[SciPy-Dev] Including Lomb-Scargle code in scipy.signal (sub)module

Warren Weckesser warren.weckesser at enthought.com
Wed Feb 9 17:37:57 EST 2011


On Wed, Feb 9, 2011 at 8:01 AM, Pim Schellart <P.Schellart at astro.ru.nl>wrote:

> Dear SciPy developers,
>
> I have recently submitted code to calculate the Lomb-Scargle periodogram
> (see ticket http://projects.scipy.org/scipy/ticket/1352 for more
> information).
> After some iterations of review, recoding, adding documentation and adding
> unit tests the code (according to Ralf Gommers) is ready to go in.
> Ralf has nicely integrated the code into SciPy trunk in his git branch (
> https://github.com/rgommers/scipy/tree/lomb-scargle) and you may pull from
> there.
> Now the time has come to discuss where to put it and Ralf has suggested to
> have this discussion here:
>
> "I've played with your code a bit, changed a few things, and added it to
> scipy.signal in a github branch:
> https://github.com/rgommers/scipy/tree/lomb-scargle. I think it looks
> good, whether it really should go into signal should be discussed on the
> mailing list (but seemed like the logical place for it).
>
> ...
>
> The best name for the module I could think of was spectral_analysis, maybe
> there's a better one? It allows to add similar methods later.
> "
>
> I would like to suggest the module name "lssa" for "Least-squares spectral
> analysis". So the full path would be scipy.signal.lssa. This has several
> advantages.
> 1. It is a short name without underscores (personal preference)
> 2. It is a category name that can comprise several similar algorithms as
> desired.
> 3. It is immediately obvious from this name that this is different than FFT
> and therefore people will not be confused looking for FFT functions in this
> sub-module.
> 4. The name corresponds to the Wikipedia entry for this category of
> algorithms :) (but on a serious note this may help for people that want to
> find more information, or for people browsing wikipedia that are looking for
> an implementation).
>
> Please let me know what you think.
>


As in many scipy subpackages, users will access this function as
scipy.signal.lombscargle  (because __init__.py in scipy.signal
imports the function from the submodule and makes it available
in  __all__).  I don't know if there is an official policy, but
this seems to be the preferred packaging style in many scipy
packages.  So the name of the submodule doesn't really matter
that much.  I would just call the submodule lombscargle also.

Warren



>
> Kind regards,
>
> Pim Schellart
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20110209/6cfd6dba/attachment.html>


More information about the SciPy-Dev mailing list