Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.095 X-Spam-Evidence: '*H*': 0.81; '*S*': 0.01; 'mathematics': 0.05; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'numpy': 0.16; 'words.': 0.16; 'wrote:': 0.18; 'code.': 0.18; "python's": 0.19; 'appears': 0.22; "shouldn't": 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'guess': 0.33; 'offered': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'behind': 0.37; 'too': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; "you're": 0.61; 'first': 0.61; 'confirm': 0.64; 'total': 0.65; 'surprise': 0.74; 'expressive': 0.84; 'maths': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=Q+0j7U2rA6jNFh7O2yokKgcCRuLW9+hmPQdoDVr5iPs=; b=KBuCwuB/2VIa0iQvkgcSCspMiSB3qi4dMIO/HgpLR5ofDNc1lp5Z6FQOE45GQ0B7Fr /d51zDrYiNfGnrfFA4kPj9Ezml4nVXBB/+VHRaEW8Kgx4v/lYlz2qHeaUb3/0ZlaVrur Jdw8sbPR49aDp202dbBdHNkSSLS7uObjAsOVlnUISmsF6WbpV1sMI9+cfRWrlF2fFOlC qvHnVeaMU7C6Wvs9au4OAuR0LaXajw5u1qtD16uQubLiAOcPdhJ7tkO9CtdnAymfq66H BaBEFR5hG9RDmWvA9+iB2WLOlQVvHkX/bO6iaPV5Ibs7qAOvuKrCOaAKrD2SZUQxzNZW RJ9A== MIME-Version: 1.0 X-Received: by 10.52.155.133 with SMTP id vw5mr7473209vdb.43.1368977693514; Sun, 19 May 2013 08:34:53 -0700 (PDT) In-Reply-To: References: Date: Mon, 20 May 2013 01:34:53 +1000 Subject: Re: Harmonic distortion of a input signal From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368977695 news.xs4all.nl 15996 [2001:888:2000:d::a6]:53238 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45562 On Sun, May 19, 2013 at 8:52 PM, Anti Log wrote: > total distortion of a harmonics I selected this part of your post, right-clicked, and Chrome offered to do a Google search for those words. And, surprise surprise, the first hit is a page that appears to have the mathematics behind it. Now, I don't know how much you trust Google and Wikipedia, but I'm sure you can confirm the maths in some other way. My guess is that there's no function in numpy to do what you're asking... but it shouldn't be too hard to render the formula/e given into Python code. Python's pretty expressive when it comes to algebra. :) ChrisA