Loading produceSED_1.py +5 −4 Original line number Diff line number Diff line Loading @@ -464,7 +464,7 @@ def calculatCSSTFilEnergy(spec = None, throughput_dir = '/Users/zhangxin/Work/Sl resMag[fi] = ene return resMag def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm = 24.0, norm_filter_thr_fn= 'g.fits',galaxy_cat_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/cat2CSSTSim_bundle/",sedlib_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/sedlibs/"): def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm = -99, norm_filter_thr_fn= 'g.fits',galaxy_cat_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/cat2CSSTSim_bundle/",sedlib_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/sedlibs/"): healPix_id = int(gal_id_s[0:6]) Loading Loading @@ -504,11 +504,12 @@ def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm normThr = Table.read(norm_filter_thr_fn) # orig_spec = Table(np.array([wave,flux]).T, names=(['WAVELENGTH', 'FLUX'])) norm_thr_rang_ids = normThr['SENSITIVITY'] > 0.001 sedNormFactor=1.0 if mag_norm != -99: sedNormFactor = getNormFactorForSpecWithABMAG(ABMag=mag_norm, spectrum=orig_spec_phot, norm_thr=normThr, sWave=np.floor(normThr[norm_thr_rang_ids][0][0]), eWave=np.ceil(normThr[norm_thr_rang_ids][-1][0])) sedNormFactor=1.0 norm_spec = Table(Table(np.array([wave,flux*sedNormFactor]).T, names=(['WAVELENGTH', 'FLUX']))) norm_spec_phot = Table(Table(np.array([lamb,all_sed*sedNormFactor]).T, names=(['WAVELENGTH', 'FLUX']))) Loading Loading @@ -538,7 +539,7 @@ sedlib_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/sedlibs/" # gal_norm_fn = '/Users/zhangxin/Work/SlitlessSim/sed/produceSED_bycatfile/data/throughputs/LSST/lsst_throuput_g.fits' gal_norm_fn = os.path.join(fileDir, "data/throughputs/LSST/lsst_throuput_g.fits") gal_spec, gal_spec_photo = produceGalSED_C6(gal_id_s = '03490800052300010462', gal_z = 0.3764,mag_norm = 24.0, norm_filter_thr_fn= gal_norm_fn) gal_spec, gal_spec_photo = produceGalSED_C6(gal_id_s = '03490800052300010462', gal_z = 0.3764,mag_norm = -99, norm_filter_thr_fn= gal_norm_fn) #根据上面计算的光谱计算csst星等,噪声不需要就不用管了,t, frame, noisepix_num, flux_ratio,都是为了估计噪声 Loading Loading
produceSED_1.py +5 −4 Original line number Diff line number Diff line Loading @@ -464,7 +464,7 @@ def calculatCSSTFilEnergy(spec = None, throughput_dir = '/Users/zhangxin/Work/Sl resMag[fi] = ene return resMag def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm = 24.0, norm_filter_thr_fn= 'g.fits',galaxy_cat_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/cat2CSSTSim_bundle/",sedlib_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/sedlibs/"): def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm = -99, norm_filter_thr_fn= 'g.fits',galaxy_cat_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/cat2CSSTSim_bundle/",sedlib_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/sedlibs/"): healPix_id = int(gal_id_s[0:6]) Loading Loading @@ -504,11 +504,12 @@ def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm normThr = Table.read(norm_filter_thr_fn) # orig_spec = Table(np.array([wave,flux]).T, names=(['WAVELENGTH', 'FLUX'])) norm_thr_rang_ids = normThr['SENSITIVITY'] > 0.001 sedNormFactor=1.0 if mag_norm != -99: sedNormFactor = getNormFactorForSpecWithABMAG(ABMag=mag_norm, spectrum=orig_spec_phot, norm_thr=normThr, sWave=np.floor(normThr[norm_thr_rang_ids][0][0]), eWave=np.ceil(normThr[norm_thr_rang_ids][-1][0])) sedNormFactor=1.0 norm_spec = Table(Table(np.array([wave,flux*sedNormFactor]).T, names=(['WAVELENGTH', 'FLUX']))) norm_spec_phot = Table(Table(np.array([lamb,all_sed*sedNormFactor]).T, names=(['WAVELENGTH', 'FLUX']))) Loading Loading @@ -538,7 +539,7 @@ sedlib_dir = "/Volumes/EAGET/C6_data/inputData/Catalog_C6_20221212/sedlibs/" # gal_norm_fn = '/Users/zhangxin/Work/SlitlessSim/sed/produceSED_bycatfile/data/throughputs/LSST/lsst_throuput_g.fits' gal_norm_fn = os.path.join(fileDir, "data/throughputs/LSST/lsst_throuput_g.fits") gal_spec, gal_spec_photo = produceGalSED_C6(gal_id_s = '03490800052300010462', gal_z = 0.3764,mag_norm = 24.0, norm_filter_thr_fn= gal_norm_fn) gal_spec, gal_spec_photo = produceGalSED_C6(gal_id_s = '03490800052300010462', gal_z = 0.3764,mag_norm = -99, norm_filter_thr_fn= gal_norm_fn) #根据上面计算的光谱计算csst星等,噪声不需要就不用管了,t, frame, noisepix_num, flux_ratio,都是为了估计噪声 Loading