def update_conditions(self, conditions):
"""
Parameters
----------
conditions : dict
Keys should include airmass, sky_brightness, seeing.
"""
m5 = np.empty(conditions['skybrightness'][self.filtername].size)
m5.fill(hp.UNSEEN)
m5_mask = np.zeros(m5.size, dtype=bool)
m5_mask[np.where(conditions['skybrightness'][self.filtername] == hp.UNSEEN)] = True
good = np.where(conditions['skybrightness'][self.filtername] != hp.UNSEEN)
m5[good] = m5_flat_sed(self.filtername, conditions['skybrightness'][self.filtername][good],
conditions['FWHMeff_%s' % self.filtername][good],
self.expTime, conditions['airmass'][good])
self.feature = m5
self.feature[m5_mask] = hp.UNSEEN
self.feature = hp.ud_grade(self.feature, nside_out=self.nside)
self.feature = ma.masked_values(self.feature, hp.UNSEEN)
评论列表
文章目录