Пример #1
0
 def load_sfh(self):
     try:
         vals = np.loadtxt(self.SFH_file)
         scale = [1e-9, 1e9]  # this puts time in Gyr and SFR in Msun/Gyr
         #        self.sfh = vals*scale
         sfh = vals * scale
         # extrapolates SFH back to 0.001Gyr using SFH file
         final_sfh = f.extra_sfh(sfh, self.gamma)
         self.sfh = np.array(final_sfh)
     except:
         logger.error("File '%s' will not parse" % self.SFH_file)
         self.sfh = None
Пример #2
0
 def load_sfh(self):
     '''
     takes in input SFH file and extend backwards to start from 1e-3 Gyr
     '''
     try:
         vals = np.loadtxt(self.SFH_file)
         scale = [1e-9, 1e9]  # Gyr conversions for time, SFR
         sfh = vals * scale  # converts time in Gyr and SFR in Msun/Gyr
         # extrapolates SFH back to 0.001Gyr using SFH file and power law (gamma)
         final_sfh = extra_sfh(sfh, self.gamma)
         self.sfh = np.array(final_sfh)
     except Exception as e:
         logger.error("File '%s' will not parse %s" % (self.SFH_file, e))
         self.sfh = None
Пример #3
0
 def load_sfh(self):
     '''
     takes in input SFH file and extend backwards to start from 1e-3 Gyr
     '''
     try:
         vals = np.loadtxt(self.SFH_file)
         scale = [1e-9,1e9] # Gyr conversions for time, SFR
         sfh = vals*scale # converts time in Gyr and SFR in Msun/Gyr
         # extrapolates SFH back to 0.001Gyr using SFH file and power law (gamma)
         final_sfh = extra_sfh(sfh, self.gamma)
         self.sfh = np.array(final_sfh)
     except Exception as e:
         logger.error("File '%s' will not parse %s" % (self.SFH_file, e))
         self.sfh = None