Loading csst_ifs_gehong/config.py +1 −3 Original line number Diff line number Diff line Loading @@ -22,13 +22,11 @@ class config(): dpix : float, optional Pixel size in the spatial direction, by default 0.2arcsec """ def __init__(self, wave_min=3500.0, wave_max=10000.0, dlam=2.0, inst_fwhm=0.1, def __init__(self, wave_min=3500.0, wave_max=10000.0, dlam=2.0, nx=30, ny=30, dpix=0.2): self.dlam = dlam self.wave = np.arange(wave_min, wave_max, dlam) self.wave_min = wave_min self.inst_fwhm = inst_fwhm self.nx = nx self.ny = ny self.dpix = dpix Loading csst_ifs_gehong/map2d.py +8 −6 Original line number Diff line number Diff line Loading @@ -229,9 +229,9 @@ class Map2d(object): # Check Input Parameters if (mag > 26) or (mag < 8): print("Notice: Your input integral magnitude of Sersic mode (mag) is > 26 mag or < 8 mag.") if (r_eff <= 0): # raise Exception("Effective radius (r_eff) should be > 0 arcsec!") print("Effective radius (r_eff) should be > 0 arcsec!") if (r_eff < 0): raise Exception("Effective radius (r_eff) should be > 0 arcsec!") #print("Effective radius (r_eff) should be > 0 arcsec!") if (n < 0): raise Exception("Sersic index (n) should be > 0!") if (ellip > 1) or (ellip < 0): Loading Loading @@ -334,7 +334,7 @@ class Map2d(object): if np.ndim(image) == 2: self.map = resize(image, (self.nx, self.ny)) else: print("Input array should be a 2d-array!") raise Exception("Input array should be a 2d-array!") class StellarPopulationMap(): Loading Loading @@ -456,17 +456,19 @@ class IonizedGasMap(): if (vdisp is None): print('Input Vdisp Map is empty!') else: self.vdisp = vdisp.map # Fix the spaxels whose vdisp is too small ind_overrange = (self.vdisp < 10) if len(self.vdisp[ind_overrange]) > 0: print("Notice: Spaxel with <10km/s in the input vdisp map will be automatically adjusted to 10km/s.") self.vdisp[ind_overrange] = 10 else: self.vdisp = vdisp.map if (ebv is None): print('Input EBV Map is empty!') else: self.ebv = ebv.map # Fix the spaxels whose ebv is negtive ind_overrange = (self.ebv < 0) if len(self.ebv[ind_overrange]) > 0: print("Notice: Spaxel with < 0 mag in the input ebv map will be automatically adjusted to 0 mag.") Loading tests/__pycache__/test_cube3d.cpython-312-pytest-7.4.4.pyc 0 → 100644 +4.03 KiB File added.No diff preview for this file type. View file tests/__pycache__/test_map2d.cpython-312-pytest-7.4.4.pyc 0 → 100644 +12.7 KiB File added.No diff preview for this file type. View file tests/__pycache__/test_spec1d.cpython-312-pytest-7.4.4.pyc 0 → 100644 +23.2 KiB File added.No diff preview for this file type. View file Loading
csst_ifs_gehong/config.py +1 −3 Original line number Diff line number Diff line Loading @@ -22,13 +22,11 @@ class config(): dpix : float, optional Pixel size in the spatial direction, by default 0.2arcsec """ def __init__(self, wave_min=3500.0, wave_max=10000.0, dlam=2.0, inst_fwhm=0.1, def __init__(self, wave_min=3500.0, wave_max=10000.0, dlam=2.0, nx=30, ny=30, dpix=0.2): self.dlam = dlam self.wave = np.arange(wave_min, wave_max, dlam) self.wave_min = wave_min self.inst_fwhm = inst_fwhm self.nx = nx self.ny = ny self.dpix = dpix Loading
csst_ifs_gehong/map2d.py +8 −6 Original line number Diff line number Diff line Loading @@ -229,9 +229,9 @@ class Map2d(object): # Check Input Parameters if (mag > 26) or (mag < 8): print("Notice: Your input integral magnitude of Sersic mode (mag) is > 26 mag or < 8 mag.") if (r_eff <= 0): # raise Exception("Effective radius (r_eff) should be > 0 arcsec!") print("Effective radius (r_eff) should be > 0 arcsec!") if (r_eff < 0): raise Exception("Effective radius (r_eff) should be > 0 arcsec!") #print("Effective radius (r_eff) should be > 0 arcsec!") if (n < 0): raise Exception("Sersic index (n) should be > 0!") if (ellip > 1) or (ellip < 0): Loading Loading @@ -334,7 +334,7 @@ class Map2d(object): if np.ndim(image) == 2: self.map = resize(image, (self.nx, self.ny)) else: print("Input array should be a 2d-array!") raise Exception("Input array should be a 2d-array!") class StellarPopulationMap(): Loading Loading @@ -456,17 +456,19 @@ class IonizedGasMap(): if (vdisp is None): print('Input Vdisp Map is empty!') else: self.vdisp = vdisp.map # Fix the spaxels whose vdisp is too small ind_overrange = (self.vdisp < 10) if len(self.vdisp[ind_overrange]) > 0: print("Notice: Spaxel with <10km/s in the input vdisp map will be automatically adjusted to 10km/s.") self.vdisp[ind_overrange] = 10 else: self.vdisp = vdisp.map if (ebv is None): print('Input EBV Map is empty!') else: self.ebv = ebv.map # Fix the spaxels whose ebv is negtive ind_overrange = (self.ebv < 0) if len(self.ebv[ind_overrange]) > 0: print("Notice: Spaxel with < 0 mag in the input ebv map will be automatically adjusted to 0 mag.") Loading
tests/__pycache__/test_cube3d.cpython-312-pytest-7.4.4.pyc 0 → 100644 +4.03 KiB File added.No diff preview for this file type. View file
tests/__pycache__/test_map2d.cpython-312-pytest-7.4.4.pyc 0 → 100644 +12.7 KiB File added.No diff preview for this file type. View file
tests/__pycache__/test_spec1d.cpython-312-pytest-7.4.4.pyc 0 → 100644 +23.2 KiB File added.No diff preview for this file type. View file