Developed by Jamila Taaki (MIDAS fellow).
PyStarshade is a Python library for Starshade (or any external occulter) simulations from star-planet system to CCD with Fresnel diffraction methods. This library efficiently calculates output fields using Bluestein FFTs.
What is a starshade? A starshade is a particular apodization (mask), which flown at Fresnel distances from a telescope achieves star-light suppression for imaging exoplanets in orbit around the star.
When a starshade is aligned with a star, starlight is diffracted by the starshade
Simulated imaging of a synthetic exoscene (ExoVista) with three visible exoplanets at a wavelength of 500 nm. A 60 m starshade configuration and a 6m segmented pupil was used for this example.
You can install PyStarshade using pip:
pip install pystarshade
To use pre-computed data, use git lfs:
$ git clone https://github.com/xiaziyna/PyStarshade.git PyStarshade
$ cd PyStarshade
$ git lfs pull
Scipy, Numpy,
Optional: HCIPy, astropy
Detailed documentation for all PyStarshade utilities.
PyStarshade can take as input any pixelized source-field such as Haystacks model, or analytic descriptions of sources (so far a point source and Gaussian source). If you wish to perform propagation using analytic descriptions, please use 'pystarshade.simulate_field.point_source_to_ccd'.
The easiest way to interface with PyStarshade is via the StarshadeProp class. Generate fields/psf models for a chosen design reference mission (drm). Simulate imaging for a 'source_field' with a default 2 mas sampling.
from pystarshade.propagator import StarshadeProp
drm = 'hwo'
hwo_starshade = StarshadeProp(drm = drm)
hwo_starshade.gen_pupil_field()
pupil_type = 'hex'
hwo_starshade.gen_psf_basis(pupil_type = pupil_type)
focal_intensity = hwo_starshade.gen_scene(pupil_type, source_field.astype(np.float32), 500e-9)
See examples folder for different simulation examples.
[PyStarshade] is released under the GNU General Public License v3.0.