Skip to content

Commit

Permalink
make documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hexajonal committed Dec 6, 2024
1 parent 44f5047 commit 8b6eea8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/content/fft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Bluesteins FFT

When a starshade is aligned with a star, starlight is diffracted by the starshade :math:`s(\mathbf{x})` onto a telescope aperture. For a starshade mask :math:`s(u, v)` which is zero inside the mask and unity outside, at a wavelength :math:`\lambda` and starshade-telescope distance :math:`z`, the field at the telescope aperture is :math:`f_{\lambda}(x, y)` is related to the Fourier transform of the starshade mask multipled by a highly oscillatory chirp term:
.. math::
f_{\lambda}[u, v] \propto \mathcal{F} \left( s(u, v) e^{\frac{j \pi}{\lambda z} (u^2 + v^2)} \right) \left[ \frac{x}{\lambda z} ,\frac{y}{\lambda z} \right]
Numerical diffraction calculations must use a very small numerical resolution :math:`d u` of the starshade :math:`s(u, v)` in order to accurately calculate starlight suppression. Using a standard FFT to perform these calculations is inefficient as very large zero-padding factors are needed to sample the field at the telescope aperture. The Bluestein FFT is a technique to calculate arbitrary spectral samples of a propagated field, indirectly using FFTs and therefore benefiting from their efficiency. For an :math:`N \cdot N` starshade mask, and an :math:`M \cdot M` telescope aperture, the Bluestein FFT approach achieves a complexity of :math:`O((N+M)^2 \log (M+N))`. This technique is utilized in multiple aspects of the optical train to efficiently propagate fields.
9 changes: 3 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ Developed by Jamila Taaki (MIDAS).
Installation
--------

```bash
pip install pystarshade
```pip install pystarshade
```

Usage
Expand All @@ -28,13 +27,11 @@ The simplest way to use PyStarshade is by calling the function 'source_field_to_
takes as input a 2D source-field of size (N_s, N_s) and spatial sampling ds and returns the 2D output
field incident on a CCD of size (N_pix, N_pix) and pixel size dp.

```bash
from pystarshade.simulate_field import source_field_to_ccd
```from pystarshade.simulate_field import source_field_to_ccd
source_field_to_ccd(source_field, wl, dist_xo_ss, dist_ss_t, focal_length_lens, radius_lens,
N_s = 333, N_x = 6401, N_t = 1001, N_pix = 4001,
ds = 0.3*au_to_meter, dx = 0.01, dt = 0.0116, dp=.5*1.9e-7)
```
ds = 0.3*au_to_meter, dx = 0.01, dt = 0.0116, dp=.5*1.9e-7)```

Input data
--------
Expand Down

0 comments on commit 8b6eea8

Please sign in to comment.