Commit b19bc697 authored by Zhang Xin's avatar Zhang Xin
Browse files

band range bug

parent 56e72468
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -494,9 +494,8 @@ def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm
        redden=0.0
    )
    wave, flux = sed_data[0], sed_data[1]

    speci = interpolate.interp1d(wave, flux)
    lamb = np.arange(2000, 18001 + 0.5, 0.5)
    lamb = np.arange(2000, 11001 + 0.5, 0.5)
    y = speci(lamb)
    # erg/s/cm2/A --> photo/s/m2/A
    all_sed = y * lamb / (cons.h.value * cons.c.value) * 1e-13
@@ -509,7 +508,7 @@ def produceGalSED_C6( gal_id_s = '03593100052300144566', gal_z = 1.6927,mag_norm
                                                    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'])))

@@ -539,7 +538,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 = '03593100052300144566', gal_z = 1.6927,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 = 24.0, norm_filter_thr_fn= gal_norm_fn)


#根据上面计算的光谱计算csst星等,噪声不需要就不用管了,t, frame, noisepix_num, flux_ratio,都是为了估计噪声