DavidT3 / DAXA

Democratising Archival X-ray Astronomy (DAXA) is an easy-to-use Python module for downloading multi-mission X-ray telescope data and processing it into usable archives. Users can acquire entire archives, or filter observations based on ID/positions/time. Supports XMM; partial support eROSITA, Chandra, NuSTAR, Swift, Suzaku, ASCA, ROSAT, INTEGRAL
BSD 3-Clause "New" or "Revised" License
15 stars 0 forks source link

filter_on_position won't accept a simple [ra, dec] list #281

Closed DavidT3 closed 6 months ago

DavidT3 commented 6 months ago

Edward spotted this issue - I say in the docstring that either a

"list or nested list (i.e. [r, d] OR [[r1, d1], [r2, d2]])"

can be passed, but that isn't true. Even if there is one coordinate pair you still have to pass it as [[ra, dec]] currently.

@jessicapilling if you could fix this and include that scenario in the tests that would be great, cheers.

jessicapilling commented 6 months ago

I think Edward is looking at an older version of DAXA because I also spotted this when I was initially writing unit tests. I corrected this bug and did some unit tests for it in my initial unit test branch, which has been merged into main now.

The code added in mission.base is here

The unit test testing this is here