askap-vast / vast-tools

A collection of tools that are useful for the VAST project and for exploration of results from the VAST Pipeline.
https://vast-survey.org/vast-tools/
MIT License
8 stars 0 forks source link

mocpy>0.9 breaks due to STMOC handling #557

Closed ddobie closed 3 months ago

ddobie commented 4 months ago

Tests fail for mocpy>0.8, because the STMOC start and end times do not match the input start and end times.

ddobie commented 4 months ago
FAILED tests/test_tools.py::test_gen_mocs_image[write] - AssertionError: assert 2458786.032079079 == 2458786.0312783564

The difference in times is 69.18244511s, significantly more than the claimed mocpy time resolution of 1 microsecond. Either the time resolution is incorrect or something weird is going on.

ddobie commented 4 months ago

The issue is in the conversion to JD. Directly comparing the astropy time objects to one another results in the expected behaviour, within the 1 microsecond error - need to use .isclose() to account for that error though.