Package: astroML_addons
This package contains addon code for the astroML package, available athttp://github.com/astroML/astroML.AstroML is a Python module for machine learning and data mining
built on numpy, scipy, scikit-learn, and matplotlib,
and distributed under the 3-Clause BSD license.
It contains a growing library of statistical and machine learning
routines for analyzing astronomical data in python, loaders for several open
astronomical datasets, and a large suite of examples of analyzing and
visualizing astronomical datasets.This project was started in 2012 by Jake VanderPlas to accompany the bookStatistics, Data Mining, and Machine Learning in Astronomyby
Zeljko Ivezic, Andrew Connolly, Jacob VanderPlas, and Alex Gray.Core and AddonsThe project is split into two components.  The coreastroMLlibrary is
written in python only, and is designed to be very easy to install for
any users, even those who don’t have a working C or fortran compiler.
A companion library,astroML_addons, can be optionally installed for
increased performance on certain algorithms.  Every algorithm
inastroML_addonshas a pure python counterpart in the
coreastroMLimplementation, but theastroML_addonslibrary
contains faster and more efficient implementations in compiled code.
Furthermore, ifastroML_addonsis installed on your system, the coreastroMLlibrary will import and use the faster routines by default.The reason for this split is the ease of use for newcomers to Python.  If the
prerequisites are already installed on your system, the coreastroMLlibrary can be installed and used on any system with little trouble.  TheastroML_addonslibrary requires a C compiler, but is also designed to be
easy to install for more advanced users.  See further discussion in
“Development”, below.Important LinksHTML documentation:http://astroML.github.comSource-code repository:http://github.com/astroML/astroMLIssue Tracker:http://github.com/astroML/astroML/issuesMailing List:https://groups.google.com/forum/#!forum/astroml-generalInstallationThis package uses distutils, which is the default way of installing python
modules.Before installation, make sure your system meets the prerequisites
listed in Dependencies, listed below.CoreTo install the coreastroMLpackage in your home directory, use:pip install astroMLThe core package is pure python, so installation should be straightforward
on most systems.  To install from source, refer tohttp://github.com/astroML/AddonsTheastroML_addonspackage requires a working C/C++ compiler for
installation.  It can be installed using:pip install astroML_addonsTo install from source, use:python setup_addons.py installYou can specify an arbitrary directory for installation using:python setup.py install --prefix='/some/path'To install system-wide on Linux/Unix systems:python setup.py build
sudo python setup.py installDependenciesThere are three levels of dependencies in astroML.Coredependencies are
required for the coreastroMLpackage.Add-ondependencies are required
for the performanceastroML_addons.Optionaldependencies are required
to run some (but not all) of the example scripts.  Individual example scripts
will list their optional dependencies at the top of the file.Core DependenciesThe coreastroMLpackage requires the following:Pythonversion 2.6.x - 2.7.x
(astroML does not yet support python 3.x)Numpy>= 1.4Scipy>= 0.7Scikit-learn>= 0.10Matplotlib>= 0.99PyFITS>= 3.0.
PyFITS is a python reader for Flexible Image Transport
System (FITS) files, based on cfitsio.  Several of the dataset loaders
require pyfits.This configuration matches the Ubuntu 10.04 LTS release from April 2010,
with the addition of scikit-learn.To run unit tests, you will also need nose >= 0.10Add-on DependenciesThe fast code inastroML_addonsrequires a working C/C++ compiler.Optional DependenciesSeveral of the example scripts require specialized or upgraded packages.
These requirements are listed at the top of the particular scriptsScipyversion 0.11 added a sparse graph submodule.
The minimum spanning tree example requires scipy >= 0.11PyMCprovides a nice interface for Markov-Chain Monte Carlo. Several astroML
examples use pyMC for exploration of high-dimensional spaces. The examples
were written with pymc version 2.2HEALPyprovides an interface to
the HEALPix pixelization scheme, as well as fast spherical harmonic
transforms.DevelopmentThis package is designed to be a repository for well-written astronomy code,
and submissions of new routines are encouraged.  After installing the
version-control systemGit, you can check out
the latest sources fromGitHubusing:git clone git://github.com/astroML/astroML.gitor if you have write privileges:git clone git@github.com:astroML/astroML.gitContributionWe strongly encourage contributions of useful astronomy-related code:
forastroMLto be a relevant tool for the python/astronomy community,
it will need to grow with the field of research.  There are a few
guidelines for contribution:GeneralAny contribution should be done through the github pull request system (for
more information, see thehelp pageCode submitted toastroMLshould conform to a BSD-style license,
and follow thePEP8 style guide.Documentation and ExamplesAll submitted code should be documented following theNumpy Documentation Guide.  This is a unified documentation style used
by many packages in the scipy universe.In addition, it is highly recommended to create example scripts that show the
usefulness of the method on an astronomical dataset (preferably making use
of the loaders inastroML.datasets).  These example scripts are in theexamplessubdirectory of the main source repository.Add-on codeWe made the decision early-on to separate the core routines from
high-performance compiled routines.
This is to make sure that installation of the core
package is as straightforward as possible (i.e. not requiring a C compiler).Contributions of efficient compiled code toastroML_addonsis encouraged:
the availability of efficient implementations of common algorithms in python
is one of the strongest features of the python universe.  The preferred
method of wrapping compiled libraries is to usecython; other options (weave, SWIG, etc.) are
harder to build and maintain.Currently, the policy is that any efficient algorithm included inastroML_addonsshould have a duplicate python-only implementation inastroML, with code that selects the faster routine if it’s available.
(For an example of how this works, see the definition of thelomb_scarglefunction inastroML/periodogram.py).
This policy exists for two reasons:it allows novice users to have all the functionality ofastroMLwithout
requiring the headache of complicated installation steps.it serves a didactic purpose: python-only implementations are often easier
to read and understand than equivalent implementations in C or cython.it enforces the good coding practice of avoiding premature optimization.
First make sure the code works (i.e. write it in simple python).  Then
create an optimized version in the addons.If this policy proves especially burdensome in the future, it may be revisited.AuthorsPackage AuthorJake Vanderplas <vanderplas@astro.washington.edu>http://jakevdp.github.comCode ContributionMorgan Fouesneauhttps://github.com/mfouesneauJulian Taylorhttp://github.com/juliantaylor