Commit b9bc3f10 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

test

parent 5f8779ad
Pipeline #4058 failed with stage
in 0 seconds
...@@ -125,8 +125,8 @@ class Gal_Temp(): ...@@ -125,8 +125,8 @@ class Gal_Temp():
###import os ###import os
###parent = os.path.dirname(os.path.realpath(__file__)) ###parent = os.path.dirname(os.path.realpath(__file__))
self.path=path
hdulist = fits.open(path+'MCI_inputData/SED_Code/seddata/galaxy_temp.fits') hdulist = fits.open(self.path+'MCI_inputData/SED_Code/seddata/galaxy_temp.fits')
self.wave = hdulist[1].data['wave'] self.wave = hdulist[1].data['wave']
self.flux = hdulist[2].data self.flux = hdulist[2].data
self.age_grid = hdulist[3].data['logAge'] self.age_grid = hdulist[3].data['logAge']
...@@ -139,11 +139,11 @@ class Gal_Temp(): ...@@ -139,11 +139,11 @@ class Gal_Temp():
redshift (float, optional): redshift of spectra. Defaults to 0. redshift (float, optional): redshift of spectra. Defaults to 0.
""" """
wave = self.wave * (1 + redshift) wave = self.wave * (1 + redshift)
self.umag = flux_to_mag(wave, self.flux, band='SDSS_u') self.umag = flux_to_mag(wave, self.flux, self.path,band='SDSS_u')
self.gmag = flux_to_mag(wave, self.flux, band='SDSS_g') self.gmag = flux_to_mag(wave, self.flux, self.path,band='SDSS_g')
self.rmag = flux_to_mag(wave, self.flux, band='SDSS_r') self.rmag = flux_to_mag(wave, self.flux, self.path,band='SDSS_r')
self.imag = flux_to_mag(wave, self.flux, band='SDSS_i') self.imag = flux_to_mag(wave, self.flux, self.path,band='SDSS_i')
self.zmag = flux_to_mag(wave, self.flux, band='SDSS_z') self.zmag = flux_to_mag(wave, self.flux, self.path,band='SDSS_z')
class Star_Temp(): class Star_Temp():
""" """
...@@ -153,7 +153,7 @@ class Star_Temp(): ...@@ -153,7 +153,7 @@ class Star_Temp():
def __init__(self,path): def __init__(self,path):
##import os ##import os
self.path=path
####parent = os.path.dirname(os.path.realpath(__file__)) ####parent = os.path.dirname(os.path.realpath(__file__))
###print("获取其父目录——" + parent) # 从当前文件路径中获取目录 ###print("获取其父目录——" + parent) # 从当前文件路径中获取目录
...@@ -163,14 +163,14 @@ class Star_Temp(): ...@@ -163,14 +163,14 @@ class Star_Temp():
self.Teff_grid = hdulist[3].data['Teff'] self.Teff_grid = hdulist[3].data['Teff']
self.FeH_grid = hdulist[3].data['FeH'] self.FeH_grid = hdulist[3].data['FeH']
self.bpmag = flux_to_mag(self.wave, self.flux, band='GAIA_bp') self.bpmag = flux_to_mag(self.wave, self.flux, path,band='GAIA_bp')
self.rpmag = flux_to_mag(self.wave, self.flux, band='GAIA_rp') self.rpmag = flux_to_mag(self.wave, self.flux, path,band='GAIA_rp')
def toMag(self): def toMag(self):
wave = self.wave wave = self.wave
self.bpmag = flux_to_mag(wave, self.flux, band='GAIA_bp') self.bpmag = flux_to_mag(wave, self.flux, self.path,band='GAIA_bp')
self.rpmag = flux_to_mag(wave, self.flux, band='GAIA_rp') self.rpmag = flux_to_mag(wave, self.flux, self.path,band='GAIA_rp')
# ------------- # -------------
# SED Modelling # SED Modelling
......
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