sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Add command events to implement maneuver to pitch and roll about sun line #315

Closed taldcroft closed 4 months ago

taldcroft commented 5 months ago

Description

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

Note that this passes tests with or without https://github.com/sot/ska_sun/pull/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 https://github.com/sot/ska_sun/pull/37 in the PYTHONPATH.

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
- [x] 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
<!-- Describe and document results of any functional tests, otherwise leave the text below -->
No functional testing.
jeanconn commented 4 months ago

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.

taldcroft commented 4 months ago

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.