Skip to content

BUG - inaccuracy in L2 map obs_date values after projection #2383

@subagonsouth

Description

@subagonsouth

Description of the issue

While working through a Hi bug related to obs_date values I found that given a single dataset, the projected obs_date values deviated up to ~60 seconds away from the expected value of the PSET midpoint as defined by the epoch + epoch_delta / 2.

I had a suspicion that the error was due to using tt2000ns for the time that was being projected. Just to check, I converted the obs_date value in the PSET prior to projecting to tt2000s and the error was reduced to about 20-seconds.

Steps to reproduce the issue

The relevant test that exhibits this inaccuracy is in test_hi_l2.py::test_genarate_hi_map

The check on the projected obs_date value is:

np.testing.assert_allclose(
        np.nanmax(sky_map.data_1d["obs_date"].data) / 1e9,
        pset_midpoint,
        atol=60,
    )

Expected behavior (What should happen)

No response

Actual behavior (What does happen)

No response

Code Snippet:

Code

Additional notes, affected areas, and suggested fixes

No response

Metadata

Metadata

Assignees

Labels

HelperIns: HiRelated to the IMAP-Hi instrumentIns: LoRelated to the IMAP-Lo instrumentIns: UltraRelated to the IMAP-Ultra instrumentMapper ToolsWork related to common mapper toolsbugSomething isn't working

Type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions