-
Notifications
You must be signed in to change notification settings - Fork 0
das2c_readhttp
das2c_readhttp
This function sends an HTTP GET query string to a das2 server, parses the resulting data stream and stores the values and metadata.
Result = das2c_readhttp(Url, Agent)
Parameter | Type | Purpose |
---|---|---|
Url | string | A string containing a full HTTP GET URL. This looks like like it would in your web browser's address bar. In fact you can test the URL just by pasting it into a browser window. |
Parameter | Type | Purpose |
---|---|---|
Agent | string | Set your preferred user-agent string. User-agent string are typically saved in web-logs. If parameter is not specified, then 'das2dlm/VERSION' is sent as the user agent. |
This function returns a structure of type DAS2C_RESULT if it succeeds, or !NULL
on failure. The result structure is small. It does not contain the actual data but may be used to get data and metadata on the result. See das2c_results for a description of the DAC2_RESULT structure fields.
Output data from the query are loaded into RAM. Use the function das2c_free to release the results after you are done with them.
Load 60 second resolution Galileo PWS low-frequency electric field spectra collected from noon Jan. 1st 2001 to 2:35 pm Jan 2nd 2001 UTC.
sSrv = 'http://planet.physics.uiowa.edu/das/das2Server'
sDs = 'Galileo/PWS/Survey_Electric'
sBeg = '2001-001T12:00'
sEnd = '2001-002T14:35'
sRes = '60'
sFmt = '%s?server=dataset&dataset=%s&start_time=%s&end_time=%s&resolution=%s'
sUrl = string(sSrv, sDs, sBeg, sEnd, sRes, format=sFmt)
result = das2c_readhttp(sUrl, "IDL/8.9")
Now get information about the query:
ds = das2c_datasets(result, 0)
das2c_dsinfo(ds)
C. Piker, 2020-03-11 - Initial Version