-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hapi treats complex numbers as two dimensional real vectors for example the info request:
https://cdaweb.gsfc.nasa.gov/hapi/info?id=RBSP-B_WFR-SPECTRAL-MATRIX_EMFISIS-L2¶meters=BwEu, where information on the spectral power matrix component formed by the magnetic field w-antenna and electric field u-antenna measurements: BwEu is requested.
Returns
{
"HAPI": "2.0",
"status": {"code": 1200, "message": "OK"},
"parameters": [
{
"name": "Time",
"type": "isotime",
"units": "UTC",
"length":30,
"fill": null
},
{
"name": "BwEu",
"type": "double",
"units": "nT*V/m/Hz",
"fill": "-1.0E31",
"description": "---> [NO PLOTS] BwEu amplitude",
"size": [2,65],
"bins": [
{
"name": "Complex",
"units": " ",
"centers":[1.00e+00,2.00e+00]
},
{
"name": "WFR_frequencies_Fixed",
"units": "Hz",
"centers":[2.14e+00,4.27e+00,6.41e+00,8.55e+00,1.07e+01,1.28e+01,1.49e+01,1.71e+01,1.92e+01,2.14e+01,2.35e+01,2.56e+01,2.78e+01,3.10e+01,3.52e+01,3.95e+01,4.38e+01,4.91e+01,5.55e+01,6.30e+01,7.16e+01,8.01e+01,8.97e+01,1.00e+02,1.12e+02,1.26e+02,1.42e+02,1.59e+02,1.78e+02,2.00e+02,2.24e+02,2.52e+02,2.82e+02,3.16e+02,3.55e+02,3.98e+02,4.48e+02,5.02e+02,5.63e+02,6.31e+02,7.09e+02,7.96e+02,8.92e+02,1.00e+03,1.12e+03,1.26e+03,1.42e+03,1.59e+03,1.78e+03,2.00e+03,2.24e+03,2.52e+03,2.82e+03,3.17e+03,3.56e+03,3.99e+03,4.47e+03,5.02e+03,5.63e+03,6.32e+03,7.09e+03,7.96e+03,8.93e+03,1.00e+04,1.12e+04]
}
]
}
],
"startDate": "2012-09-01T00:00:04Z",
"stopDate": "2019-07-16T16:01:11Z",
"resourceURL": "https://cdaweb.gsfc.nasa.gov/misc/Notes.html#RBSP-B_WFR-SPECTRAL-MATRIX_EMFISIS-L2",
"contact": "voycrs@gmail.com"
}
The key "size" is [2,65] which is described by the key "bins" which indicates that the row is a complex number with 2 elements, of course, indicated by the Bins name "Complex", and the column is a frequency with 65 elements indicated by the Bins name "WFR_frequencies_Fixed", the server data stream is row major for this type of array. Currently the clients will return complex numbers as real 2D array or 2D sub-array and one must look at the “bins” name to determine if a dimension of size 2 of an array indicates it is a complex number.