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 command events to implement maneuver to pitch and roll about sun line #315

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Feb 1, 2024

Description

This adds two new command events for the Chandra Comment Events sheet:

  • Maneuver sun pitch: maneuver to a specified absolute sun pitch angle
  • Maneuver sun rasl: roll about sun line by specified angle

Note that this passes tests with or without sot/ska_sun#37 which changes the sign convention of roll about the sun line. This is the case because the code applies the rasl using apply_sun_pitch_yaw and then measures the change using get_sun_pitch_yaw. Those use the same sign convention so rasl2 - rasl1 is the same in both cases (with/without 37).

Closes #316

Interface impacts

No code impacts but this adds new command events. When this is ready to merge I will update the FOT MP command events TWiki documentation to include the two new command event types.

Testing

Unit tests

Tested with sot/ska_sun#37 in the PYTHONPATH.

  • Mac
(ska3) ➜  kadi git:(nsm-offset-pitch) printenv PYTHONPATH                                   
/Users/aldcroft/git/ska_sun
(ska3) ➜  kadi git:(nsm-offset-pitch) python -c "import ska_sun; print(ska_sun.__version__)"
3.13.1.dev1+g3579ca1
(ska3) ➜  kadi git:(nsm-offset-pitch) git rev-parse HEAD                                    
31358c88273b96c9ece0899c7320048303aa2faf
(ska3) ➜  kadi git:(nsm-offset-pitch) 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 233 items                                                                                                                 

kadi/commands/tests/test_commands.py .......................................................................................  [ 37%]
kadi/commands/tests/test_states.py .......................x..............................................x................... [ 75%]
....                                                                                                                          [ 77%]
kadi/commands/tests/test_validate.py ....................                                                                     [ 86%]
kadi/tests/test_events.py ..........                                                                                          [ 90%]
kadi/tests/test_occweb.py ......................                                                                              [100%]

Independent check of unit tests by Jean with a ska3-masters with ska_sun PR up-to-date

  • OSX

(ska3) flame:kadi jean$ pytest
===================================================================== test session starts =====================================================================
platform darwin -- Python 3.10.8, pytest-7.2.1, pluggy-1.0.0
rootdir: /Users/jean/git, configfile: pytest.ini
plugins: timeout-2.1.0, anyio-3.6.2
collected 233 items                                                                                                                                           

kadi/commands/tests/test_commands.py .......s.......s......................................................................s                            [ 37%]
kadi/commands/tests/test_states.py .......................x..............................................x.......................                       [ 77%]
kadi/commands/tests/test_validate.py ....................                                                                                               [ 86%]
kadi/tests/test_events.py ..........                                                                                                                    [ 90%]
kadi/tests/test_occweb.py ......................                                                                                                        [100%]

====================================================================== warnings summary =======================================================================
kadi/kadi/commands/tests/test_commands.py::test_get_starcats_each_year[year0]
  /Users/jean/miniconda3/envs/ska3/lib/python3.10/site-packages/setuptools_scm/git.py:295: UserWarning: git archive did not support describe output
    warnings.warn("git archive did not support describe output")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== 228 passed, 3 skipped, 2 xfailed, 1 warning in 91.89s (0:01:31) ===============================================
(ska3) flame:kadi jean$ git rev-parse HEAD
31358c88273b96c9ece0899c7320048303aa2faf
(ska3) flame:kadi jean$ python -c "import ska_sun; print(ska_sun.__version__)"
3.13.1.dev2+g2ec26c1

Functional tests

No functional testing.

@taldcroft taldcroft requested a review from jeanconn February 1, 2024 11:33
@taldcroft taldcroft changed the base branch from master to fix-matching-for-obs-cmds February 13, 2024 10:34
@taldcroft taldcroft requested a review from jeanconn February 13, 2024 10:54
@jeanconn
Copy link
Contributor

Per our conversation, it would be good to include something short in the twiki docs about how the common use case for rasl would be a yaw change, and that under the hood it is implemented as a maneuver.

Base automatically changed from fix-matching-for-obs-cmds to master February 15, 2024 10:14
@taldcroft
Copy link
Member Author

Per our conversation, it would be good to include something short in the twiki docs about how the common use case for rasl would be a yaw change, and that under the hood it is implemented as a maneuver.

Done.

@taldcroft taldcroft merged commit 550cdd8 into master Feb 15, 2024
2 checks passed
@taldcroft taldcroft deleted the nsm-offset-pitch branch February 15, 2024 10:50
This was referenced Mar 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.

NSM offset command event for the Command Events sheet
2 participants