Commit 9cec2b00 authored by Shuai Feng's avatar Shuai Feng
Browse files

update2412

parent 3b449c85
Pipeline #7686 failed with stage
in 0 seconds
...@@ -2,6 +2,7 @@ import numpy as np ...@@ -2,6 +2,7 @@ import numpy as np
from .spec1d import StellarContinuum, HII_Region from .spec1d import StellarContinuum, HII_Region
import astropy.wcs import astropy.wcs
from astropy.io import fits from astropy.io import fits
from. import __version__
class Cube3D(): class Cube3D():
...@@ -31,13 +32,13 @@ class Cube3D(): ...@@ -31,13 +32,13 @@ class Cube3D():
age=self.stellar_map.age[i, j], feh=self.stellar_map.feh[i, j], age=self.stellar_map.age[i, j], feh=self.stellar_map.feh[i, j],
vel=self.stellar_map.vel[i, j], vdisp=self.stellar_map.vdisp[i, j], vel=self.stellar_map.vel[i, j], vdisp=self.stellar_map.vdisp[i, j],
ebv=self.stellar_map.ebv[i, j]) ebv=self.stellar_map.ebv[i, j])
self.flux[i, j, :] = self.flux[i, j, :] + ss.flux
if self.gas_map is not None: if self.gas_map is not None:
gg = HII_Region(self.config, hii_tem, halpha=self.gas_map.halpha[i, j], gg = HII_Region(self.config, hii_tem, halpha=self.gas_map.halpha[i, j],
logz=self.gas_map.zh[i, j], vel=self.gas_map.vel[i, j], logz=self.gas_map.zh[i, j], vel=self.gas_map.vel[i, j],
vdisp=self.gas_map.vdisp[i, j], ebv=self.gas_map.ebv[i, j]) vdisp=self.gas_map.vdisp[i, j], ebv=self.gas_map.ebv[i, j])
self.flux[i, j, :] = ss.flux + gg.flux self.flux[i, j, :] = self.flux[i, j, :] + gg.flux
else:
self.flux[i, j, :] = ss.flux
def wcs_info(self): def wcs_info(self):
# wcs = fits.Header() # wcs = fits.Header()
...@@ -69,7 +70,7 @@ class Cube3D(): ...@@ -69,7 +70,7 @@ class Cube3D():
hdr = fits.Header() hdr = fits.Header()
hdr['FILETYPE'] = 'SCICUBE' hdr['FILETYPE'] = 'SCICUBE'
hdr['CODE'] = 'csst-ifs-gehong' hdr['CODE'] = 'csst-ifs-gehong'
hdr['VERSION'] = '1.1.3' hdr['VERSION'] = __version__
hdu0 = fits.PrimaryHDU(header=hdr) hdu0 = fits.PrimaryHDU(header=hdr)
......
...@@ -220,7 +220,7 @@ def Calzetti_Law(wave, Rv=4.05): ...@@ -220,7 +220,7 @@ def Calzetti_Law(wave, Rv=4.05):
reddening_curve = np.zeros(len(wave)) reddening_curve = np.zeros(len(wave))
idx = (wave >= 1200) & (wave < 6300) idx = (wave >= 1200) & (wave < 6300)
reddening_curve[idx] = 2.659 * (-2.156 + 1.509 * wave_number[idx] - 0.198 * (wave_number[idx] ** 2)) + 0.011 * (wave_number[idx] ** 3) + Rv reddening_curve[idx] = 2.659 * (-2.156 + 1.509 * wave_number[idx] - 0.198 * (wave_number[idx] ** 2) + 0.011 * (wave_number[idx] ** 3)) + Rv
idx = (wave >= 6300) & (wave <= 22000) idx = (wave >= 6300) & (wave <= 22000)
reddening_curve[idx] = 2.659 * (-1.857 + 1.040 * wave_number[idx]) + Rv reddening_curve[idx] = 2.659 * (-1.857 + 1.040 * wave_number[idx]) + Rv
...@@ -735,13 +735,13 @@ class AGN(): ...@@ -735,13 +735,13 @@ class AGN():
if (halpha_broad > 0) & (vdisp_broad > 0): if (halpha_broad > 0) & (vdisp_broad > 0):
BLR = AGN_BLR(config, hbeta_flux=halpha_broad / 2.579, BLR = AGN_BLR(config, hbeta_flux=halpha_broad / 2.579,
hbeta_fwhm=vdisp_broad / 2.355, ebv=ebv, vel=vel) hbeta_fwhm=vdisp_broad / 2.355, ebv=ebv, vel=vel)
self.flux = self.flux + BLR.flux Fe = AGN_FeII(config, hbeta_broad=halpha_broad / 2.579, ebv=ebv, vel=vel)
self.flux = self.flux + BLR.flux + Fe.flux
if (bhmass > 0) & (edd_ratio > 0): if (bhmass > 0) & (edd_ratio > 0):
m5100 = BHmass_to_M5100(bhmass, edd_ratio=edd_ratio, dist=dist) m5100 = BHmass_to_M5100(bhmass, edd_ratio=edd_ratio, dist=dist)
PL = AGN_Powerlaw(config, m5100=m5100, ebv=ebv, vel=vel) PL = AGN_Powerlaw(config, m5100=m5100, ebv=ebv, vel=vel)
Fe = AGN_FeII(config, hbeta_broad=halpha_broad / 2.579, ebv=ebv, vel=vel) self.flux = self.flux + PL.flux
self.flux = self.flux + PL.flux + Fe.flux
def BHmass_to_M5100(bhmass, edd_ratio=0.05, dist=21.0): def BHmass_to_M5100(bhmass, edd_ratio=0.05, dist=21.0):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment