Pyastronomy Documentation Release 0.17.0Beta
Total Page:16
File Type:pdf, Size:1020Kb
PyAstronomy Documentation Release 0.17.0beta PyA group Sep 04, 2021 Contents 1 About PyAstronomy 3 2 PyAstronomy’s sub-packages 15 3 Spotlights 359 4 PyAstronomy core 361 5 Indices and tables 379 Bibliography 381 Python Module Index 383 Index 385 i ii PyAstronomy Documentation, Release 0.17.0beta PyAstronomy (PyA) is a collection of astronomy related packages hosted on github. Contents 1 PyAstronomy Documentation, Release 0.17.0beta 2 Contents CHAPTER 1 About PyAstronomy 1.1 What is it? PyAstronomy (PyA) is a collection of astronomy related packages. The aim of PyAstronomy is to provide a collection of packages, which fulfill a certain standard both in code and documentation quality. In this way, we (the PyA group) want to ensure that PyA packages constitute an enjoyable tool for enhancing the efficiency of our/your work and not another source of painful experiences. PyA emerged from the work of some people at the Hamburger Sternwarte. It has not been designed to cover some particular field, but we integrated tools, which we found useful during our work. Other people have different needs and also ours are evolving. Therefore, we expect PyA to grow both by our own contributions and, hopefully, contributions from others. 1.2 Installation and source code of PyAstronomy PyAstronomy is available from the Python Package Index (PyPI) using pip. Sources, bug tracking, and opportunities for contributions are available on github. 1.2.1 Installation with PyPI and pip PyAstronomy can be installed via pip Note: Depending on the setup of your Python installation, you may need administrator (root) privileges to install a package. pip install PyAstronomy or (if non-Python dependencies are required) 3 PyAstronomy Documentation, Release 0.17.0beta pip install PyAstronomy[occult] 1.2.2 Installation from github via pip The current development branch can be installed from github via pip install git+https://github.com/sczesla/PyAstronomy.git#egg=PyAstronomy[occult] 1.2.3 Installing from source code PyAstronomy can be installed from the source. Source distributions can be obtained from github. Save it to whatever place you prefer on your system, extract the files, and change into the thus created directory; on linux use, e.g.,: tar xfv PyAstronomy.tar.gz cd PyAstronomy Note: The package and directory name usually contain a version number. In the directory created by unpacking the tar-ball, you find a script called setup.py. This script will do the work of installing the package for you. Execute it by typing: python setup.py [--with-ext] install Note: –with-ext is an optional flag. If specified, the installer will try to build non-Python extension. Building the extensions requires a fortran compiler. Note: Depending on the setup of your Python installation, you may need administrator (root) privileges to install a package. The default path for installing packages is the site-packages directory of your Python installation. You can modify this target location by using “python setup.py install –home=XYZ”, where XYZ is your preferred installation path. Note that this path has to be added to your PYTHONPATH environment variable if XYZ is a nonstandard path. 1.2.4 Building the documentation PyAstronomy is distributed including documentation. The latest documentation is available via readthedocs. To build the documentation yourself, change into the directory where you installed (or unpacked) PyA. Change into the subdirectory named doc (may not be the first level). In this directory, you find a Makefile, which is responsible for building the documentation. Note: To build the documentation you need to have installed the Sphinx package. In addition, PyAstronomy must be installed. The HTML documentation is built by using: make html 4 Chapter 1. About PyAstronomy PyAstronomy Documentation, Release 0.17.0beta 1.3 Members of the PyA group PyAstronomy is a collaborative effort started by SC and SS during a (really!) bad-weather observing run high-up on island X. • Stefan Czesla (SC) • Sebastian Schröter (SS) Valuable and highly appreciated contributions to the project have meanwhile been provided by the following au- thors: • Christian P. Schneider • Klaus F. Huber • Fabian Pfeifer • Daniel Thaagaard Andreasen • Mathias Zechmeister (GLS) 1.4 PyAstronomy licensing (MIT) PyAstronomy and all its submodules, if not explicitly stated otherwise, are distributed under the MIT license: Copyright (c) 2011, PyA group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, ,!merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit ,!persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A ,!PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ,!LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 1.5 What is new? (Change log) The change log keeps you informed about newly introduced or changed features and behavior of PyAstronomy. New version will, of course, contain bug fixes for bugs we became aware of. Most likely, we will also have introduced new, better bugs to keep things interesting. 1.3. Members of the PyA group 5 PyAstronomy Documentation, Release 0.17.0beta 1.5.1 From 0.12.0 to 0.13.0 Concerns What happened 1.5.2 From 0.11.0 to 0.12.0 Concerns What happened pyasl New functionality • Added Beta Sigma noise estimate 1.5.3 From 0.10.0 to 0.11.0 Concerns What happened pyasl New functionality • De Jager 1987 spectral types • MMSCETS table pyTiming Update • New GLS implementation from MZ 1.5.4 From 0.9.0 to 0.10.0 Concerns What happened PyAstronomy Python 3.x compatibility pyasl New functionality • slidingPolyResOutlier • New output/input options for daycnv • ‘nanHandling’ for binningx0dt • ExoplanetEU2 for more convenient ac- cess to exoplanet.eu data • Photometric passbands funcFit Improved functionality • Sorting in parameterSummary pyaC New functionality • Find zero crossings in discrete data 6 Chapter 1. About PyAstronomy PyAstronomy Documentation, Release 0.17.0beta 1.5.5 From 0.8.1 (or 0.8.0) to 0.9.0 Concerns What happened pyaC New functionality • mtools package • trapz integration with interpolated boundaries pyasl New functionality • Abundance patterns modelSuite Update • Maintenance of transit models • Full support of keplerian orbits funcFit New functionality • emcee sampling 1.5.6 From 0.7.0 to 0.8.0 1.5. What is new? (Change log) 7 PyAstronomy Documentation, Release 0.17.0beta Concerns What happened pyasl New functionality • S-index into RHK conversion • Convolution with Gaussian (broadGaussFast) • Conversion between atomic number and elemental symbol • First ionization energies • Conversion between decimal and sexa- gesimal coordinates • Outlier detection based on polynomial • write1dFitsSpec • Exponentially correlated Gaussian ran- dom numbers • Conversion from decimal year to gre- gorian date • Teff-color conversion • Stellar age Update • Updated air-vacuum wavelength con- version funcFit New functionality • Model description pyaGui New functionality • Interactive normalization • Interactive Gauss/Voigt fit 1.5.7 From 0.6.0 to 0.7.0 8 Chapter 1. About PyAstronomy PyAstronomy Documentation, Release 0.17.0beta Concerns What happened pyaC New functionality • Formatted output of 2d matrices • Numerical derivatives (diffCFD) pyasl New functionality • Cross-correlation algorithm (crosscor- rRV) • Finding extreme point by parabolic fit (quadExtreme) • Calculate decimal year (decimalYear) • Gaussian instrumental broadening (in- strBroadGaussFast) • Reading spectrum from fits file • Distance module to distance conversion • Position angle funcFit New functionality • Various bug fixes. • Introduced external fitters • Multicomponent two-dimensional Gaussian • Conditional restrictions modelSuite New functionality • Rotational broadening profile 1.5.8 From 0.5.0 to 0.6.0 1.5. What is new? (Change log) 9 PyAstronomy Documentation, Release 0.17.0beta Concerns What happened funcFit New functionality • GUI tool for model exploration • Tutorial on TraceAnalysis modelSuite New functionality • Hydrogen Lyman-alpha line profile pyasl New routines • Signal to Noise Ratio (SNR) estimator • Outlier detection • INTEP interpolation algorithm • Magnitude conversion • Access to Baraffe et al. 98 evolutionary tracks • Ported IDL Astrolib routines (sunpos, nutate, co_nutate, co_aberration, ct2lst, hadec2altaz, co_refract_forward, co_refract, eq2hor, observatory) • Access to NASA Exoplanet Archive • Access to exoplanet.eu data base • Azimuth to cardinal point conversion • Name twilight given solar altitude • Calculate angular distance • Calculate airmass • Transit time table • Transit visibility plot pyaC New functionality • Invert index selection 1.5.9 From 0.4.0 to 0.5.0 10 Chapter 1. About PyAstronomy PyAstronomy Documentation, Release 0.17.0beta Concerns What happened funcFit New functionality • Now supports n-dimensional (nD) fit- ting • Tutorial for nD fitting added