Skip to content

Swapi proton moments#99

Draft
hafarooki wants to merge 3 commits intoIMAP-Science-Operations-Center:mainfrom
hafarooki:swapi-proton-moments
Draft

Swapi proton moments#99
hafarooki wants to merge 3 commits intoIMAP-Science-Operations-Center:mainfrom
hafarooki:swapi-proton-moments

Conversation

@hafarooki
Copy link
Copy Markdown

Change Summary

New response function for SWAPI + new proton/alpha fitting algorithm to use the new response function. See new Markdown document file included in the PR for extensive details about the changes.

@jtniehof
Copy link
Copy Markdown
Collaborator

jtniehof commented May 7, 2026

Can you rebase or merge main into the PR and resolve conflicts?

@hafarooki hafarooki closed this May 7, 2026
@hafarooki hafarooki force-pushed the swapi-proton-moments branch from 856b01c to d21fa9a Compare May 7, 2026 18:41
@hafarooki hafarooki reopened this May 7, 2026
@hafarooki
Copy link
Copy Markdown
Author

Should be all good now

@pleasant-menlo
Copy link
Copy Markdown
Collaborator

pleasant-menlo commented May 7, 2026

We manage the Python dependencies in the Docker containers using uv. Since this PR adds a dependency on numba, can you install uv and run uv add numba, then commit the updated pyproject.toml and uv.lock files?

After making this change locally, we were able to run the integration test in Docker. It returned a failure:

AssertionError:
Not equal to tolerance rtol=0.01, atol=0
proton_sw_speed regression
Mismatched elements: 1 / 3 (33.3%)
Max absolute difference among violations: 30.87983496
Max relative difference among violations: 0.06362372
 ACTUAL: array([474.574554, 475.23233 , 516.230835])
 DESIRED: array([474.576, 475.232, 485.351])

Is this expected and the test just needs to be updated, or does it indicate an error in the code?

@hafarooki
Copy link
Copy Markdown
Author

will do!

That is expected, I made some algorithm changes over the past few days and need to update the assertions

@hafarooki
Copy link
Copy Markdown
Author

Just to double check, I plotted the values around that time and compared with another spacecraft and it does look like the correct speed should be 516, not 485. So I'll go ahead and update those tests

@hafarooki
Copy link
Copy Markdown
Author

Fixed the integration test, please try again when you get a chance @pleasant-menlo

@pleasant-menlo
Copy link
Copy Markdown
Collaborator

We have created two pull requests to configure the SDS triggering system.

Before getting the first one merged, we would like to upload the new ancillary files to production so that the current processor continues to be triggered. These are:

  • azimuthal-transmission
  • central-effective-area
  • passband-fit-coefficients

Are the versions in this PR suitable, or would you like us to wait to upload until you produce finalized versions?

@hafarooki
Copy link
Copy Markdown
Author

The current versions are thoroughly validated and not likely to change much if at all for the upcoming data release. I think you can go ahead and upload this version of them for now. Will it be possible to upload a new version with minor changes later on?

@pleasant-menlo
Copy link
Copy Markdown
Collaborator

We renamed the files to 20250924, following the conventions, and uploaded them to production.

If you have an update in the future that should apply over the whole mission, you can upload v002 with the same 20250924 start date (mission launch date). If an update should only be applied for data after a specific time, you can upload v002 with a later start date and it will only affect data from the specified time onward.

We ran the integration test in Docker with your latest changes, and it passed.

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.

3 participants