-
-
Notifications
You must be signed in to change notification settings - Fork 604
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
Implement the AIASynopticClient #7842
base: main
Are you sure you want to change the base?
Conversation
I need help troubleshooting Wavelength and Sample attrs which aren't doing anything right now. Example usagetime_range = a.Time("2023-10-11 00:00:00", "2023-10-11 01:00:00") MatchdictThe content of the matchdict from the pre_search_hook has this:
Console Printout:Results from 1 Provider: 279 Results from the AIASynopticClient:
2023-10-11 00:00:00.000 2023-10-11 00:00:59.999 AIASYNOPTIC intensity SDO JSOC 1.5 SYNOPTIC 94 |
sunpy/net/dataretriever/sources/tests/example_aia_synoptic.ipynb
Outdated
Show resolved
Hide resolved
@@ -448,7 448,8 @@ def __contains__(self, other): | |||
if isinstance(other, Range): | |||
return self.min <= other.min and self.max >= other.max | |||
else: | |||
return self.min <= other <= self.max | |||
# return self.min <= other <= self.max | |||
return self.min.value <= int(other) <= self.max.value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What query should I run to trigger the bug here?
required = {a.Time, a.Instrument} | ||
optional = {a.Sample, a.Level, a.Wavelength, a.ExtentType} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
required = {a.Time, a.Instrument} | |
optional = {a.Sample, a.Level, a.Wavelength, a.ExtentType} | |
required = {a.Time, a.Instrument, a.ExtentType, a.Provider} | |
optional = {a.Sample, a.Wavelength} |
Maybe this would work, it's a lot to add for a query but it should make sure we only get the results from this client.
a.Source: [("SDO", "The Solar Dynamics Observatory.")], | ||
a.Wavelength: [(f"{wv:04d}", f"{wv} Å") for wv in cls.known_wavelengths], | ||
a.Provider: [("JSOC", "Joint Science Operations Center at Stanford.")], | ||
a.Level: [("synoptic", "Level 1.5 data processed for quicker analysis.")], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a.Level: [("synoptic", "Level 1.5 data processed for quicker analysis.")], | |
a.Level: [("1.5", "Level 1.5 data processed for quicker analysis.")], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I was hoping to maybe just use the Level attribute. It seems appropriate: it labels a homogenious data set from JSOC with standardized processing steps and observational parameters. By referencing the synoptic level of AIA data you are specifying this in a way users probably already know to do. But this is just my preferred implementation and if you'd like it more standardized I understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, fair. I will have to let the others chime in on this matter before we make a change here.
required_attrs = {a.Instrument, a.Level} | ||
supported_attrs = {a.Time, a.Instrument, a.Sample, a.Level, a.Wavelength, a.ExtentType} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to be this from the client itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually does the main class's version of this not handle this already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the idea that only those two could be required but all the others are accepted too
I'm not sure what you mean about the main class, are you just saying that these values match the defaults?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I wasn't clear.
This client inherits from a base class which should have a def _can_handle_query(self, *query):
already which means that I think this isn't needed for this client. But it would need to be checked out to confirm or deny it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just went through and tried troubleshooting the inherited method and I'm missing something because the only way the client returns results is if I use my class' version of the function. It's probably just a syntax misunderstanding since the two versions are very similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INteresting, I have suspected that there is a bug somewhere in that function for a while now. I think this confirms it. For now, we can leave this here and worry about that in the future.
sunpy/net/dataretriever/sources/tests/example_aia_synoptic.ipynb
Outdated
Show resolved
Hide resolved
Co-authored-by: Nabil Freij <[email protected]>
Co-authored-by: Nabil Freij <[email protected]>
I'm sorry I haven't tied this up yet, though it turns out that major flooding at the JSOC datacenter makes this less important for the time being. That said, what are the steps I need to take to keep/get the ball rolling on this PR? Thanks again for your unending patience! |
Sorry I somehow missed this message. Unfortunately I think until the JSOC server is back, there isn't much we can do directly. |
Seems like the server is back with some data. So we can go back to finishing this PR up. |
PR Description
This PR addresses issue #7828 , implementing the new Client as requested. In its current state the client returns found files, but it does not handle a.Wavelenth or a.Sample yet, which I'd like to ask for assistance in implementing.