Coverage for tests/test_Features.py : 39%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
pin = features.Pair_in_night(gap_min=25., gap_max=45.) self.assertEqual(np.max(pin.feature), 0.)
indx = np.array([1000])
delta = 30./60./24.
# Add 1st observation, feature should still be zero obs = empty_observation() obs['filter'] = 'r' obs['mjd'] = 59000. pin.add_observation(obs, indx=indx) self.assertEqual(np.max(pin.feature), 0.)
# Add 2nd observation obs['mjd'] += delta pin.add_observation(obs, indx=indx) self.assertEqual(np.max(pin.feature), 1.)
obs['mjd'] += delta pin.add_observation(obs, indx=indx) self.assertEqual(np.max(pin.feature), 2.)
lsst.utils.tests.init()
lsst.utils.tests.init() unittest.main() |