I'm trying to query HMI SHARP data(e.g. the hmi.sharp_720s series) data using net.jsoc.JSOCClient(), but I have not found a way to accomplish this. The provided example for the hmi.m_45sclient = jsoc.JSOCClient()response = client.query(jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), jsoc.Series('hmi.m_45s'))print responseseems to return a set of records as expected (although I quite don't understand the time of the records that I am getting, they seem to consistently be different than requested):DATE TELESCOP INSTRUME ... WAVELNTH WAVEUNIT-------------------- -------- ---------- ... -------- ---------------2014-01-05T17:44:53Z SDO/HMI HMI_FRONT2 ... 6173.0 Invalid KeyLink2014-01-05T17:46:02Z SDO/HMI HMI_FRONT2 ... 6173.0 Invalid KeyLink
For SHARP data, however, one needs to specify the HARP number when using the JSOC web export. It is not clear to me how to accomplish this with JSOCClient. For instance runningresponse = client.query(jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), jsoc.Series('hmi.sharp_720s'))
How should one request SHARP data? I'm using version 0.6.dev5642
For SHARP data, however, one needs to specify the HARP number when using the JSOC web export. It is not clear to me how to accomplish this with JSOCClient. For instance runningresponse = client.query(jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), jsoc.Series('hmi.sharp_720s'))How should one request SHARP data? I'm using version 0.6.dev5642I don't think at the moment we can actually do it.. but it shouldn't be too difficult to implement... but how do we know such number before hand?...
the restults are right, however you don't want to look at the 'DATE' field - which I don't know what it means but to the T_OBS one.
The HARP number is a more difficult problem, The _make_query_payload function concatenates the series name and a prime key clause configured as
a time range but does not allow other prime key or query clauses to be included. But it may work to append the other clauses as needed to
the seriesname. I have not looked deep enough to see it the seriesname is used in other contexts other than building the query.
If only fo the query, then note that a '[...]' prime key clause can have the form [<keyname>=<value>]. If the keyname is omitted then the
oreder of the clauses is used to determine which keyname is implied. Checkout lookdata.html and note that on the tab after the seriesname is given
it will show the default order of prime key clauses.
The sharp series has HARPNUM as the first primekey so the query must be like:
hmi.sharp_720s[12345][2014-01-01T00:00:00_TAI-2014-01-01T01:00:00_TAI]
But _make_query_payload only knows how to put the time clause in the query. So I suggest trying
series = "hmi.sharp_720s[12345]" and time range as is normal, that "should" result in the proper query to the JSOC system.
If you need other clauses you should also be able to append them to the seriesname variable, e.g.
series = 'hmi.sharp_720s[? NOAA_AR=11949 ?][]" to get the data for NOAA region 11949 which was on the disk in Jan 2014.
The empty clause '[]' is a place marker for the HARPNUM clause since sunpy will append the time clause after the series string.
response = client.query(jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), jsoc.Series('hmi.sharp_720s[? NOAA_AR=11936 ?][]'))
response = client.query(jsoc.Time('2014-01-01T00:00:00', '2014-01-01T01:00:00'), jsoc.Series('hmi.sharp_720s[]'))
Play with lookdata.html to make queries and compare the result with the sunpy result. Any keyword can be used in a query clause.
If not a primekey then name needs to be present in a '[?...?]' clause. the name can be present in a prime key clause too.
The funny times may be due to the time clause being placed in the HARPNUM place.
A almost accurate description of DRMS query formats is in http://hmi.stanford.edu/doc/JSOC/DRMS_dataset_names.pdf
The "Catalog" concept was not implemented as described, and the DSDS discussion is now not needed since all
of the old DSDS records have been imported into the JSOC with DRMS style names.
but it is still the only nearly complete discussion.
As with any document, having a description written by a hard-earned experienced non-developer user would help.
It could be that automatically generating a template for the prime keys and allowing an appended extra
set of clauses would allow the generality and power of more complex queries to be made.
Note that lookdata.html does this when a checkbox is filled. So the info needed is in the
jsoc_info op=series_struct json response.
ter: