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 MAG_ACA_ERR units for guide selection #123

Merged
merged 2 commits into from
Sep 26, 2018
Merged

Conversation

jeanconn
Copy link
Contributor

@jeanconn jeanconn commented Sep 26, 2018

Fix MAG_ACA_ERR units for guide selection

I considered adding a new column to the candidate list, but then just used the 0.01 conversion in the two new places that this is used thanks to #105 .

This fix and mag err use in general probably needs more review and better tests, but this might be enough for an updated release candidate for today.

Closes #120

@taldcroft
Copy link
Member

Did you check the #120 obsid?

@jeanconn
Copy link
Contributor Author

Yes, I commented over there on #120

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.

👍 with #125 in place.

@jeanconn
Copy link
Contributor Author

By "with #125 in place" did you mean with the issue in the list or with the test made?

@taldcroft
Copy link
Member

With the issue in the list.

@taldcroft taldcroft merged commit df49fbb into master Sep 26, 2018
@taldcroft taldcroft deleted the mag_aca_err_units branch September 26, 2018 19:38
@taldcroft
Copy link
Member

This is failing for me. Did it pass tests for you?

================================================ FAILURES ================================================
_______________________________________ test_get_aca_catalog_20259 _______________________________________

    @pytest.mark.skipif('not HAS_SC_ARCHIVE', reason='Test requires starcheck archive')
    def test_get_aca_catalog_20259():
        """
        Test obsid 20259 which has two spoiled fids: HRC-2 is yellow and HRC-4 is red.
        Expectation is to choose fids 1, 2, 3 (not 4).
        """
        # Force not using a bright star so there is a GUI-only (not BOT) star
        aca = get_aca_catalog(20259, raise_exc=True)
        exp = ['slot idx     id    type  sz   yang     zang   dim res halfw',
               '---- --- --------- ---- --- -------- -------- --- --- -----',
               '   0   1         1  FID 8x8 -1175.03  -468.23   1   1    25',
               '   1   2         2  FID 8x8  1224.70  -460.93   1   1    25',
               '   2   3         3  FID 8x8 -1177.69   561.30   1   1    25',
               '   3   4 896009152  BOT 6x6  1693.39   217.92  20   1   160',
               '   4   5 897712576  BOT 6x6 -1099.95  2140.23  20   1   160',
               '   5   6 897717296  BOT 6x6   932.58  1227.48  20   1   160',
               '   6   7 896013056  BOT 6x6  1547.25 -2455.12  20   1   160',
               '   7   8 896008536  GUI 6x6  1705.59   158.91   1   1    25',
               '   7   9 896011576  ACQ 6x6   810.99   -69.21  20   1   160',
               '   0  10 896009240  ACQ 6x6  -911.41   402.62  20   1   160',
               '   1  11 897192352  ACQ 6x6 -2110.43  2005.21  20   1   100',
               '   2  12 897719248  ACQ 6x6  1650.09  2019.62  20   1    80']
        repr(aca)  # Apply default formats
>       assert aca[TEST_COLS].pformat(max_width=-1) == exp
E       AssertionError: assert ['slot idx   ...1   160', ...] == ['slot idx    ...1   160', ...]
E         At index 9 diff: '   7   8 896009240  BOT 6x6  -911.41   402.62  20   1   160' != '   7   8 896008536  GUI 6x6  1705.59   158.91   1   1    25'
E         Right contains more items, first extra item: '   2  12 897719248  ACQ 6x6  1650.09  2019.62  20   1    80'
E         Use -v to get the full diff

proseco/tests/test_catalog.py:80: AssertionError

@jeanconn
Copy link
Contributor Author

I did run the tests, but I guess I've got to be better about having the terminal print branch and commit. I must have retested in master or the like instead of properly testing in my branch.

@taldcroft
Copy link
Member

OK, I'll make a fix.

@jeanconn
Copy link
Contributor Author

Thanks. And I just figured out what I did. I checked out master to reproduce the error in #120 and then forgot that I was in the wrong branch for my run-for-record test. So less a general process fail and more a specific process fail related to trying to see an error in another branch.

@taldcroft
Copy link
Member

I've been more in the habit lately of running all tests before making a commit, esp. for something that I expect to pass (not a WIP). And likewise I'm trying to run all tests immediately before pushing to GitHub. This is part of why I want to keep our unit tests reasonably fast.

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.

Odd warning in guide.py after #105
2 participants