./
spdfgetdata.pro
This file contains a procedure-oriented wrapper that integrates functionality from the SpdfCdas class (IDL client interface to Coordinated Data Analysis System Web Services (CDAS WSs)) and the CDAWlib library.
Author information
- Author
B. Harris
- Copyright
Copyright (c) 2010-2023 United States Government as represented by the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved.
Routines
Routines from spdfgetdata.pro
result = SpdfGetDataCallback(statusInfo, progressInfo, callbackData)
This function is an example of a callback_function for the spdfGetData function.
result = SpdfGetData(dataset, variables, timeSpans [, binInterval=double] [, binInterpolateMissingValues=byte] [, binSigmaMultiplier=int] [, binOverrideDefaultBinning=byte] [, dataview=string] [, endpoint=string] [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference] [, sslVerifyPeer=int])
This function gets data from NASA's Space Physics Data Facility Coordinated Data Analysis System and returns it in a CDAWlib structure..
Routine details
top source SpdfGetDataCallback
result = SpdfGetDataCallback(statusInfo, progressInfo, callbackData)
This function is an example of a callback_function for the spdfGetData function.
Return value
a continue flag. A return value of zero indicates that the operation should be cancelled. A return value of one indicates that the operation should continue.
Parameters
- statusInfo in type=strarr
- progressInfo in type=lon64arr
- callbackData in type=reference
top source SpdfGetData
result = SpdfGetData(dataset, variables, timeSpans [, binInterval=double] [, binInterpolateMissingValues=byte] [, binSigmaMultiplier=int] [, binOverrideDefaultBinning=byte] [, dataview=string] [, endpoint=string] [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference] [, sslVerifyPeer=int])
This function gets data from NASA's
Space Physics Data Facility
Coordinated Data Analysis
System and returns it in a
CDAWlib
structure..
Notes:
- If any one of the
binInterval, binInterpolateMissingValues, binSigmaMultiplier, or binOverrideDefaultBinning
keyword parameters is set, binning of the data will be requested with the default values for any missingbin*
keyword values. If nobin*
keyword parameters are set, binning of the data will not be requested. - A few datasets in CDAS contain variables with names that cannot be used as tag names an IDL structure. In those cases, the tag name in this structure will be a modification of the actual CDF variable name. For example, if you requested the 'H+' variable from the 'FA_K0_TMS' dataset, the 'H+' values will be returned in a structure under the tag name 'H$'.
Return value
structure containing requested data.
Parameters
- dataset in type=string
name of dataset to get data from.
- variables in out type=strarr
On entry, names of variables whose values are to be gotten. If the first (only) name is "ALL-VARIABLES", then the resulting CDF will contain all variables. On exit, names of variables actually read (may be more than requested).
- timeSpans in type=strarr(n, 2)
ISO 8601 format strings of the start and stop times of the data to get.
Keywords
- binInterval in optional type=double default=60.0D
binning interval (seconds).
- binInterpolateMissingValues in optional type=byte default=1
flag indicating whether to interpolate missing values.
- binSigmaMultiplier in optional type=int default=0
standard deviation multiplier used for rejecting data.
- binOverrideDefaultBinning in optional type=byte default=0
flag indicating whether to override the default selection of variables to bin. 0 = use default selection (only variables with the ALLOW_BIN attribute set). 1 = bin additional variables beyond just those with the ALLOW_BIN attribute set.
- dataview in optional type=string default='sp_phys'
name of dataview containing the dataset.
- endpoint in optional type=string default='https://cdaweb.gsfc.nasa.gov/WS/cdasr/1'
URL of CDAS web service.
- keepfiles in optional type=boolean default=false
The KEEPFILES keyword causes SpdfGetData to retain the downloaded data files. Normally these files are deleted after the data is read into the IDL environment.
- quiet in optional type=boolean default=false
SpdfGetData normally prints an error message if no data is found. If QUIET is set, no error messages is printed.
- verbose in optional type=boolean default=false
The VERBOSE keyword causes SpdfGetData to print additional status, debugging, and usage information.
- callback_function in optional type=string
this keyword value is the name of the IDL function that is to be called during this retrieval operation. The callbacks provide feedback to the user about the ongoing operation, as well as provide a method to cancel an ongoing operation. If this keyword is not set, no callback to the caller is made. For information on creating a callback function, see "Using Callbacks with the IDLnetURL Object" in the IDL documentation.
- callback_data in optional type=reference
this keyword value contains data that is passed to the caller when a callback is made. The data contained in this variable is defined and set by the caller. The variable is passed, unmodified, directly to the caller as a parameter in the callback function. If this keyword is not set, the corresponding callback parameter's value is undefined.
- sslVerifyPeer in optional type=int default=spdfGetDefaultSslVerify()
Specifies whether the authenticity of the peer's SSL certificate should be verified. When 0, the connection succeeds regardless of what the peer SSL certificate contains.
Examples
d = spdfgetdata('AC_H2_MFI', ['Magnitude', 'BGSEc'], $ ['2013-01-01T00:00:00.000Z', '2013-01-03T00:00:00.000Z'], $ /VERBOSE) The Epoch values are returned in d.epoch.dat The Magnitude values are in d.magnitude.dat The BGSEc values are in d.bgsec.dat To see further info. about each variable type help, /struct, d."variablename" To make a plot with the CDAWlib s/w type s = plotmaster(d, /AUTO, /CDAWEB, /GIF, /SMOOTH, /SLOW)
File attributes
Modification date: | Mon May 20 05:39:06 2024 |
Lines: | 100 |
CDAS Feedback.