Skip to content

Add support for SOLO L3#148

Merged
samaloney merged 5 commits intosunpy:mainfrom
Hermanlrx:add-rpw-tds
Feb 23, 2026
Merged

Add support for SOLO L3#148
samaloney merged 5 commits intosunpy:mainfrom
Hermanlrx:add-rpw-tds

Conversation

@Hermanlrx
Copy link
Copy Markdown
Contributor

-Add handling of SOLO RPW surv flux products (TNR-SURV-FLUX & HFR-SURV-FLUX) #136

These changes allow you to read and plot the new data products using Spectrogram.
Long term it could be good to separate the TNR and HFR data products depending on usage.

@samaloney
Copy link
Copy Markdown
Member

This is not specific to this PR. I'm posting this to all open PRs. Please be aware of the update to our AI usage policy, specifically on the disclosure of and acceptable uses of AI.

@samaloney
Copy link
Copy Markdown
Member

pre-commit.ci autofix

Copy link
Copy Markdown
Member

@samaloney samaloney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR the test fails are unrelated but do tests pass locally for you?

Note I've run the pre-commit.ci autofix so you will need to pull these change back down. Needs a changelog too.

I think the level handling of the SOLO data could be improved there must be level keyword/variable that can be checked.

@Hermanlrx
Copy link
Copy Markdown
Contributor Author

Hermanlrx commented Feb 19, 2026

Most tests passed, there are some fails related to upstream sunpy Scraper.

The new commit includes some level handling and a changelog.

@samaloney
Copy link
Copy Markdown
Member

Ok once #142 is merged and this PR update it should resolve the Fido errors.
I'm going to use pre-commit.ci autofix again but pre-commit should run when you do a git commit see here but in short

pip install tox
tox -e codestyle

@samaloney
Copy link
Copy Markdown
Member

pre-commit.ci autofix

@samaloney
Copy link
Copy Markdown
Member

Ok I've update this PR with the merge Fido fixes and the tests look good. I think the only thing this needs is a test similar to what's done here https://github.com/sunpy/radiospectra/blob/main/radiospectra/spectrogram/sources/tests/test_psp_rfs.py

"times": times,
"freqs": hfr_frequency,
return data, meta
elif "L2" in data_type:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this actually work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely made an assumption about the contents of the cdf files there, will double check and revert back as needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I get when running the plotting code:

image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that doesnt look right, thanks for checking Herman! @samaloney can you remember this working in the past? i suggest we only add support for L3 data (which is what the RPW team suggest scientists to use anyway)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it still works, the default colour scheme prob look messy for that specific data if you use the example from the source you get this.

image

Also if you use LogNorm the above data do show things but we just don't interpolate fill in the missing data.

We should point user towards the L3 file but may not be the best for every one.

Herman le Roux and others added 5 commits February 23, 2026 13:04
Add handling of SOLO RPW surv flux products (TNR-SURV-FLUX &
HFR-SURV-FLUX) sunpy#136

Change SOLO L3 handling to use sunpy sfu
Add leveling handling for L2 and L3 data products
Add changelog file for new feature
Adds unit tests for level 3 SOLO RPW data products
Copy link
Copy Markdown
Member

@samaloney samaloney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the PR.

Now we just need to add a Fido client to allow search and download of the L3 data.

@samaloney
Copy link
Copy Markdown
Member

A bit of playing around

import astropy.units as u
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from radiospectra.spectrogram import Spectrogram

spec = Spectrogram("https://rpw-lira.obspm.fr/roc/data/pub/solo/rpw/data/L3/thr_flux/2025/11/solo_L3_rpw-hfr-surv-flux_20251101_V01.cdf")

fig, ax = plt.subplots()
ax.yaxis.set_units(u.MHz)
spec.plot(norm=LogNorm(), axes=ax)
ax.set_yscale("log")
ax.set_ylim(ax.get_ylim()[::-1])
plt.show()
image

@samaloney samaloney merged commit d39b28a into sunpy:main Feb 23, 2026
17 of 19 checks passed
@hayesla
Copy link
Copy Markdown
Member

hayesla commented Feb 23, 2026

we can get it from SOAR @samaloney - dont need specific client

@samaloney
Copy link
Copy Markdown
Member

@Hermanlrx thanks for the PR great to get the L3 SO/RPW support 🚀

@samaloney
Copy link
Copy Markdown
Member

we can get it from SOAR @samaloney - dont need specific client

Ah great I didn't think/know it was in the SOAR

@Hermanlrx
Copy link
Copy Markdown
Contributor Author

Hermanlrx commented Feb 23, 2026

@Hermanlrx thanks for the PR great to get the L3 SO/RPW support 🚀

Thanks for the help @samaloney, to many more ;) 🍻

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