Coverage for tests/test_BasisFuncs.py : 41%

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
bf = basis_functions.Visit_repeat_basis_function()
indx = np.array([1000])
# 30 minute step delta = 30./60./24.
# Add 1st observation, should still be zero obs = empty_observation() obs['filter'] = 'r' obs['mjd'] = 59000. conditions = Conditions() conditions.mjd = np.max(obs['mjd']) bf.add_observation(obs, indx=indx) self.assertEqual(np.max(bf(conditions)), 0.)
# Advance time so now we want a pair conditions.mjd += delta self.assertEqual(np.max(bf(conditions)), 1.)
# Now complete the pair and it should go back to zero bf.add_observation(obs, indx=indx)
conditions.mjd += delta self.assertEqual(np.max(bf(conditions)), 0.)
lsst.utils.tests.init()
lsst.utils.tests.init() unittest.main() |