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

Fix a processing error in acq and guide stats #304

Open
wants to merge 2 commits into
base: vv-error
Choose a base branch
from
Open

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Oct 4, 2024

Description

Fix a processing error in acq and guide stats. This looks like a small bug introduced by #300 . There's obviously more than one way to do the fix, but tbl.cols doesn't exist for a closed tbl.

Interface impacts

Testing

I've been testing in a ska3-masters

Unit tests

  • Linux
jeanconn-fido> git rev-parse HEAD
ea27feae6766183826d0c3e5c9a5ef9601958e9e
jeanconn-fido> pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.11.8, pytest-7.4.4, pluggy-1.4.0
rootdir: /proj/sot/ska/jeanproj/git
configfile: pytest.ini
plugins: timeout-2.2.0, anyio-4.3.0
collected 108 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 ...                                                                                           [ 20%]
mica/archive/tests/test_asp_l1.py .......                                                                                       [ 26%]
mica/archive/tests/test_cda.py ..............................................                                                   [ 69%]
mica/archive/tests/test_obspar.py .                                                                                             [ 70%]
mica/report/tests/test_write_report.py .                                                                                        [ 71%]
mica/starcheck/tests/test_catalog_fetches.py ...............                                                                    [ 85%]
mica/stats/tests/test_acq_stats.py ...                                                                                          [ 87%]
mica/stats/tests/test_guide_stats.py ....                                                                                       [ 91%]
mica/vv/tests/test_vv.py .........                                                                                              [100%]

=================================================== 108 passed in 531.20s (0:08:51)

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

Functional testing just verifies that without these fixes, the methods for determining the obsids to update just return all the obsids since 2002. In 'vv-error' branch and 'master':

In [1]: import mica.stats.update_acq_stats
obs
In [2]: obsids = mica.stats.update_acq_stats._get_obsids_to_update()
len
In [3]: len(obsids)
Out[3]: 41028

In [4]: import mica.stats.update_guide_stats

In [5]: obsids = mica.stats.update_guide_stats._get_obsids_to_update(table_file='/proj/sot/ska/data/guide_stats/guide_stats.h5')

In [6]: len(obsids)
Out[6]: 41028

In this branch

In [1]: import mica.stats.update_guide_stats

In [2]: obsids = mica.stats.update_guide_stats._get_obsids_to_update(table_file='/proj/sot/ska/data/guide_stats/guide_stats.h5')

In [3]: len(obsids)
Out[3]: 17

In [4]: import mica.stats.update_acq_stats

In [5]: obsids = mica.stats.update_acq_stats._get_obsids_to_update()

In [6]: len(obsids)
Out[6]: 46

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.

1 participant