Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SOLO RPW spectrogram support #62

Merged
merged 10 commits into from Nov 18, 2023
Merged

Conversation

samaloney
Copy link
Contributor

@samaloney samaloney commented Oct 31, 2021

Description

Fixes #55 adding support for some SOLO//RPW data

import sunpy_soar
from astropy.time import Time
from astropy.visualization import ImageNormalize, PercentileInterval
from sunpy_soar.attrs import Identifier
from sunpy.net import Fido, attrs as a
from matplotlib import pyplot as plt

from radiospectra.spectrogram import Spectrogram

query = Fido.search(a.Time('2020-07-11', '2020-07-11 23:59'),
                    a.Instrument('RPW'), a.Level(2), Identifier('RPW-HFR-SURV'))
downloaded = Fido.fetch(query[0])
spec = Spectrogram(downloaded[0])

fig, ax = plt.subplots()
norm = ImageNormalize(spec[0].data, interval=PercentileInterval(97.5))
spec[0].plot(norm=norm, axes=ax)
ax.set_xlim([Time('2020-07-11 2:00').datetime, Time('2020-07-11 3:00').datetime])
ax.semilogy()

solo_rpw

@samaloney
Copy link
Contributor Author

This code doesn't work on all RPW spectra need to test if any of acg1 or acg2 and use one or both accordingly

@samaloney samaloney force-pushed the feat-add-solo-rpw branch 4 times, most recently from 420255d to 83e2d67 Compare September 16, 2022 17:25
@samaloney samaloney marked this pull request as ready for review September 16, 2022 17:31
@samaloney samaloney force-pushed the feat-add-solo-rpw branch 2 times, most recently from 5a81119 to 4548bed Compare September 16, 2022 18:12
freqs.append(cfreq)
return slices, times, freqs

sensor_unique = np.unique(sensor)
Copy link
Member

Choose a reason for hiding this comment

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

is this the correct thing to be indexing?

Is the idea to find CH1 and CH2 here?

@nabobalis nabobalis force-pushed the feat-add-solo-rpw branch 2 times, most recently from f8ad0da to c4aa519 Compare November 11, 2022 02:22
@nabobalis
Copy link
Contributor

Probably want more source tests?

@nabobalis
Copy link
Contributor

Online fail is very real.

@nabobalis nabobalis added this to the 0.5.0 milestone Nov 15, 2022
@@ -19,6 +19,7 @@ def client():
return SWAVESClient()


@pytest.mark.skip("Upstream data server removed")
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it come back?

Copy link
Contributor Author

@samaloney samaloney Oct 9, 2023

Choose a reason for hiding this comment

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

Nope the job of processing/hosting has moved to a different group/institute and the data is now only available on the CDPP and I'm not sure how to search that via an API also I think the files are in CDF format another proprietary format .B3E? I'll add another change log to document the removal of the server and hence code.

Copy link
Contributor

Choose a reason for hiding this comment

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

So we should remove these tests and the client for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea I need to check where the data can be obtained and in what formats so want to leave the code until I figure that out, only skipped the tests for the CI really.

@sunpy sunpy deleted a comment from pep8speaks Nov 17, 2023
@nabobalis nabobalis merged commit 38e18f8 into sunpy:main Nov 18, 2023
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for SolarOrbiter Radio and Plasma Waves data
3 participants