Skip to content

Code for the creation of MaNGA-like IFU datacube for simulated galaxies

Notifications You must be signed in to change notification settings

SEDMORPH/YZCube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

### These are codes for the creation of MaNGA-like IFU datacube for simulated galaxies.
If you would like to use any of this repository, please cite our paper: https://doi.org/10.1093/mnras/staa2358
=====================================
Yirui Zheng. April-2020

The code is run from sedm2_run.pro
Keywords need to be set for the code to do anything

/CENTERSLIST = compute and store the centers of the two halos for all snapshots. This needs to be done before creating RSS, which use the centers to point the mock IFU. If mock galaxies contains black holes, use the BH position as the galaxy center. Ohterwise, use histogram to find the distribution of halo particles, and use the peak position as the galaxy center.

/spec_star_age = create total optical spectra for simulated galaxies withing the algorithm described in Y.Zheng+2020

/cell_spectra = create optical spectra for a region of simulated galaxies withing the algorithm described in Y.Zheng+2020. Necesary for mock datacube creation. (See below)

/pca = run Principle Component Analysis. You can use it to indentify PSBs, see V.Wild+2007. Another version with more details can be found on https://github.com/SEDMORPH/VWPCA.



### HOW TO CREATE A DATACUBE 

# Prepartion
1. edit sedm2_directories, sedm2_codeunits.inc , specify the path and download the related data.
2. download the download a MaNGA harness metrology file and put it under the same folder:https://svn.sdss.org/public/repo/manga/mangacore/tags/v1_6_2/metrology/ma134/ma134-56995-1.par
3. for the SSP models, I suggest to convert them from unformatted fortran files into fits file. Do metallicity interpolation if necessary. For the conversion and interpolation codes, email Yirui Zheng(yz69@st-andrews.ac.uk). If you insist to used the raw fortran format, please edit sedm2_getssp.pro to use them.
4. edit sedm2_codeunits.inc, especially the metallicity models(Z_models)

# STEPS
How to run the code, see a worked example in create_datacube.sh
You only need to run step 1 for once for one simulation 
You only need to run step 2&3 for once if you do not change the redshift
1. compute and store the centers of the two halos for all snapshots
2. get fiber location at the redshift
3. get PSF weight at the redshift
4. create RSS(cell spectra) with circluar mock fibers or sqaure one. An example could be
> idl -e "sedm2_run, '2xSc_07_EC_BH_vw1e4_ReposNoRFBNoRP',snap=151, cell_x_offset=2.97,cell_y_offset=4.12,/cell_spectra, fib_radius=0.79, tauv=1.0, spec_style='star_age',/with_metal,/with_PSF,/cir_fib"
This example specify the fileseq, snapshot ID, center of fiber, radius of the fiber, tauv, create star_age style spectrum, considering metallicity and PSF effect, using circular fiber
5. make datacube from RSS


Contact me by yz69@st-andrews.ac.uk or zyr9040@mail.ustc.edu.cn