Skip to content

gnoir0t/ETC_grism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version 0.9.0

Example notebooks available in ETC_grism_notebooks
Please read the warning!

## WARNING: This is an early version (0.9.0) of the grism ETC, and improvement is still underway. The current version demonstrates how to use the tool but changes in the specification files or the tool itself may occur and current results should be taken with caution.

The tool has been built with python 3.9.12.
Requirements are: "numpy", "matplotlib", "astropy", "spectres", "fsps".
The tool has been successfully tested with the following versions of the required packages:
numpy 1.26.4
matplotlib 3.5.1
astropy 6.0.1
spectres 2.1.1
fsps 0.4.7
specutils 1.9.1
Installing higher, backward-compatible versions of the requirements should be fine as well.
Note that the python version of FSPS has its own requirements, particularly having a fortran compiler and downloading the FSPS project files (see https://dfm.io/python-fsps/current/installation/).

The file 'environment_0.9.0.yml' can be used to create a conda environment with the necessary requirements. To do so you can simply do:
> conda env create -f environment_0.9.0.yml -n custom_name
where 'custom_name' is the name of the conda environment you want to create to install the grism ETC tool.

Once requirements have been installed and the ETC_grism folder downloaded (or git cloned), install the grism ETC simply with:
> python setup.py install
or:
> pip install .
or (edit mode):
> pip install -e .

/!\ Before installing the ETC, modify the 'ETC_GRISM_HOME' variable located in 'utils.py'. It should be the absolute path to the 'ETC_grism_dev' folder on your machine.


--
Working version of the ETC available on google colab:
	- With all dependencies including fsps: https://colab.research.google.com/drive/1FthdKL6SyssaCnQOp2AdbFmaHSLGwlwc?usp=sharing
	- And without fsps: https://colab.research.google.com/drive/1MDiHeFz-h_kbxTp-dV6ZhsewvaR6vk8P?usp=sharing

	- v0.4.0 (S2D conference tutorial): https://colab.research.google.com/drive/1zEeN1pBjpDJzgcvNVLGY04KBR04Ezayq?usp=sharing

	- v0.5.0 notebook showing full scene observation capabilities: https://github.com/gnoir0t/ETC_grism/tree/main/ETC_grism_notebooks/grism_etc_example_scene.ipynb

	- v0.6.0 notebook: https://github.com/gnoir0t/ETC_grism/tree/main/ETC_grism_notebooks/grism_etc_example_scene_SNR.ipynb

	- v0.7.0 notebook: https://github.com/gnoir0t/ETC_grism/tree/main/ETC_grism_notebooks/grism_etc_large_sources.ipynb

	- Tutorial (CASTOR Meeting - Nov 2024): https://drive.google.com/file/d/1ButPVGGuVIJXfMlh8JA620keDUkDjdfV/view?usp=sharing

--
Change log:

2026-04-17:
v0.9.0
Updated UV PSF profile and made new u-band PSF profile based on the imaging PSFs to smear spectra in the spatial direction during dispersion.
Fixed some bugs in the fit_z_range and fit_at_z functions. Added option to normalize the input template to a target magnitude in fit_z_range during forward-modelling which allows to resample the template to constant 1 angstrom grid and apply the LSF in wavelength space rather than pixel space.

2026-03-24:
v0.8.0
Added a dispersion-direction smearing of the input spectrum with a Gaussian-kernel Line Spread Function of FWHM 6.5A (~2pixels). The LSF is applied after resampling to the pixel grid if the input spectrum sampling doesn't match the kernel sampling (1A sampling). Added a function to create (unconvolved) point sources (ie, single illuminated pixel for point sources, since PSF convolution happens during dispersion). Added a function in fitting module to fit a template at a specific redshift instead of a redshift range (fit_at_z), and updated some constants.

2023-10-11:
v0.7.0
Added capability to use arbitrary large sources when dispersing a single source, a full scene, or a scene with multiple dimensions.

2023-10-10:
v0.6.0
Added functions to generate SNR maps of associated full grism scene observations (with or without overlapping sources in the direct image).

2023-06-01:
v0.5.0
Added function to create full grism scene observations (noiseless) with overlapping sources in the direct image.

2023-05-17:
v0.4.0
Added function to create full grism scene observations (noiseless).

2023-05-16:
v0.3.0
Added fitting module.

2023-01-16:
v0.0.2
Added geocoronal lines to the sky background. Three spectra with different line intensities are provided in the 'sky_background' folder. The user can choose between geo_intensity='high', 'avg', and 'low' when calling the recompute_sky_background() function (default is 'avg').
Note: 'zodi.fits', 'earthshine.fits' and 'geo_*.fits' spectra are in units of ergs/cm2/s/A/arcsec2.

2022-09-30:
Input spectra can now be defined over shorter wavelength ranges than the filter transmission curves, values of 0 will simply be assumed outside the wavelength ranges.

About

CASTOR grism ETC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages