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 new functions to get Earth boresight angles and Earth block intervals #164

Merged
merged 5 commits into from
Jan 5, 2024

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Jan 1, 2024

Description

This provides a new function to get the angle from the Chandra ACA boresight to the Earth limb and Earth center over a date range. It also provides the Earth opening angle at the same time sampling.

It also adds a simple convenience function to get time intervals when the boresight to limb angle is below a certain value (10 deg by default).

Interface impacts

Adds two new functions. This PR is a requirement for sot/kalman_watch#11.

Testing

Unit tests

  • Mac
(masters) ➜  chandra_aca git:(boresight-angle) $ git rev-parse HEAD 
f1a501c8417528d3a10b3edfe24e972b08a225b3
(masters) ➜  chandra_aca git:(boresight-angle) $ pytest
======================================================== test session starts ========================================================
platform darwin -- Python 3.10.8, pytest-7.2.1, pluggy-1.0.0
rootdir: /Users/aldcroft/git, configfile: pytest.ini
plugins: timeout-2.1.0, anyio-3.6.2
collected 202 items                                                                                                                 

chandra_aca/tests/test_aca_image.py ..............                                                                            [  6%]
chandra_aca/tests/test_all.py ........................                                                                        [ 18%]
chandra_aca/tests/test_attitude.py .............................................................                              [ 49%]
chandra_aca/tests/test_dark_model.py ....                                                                                     [ 50%]
chandra_aca/tests/test_drift.py ..........................                                                                    [ 63%]
chandra_aca/tests/test_maude_decom.py ..................                                                                      [ 72%]
chandra_aca/tests/test_planets.py ...............                                                                             [ 80%]
chandra_aca/tests/test_psf.py ...                                                                                             [ 81%]
chandra_aca/tests/test_residuals.py ss...                                                                                     [ 84%]
chandra_aca/tests/test_star_probs.py ................................                                                         [100%]

================================================== 200 passed, 2 skipped in 44.01s ==================================================

Independent check of unit tests by [REVIEWER NAME]

  • [PLATFORM]:

Functional tests

From this PR

image

From MATLAB MCC

image

@taldcroft taldcroft changed the title Add new function to get Earth boresight angles Add new functions to get Earth boresight angles and Earth block intervals Jan 2, 2024
@taldcroft taldcroft requested a review from javierggt January 2, 2024 22:08
chandra_aca/tests/test_planets.py Show resolved Hide resolved
chandra_aca/planets.py Outdated Show resolved Hide resolved
chandra_aca/planets.py Show resolved Hide resolved
@javierggt
Copy link
Contributor

I ran the tests and went over the code and it looks reasonable to me. The things I pointed out are trivial, basically improving a docstring and adding one small test.

The third comment (moving np.sawpaxes into the call to np.einsum) is your call.

@taldcroft
Copy link
Member Author

taldcroft commented Jan 5, 2024

@javierggt - I addressed your comments in f1a501c. And I noticed a comment mistake which is fixed in 733d4e6.

@taldcroft taldcroft requested a review from javierggt January 5, 2024 10:36
@taldcroft taldcroft merged commit c8d6a7b into master Jan 5, 2024
2 checks passed
@taldcroft taldcroft deleted the boresight-angle branch January 5, 2024 15:08
@javierggt javierggt mentioned this pull request Feb 6, 2024
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