Complete CDAS R1.8.6 Web Services API

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

spdfcdas__define.pro


This class represents the remotely callable interface to NASA's Space Physics Data Facility (SPDF) Coordinated Data Analysis System (CDAS).

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.

Class description for SpdfCdas

Properties

Properties in SpdfCdas

defaultDataview init
endpoint init
sslVerifyPeer init
userAgent init

Fields

Fields in SpdfCdas

currentVersionUrl ''

URL to the file identifying the most up to date version of this class.

defaultDataview ''

CDAS dataview to access when the dataview is not specified.

endpoint ''

URL of CDAS web service.

proxySettings obj_new()

HTTP proxy settings to use.

retryLimit 0L

retry limit for requests that fail with an http status of 429 or 503 with a Retry-After header.

ssl_verify_peer 0L

IDLnetURL SSL_VERIFY_PEER property value.

userAgent ''

HTTP user-agent value to use in communications with CDAS.

version ''

identifies the version of this class.

Routines

Routines from spdfcdas__define.pro

result = SpdfCdas::init( [endpoint=string] [, userAgent=string] [, defaultDataview=string] [, sslVerifyPeer=int])

Creates an object representing CDAS.

SpdfCdas::cleanup

Performs cleanup operations when this object is destroyed.

result = SpdfCdas::getEndpoint()

Gets the current endpoint value.

result = SpdfCdas::getUserAgent()

Gets the current userAgent value.

result = SpdfCdas::getDefaultDataview()

Gets the current defaultDataview value.

result = SpdfCdas::getVersion()

Gets the version of this class.

result = SpdfCdas::getCurrentVersion()

Gets the most up to date version of this class.

result = SpdfCdas::isUpToDate()

Compares getVersion() and getCurrentVersion() to determine if this class is up to date.

result = SpdfCdas::encode(value)

"Percent encodes" the given string to escape reserved charaters.

result = SpdfCdas::getNamedElementsFirstChildValue(domElement, tagName)

Gets the node's value of the first child of the first item of the specified element of the given DOM document.

