Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a get_aca_images method for mica l0 #301

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Sep 20, 2024

Description

Add a get_aca_images() method to mica aca_l0. This new function replicates the outputs of chandra_aca.maude_decom.get_aca_images() exactly, apart from providing additional column outputs documented in the function docstring.

This would be a supporting method to replace "get_mica_images" in the current sot/chandra_aca#174 . The idea is to provide a method to get something similar to maude_decom.get_aca_images for the purposes of getting background-subtracted images.

Interface impacts

This adds two columns PIXTLM and BGDTYP to the output of get_slot_data. For L0 data that hasn't been reprocessed since DS10.8.3 and doesn't have those columns in the source data FITS file, these are filled with ORIG and FLAT, respectively.

Testing

Testing done with a sparse local L0 archive with the required data to pass tests.

Unit tests

  • Mac (TA)
========================================================= 1 passed in 0.44s =========================================================
(ska3) ➜  mica git:(match-maude-images) git rev-parse HEAD                                                                 
7605f66585552056a22614e494851c6f85024e68
(ska3) ➜  mica git:(match-maude-images) pytest
======================================================== test session starts ========================================================
platform darwin -- Python 3.11.8, pytest-7.4.4, pluggy-1.4.0
rootdir: /Users/aldcroft/git
configfile: pytest.ini
plugins: timeout-2.2.0, anyio-4.3.0
collected 110 items                                                                                                                 

mica/archive/tests/test_aca_dark_cal.py ..................                                                                    [ 16%]
mica/archive/tests/test_aca_hdr3.py s                                                                                         [ 17%]
mica/archive/tests/test_aca_l0.py ...ss                                                                                       [ 21%]
mica/archive/tests/test_asp_l1.py sssssss                                                                                     [ 28%]
mica/archive/tests/test_cda.py ..............................................                                                 [ 70%]
mica/archive/tests/test_obspar.py .                                                                                           [ 70%]
mica/report/tests/test_write_report.py s                                                                                      [ 71%]
mica/starcheck/tests/test_catalog_fetches.py ...............                                                                  [ 85%]
mica/stats/tests/test_acq_stats.py .ss                                                                                        [ 88%]
mica/stats/tests/test_guide_stats.py .sss                                                                                     [ 91%]
mica/vv/tests/test_vv.py sssssssss                                                                                            [100%]

=========================================== 85 passed, 25 skipped, 24 warnings in 22.16s ============================================

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

No functional testing.

mica/archive/aca_l0.py Outdated Show resolved Hide resolved
mica/archive/aca_l0.py Outdated Show resolved Hide resolved
mica/archive/aca_l0.py Outdated Show resolved Hide resolved
Base automatically changed from ruff to master September 26, 2024 22:32
mica/archive/aca_l0.py Outdated Show resolved Hide resolved
mica/archive/aca_l0.py Outdated Show resolved Hide resolved
@taldcroft
Copy link
Member

@jeanconn - this is substantially revised, so please have a look.
@javierggt - this a joint effort and aims to replicated the maude get_aca_images(), so you should review as well.

@taldcroft taldcroft removed their request for review October 4, 2024 15:29

# Combine all slot data into one output table and sort by time and slot
out = vstack(slot_data_list)
out.sort(keys=["TIME", "IMGNUM"])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With all of the discussion about END_INTEG_TIME and TIME in chandra_aca, I'm wondering in passing if we should use END_INTEG_TIME instead of TIME as the more unambiguous quantity for this kind of thing (the sort).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are just sorting, I think it's the same.

For joins and for searches I always use VCDU frame these days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants