Works of emulator for the CSST slitless spectroscopy. Publicated paper is Wen et al. (2024). The version of CESS used in the paper is v0.7 which is reserved in this repository. And the latest version of CESS is CESS_v0.8.5, which is available at the 'Releases'.
The Chinese Space Station Telescope (CSST) slitless spectroscopic survey will observe objects to a magnitude limit of ~ 23 mag (5σ, point sources) in U, V, and I over 17,500 square degrees. The spectroscopic observations are expected to be highly efficient and complete for mapping galaxies over 0<z<1 with secure redshift measurements at spectral resolutions of R ~ 200, providing unprecedented datasets for cosmological studies. To examine the survey potential in a quantitative manner, we develop a software tool, namely the CSST Emulator for Slitless Spectroscopy (CESS), to quickly generate simulated one-dimensional slitless spectra with limited computing resources.
The Manual of CESS is uploaded for version 0.8.5
How to display the data structure:
import h5py
file = h5py.File('CSST_grism_23514_seedcat2_0420_1204_MzLS_0csp_sfh200_bc2003_hr_stelib_chab_neb_300r_i0100_2dal8_10.hdf5','r') # the output file in hdf5 of CESS
for name in file:
print(name)
if isinstance(file[name], h5py.Group):
for subname in file[name]:
print(f" {subname}")
Detailed full structures (with morphological effects, wavelength carlibration effects and emission line detections performed):
'ID' # ids of each source in the DESI photometry catalog
'data_mask' # mask for available sources, with data_mask = 1 means available sources and data_mask = 2 means invaild sources due to some reasons
'parameters_desi' # parameters of DESI LS DR9 catalog for each source, in array,
including 'RA', 'Dec', 'z_best', 'MAG_G','MAG_R','MAG_Z',
'n','Re','PA','baratio','str_mass',
'parameters_grism' # parameters of simulated grism spectra for each source, in array,
including 'gu_rms_in_e','gv_rms_in_e','gi_rms_in_e', (root mean square of noise for each source in electrons)
'gu_snr_mean','gv_snr_mean','gi_snr_mean', (mean signal-to-noise ratio for each source)
'gu_wave_off','gv_wave_off','gi_wave_off', (wavelength calibration error)
'gv_el_flag','gi_el_flag' (0 = no el detection, 1 = only intrinsic el detection, 2 = both intrinsic and noisy el detection)
'parameters_phot' # parameters of simulated photometric data for each source, in array,
including 'mag_nuv','mag_u','mag_g','mag_r','mag_i','mag_z','mag_y',
'magerr_nuv','magerr_u','magerr_g','magerr_r','magerr_i','magerr_z','magerr_y',
'snr_nuv','snr_u','snr_g','snr_r','snr_i','snr_z','snr_y'
'GU' # hdf5 group
├── wave # wavelength grid
├── flux_elec # simulated CSST observed slitless spectra in electrons
├── flux_ujy # simulated CSST intrinsic slitless spectra in ujy
├── flux_ujy_with_noise # simulated CSST observed slitless spectra with noise in ujy
├── ferr # simulated CSST observed slitless spectra error in ujy
├── snr # signal-to-noise ratio of each spectrum
├── snr_mask # signal-to-noise ratio mask of each spectrum (true for available data points)
└── spec_mask # simulated CSST observed slitless spectra mask (true for available data points)
'GV' and 'GI' # hdf5 group
-----simulated spectrum information-----
├── wave
├── flux_elec
├── flux_ujy_with_noise
├── ferr
├── flux_ujy
├── snr
├── snr_mask
└── spec_mask
-----intrinsic spectrum emission line information-----
├── intri_el_id # ids for source detected with emission lines in intrinsic spectra, i.e., 'flux_ujy'
├── intri_el_wave # arrays of the emission line wavelengths in intrinsic spectra
├── intri_el_idx # arrays of the emission line wavelength grid corresponding index in intrinsic spectra
├── intri_el_elnumber # numbers of detected emission lines in intrinsic spectra
-----noisy spectrum emission line information-----
├── detect_el_id # ids for source detected with emission lines in noisy spectra, i.e., 'flux_ujy_with_noise'
├── detect_el_wave # arrays of the emission line wavelengths in noisy spectra
├── detect_el_idx # arrays of the emission line wavelength grid corresponding index in noisy spectra
├── detect_el_elnumber # numbers of detected emission lines in noisy spectra
└── detect_el_snr # mean snr of detected emission lines in noisy spectra
----------24/12/30 update----------
- Upload the Manual for CESS (version 0.8.5)
- Update the demo.ipynb
----------24/11/22 update----------
- Fix some bugs in the main.py, morphology.py and run.py.
- Update the run.py script (named run_gravity_zouhu.py) used in the Gravity for the following emission-line galaxies redshift measurements in Sui et al. (submitted).
- Delete version 0.8.4.
----------24/11/04 update----------
- Update the emulator version 0.8.5.
- Add switch in the running command for performing the following functions or not (default is False for all these four functions):
(1).morphlogical effect; (2).wavelength calibration effect; (3).photometric simulation; (4).emission line detection
e.g., to perform all the functions as
python run.py morph=true wave_cal=true photo=true el_detect=true
or do not perform the functionspython run.py morph=false wave_cal=false photo=false el_detect=false
- Update the main code to solve some extreme spectrum data (start from line 506 in /CESS_v0.8.5/run.py)
----------24/06/30 update----------
- Update the emulator version 0.8.4.
- Add photometric magnitude (AB mag) estimation for CSST photometry.
- Update the kernel convolution function following the
varsmooth
function inpPXF
package from https://pypi.org/project/ppxf/ by Cappellari
----------23/10/27 update----------
- Update the emulator version 0.8.
- For those sources with error data, the emulator creates a nan array now.
----------23/08/06 update----------
- Divided the files into 3 documents, the basic files used for the emulator, the main Python files of the emulator, and some of the used jupyter notebooks.
- Uploaded some jyputer notebooks that I created and used during the development of the emulator.
----------23/07/19 update----------
Main files for emulator version 0.7 are uploaded!
- main.py for the convolution for the CSST intrinsic slitless spectra, simulating observed slitless spectra and emission line detection.
- morphology.py for the 2-D parameters fitting and 2-D profile distribution function extraction.
- utils.py for some small functions.
- runtest.py for the running code file in the local environment, i.e., my MacBook.
- More details needed to be updated.
----------23/03/25 update----------
redshift range figure updated:
- using redshift data in the loop instead of creating and loading files.
- setting z = 0.5 x_label as a float while other labels are int using FuncFormatter
- hide the y-axis major label instead of setting the color as 'white'
----------21/12/02 update----------
redshift range figure updated with customized x-axis scale.
----------21/08/25 update----------
Jupyter notebook of emission lines redshift range in 3 CSST grism band.