Swapi proton moments#99
Conversation
|
Can you rebase or merge |
856b01c to
d21fa9a
Compare
|
Should be all good now |
|
We manage the Python dependencies in the Docker containers using After making this change locally, we were able to run the integration test in Docker. It returned a failure: Is this expected and the test just needs to be updated, or does it indicate an error in the code? |
|
will do! That is expected, I made some algorithm changes over the past few days and need to update the assertions |
|
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 |
|
Fixed the integration test, please try again when you get a chance @pleasant-menlo |
|
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:
Are the versions in this PR suitable, or would you like us to wait to upload until you produce finalized versions? |
|
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? |
|
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. |
|
Does tests.swapi.l3a.science.solar_wind.test_optimizer.TestOptimizeSolarWindParamsRecoversTruth pass for you? We are seeing the perturbed parameters returned directly without converging to the "true" values. |
|
I just reran the full unit test suite and all 336 tests pass on my end. |
|
Do you have the latest version pulled to your local clone? |
|
Running on commit 59647a1, which looks to be the latest. I set up a little logging and it evaluates at a few points with oddly large velocity, then decides it can't get any better: It works as expected if I use |
|
That velocity looks weird, I'll take a closer look at the test to see if it's just some ridiculous misspecified initial condition.
|
|
Another finding: if we pass
Maybe you are using an older version of scipy? |
|
Good catch! It looks like I have scipy 1.13 based on pyproject.toml. uv.lock has spicy 1.15 on python <3.11 and 1.17 for python >= 3.11. What version of Python and spicy should we actually be using? |
|
I believe we use 3.12 in the pipeline. If you use uv to set up the environment you can get the exact versions: either |
|
I was using conda before. I've switched to the uv environment for now with python 3.12. And now I can indeed reproduce the failure. Working to fix it now |
|
(Perhaps we should delete the environment.yaml file in the repo? It looks like that's where I got my outdated dependencies from) |
|
Should be all good now @pleasant-menlo |
|
Thanks, that made it work! There are a few test failures in tests/test_utils.py where we construct a SwapiL3AlphaSolarWindData with the old parameters. We have some Windows development machines, where "fork" does not work. It's not worth doing anything complicated, but could you apply something like Otherwise, this is looking pretty good. |
|
should be fixed |
Any thoughts on this? |
|
One more thing I noticed when trying to plot a file: the variable attributes for the RTN velocities point to
Example from SWE: |
I'm not particularly concerned about those files, they seem relatively small compared to what is already in the repository. |
@jtniehof is this something that needs to be addressed at this stage or can that wait for the metadata validation stage? |
eccc016
into
IMAP-Science-Operations-Center:main
|
Good point, that's more of a metadata issue. We went ahead and merged the PR. Thanks for all your work! |
|
Thanks! |
|
@hafarooki FYI, we have deployed the new version of the code and reprocessed all |
|
Thanks! Took a look at a few days of data, seems like it worked OK. (We had to change the CDF file version to v001 to load it in CAVA, however) |
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.