flatstar

Draw limb-darkened stars!


Keywords
astronomy, astrophysics, stars, limb-darkening, planetary-transits
License
MIT
Install
pip install flatstar==0.2.1a0

Documentation

flatstar

flatstar is a pure-Python tool for drawing stellar disks with scientifically-rigorous limb darkening. Each pixel has an accurate fractional intensity in relation to the total stellar intensity of 1.0. It is ideal for ray-tracing simulations of stars and planetary transits.

Build Status Coverage Status Documentation Status

flatstar

Features

  • Blazing fast! There are no for-loops involved, only numpy arrays manipulation and pillow Image objects.
  • It has the most well-known limb-darkening laws: linear, quadratic, square-root, logarithmic, exponential, Sing et al. (2009), Claret et al. (2000).
  • You can implement your own custom limb-darkening law.
  • Supersampling for the situations where you need coarse arrays but do not want to lose precision in stellar disk intensity (i.e., no hard pixel boundaries).
  • Upscaling for the situations where you want to save on computation time but need high-resolution intensity maps (the price to pay here is that there is some precision loss in intensities).
  • Resampling is done with the C-libraries of pillow, which means they are as fast as it goes.
  • You can add planetary transits with pixel-perfect settings for impact parameter and first/fourth contacts.

Installation

You can install flatstar either with pip or by compiling from source. Coming soon: you will also be able to install it using conda-forge. Any of these methods will also install the dependencies numpy and pillow if they are not yet installed.

Using pip (more stable version)

Simply run the following line in your terminal and you are good to go:

pip install flatstar

Compile from source (development version)

First clone this repository and navigate to it:

git clone https://github.com/ladsantos/flatstar.git && cd flatstar

And now install it:

python setup.py install