diff --git a/csst_mci_sim/csst_mci_sim.py b/csst_mci_sim/csst_mci_sim.py index 9ca2d6c5191ecedc8240d315750bc9225ba85707..83396f5c323e8ae344dcff77440335090ca7205e 100644 --- a/csst_mci_sim/csst_mci_sim.py +++ b/csst_mci_sim/csst_mci_sim.py @@ -2151,7 +2151,7 @@ class MCIsimulator(): t.toMag(redshift=redshift) # Calculating flux ugriz = np.array([umag, gmag, rmag, imag, zmag]) - star_flux = sed.Model_Galaxy_SED(wave, ugriz, redshift, t) + star_flux = sed.Model_Galaxy_SED(wave, ugriz, redshift, t, self.information['dir_path']) self.log.info('load star catlog 888888888888') @@ -2175,7 +2175,7 @@ class MCIsimulator(): t.toMag(redshift=redshift) # Calculating flux ugriz = np.array([umag, gmag, rmag, imag, zmag]) - star_flux = sed.Model_Galaxy_SED(wave, ugriz, redshift, t) + star_flux = sed.Model_Galaxy_SED(wave, ugriz, redshift, t, self.information['dir_path']) ######################################### self.log.info('load star catlog 99999999') ##cal_SED_photons(self, flux_arr): diff --git a/csst_mci_sim/support/sed.py b/csst_mci_sim/support/sed.py index 52169fed4bfa4b5f059f64a54cbb91edf063e498..8dc56a609e83fec4ec49d581bfb37181d27172bf 100755 --- a/csst_mci_sim/support/sed.py +++ b/csst_mci_sim/support/sed.py @@ -198,7 +198,7 @@ def Model_Stellar_SED(wave, bp, rp, temp): flux = calibrate(wave, flux1, rp, band = 'GAIA_rp') return flux -def Model_Galaxy_SED(wave, ugriz, z, temp): +def Model_Galaxy_SED(wave, ugriz, z, temp, path): """Modelling galaxy SED based on u,g,r,i,z magnitude Args: @@ -239,5 +239,5 @@ def Model_Galaxy_SED(wave, ugriz, z, temp): flux1 = reddening(temp.wave, flux0, ebv = ebv) flux2 = np.interp(wave, temp.wave * (1 + z), flux1) - flux = calibrate(wave, flux2, ugriz[2], band = 'SDSS_r') + flux = calibrate(wave, flux2, ugriz[2], path, band = 'SDSS_r') return flux \ No newline at end of file