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

Unmask aca image data columns (from get_aca_images) except for IMG #311

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Nov 21, 2024

Description

Unmask slot data columns as possible.

The intent is that this is the mica equivalent of
sot/chandra_aca#182

Interface impacts

astropy Tables from mica.archive.aca_l0.get_aca_images will have masks only on columns with missing data (except for IMG). IMGRAW is renamed IMG within the routine, so the actual unmasking excepts IMGRAW.

Testing

Unit tests

  • Mac
(ska3-flight-latest) flame:mica jean$ git rev-parse HEAD
5cf7011b866178f1f56e15dc12082ae4f16e96dd
(ska3-flight-latest) flame:mica jean$ pytest
===================================================================================== test session starts =====================================================================================
platform darwin -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0
PyQt5 5.15.9 -- Qt runtime 5.15.8 -- Qt compiled 5.15.8
rootdir: /Users/jean/git
configfile: pytest.ini
plugins: astropy-0.11.0, qt-4.4.0, cov-5.0.0, timeout-2.2.0, remotedata-0.4.1, anyio-4.3.0, filter-subpackage-0.2.0, doctestplus-1.2.1, astropy-header-0.2.2, hypothesis-6.112.0, arraydiff-0.6.1, mock-3.14.0
collected 110 items                                                                                                                                                                           

mica/archive/tests/test_aca_dark_cal.py ..................                                                                                                                              [ 16%]
mica/archive/tests/test_aca_hdr3.py .                                                                                                                                                   [ 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 ...                                                                                                                                                  [ 88%]
mica/stats/tests/test_guide_stats.py ....                                                                                                                                               [ 91%]
mica/vv/tests/test_vv.py sssssssss                                                                                                                                                      [100%]

====================================================================================== warnings summary =======================================================================================
mica/mica/archive/tests/test_cda.py: 13 warnings
mica/mica/stats/tests/test_acq_stats.py: 9 warnings
  /Users/jean/miniforge3/envs/ska3-flight-latest/lib/python3.11/site-packages/tables/table.py:1513: DeprecationWarning: `sometrue` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `any` instead.
    coords = [p.nrow for p in

mica/mica/starcheck/tests/test_catalog_fetches.py::test_validate_catalogs_over_range
  /Users/jean/miniforge3/envs/ska3-flight-latest/lib/python3.11/site-packages/django/utils/encoding.py:266: DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead.
    encoding = locale.getdefaultlocale()[1] or 'ascii'

mica/mica/starcheck/tests/test_catalog_fetches.py::test_validate_catalogs_over_range
  /Users/jean/miniforge3/envs/ska3-flight-latest/lib/python3.11/site-packages/django/http/request.py:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    import cgi

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================== 91 passed, 19 skipped, 24 warnings in 36.35s

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

No functional testing.

@jeanconn jeanconn requested a review from Copilot November 21, 2024 23:14

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

@jeanconn jeanconn requested a review from taldcroft November 21, 2024 23:15
@jeanconn
Copy link
Contributor Author

Does this need similar unit tests to sot/chandra_aca#182 ?

Copy link
Member

@taldcroft taldcroft left a comment

Choose a reason for hiding this comment

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

Looks good. Since get_aca_images() is a new function for mica there should not be any production code using it that might break.

@jeanconn
Copy link
Contributor Author

"Since get_aca_images() is a new function for mica there should not be any production code using it that might break." Yes, that was my thinking in doing the unmasking in get_aca_images instead of upstream.

@jeanconn jeanconn merged commit 8c56ac2 into master Nov 26, 2024
2 checks passed
@jeanconn jeanconn deleted the remove-mask branch November 26, 2024 13:16
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.

2 participants