Recent data on XRS GOES

63 views
Skip to first unread message

Felipe Meza

unread,
Dec 8, 2020, 9:46:29 AM12/8/20
to su...@googlegroups.com
Hi folks, hope everything is well.

One quick question: What is the most recent data that can be acquired from XRS?

I was trying to obtain the most recent data from yesterday 2020-12-07 but I cannot see any data using Sunpy:

image.png
This is the curve from GOES site:


image.png


Thanks for your help!

Felipe Meza.

Laura Hayes

unread,
Dec 8, 2020, 10:10:21 AM12/8/20
to su...@googlegroups.com
Hi Felipe, 

Thanks for your message.

We have recently added support for the GOES 16 and 17 X-ray data in sunpy which will be available in our 2.1 release (scheduled in the next few weeks). 
The files are available https://www.ngdc.noaa.gov/stp/satellite/goes-r.html in netcdf format. 

In the meantime, if you want you can use the development version of sunpy (details are described here), the functionality to query and download the new GOES data and read the files into a `sunpy.timeseries.TimeSeries` is available there.

However if you are just looking for the 1m data from the NOAA site as shown, the recent json files can be read through something like:

```
import pandas as pd
from astropy import units as u
from sunpy import timeseries as ts
from sunpy.time import parse_time
from collections import OrderedDict

noaa_file = "https://services.swpc.noaa.gov/json/goes/primary/xrays-7-day.json"
units = OrderedDict([('xrsa', u.W/u.m**2),
                 ('xrsb', u.W/u.m**2)])

data = pd.read_json(noaa_file)
data_short = data[data['energy']=='0.05-0.4nm']
data_long = data[data['energy']=='0.1-0.8nm']
time_array = [parse_time(x).datetime for x in data_short['time_tag'].values]

df = pd.DataFrame({'xrsa': data_short['flux'].values, 'xrsb': data_long['flux'].values}, index=time_array)
df.sort_index(inplace=True)
   
goes_data = ts.TimeSeries(df, units, source="xrs")
```

Thanks,
Laura

--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sunpy/CADhWRJDMz%3DYPxRjQO5qZZFO6PFaaC8WxWtTsUviD5oF4iBst7A%40mail.gmail.com.


--
Laura Hayes

Ekrem Erkuş

unread,
Dec 8, 2020, 1:42:25 PM12/8/20
to su...@googlegroups.com
Hi.I am sending program as add.Also,you can handle with 3 or 7 days options 



Laura Hayes <hay...@tcd.ie>, 8 Ara 2020 Sal, 18:10 tarihinde şunu yazdı:
1.PNG
2.PNG
Reply all
Reply to author
Forward
0 new messages