Skip to content

anand0xff/ami_sim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ami_sim

PSF simulation for JWST NIRISS Aperture Masking Interferometry

This is as-is software. STScI does not maintain this software. See the 2023 PASP paper The Near Infrared Imager and Slitless Spectrograph for the James Webb Space Telescope. IV. Aperture Masking Interferometry for more detail on ami_sim and mirage. Mirage (at this time) is the primary STScI-maintained JWST data simulation software.


Get the source files for the AMI data simulation programs, e.g.:

git clone https://github.com/anand0xff/ami_sim

cd ami_sim/

It requires WebbPSF and pysynphot python modules and supporting data files.

driver_scene.py

This driver script creates simulated data of sky.fits using psf.fits, e.g.:

python driver_scene.py -t simulatedData/ -o 0 -utr 0 -f F430M
-p [absolute path to psf file]/psf.fits
-s [absolute path to psf file]/sky.fits
-os 11 -I 10 -G 2 [-c 0] -cr 2.1e6 -v 1
--random_seed 42

For a full list of optional arguments, including those to control detector noise, enter:

python driver_scene.py --help

You need to create a directory (eg simulatedData in the above example) for the saved files. You also need to point to:

- Absolute path to the sky scene (eg sky.fits, normalized on-the-fly to cr in photons/s on 25m^2 in filter bandpass)
- Absolute path to the PSF file (eg psf.fits) (PSF.sum = NRM area / full aperture area)

The output "data cube"" files will be named using your input filename, i.e. - t_sky__psf.fits for the target - c_sky__psf.fits for the calibrator (-c flag omitted, or -c 1)

** Only oversampling of 11 is tested so far - use the flag "-os 11" **

NOTES: sky.fits must be square, and an odd number (<80) of 65 mas detector pixels on a side Generate your sky.fits using an odd oversampling (eg 11) sky.fits in units of detected e-/s using 25m^2 collecting area through the filter Create a PSF file (eg using WebbPSF) with the shape and pixel scale of sky.fits To generate a calibrator star data place the total of your sky.fits into a single oversampled pixel in the same-sized cal.fits input file. The user chooses NINT and NGROUP. The JWST ETC can estimate operational values, or choose your own. NGROUP+1 is the number of detector readouts up the ramp NINT is the number of full ramps

The following two commands simulate a binary companion without a disk (user-created sky scene) and a binary companion with a disk (also user-created sky scene sky scene). Both simulations generate a calibrator observation also ("c_*.fits"). For the -cr (--countrate) parameter, use the "CRclearp"" number that ami_etc.py gives you for a given point source target magnitude and filter.

> python driver_scene.py -t simDataLkCa15/bin/ -o 0 -utr 0 -f F430M \
      -p PSF_5x_MASK_NRM_F430M_opd162_3_A0V.fits -s binary_cr0.01_pa0.0.fits \
      -O 5 -I 3 -G 30 -utr 0 -c 1 -cr 3e6

> python driver_scene.py -t simDataLkCa15/bnd/ -o 0 -utr 0 -f F430M \
      -p PSF_5x_MASK_NRM_F430M_opd162_3_A0V.fits -s binaryanddisk_cr0.01_pa0.0.fits \
      -O 5 -I 3 -G 30 -utr 0 -c 1 -cr 3e6

Maintainers: Deepashri Thatte, Anand Sivaramakrishnan, Johannes Sahlmann, Alexandra Greenbaum, Rachel Cooper

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%