Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is part of a set of performance changes to kadi, chandra_aca, ska_sun, Quaternion, and Chandra.Maneuver to make kadi command states faster. The changes are independent.
This PR includes changes to:
Interface impacts
The numba cache uses the NUMBA_CACHE_DIR already configured in ska after sot/ska_helpers#29 .
The pitch and off_nominal_roll functions now support sun_ra and sun_dec kwargs.
Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
Also checking numba caching behavior in ska3-flight 2023.3. This demonstrates the creation of numba cache files in the expected user directory.
With regard to performance, on linux (HEAD fido) a comparison with ska_sun 3.10.1 shows the expected result that the numba caching can be slower on the first run of a function (compared to flight / 3.10.1) and then has advantages.
flight:
This PR
And when set with debug printing on the numba caching, the caching saves seem reasonable
And as mentioned, this PR provides the option to supply sun_ra and sun_dec from the calling code which can provide significant savings.