-
-
Notifications
You must be signed in to change notification settings - Fork 611
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 support for extra NOAA JSON timeseries #4346
Comments
@nabobalis thank you for opening this issue. I was trying to see some details for the products provided and information detailed by the https://services.swpc.noaa.gov/json/. So for the GOES json files that are provided under the /primary/ or /secondary/ sub-directories, the TimeSeries class could probably handle the following products:
For the GOES X-ray Flux case I am currently working on an e.g. NOAAGoesSXRTimeSeries class that can handle the sxr .json files and it is based on the revised noaa TimeSeries class #4339. I will conclude my efforts next week, I would like to do some reading first of the sunpy Developer’s Guide at especially the pull request part since it is going to be my first one. |
Given the comments on #4359, I think this should possibly be closed? The conclusion there was, at least for the XRS data, these JSON files are not the canonical data product and it would be contradictory and confusing to have multiple data sources for a single instrument. I do not know if this applies to the other data products mentioned here as well. |
Yes I agree, it doesn't need to be supported. However, it could be worth it to add an example of how to do a quick-look at the GOES 1 minute data? Nice example of how to create e.g. import pandas as pd
from sunpy.time import parse_time
from sunpy import timeseries as ts
from collections import OrderedDict
from astropy import units as u
data = pd.read_json("https://services.swpc.noaa.gov/json/goes/primary/xrays-7-day.json")
data_short = data[data["energy"]=="0.05-0.4nm"]
data_long = data[data["energy"]=="0.1-0.8nm"]
time_array = parse_time(data_short["time_tag"])
units = OrderedDict([("xrsa", u.W/u.m**2), ("xrsb", u.W/u.m**2)])
meta = OrderedDict({"instrument":"GOES X-ray sensor", "measurments": "primary", "type": "quicklook"}) # or whatever
goes_data = pd.DataFrame({"xrsa": data_short["flux"].values, "xrsb": data_long["flux"].values}, index=time_array.datetime)
test_ts = ts.TimeSeries(goes_data, meta, units, source="xrs")
test_ts.peek() |
Are only examples left to be added or the implementation for support of NOAA JSON timeseries as well? |
I guess just an example using the code that Laura posted above. |
From #4340 (comment):
The text was updated successfully, but these errors were encountered: