Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyISH: Python Integral Field Spectrograph for the Habitable Worlds Observatory (PyISH)

PyISH takes in user inputs, and produces high-fidelity data products as seen by an ultraviolet Integral Field Spectrograph.

PyISH

Key Features

PyISH will take in high resolution maps of your source, whether a solar system object, star, galaxy, etc, and return high fidelity data products, as seen by a potential UV IFS on HWO!

For a full description, see the linked arXiv paper describing the simulation and walking through an example!

For a full description in less words (no judgement for not wanting to read), see my most recent poster on PyISH at AAS 247 here!

List of Contributors

  1. Grace Sweetak
  2. Breann Sitarski
  3. Kevin France
  4. Randall McEntaffer
  5. Richard Cartwright

What's Included in this Repo

simulationfunctions.py: This is the main code of PyISH, containing every function or "module" of the simulation. Small descriptions of each module are commented in-line, while a full description can be found in the arXiv paper linked above.

congrid.py: Function incorporated in simulationfunctions.py to resamples arrays

generate_PSF.py: Function incorporated in simulationfunctions.py to generate HWO psfs based on the desired EAC

InputInformationIFU.xlsx: Excel spreadsheet the user (you!) fills out with desired UV IFS specifications (FOV, bandpass, detector size, etc). I have left my example simulation specs in there, so delete and replace with your own.

inputdataIFUSim.xlsx: Additional excel spreadsheet that the user (again, you!) fills out with input data specifications. It is currently input with my example simulated data, so delete and replace with your own.

MCP_QE.yaml, XeLiF_refl.yaml, and echelle_grating_efficiency.yaml: these 3 .yaml files are pulled from THIS Github, and represent the current reflectivities/efficiencies of UV IFS optical components considered for HWO.

EAC1.yaml, EAC2_draft.yaml, and EAC3_draft.yaml: .yaml files pulled from the same repo as above, representing the eac configurations. For more information on EAC's, please see this attached paper.

europaspectrumRscaled.txt: nm vs. rayleigh spectrum of Europa from Roth et al 2014.. This is for my example detailed in the linked PyISH paper above. Your own simulation should input a .txt file with the exact format as this one

europa_blue.fits, europa_green.fits, and europa_red.fits: These are my input spatial maps of Europa's identified emission lines, 121.6 nm, 130.4 nm, and 135.6 nm, respectively. You can use these to check if PyISH is running correctly by trying my simulation.

EuropaDiskModelHRIrefframe.fits: My input surface reflectance (continuum) spatial map of Europa, used in the example simulation.

Installation

Hit the green button at the top to download the .zip, or git clone https://github.com/gracesweetak/PyISH

Check if it's working: run my example!

Included in this repo is all the data needed to run my example, detailed in the arXiv link above! After downloading, run simulationfunctions.py!

You will be prompted with 2 additional inputs early on, specifying if you want to use detector space optimally, and how you want to generate the psf.

Note: Generating the psf at every wavelength step is time consuming. Mentally prepare with some activities to keep you occupied.

To Run Your Own Simulation

1. Fill out the downloaded excel files, InputDataIFUSim and InputInformationIFU with these values below:

Input Information IFU:

detector_size1: One dimension of your desired detector, in mm

detector_size2: One dimension of your desired detector, in mm

R: Spectral Resolving Power

Bandpass: Desired Bandpass, in nanometers

FOV: Desired Field of View, in arcseconds

Pixel_Scale: Desired pixel scale, in milli-arcseconds/pixel

pixelpitch: Desired pixel pitch, in microns/pixel

Inscribed_diameter: Inscribed diameter of primary mirror, in meters (HWO ranges between 6 - 8 m)

ExpTime: Desired exposure time for HWO observation of your source, in seconds

bandpass_start: the low-end of your bandpass, in nm

dark rate: Dark rate of your detector, in cts/cm2/s (current UV detectors from solar system instruments ~ 4.4)

reflections: reflections in your IFS design (telescope + instrument)

lambda: wavelength that R is centered on, in nm

path to eacl yamls: where the downloaded yamls are stored in your directory

EAC: desired EAC to simulate (this determines PSF)

Input Data IFU Sim:

Ion: list of emission line names you plan to include in your simulation (one row per emission line)

Wavelength (nm): wavelengths of each emission line, in nm

path to model spectral map: the full path in your directory to the spatial map that represents that emission line, as a .fits file

path_to_spectrum: the full path in your directory to the .txt file representing your spectrum. Columns are wavelength, flux (flux is in units of Rayleighs)

path to continuum map: the full path in your directory to the spatial map that represents the continuum (such as a surface reflectance model), as a .fits file

arcsecspectra: the height of your input .fits science files, in units of arcseconds (PyISH assumes square inputs)

path to grating yaml: the full path in your directory to the .yaml file representing the grating efficiencies

path to QE yaml: the full path in your directory to the .yaml file representing the quantum efficiencies

path to coating yaml: the full path in your directory to the .yaml file representing the coating reflectivity

2. Run the file, simulationfunctions.py!

It's that easy! You will be prompted with 2 additional inputs early on, specifying if you want to use detector space optimally, and how you want to generate the psf.

Note: Generating the psf at every wavelength step is time consuming. Mentally prepare with some activities to keep you occupied.

3. Outputs

There are 3 fits files downloaded to your computer, with an additional terminal prompt for a 4th data product.

  1. 3dcube_HWOsim.fits: High - fidelity 3D cube of your astrophysical source. This is pre-processed.

  2. stitcheddetector.fits: 2D .fits file of the IFS detector, filled with spectra from your astrophysical source

  3. detectorsections.fits: same information as 2., but in a 3D format where the z-axis steps through each section of the detector (1 section = 1 spectrum from an IFS slice)

Important Update

The user input transformation module has been updated via a seperate web-interface, found here. The input transform module allows users to trade science specifications (fov, bandpass, etc) for instrument specifications (detector size, pixel scale, etc).

Original User Input Transformation

The original input transform, included in verison 1.0 of PyISH, fixes the number of IFS slices, detector size, and resolution, allowing the bandpass, fov, and pixel scale of the x-axis (determined by FOV/IFS slices) to increase. This is valid, but in cases where users are not familiar with the instrumentation, could lead to unphysical quantities.

Updated User Input Transformation (June 2026)

The updated input transformation module, now on the linked website, will fix the pixel scale, resolution and detector size, allowing the bandpass, fov, and number of IFS slices to increase. The website also provides additional checks to ensure the user knows if the insturment specifications are feasible given the current technology.

How this effects you

If you prefer the updated user input tranformation module, use the website to get your desired specifications, then input those specification on the excel spreadsheets. When running PyISH and given the choice to "use the full detector space avaliable", choose no. This will produce the same results as the website!

About

PyISH: Python Integral Field Spectrograph Simulation for the Habitable Worlds Observatory. PyISH takes in user inputs, and produces high-fidelity data products as seen by an ultraviolet Integral Field Spectrograph.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages