def __init__(self, survey, band):
self.survey = survey.strip()
self.band = band.strip()
try:
self.mstar_file = resource_filename(__name__,'data/mstar/mstar_%s_%s.fit' % (self.survey, self.band))
except:
raise IOError("Could not find mstar resource mstar_%s_%s.fit" % (self.survey, self.band))
try:
self._mstar_arr = fitsio.read(self.mstar_file,ext=1)
except:
raise IOError("Could not find mstar file mstar_%s_%s.fit" % (self.survey, self.band))
# Tom - why not use CubicSpline here? That's why it exists...
self._f = CubicSpline(self._mstar_arr['Z'],self._mstar_arr['MSTAR'])
#self._f = interpolate.interp1d(self._mstar_arr['Z'],self._mstar_arr['MSTAR'],kind='cubic')
评论列表
文章目录