result = SpdfCdas::getDataviews( [httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the dataviews that are available.

result = SpdfCdas::getObservatoryGroups( [dataview=string] [, instrumentTypes=strarr] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the observatory groups.

result = SpdfCdas::getInstrumentTypes( [dataview=string] [, observatoryGroups=strarr] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the instrument types.

result = SpdfCdas::getDatasets( [dataview=string] [, observatoryGroups=strarr] [, instrumentTypes=strarr] [, observatories=strarr] [, instruments=strarr] [, startDate=julday] [, stopDate=julday] [, identifier=string] [, idPattern=string] [, labelPattern=string] [, notesPattern=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the datasets.

result = SpdfCdas::getInventory(dataset [, dataview=string] [, timeInterval=SpdfTimeInterval] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of a dataset's data inventory.

result = SpdfCdas::getExampleTimeInterval(dataset [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a small example time interval for the specified dataset.

result = SpdfCdas::getVariables(dataset [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of a dataset's variables.

result = SpdfCdas::getVariableNames(dataset [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets the names of a dataset's variables.

result = SpdfCdas::getCdfData(timeIntervals, dataset, variables [, dataview=string] [, cdfVersion=int] [, cdfFormat=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets Common Data Format data from the specified dataset.

result = SpdfCdas::getTextData(timeInterval, dataset, variables [, dataview=string] [, compression=int] [, format=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a textual representation of data from the specified dataset.

result = SpdfCdas::getGraphData(timeInterval, datasetRequests [, dataview=string] [, graphOptions=int] [, imageFormat=strarr] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a graphical representation of data from the specified dataset.

result = SpdfCdas::getCdawlibData(timeIntervals, dataset, variables [, dataview=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter] [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference])

Gets data from the specified dataset and returns it in a CDAWlib structure.

result = SpdfCdas::getCdfDataHash(timeIntervals, dataset, variables [, dataview=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter] [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference])

Gets data from the specified dataset and returns it in an IDL Hash as defined by the CDF_READCDF function.

result = SpdfCdas::download(fileDescriptions [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference])

Downloads the specified remote files and returns their local filenames.

result = SpdfCdas::julDay2Iso8601(value)

Converts the given Julian Day value to an ISO 8601 string representation.

result = SpdfCdas::getData(dataRequest [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Make a request to CDAS for the specified data.

result = SpdfCdas::getDataResult(doc)

Creates an SpdfCdasDataResult object from the given cdas:DataResult XML document.

result = SpdfCdas::getFileDescriptions(doc)

Creates SpdfFileDescription object(s) from the FileDescription elements in the given cdas:DataResult XML document.

result = SpdfCdas::getThumbnailDescription(fileElement)

Creates an SpdfThumbnailDescription object from the FileDescription element in the given cdas:DataResult XML document.

result = SpdfCdas::getTimeIntervalChild(domNode)

Creates a SpdfTimeInterval object from a child TimeInterval element of the given node from a cdas:DataResult XML document.

result = SpdfCdas::getTimeInterval(timeIntervalElement)

Creates a SpdfTimeInterval object from the given TimeInterval element from a cdas:DataResult XML document.

result = SpdfCdas::getJulDate(dateTimeElement)

Creates a julday object from the given time element from a cdas:DataResult XML document.

result = SpdfCdas::getThumbnailId(fileElement)

Gets the ThumbnailId value from the given cdas:FileDescription element.

result = SpdfCdas::getDataResultText(resultDoc, type)

Gets the specified node values from the given cdas:DataResult XML document.

result = SpdfCdas::makeGetRequest(dataview, url [, authenticator=SpdfAuthenticator] [, errorReporter=string])

Perform an HTTP GET request to the given URL.

result = SpdfCdas::makePostRequest(dataview, url, xmlRequest [, authenticator=SpdfAuthenticator] [, errorReporter=string])

Perform an HTTP POST request to the given URL.

result = SpdfCdas::getResponseHeader(request, header)

Function to get an HTTP response header.

result = SpdfCdas::handleHttpError(request, dataview, username, password [, authenticator=SpdfAuthenticator] [, errorReporter=string])

Function to handle HTTP request errors.

result = SpdfCdas::getRequestUrl(url, username, password)

Create an IDLnetURL object from the given URL with any supplied authentication values set.

SpdfCdas__define

Defines the SpdfCdas class.

Routine details

top source SpdfCdas::init

result = SpdfCdas::init( [endpoint=string] [, userAgent=string] [, defaultDataview=string] [, sslVerifyPeer=int])

Creates an object representing CDAS. If access to the Internet is through an HTTP proxy, the caller should ensure that the HTTP_PROXY environment is correctly set before this method is called. The HTTP_PROXY value should be of the form http://username:password@hostname:port/.

Return value

a reference to a CDAS object.

Keywords

endpoint in optional type=string default='https://cdaweb.gsfc.nasa.gov/WS/cdasr/1'

URL of CDAS web service.

userAgent in optional type=string default=WsExample

HTTP user-agent value used in communications with CDAS.

defaultDataview in optional type=string default=sp_phys

default CDAS dataview value to use in subsequent calls when no value is specified.

sslVerifyPeer in optional type=int default=SpdfGetDefaultSslVerifyPeer()

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.

top source SpdfCdas::cleanup

SpdfCdas::cleanup

Performs cleanup operations when this object is destroyed.

top source SpdfCdas::getEndpoint

result = SpdfCdas::getEndpoint()

Gets the current endpoint value.

Return value

current endpoint string value.

top source SpdfCdas::getUserAgent

result = SpdfCdas::getUserAgent()

Gets the current userAgent value.

Return value

current userAgent string value.

top source SpdfCdas::getDefaultDataview

result = SpdfCdas::getDefaultDataview()

Gets the current defaultDataview value.

Return value

current defaultDataview string value.

top source SpdfCdas::getVersion

result = SpdfCdas::getVersion()

Gets the version of this class.

Return value

version of this class.

top source SpdfCdas::getCurrentVersion

result = SpdfCdas::getCurrentVersion()

Gets the most up to date version of this class.

Return value

most up to date version of this class.

top source SpdfCdas::isUpToDate

result = SpdfCdas::isUpToDate()

Compares getVersion() and getCurrentVersion() to determine if this class is up to date.

Return value

true if getVersion() >= getCurrentVersion(). Otherwise false.

top source SpdfCdas::encode

result = SpdfCdas::encode(value)

"Percent encodes" the given string to escape reserved charaters. This method is merely a wrapper around the IDLnetURL::URLEncode method which does nothing on versions of IDL where the IDLnetURL::URLEncode method does not exist.

Return value

percent encoded representation of the given value or the orignal value if called on a version of IDL without the IDLnetURL::URLEncode method.

Parameters

value in required type=string

the string to be encoded.

top source SpdfCdas::getNamedElementsFirstChildValueprivate

result = SpdfCdas::getNamedElementsFirstChildValue(domElement, tagName)

Gets the node's value of the first child of the first item of the specified element of the given DOM document.

Return value

node's string value(s) of the first child of the item(s) of the specified element of the given DOM document. An empty string is returned if the value cannot be found.

Parameters

domElement in required type=IDLffXMLDOMDocument

DOM element to search

tagName in required type=string

A scalar string containing the tag name of the desired element.

top source SpdfCdas::getDataviews

result = SpdfCdas::getDataviews( [httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the dataviews that are available.

Return value

array of SpdfDataviewDescription objects. If there are no dataviews, an array of length one is returned with the first element being a null object reference.

Keywords

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getObservatoryGroups

result = SpdfCdas::getObservatoryGroups( [dataview=string] [, instrumentTypes=strarr] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the observatory groups.

Return value

array of SpdfObservatoryGroupDescription objects. If there are no observatory groups, an array of length one is returned with the first element being a null object reference.

Keywords

dataview in optional type=string

name of dataview to access.

instrumentTypes in optional type=strarr

names of instrument-types which restrict the returned observatory groups to only those supporting the specified instrument-types. Valid values are those returned by getInstrumentTypes.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getInstrumentTypes

result = SpdfCdas::getInstrumentTypes( [dataview=string] [, observatoryGroups=strarr] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the instrument types.

Return value

array of SpdfInstrumentTypeDescription objects. If there are no intrument types, an array of length one is returned with the first element being a null object reference.

Keywords

dataview in optional type=string

name of dataview to access.

observatoryGroups in optional type=strarr

names of observatory-groups which restrict the returned instrument types to only those supporting the specified observatory-groups. Valid values are those returned by getObservatoryGroups.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getDatasets

result = SpdfCdas::getDatasets( [dataview=string] [, observatoryGroups=strarr] [, instrumentTypes=strarr] [, observatories=strarr] [, instruments=strarr] [, startDate=julday] [, stopDate=julday] [, identifier=string] [, idPattern=string] [, labelPattern=string] [, notesPattern=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of all the datasets.

Return value

array of SpdfDatasetDescription objects. If there are no datasets, an array of length one is returned with the first element being a null object reference.

Keywords

dataview in optional type=string

name of dataview to access.

observatoryGroups in optional type=strarr

names of observatory-groups which restrict the returned datasets to only those supporting the specified observatory-groups. Valid values are those returned by getObservatoryGroups.

instrumentTypes in optional type=strarr

names of instrument-types which restrict the returned datasets to only those supporting the specified instrument-types. Valid values are those returned by getInstrumentTypes.

observatories in optional type=strarr

names of observatories which restrict the returned datasets to only those supporting the specified observatories. Valid values are those returned by getObservatories.

instruments in optional type=strarr

names of instruments which restrict the returned datasets to only those supporting the specified instruments. Valid values are those returned by getInstruments.

startDate in optional type=julday

value that restricts the returned dataset to only those that contain data after this date.

stopDate in optional type=julday

value that restricts the returned dataset to only those that contain data before this date.

identifier in optional type=string

a dataset identifier. The value may be a CDAS (e.g., AC_H2_MFI), DOI (e.g., 10.48322/fh85-fj47), or SPASE [ResourceID] (e.g., spase://NASA/NumericalData/ACE/MAG/L2/PT1H) identifier. If specified, all other keywords are ignored.

idPattern in optional type=string

a java.util.regex compatible regular expression that must match the dataset's identifier value. Omitting this parameter is equivalent to ".*".

labelPattern in optional type=string

a java.util.regex compatible regular expression that must match the dataset's label text. Omitting this parameter is equivalent to ".*". Embedded matching flag expressions (e.g., (?i) for case insensitive match mode) are supported and likely to be useful in this case.

notesPattern in optional type=string

a java.util.regex compatible regular expression that must match the dataset's notes text. Omitting this parameter is equivalent to ".*". Embedded matching flag expressions (e.g., (?i) for case insensitive match mode) are supported and likely to be useful in this case.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getInventory

result = SpdfCdas::getInventory(dataset [, dataview=string] [, timeInterval=SpdfTimeInterval] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of a dataset's data inventory.

Return value

an SpdfInventoryDescription or a null reference if no inventory is available.

Parameters

dataset in type=string

identifies the dataset. A DOI value requires IDL 8.5.1 higher.

Keywords

dataview in optional type=string

name of dataview to access.

timeInterval in optional type=SpdfTimeInterval

TimeInteval to restrict return inventory.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getExampleTimeInterval

result = SpdfCdas::getExampleTimeInterval(dataset [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a small example time interval for the specified dataset. The interval is near the end of the dataset's data inventory. The returned interval is not guaranteed to have non-fill data for any specific variable.

Return value

an SpdfTimeInterval that is likely, but not guaranteed, to have data or a null reference if no interval is found.

Parameters

dataset in type=string

identifies the dataset. A DOI value requires IDL 8.5.1 higher.

Keywords

dataview in optional type=string

name of dataview to access.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getVariables

result = SpdfCdas::getVariables(dataset [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a description of a dataset's variables.

Return value

array of SpdfVariableDescription objects. If the dataset has no variables, an array of one null object is returned.

Parameters

dataset in type=string

identifies the dataset. A DOI value requires IDL 8.5.1 higher.

Keywords

dataview in optional type=string

name of dataview to access.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getVariableNames

result = SpdfCdas::getVariableNames(dataset [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets the names of a dataset's variables. This method is like the getVariables method except that it only return the variable names and not the other metadata in a SpdfVariableDescription object.

Return value

array of strings containing the dataset's variable names. If the dataset has no variables, !null is returned.

Parameters

dataset in type=string

identifies the dataset.

Keywords

dataview in optional type=string

name of dataview to access.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getCdfData

result = SpdfCdas::getCdfData(timeIntervals, dataset, variables [, dataview=string] [, cdfVersion=int] [, cdfFormat=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets Common Data Format data from the specified dataset.

Return value

SpdfCdasDataResult object.

Parameters

timeIntervals in type=objarr of SpdfTimeIntervals

time intervals of data to get.

dataset in type=string

identifies the dataset from which data is being requested.

variables in type=strarr

names of variable's whose data is being requested. If the first (only) name is "ALL-VARIABLES", then the resulting CDF will contain all variables.

Keywords

dataview in optional type=string

name of dataview to access.

cdfVersion in optional type=int

is the CDF file version that any created CDF files should be (2 or 3).

cdfFormat in optional type=string

CDF format of returned data. Valid values are: Binary, CDFML, GzipCDFML, ZipCDFML.

binData in optional type=SpdfBinData

data binning parameters to apply to the result file.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getTextData

result = SpdfCdas::getTextData(timeInterval, dataset, variables [, dataview=string] [, compression=int] [, format=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a textual representation of data from the specified dataset.

Return value

SpdfCdasDataResult object.

Parameters

timeInterval in type=SpdfTimeInterval

time range of data to get.

dataset in type=string

identifies the dataset from which data is being requested.

variables in type=strarr

names of variable's whose data is being requested. If no names are specified, the data of all variables is returned.

Keywords

dataview in optional type=string

name of dataview to access.

compression in optional type=int

the type of compression to use on the result file. Valid values are: Uncompressed, Gzip, Bzip2, Zip.

format in optional type=string default='Plain'

format of result file. Valid values are: Plain, CSV.

binData in optional type=SpdfBinData

data binning parameters to apply to the result file.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getGraphData

result = SpdfCdas::getGraphData(timeInterval, datasetRequests [, dataview=string] [, graphOptions=int] [, imageFormat=strarr] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Gets a graphical representation of data from the specified dataset.

Return value

SpdfCdasDataResult object.

Parameters

timeInterval in type=SpdfTimeInterval

time range of data to get.

datasetRequests in type=objarr of SpdfDatasetRequest

identifies the datasets and variables from which data is being requested.

Keywords

dataview in optional type=string

name of dataview to access.

graphOptions in optional type=int

graphing options. Valid values are: CoarseNoiseFilter, DoubleHeightYAxis, CombineGraphs.

imageFormat in optional type=strarr

Format options for graph. Valid values are: GIF, PNG, PS, PDF.

binData in optional type=SpdfBinData

data binning parameters to apply to the result file.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getCdawlibData

result = SpdfCdas::getCdawlibData(timeIntervals, dataset, variables [, dataview=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter] [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference])

Gets data from the specified dataset and returns it in a CDAWlib structure.

Return value

CDAWlib structure.

Parameters

timeIntervals in type=objarr of SpdfTimeIntervals

time intervals of data to get.

dataset in type=string

identifies the dataset from which data is being requested.

variables in type=strarr

names of variable's whose data is being requested. If the first (only) name is "ALL-VARIABLES", then the resulting CDF will contain all variables.

Keywords

dataview in optional type=string

name of dataview to access.

binData in optional type=SpdfBinData

data binning parameters to apply to the result file.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

keepfiles in optional type=boolean default=false

The KEEPFILES keyword causes downloaded data files to be retained. Normally these files are deleted after the data is read into the IDL environment.

quiet in optional type=boolean default=false

Suppresses error messages.

verbose in optional type=boolean default=false

The VERBOSE keyword causes additional status and debugging information to be printed.

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.

top source SpdfCdas::getCdfDataHash

result = SpdfCdas::getCdfDataHash(timeIntervals, dataset, variables [, dataview=string] [, binData=SpdfBinData] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter] [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference])

Gets data from the specified dataset and returns it in an IDL Hash as defined by the CDF_READCDF function. Use of this function requires CDF 3.8.1 or higher. The following is a brief example of what the returned hash looks like:

 {
     "CDFInfo": {
         "FileName": "test",
         "NumGlobalAttrs": 5,
         "NumVariableAttrs": 5,
         "NumVariables": 2,
         "Format": "SINGLE_FILE",
         "Majority": "ROW_MAJOR",
         "Version": "3.8.1",
         ...
    },
     "GlobalAttrs": {
         "Project": {
             0: "LWS>Living With a Star"
         },
         "Source_name": {
             0: "RBSP-B>Radiation Belt Storm Probe B"
         },
         ...
     },
     "Variables": {
         "Latitude": {
             "VarInfo": {
                 "DataType": "CDF_UINT1",
                 "NumElems": 1,
                 "RecVary": "VARY",
                 "NumDims": 1,
                 "DimSizes": [3],
                 ...
             },
            "VarAttrs": {
                 "VALIDMIN": -10,
                 "VALIDMAX": 90,
                 ...
             }
             "VarData": [[25, 54, 5], [15, 25, 35], [10, 28, 55]]
         },
         ...
     }
 }
 

Return value

HASH containing the data.

Parameters

timeIntervals in type=objarr of SpdfTimeIntervals

time intervals of data to get.

dataset in type=string

identifies the dataset from which data is being requested.

variables in type=strarr

names of variable's whose data is being requested. If the first (only) name is "ALL-VARIABLES", then the resulting CDF will contain all variables.

Keywords

dataview in optional type=string

name of dataview to access.

binData in optional type=SpdfBinData

data binning parameters to apply to the result file.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

keepfiles in optional type=boolean default=false

The KEEPFILES keyword causes downloaded data files to be retained. Normally these files are deleted after the data is read into the IDL environment.

quiet in optional type=boolean default=false

Suppresses error messages.

verbose in optional type=boolean default=false

The VERBOSE keyword causes additional status and debugging information to be printed.

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.

top source SpdfCdas::downloadprivate

result = SpdfCdas::download(fileDescriptions [, /keepfiles] [, /quiet] [, /verbose] [, callback_function=string] [, callback_data=reference])

Downloads the specified remote files and returns their local filenames.

Return value

HASH containing the data.

Parameters

fileDescriptions in type=objarr of SpdfFileDescription

The remote files to download.

Keywords

keepfiles in optional type=boolean default=false

The KEEPFILES keyword causes downloaded data files to be retained. Normally these files are deleted after the data is read into the IDL environment.

quiet in optional type=boolean default=false

Suppresses error messages.

verbose in optional type=boolean default=false

The VERBOSE keyword causes additional status and debugging information to be printed.

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.

top source SpdfCdas::julDay2Iso8601private

result = SpdfCdas::julDay2Iso8601(value)

Converts the given Julian Day value to an ISO 8601 string representation.

Return value

ISO 8601 string representation of the given value

Parameters

value in type=julDay

Julian day value to convert.

top source SpdfCdas::getDataprivate

result = SpdfCdas::getData(dataRequest [, dataview=string] [, authenticator=SpdfAuthenticator] [, httpErrorReporter=SpdfHttpErrorReporter])

Make a request to CDAS for the specified data.

Return value

SpdfCdasDataResult object.

Parameters

dataRequest in type=SpdfCdasDataRequest

specifies the data to get.

Keywords

dataview in optional type=string

name of dataview to access.

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

httpErrorReporter in optional type=SpdfHttpErrorReporter

used to report an HTTP error.

top source SpdfCdas::getDataResultprivate

result = SpdfCdas::getDataResult(doc)

Creates an SpdfCdasDataResult object from the given cdas:DataResult XML document.

Return value

SpdfCdasDataResult object.

Parameters

doc in type=IDLffXMLDOMDocument

cdas:DataResult XML document.

top source SpdfCdas::getFileDescriptionsprivate

result = SpdfCdas::getFileDescriptions(doc)

Creates SpdfFileDescription object(s) from the FileDescription elements in the given cdas:DataResult XML document.

Return value

objarr of SpdfFileDescription objects.

Parameters

doc in type=IDLffXMLDOMDocument

cdas:DataResult XML document.

top source SpdfCdas::getThumbnailDescriptionprivate

result = SpdfCdas::getThumbnailDescription(fileElement)

Creates an SpdfThumbnailDescription object from the FileDescription element in the given cdas:DataResult XML document.

Return value

SpdfThumbnailDescription object.

Parameters

fileElement in type=IDLffXMLDOMDocument

cdas:FileDescription element from a cdas:DataResult XML document.

top source SpdfCdas::getTimeIntervalChildprivate

result = SpdfCdas::getTimeIntervalChild(domNode)

Creates a SpdfTimeInterval object from a child TimeInterval element of the given node from a cdas:DataResult XML document.

Return value

a reference to a SpdfTimeInterval object.

Parameters

domNode in type=IDLffXMLDOMNode

node from a cdas:DataResult XML document.

top source SpdfCdas::getTimeIntervalprivate

result = SpdfCdas::getTimeInterval(timeIntervalElement)

Creates a SpdfTimeInterval object from the given TimeInterval element from a cdas:DataResult XML document.

Return value

a reference to a SpdfTimeInterval object.

Parameters

timeIntervalElement in type=IDLffXMLDOMNode

element from a cdas:DataResult XML document.

top source SpdfCdas::getJulDateprivate

result = SpdfCdas::getJulDate(dateTimeElement)

Creates a julday object from the given time element from a cdas:DataResult XML document.

Return value

julday representation of first child of given dateTimeElement.

Parameters

dateTimeElement in type=IDLffXMLDOMNodeList

list whose first child is to be converted into a julday

top source SpdfCdas::getThumbnailIdprivate

result = SpdfCdas::getThumbnailId(fileElement)

Gets the ThumbnailId value from the given cdas:FileDescription element.

Return value

ThumbnailId string value.

Parameters

fileElement in type=IDLffXMLDOMNode

cdas:FileDescription node.

top source SpdfCdas::getDataResultTextprivate

result = SpdfCdas::getDataResultText(resultDoc, type)

Gets the specified node values from the given cdas:DataResult XML document.

Return value

strarr of the specified node values from the given document.

Parameters

resultDoc in type=IDLffXMLDOMDocument

cdas:DataResult XML document.

type in type=string

name of elements whose value is to be gotten. This is expected to be one of Message, Warning, Status, or Error.

top source SpdfCdas::makeGetRequestprivate

result = SpdfCdas::makeGetRequest(dataview, url [, authenticator=SpdfAuthenticator] [, errorReporter=string])

Perform an HTTP GET request to the given URL. This method provides functionality similar to doing obj_new('IDLffXMLDOMDocument', filename=url) except that this method will catch an authorization error (401), call the supplied authenticator function, and then retry the request with the authentication credentials obtained from the call to the callers authentication function.

Return value

reference to IDLffXMLDOMDocument representation of HTTP response entity.

Parameters

dataview in type=string

name of dataview to access.

url in type=string

URL of GET request to make.

Keywords

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

errorReporter in optional type=string

name of IDL procedure to call if an HTTP error occurs.

top source SpdfCdas::makePostRequestprivate

result = SpdfCdas::makePostRequest(dataview, url, xmlRequest [, authenticator=SpdfAuthenticator] [, errorReporter=string])

Perform an HTTP POST request to the given URL. If an authorization error (401) occurs, the supplied authenticator function is called, and then the request is retried with the authentication credentials obtained from the call to the callers authentication function.

Return value

reference to IDLffXMLDOMDocument representation of HTTP response entity.

Parameters

dataview in type=string

name of dataview to access.

url in type=string

URL of GET request to make.

xmlRequest in type=string

XML entity body to be include in the request.

Keywords

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

errorReporter in optional type=string

name of IDL procedure to call if an HTTP error occurs.

top source SpdfCdas::getResponseHeaderprivate

result = SpdfCdas::getResponseHeader(request, header)

Function to get an HTTP response header.

Return value

the requested response header value or '' if it does not exist.

Parameters

request in type=IDLnetURL

HTTP request.

header in type=string

name of response header to get.

top source SpdfCdas::handleHttpErrorprivate

result = SpdfCdas::handleHttpError(request, dataview, username, password [, authenticator=SpdfAuthenticator] [, errorReporter=string])

Function to handle HTTP request errors. If an authorization error (401) has occurred and an authenticator is provided, the given authenticator is called to obtain authentication credentials. If 429 or 503 with a Retry-After header has occurred, execution is suspended for the Retry-After value. For any other error, if an errorReporter has been provided, it is called.

Return value

a value of 1 corrective action has occurred and a value of 0 if not. The corrective action for a 401 is setting the username and password. Corrective action for a 429/503 is waiting the specified time.

Parameters

request in type=IDLnetURL

HTTP request that caused the error.

dataview in type=string

name of dataview to access.

username out type=string

username value obtained by calling the given authenticator.

password out type=string

password value obtained by calling the given authenticator.

Keywords

authenticator in optional type=SpdfAuthenticator

authenticator that is used when a dataview requiring authentication is specified.

errorReporter in optional type=string

name of IDL procedure to call if an HTTP error occurs.

top source SpdfCdas::getRequestUrlprivate

result = SpdfCdas::getRequestUrl(url, username, password)

Create an IDLnetURL object from the given URL with any supplied authentication values set.

Return value

reference to a IDLnetURL with any supplied authentication values set.

Parameters

url in type=string

URL.

username in type=string

username.

password in type=string

password.

top source SpdfCdas__define

SpdfCdas__define

Defines the SpdfCdas class.

File attributes

Modification date: Fri Nov 1 13:35:58 2024
Lines: 1,066


CDAS Feedback.