API/Web Routes¶
- GET /marvin/api/cubes/¶
Returns general cube info
- Query Parameters
release (string) – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – data message
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/cubes/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": "this is a cube!" }
- POST /marvin/api/cubes/(name)/¶
Returns the necessary information to instantiate a cube for a given plateifu.
- Parameters
name – The name of the cube as plate-ifu or mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifu (string) – id of cube
mangaid (string) – mangaid of cube
ra (float) – RA of cube
dec (float) – Dec of cube
header (string) – the cube header as a string
redshift (float) – the cube redshift
wavelength (list) – the cube wavelength array
wcs_header (string) – the cube wcs_header as a string
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/cubes/8485-1901/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifu": "8485-1901", "mangaid": "1-209232", "ra": 232.544703894, "dec": 48.6902009334, "header": "XTENSION= 'IMAGE', NAXIS=3, .... END", "wcs_header": "WCSAXES = 3 / Number of coordindate axes .... END", "redshift": 0.0407447, "wavelength": [3621.6, 3622.43,...,10353.8] } }
- GET /marvin/api/cubes/(name)/¶
Returns the necessary information to instantiate a cube for a given plateifu.
- Parameters
name – The name of the cube as plate-ifu or mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifu (string) – id of cube
mangaid (string) – mangaid of cube
ra (float) – RA of cube
dec (float) – Dec of cube
header (string) – the cube header as a string
redshift (float) – the cube redshift
wavelength (list) – the cube wavelength array
wcs_header (string) – the cube wcs_header as a string
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/cubes/8485-1901/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifu": "8485-1901", "mangaid": "1-209232", "ra": 232.544703894, "dec": 48.6902009334, "header": "XTENSION= 'IMAGE', NAXIS=3, .... END", "wcs_header": "WCSAXES = 3 / Number of coordindate axes .... END", "redshift": 0.0407447, "wavelength": [3621.6, 3622.43,...,10353.8] } }
- POST /marvin/api/cubes/(name)/extensions/(cube_extension)/¶
Returns the extension for a cube given a plateifu/mangaid.
- Parameters
name – The name of the cube as plate-ifu or mangaid
cube_extension – The name of the cube extension. Either flux, ivar, or mask.
- Form Parameters
release – the release of MaNGA
use_file – if True, forces to load the cube from a file.
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
cube_extension (string) – the data for the specified extension
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/cubes/8485-1901/extensions/flux/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"extension_data": [[0,0,..0], [], ... [0, 0, 0,... 0]] } }
- GET /marvin/api/cubes/(name)/extensions/(cube_extension)/¶
Returns the extension for a cube given a plateifu/mangaid.
- Parameters
name – The name of the cube as plate-ifu or mangaid
cube_extension – The name of the cube extension. Either flux, ivar, or mask.
- Form Parameters
release – the release of MaNGA
use_file – if True, forces to load the cube from a file.
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
cube_extension (string) – the data for the specified extension
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/cubes/8485-1901/extensions/flux/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"extension_data": [[0,0,..0], [], ... [0, 0, 0,... 0]] } }
- POST /marvin/api/cubes/(name)/quantities/(x)/(y)/¶
Returns a dictionary with all the quantities.
- Parameters
name – The name of the cube as plate-ifu or mangaid
x – The x coordinate of the spaxel (origin is
lower
)y – The y coordinate of the spaxel (origin is
lower
)
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/cubes/8485-1901/quantities/10/12/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"flux": {"value": [0,0,..0], "ivar": ...}, "specres": ...} } }
- GET /marvin/api/cubes/(name)/quantities/(x)/(y)/¶
Returns a dictionary with all the quantities.
- Parameters
name – The name of the cube as plate-ifu or mangaid
x – The x coordinate of the spaxel (origin is
lower
)y – The y coordinate of the spaxel (origin is
lower
)
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/cubes/8485-1901/quantities/10/12/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"flux": {"value": [0,0,..0], "ivar": ...}, "specres": ...} } }
- GET /marvin/api/cubes/check_release/(release)/¶
check a release against the list of supported API releases
- GET /marvin/api/cubes/set_allowed_releases/¶
set the supported API / web MaNGA releases
- GET /marvin/api/general/check_release/(release)/¶
check a release against the list of supported API releases
- GET /marvin/api/general/getroutemap/¶
Build the URL route map for all routes in the Flask app.
Syntax of output: {“api”: {blueprint: {endpoint: {‘methods’:x, ‘url’:x} } }
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
urlmap (dict) – dict of the Marvin API routes
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
- Raises BrainError
Raised when url_for can’t format the endpoint name into a valid url.
Example request:
GET /marvin/api/general/getroutemap/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"urlmap": {"api": {"CubeView:index": {"methods": "HEAD,OPTIONS,GET","url": "/marvin2/api/cubes/"}, ... } } }
- POST /marvin/api/general/login/¶
Server-Side login to generate a new token
- POST /marvin/api/general/mangaid2plateifu/(mangaid)/¶
Returns a plateifu given a mangaid
- Parameters
mangaid – The name of the cube as mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifu (string) – id of cube as plateifu
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/general/mangaid2plateifu/1-209232/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {8485-1901"} }
- GET /marvin/api/general/mangaid2plateifu/(mangaid)/¶
Returns a plateifu given a mangaid
- Parameters
mangaid – The name of the cube as mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifu (string) – id of cube as plateifu
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/general/mangaid2plateifu/1-209232/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {8485-1901"} }
- POST /marvin/api/general/nsa/drpall/(mangaid)/¶
Returns the NSA data in drpall for a given mangaid.
Note that this always uses the drpver/drpall versions that are default in the server.
- Parameters
mangaid – The name of the cube as mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
nsa_data (dict) – dict of the NSA parameters from the DRPall file
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/general/nsa/drpall/1-209232/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"camcol": 2, "elpetro_absmag": [-14.3422, -15.7994,-17.0133, ...], "elpetro_amivar": [], ... } }
- GET /marvin/api/general/nsa/drpall/(mangaid)/¶
Returns the NSA data in drpall for a given mangaid.
Note that this always uses the drpver/drpall versions that are default in the server.
- Parameters
mangaid – The name of the cube as mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
nsa_data (dict) – dict of the NSA parameters from the DRPall file
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/general/nsa/drpall/1-209232/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"camcol": 2, "elpetro_absmag": [-14.3422, -15.7994,-17.0133, ...], "elpetro_amivar": [], ... } }
- POST /marvin/api/general/nsa/full/(mangaid)/¶
Returns the NSA data for a given mangaid from the full catalogue.
- Parameters
mangaid – The name of the cube as mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
nsa_data (dict) – dict of all the NSA parameters
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/general/nsa/full/1-209232/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"aid": 0, "asymmetry":[-0.0217, 0.00517, -0.0187, ...], "bastokes": [[0.7290, 0.9677, ...], [], ...], ... } }
- GET /marvin/api/general/nsa/full/(mangaid)/¶
Returns the NSA data for a given mangaid from the full catalogue.
- Parameters
mangaid – The name of the cube as mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
nsa_data (dict) – dict of all the NSA parameters
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/general/nsa/full/1-209232/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"aid": 0, "asymmetry":[-0.0217, 0.00517, -0.0187, ...], "bastokes": [[0.7290, 0.9677, ...], [], ...], ... } }
- GET /marvin/api/general/set_allowed_releases/¶
set the supported API / web MaNGA releases
- GET /marvin/api/maps/¶
Returns general maps info
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – data message
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": "this is a maps!" }
- POST /marvin/api/maps/(name)/¶
- POST /marvin/api/maps/(name)/(bintype)/¶
- POST /marvin/api/maps/(name)/(bintype)/(template)/¶
Returns the parameters needed to initialise a Maps remotely.
- Parameters
name – The name of the maps as plate-ifu or mangaid
bintype – The bintype associated with this maps. If not defined, the default is used
template – The template associated with this maps. If not defined, the default is used
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifu (string) – id of maps
mangaid (string) – mangaid of maps
header (string) – the maps header as a string
shape (list) – the maps shape [x, y]
wcs (string) – the maps wcs_header as a string
bintype (string) – the bintype of the maps
template (string) – the template library of the maps
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/SPX/GAU-MILESHC/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifu": "8485-1901", "mangaid": "1-209232", "header": "XTENSION= 'IMAGE', NAXIS=3, .... END", "wcs_header": "WCSAXES = 3 / Number of coordindate axes .... END", "shape": [34, 34], "bintype": "SPX", "template": "GAU-MILESHC" } }
- GET /marvin/api/maps/(name)/¶
- GET /marvin/api/maps/(name)/(bintype)/¶
- GET /marvin/api/maps/(name)/(bintype)/(template)/¶
Returns the parameters needed to initialise a Maps remotely.
- Parameters
name – The name of the maps as plate-ifu or mangaid
bintype – The bintype associated with this maps. If not defined, the default is used
template – The template associated with this maps. If not defined, the default is used
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifu (string) – id of maps
mangaid (string) – mangaid of maps
header (string) – the maps header as a string
shape (list) – the maps shape [x, y]
wcs (string) – the maps wcs_header as a string
bintype (string) – the bintype of the maps
template (string) – the template library of the maps
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/SPX/GAU-MILESHC/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifu": "8485-1901", "mangaid": "1-209232", "header": "XTENSION= 'IMAGE', NAXIS=3, .... END", "wcs_header": "WCSAXES = 3 / Number of coordindate axes .... END", "shape": [34, 34], "bintype": "SPX", "template": "GAU-MILESHC" } }
- POST /marvin/api/maps/(name)/(bintype)/(template)/map/(property_name)/¶
- POST /marvin/api/maps/(name)/(bintype)/(template)/map/(property_name)/(channel)/¶
Returns data, ivar, mask, and unit for a given map.
- Parameters
name – The name of the maps as plate-ifu or mangaid
bintype – The bintype associated with this maps. If not defined, the default is used
template – The template associated with this maps. If not defined, the default is used
property_name – The property_name of the map to be extractred. E.g.,
'emline_gflux'
.channel – If the
property_name
contains multiple channels, the channel to use, e.g.,ha_6564'. Otherwise, ``None
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
value (list) – the data values of this map
ivar (list) – the ivar values of this map
mask (list) – the mask values of this map
unit (string) – the unit on this channel for the given map property
header (dict) – a dictionary of the header for this map
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/SPX/GAU-MILESHC/map/emline_gflux/ha_6564/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"header": {"BITPIX": "-64", "C01": "OIId-3728", ...}, "unit": "1E-17 erg/s/cm^2/spaxel", "value": [[0.0,0.0,0.0,...], [0,0,0,...], ... ], "ivar": [[0.0,0.0,0.0,...], [0,0,0,...], ... ], "mask": [[1073741843, 1073741843, 1073741843, ...], [1073741843, 1073741843, 1073741843, ...], ... ] } }
- GET /marvin/api/maps/(name)/(bintype)/(template)/map/(property_name)/¶
- GET /marvin/api/maps/(name)/(bintype)/(template)/map/(property_name)/(channel)/¶
Returns data, ivar, mask, and unit for a given map.
- Parameters
name – The name of the maps as plate-ifu or mangaid
bintype – The bintype associated with this maps. If not defined, the default is used
template – The template associated with this maps. If not defined, the default is used
property_name – The property_name of the map to be extractred. E.g.,
'emline_gflux'
.channel – If the
property_name
contains multiple channels, the channel to use, e.g.,ha_6564'. Otherwise, ``None
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
value (list) – the data values of this map
ivar (list) – the ivar values of this map
mask (list) – the mask values of this map
unit (string) – the unit on this channel for the given map property
header (dict) – a dictionary of the header for this map
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/SPX/GAU-MILESHC/map/emline_gflux/ha_6564/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"header": {"BITPIX": "-64", "C01": "OIId-3728", ...}, "unit": "1E-17 erg/s/cm^2/spaxel", "value": [[0.0,0.0,0.0,...], [0,0,0,...], ... ], "ivar": [[0.0,0.0,0.0,...], [0,0,0,...], ... ], "mask": [[1073741843, 1073741843, 1073741843, ...], [1073741843, 1073741843, 1073741843, ...], ... ] } }
- POST /marvin/api/maps/(name)/(bintype)/(template)/quantities/(x)/(y)/¶
Returns a dictionary with all the quantities.
- Parameters
name – The name of the maps as plate-ifu or mangaid
x – The x coordinate of the spaxel (origin is
lower
)y – The y coordinate of the spaxel (origin is
lower
)
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/quantities/10/12/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"emline_gflux_ha6564": {"value": 2.3, "ivar": ...}, "binid": ...} } }
- GET /marvin/api/maps/(name)/(bintype)/(template)/quantities/(x)/(y)/¶
Returns a dictionary with all the quantities.
- Parameters
name – The name of the maps as plate-ifu or mangaid
x – The x coordinate of the spaxel (origin is
lower
)y – The y coordinate of the spaxel (origin is
lower
)
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/quantities/10/12/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"emline_gflux_ha6564": {"value": 2.3, "ivar": ...}, "binid": ...} } }
- POST /marvin/api/maps/(name)/dapall¶
- POST /marvin/api/maps/(name)/(bintype)/dapall¶
- POST /marvin/api/maps/(name)/(bintype)/(template)/dapall¶
Returns the DAPall data for a given mangaid or plateifu.
- Parameters
name – The name of the observation as mangaid or plateifu
bintype – The bintype associated with this maps. If not defined, the default is used
template – The template associated with this maps. If not defined, the default is used
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
dapall_data (dict) – dict of the DAPall parameters
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/SPX/GAU-MILESHC/dapall HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"dapall_data": {"plate": 7443, "ifudesign": 12701, ... } } }
- GET /marvin/api/maps/(name)/dapall¶
- GET /marvin/api/maps/(name)/(bintype)/dapall¶
- GET /marvin/api/maps/(name)/(bintype)/(template)/dapall¶
Returns the DAPall data for a given mangaid or plateifu.
- Parameters
name – The name of the observation as mangaid or plateifu
bintype – The bintype associated with this maps. If not defined, the default is used
template – The template associated with this maps. If not defined, the default is used
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
dapall_data (dict) – dict of the DAPall parameters
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/maps/8485-1901/SPX/GAU-MILESHC/dapall HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"dapall_data": {"plate": 7443, "ifudesign": 12701, ... } } }
- GET /marvin/api/maps/check_release/(release)/¶
check a release against the list of supported API releases
- GET /marvin/api/maps/set_allowed_releases/¶
set the supported API / web MaNGA releases
- POST /marvin/api/modelcubes/(name)/¶
- POST /marvin/api/modelcubes/(name)/(bintype)/¶
- POST /marvin/api/modelcubes/(name)/(bintype)/(template)/¶
Retrieves a ModelCube.
- Parameters
name – The name of the modelcube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube. If not defined, the default is used
template – The template associated with this modelcube. If not defined, the default is used
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
header (string) – the modelcube header as a string
shape (list) – the modelcube shape [x, y]
wavelength (list) – the modelcube wavelength array
redcorr (list) – the modelcube redcorr array
wcs_header (string) – the modelcube wcs_header as a string
bintype (string) – the bintype of the modelcube
template (string) – the template library of the modelcube
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/SPX/GAU-MILESHC/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifu": 8485-1901, "mangaid": '1-209232', "header": "XTENSION= 'IMAGE', NAXIS=3, .... END", "wcs_header": "WCSAXES = 3 / Number of coordindate axes .... END", "shape": [34, 34], "wavelength": [3621.6, 3622.43, 3623.26, ...], "redcorr": [1.06588, 1.065866, 1.06585, ...], "bintype": "SPX", "template": "GAU-MILESHC" } }
- GET /marvin/api/modelcubes/(name)/¶
- GET /marvin/api/modelcubes/(name)/(bintype)/¶
- GET /marvin/api/modelcubes/(name)/(bintype)/(template)/¶
Retrieves a ModelCube.
- Parameters
name – The name of the modelcube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube. If not defined, the default is used
template – The template associated with this modelcube. If not defined, the default is used
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
header (string) – the modelcube header as a string
shape (list) – the modelcube shape [x, y]
wavelength (list) – the modelcube wavelength array
redcorr (list) – the modelcube redcorr array
wcs_header (string) – the modelcube wcs_header as a string
bintype (string) – the bintype of the modelcube
template (string) – the template library of the modelcube
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/SPX/GAU-MILESHC/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifu": 8485-1901, "mangaid": '1-209232', "header": "XTENSION= 'IMAGE', NAXIS=3, .... END", "wcs_header": "WCSAXES = 3 / Number of coordindate axes .... END", "shape": [34, 34], "wavelength": [3621.6, 3622.43, 3623.26, ...], "redcorr": [1.06588, 1.065866, 1.06585, ...], "bintype": "SPX", "template": "GAU-MILESHC" } }
- POST /marvin/api/modelcubes/(name)/(bintype)/(template)/quantities/(x)/(y)/¶
Returns a dictionary with all the quantities.
- Parameters
name – The name of the cube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube.
template – The template associated with this modelcube.
x – The x coordinate of the spaxel (origin is
lower
)y – The y coordinate of the spaxel (origin is
lower
)
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/SPX/GAU_MILESHC/quantities/10/12/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"binned_flux": {"value": [0,0,..0], "ivar": ...}, "emline_fit": ...} } }
- GET /marvin/api/modelcubes/(name)/(bintype)/(template)/quantities/(x)/(y)/¶
Returns a dictionary with all the quantities.
- Parameters
name – The name of the cube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube.
template – The template associated with this modelcube.
x – The x coordinate of the spaxel (origin is
lower
)y – The y coordinate of the spaxel (origin is
lower
)
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/SPX/GAU_MILESHC/quantities/10/12/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"binned_flux": {"value": [0,0,..0], "ivar": ...}, "emline_fit": ...} } }
- POST /marvin/api/modelcubes/(name)/binids/(modelcube_extension)/¶
- POST /marvin/api/modelcubes/(name)/(bintype)/binids/(modelcube_extension)/¶
- POST /marvin/api/modelcubes/(name)/(bintype)/(template)/binids/(modelcube_extension)/¶
Returns the binid array for a modelcube given a plateifu/mangaid.
- Parameters
name – The name of the modelcube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube.
template – The template associated with this modelcube.
modelcube_extension – The name of the cube extension.
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
binid (string) – the binid data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/binids/flux/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"binid": [[0,0,..0], [], ... [0, 0, 0,... 0]] } }
- GET /marvin/api/modelcubes/(name)/binids/(modelcube_extension)/¶
- GET /marvin/api/modelcubes/(name)/(bintype)/binids/(modelcube_extension)/¶
- GET /marvin/api/modelcubes/(name)/(bintype)/(template)/binids/(modelcube_extension)/¶
Returns the binid array for a modelcube given a plateifu/mangaid.
- Parameters
name – The name of the modelcube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube.
template – The template associated with this modelcube.
modelcube_extension – The name of the cube extension.
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
binid (string) – the binid data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/binids/flux/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"binid": [[0,0,..0], [], ... [0, 0, 0,... 0]] } }
- POST /marvin/api/modelcubes/(name)/extensions/(modelcube_extension)/¶
- POST /marvin/api/modelcubes/(name)/(bintype)/extensions/(modelcube_extension)/¶
- POST /marvin/api/modelcubes/(name)/(bintype)/(template)/extensions/(modelcube_extension)/¶
Returns the extension for a modelcube given a plateifu/mangaid.
- Parameters
name – The name of the cube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube.
template – The template associated with this modelcube.
modelcube_extension – The name of the cube extension. Either flux, ivar, or mask.
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
modelcube_extension (string) – the data for the specified extension
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/extensions/flux/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"extension_data": [[0,0,..0], [], ... [0, 0, 0,... 0]] } }
- GET /marvin/api/modelcubes/(name)/extensions/(modelcube_extension)/¶
- GET /marvin/api/modelcubes/(name)/(bintype)/extensions/(modelcube_extension)/¶
- GET /marvin/api/modelcubes/(name)/(bintype)/(template)/extensions/(modelcube_extension)/¶
Returns the extension for a modelcube given a plateifu/mangaid.
- Parameters
name – The name of the cube as plate-ifu or mangaid
bintype – The bintype associated with this modelcube.
template – The template associated with this modelcube.
modelcube_extension – The name of the cube extension. Either flux, ivar, or mask.
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
modelcube_extension (string) – the data for the specified extension
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/modelcubes/8485-1901/extensions/flux/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"extension_data": [[0,0,..0], [], ... [0, 0, 0,... 0]] } }
- GET /marvin/api/modelcubes/check_release/(release)/¶
check a release against the list of supported API releases
- GET /marvin/api/modelcubes/set_allowed_releases/¶
set the supported API / web MaNGA releases
- GET /marvin/api/plates/¶
Returns general maps info
- Form Parameters
release – the release of MaNGA data
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – data message
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/plates/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": "this is a plate!" }
- POST /marvin/api/plates/(plateid)/¶
Retrieve basic info about a plate
- Parameters
plateid – The plateid you want
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateid (string) – the plateid
header (dict) – the cube header as a dict
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/plate/8485/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateid": "8485", "header": {"AIRMSMAX": "1.07643", "AIRMSMED": "1.04336", "AIRMSMIN": "1.03694", ... } } }
- GET /marvin/api/plates/(plateid)/¶
Retrieve basic info about a plate
- Parameters
plateid – The plateid you want
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateid (string) – the plateid
header (dict) – the cube header as a dict
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/plate/8485/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateid": "8485", "header": {"AIRMSMAX": "1.07643", "AIRMSMED": "1.04336", "AIRMSMIN": "1.03694", ... } } }
- POST /marvin/api/plates/(plateid)/cubes/¶
Returns a list of all the cubes for this plate
- Parameters
plateid – The plateid you want
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifus (list) – a list of plate-ifus for this plate
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/plate/8485/cubes/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifus": ["8485-12701","8485-12702","8485-1901","8485-1902", ...] } }
- GET /marvin/api/plates/(plateid)/cubes/¶
Returns a list of all the cubes for this plate
- Parameters
plateid – The plateid you want
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
plateifus (list) – a list of plate-ifus for this plate
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/plate/8485/cubes/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"plateifus": ["8485-12701","8485-12702","8485-1901","8485-1902", ...] } }
- GET /marvin/api/plates/check_release/(release)/¶
check a release against the list of supported API releases
- GET /marvin/api/plates/set_allowed_releases/¶
set the supported API / web MaNGA releases
- GET /marvin/api/query/¶
Returns general query info
- Query Parameters
release (string) – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – data message
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": "this is a query!" }
- GET /marvin/api/query/check_release/(release)/¶
check a release against the list of supported API releases
- POST /marvin/api/query/cleanup/¶
Clean up idle server-side queries or retrieve the list of them
Do not use!
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
task –
clean
orgetprocs
, the type of task to run
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
clean (string) – clean success message
procs (list) – the list of processes currently running on the db
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cleanup/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": 'clean success' }
- GET /marvin/api/query/cleanup/¶
Clean up idle server-side queries or retrieve the list of them
Do not use!
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
task –
clean
orgetprocs
, the type of task to run
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
clean (string) – clean success message
procs (list) – the list of processes currently running on the db
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cleanup/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": 'clean success' }
- POST /marvin/api/query/cubes/¶
Performs a remote query
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
searchfilter – your string searchfilter expression
params – the list of return parameters
rettype – the string indicating your Marvin Tool conversion object
limit – the limiting number of results to return for large results
sort – a string parameter name to sort on
order – the order of the sort, either
desc
orasc
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
results (list) – the list of results
query (string) – the raw SQL string of your query
chunk (int) – the page limit of the results
filter (string) – the searchfilter used
returnparams (list) – the list of return parameters
params (list) – the list of parameters used in the query
queryparams_order (list) – the list of parameters used in the query
runtime (dict) – a dictionary of query time (days, minutes, seconds)
totalcount (int) – the total count of results
count (int) – the count in the current page of results
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cubes/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5", "searchfilter": "nsa.z<0.1"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "chunk": 100, "count": 4, "data": [["1-209232",8485,"8485-1901","1901",0.0407447], ["1-209113",8485,"8485-1902","1902",0.0378877], ["1-209191",8485,"8485-12701","12701",0.0234253], ["1-209151",8485,"8485-12702","12702",0.0185246] ], "filter": "nsa.z<0.1", "params": ["cube.mangaid","cube.plate","cube.plateifu","ifu.name","nsa.z"], "query": "SELECT ... FROM ... WHERE ...", "queryparams_order": ["mangaid","plate","plateifu","name","z"], "returnparams": null, "runtime": {"days": 0,"microseconds": 55986,"seconds": 0}, "totalcount": 4 }
- GET /marvin/api/query/cubes/¶
Performs a remote query
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
searchfilter – your string searchfilter expression
params – the list of return parameters
rettype – the string indicating your Marvin Tool conversion object
limit – the limiting number of results to return for large results
sort – a string parameter name to sort on
order – the order of the sort, either
desc
orasc
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
results (list) – the list of results
query (string) – the raw SQL string of your query
chunk (int) – the page limit of the results
filter (string) – the searchfilter used
returnparams (list) – the list of return parameters
params (list) – the list of parameters used in the query
queryparams_order (list) – the list of parameters used in the query
runtime (dict) – a dictionary of query time (days, minutes, seconds)
totalcount (int) – the total count of results
count (int) – the count in the current page of results
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cubes/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5", "searchfilter": "nsa.z<0.1"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "chunk": 100, "count": 4, "data": [["1-209232",8485,"8485-1901","1901",0.0407447], ["1-209113",8485,"8485-1902","1902",0.0378877], ["1-209191",8485,"8485-12701","12701",0.0234253], ["1-209151",8485,"8485-12702","12702",0.0185246] ], "filter": "nsa.z<0.1", "params": ["cube.mangaid","cube.plate","cube.plateifu","ifu.name","nsa.z"], "query": "SELECT ... FROM ... WHERE ...", "queryparams_order": ["mangaid","plate","plateifu","name","z"], "returnparams": null, "runtime": {"days": 0,"microseconds": 55986,"seconds": 0}, "totalcount": 4 }
- POST /marvin/api/query/cubes/columns/¶
- POST /marvin/api/query/cubes/columns/(colname)/¶
Retrieves the entire result set for a single column
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
searchfilter – your string searchfilter expression
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
column (list) – the list of results for the specified column
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cubes/columns/plateifu/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5", "searchfilter": "nsa.z<0.1"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "chunk": 100, "count": 4, "data": ["8485-1901", "8485-1902", "8485-12701", "7443-12701", "8485-12702"], }
- GET /marvin/api/query/cubes/columns/¶
- GET /marvin/api/query/cubes/columns/(colname)/¶
Retrieves the entire result set for a single column
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
searchfilter – your string searchfilter expression
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
column (list) – the list of results for the specified column
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cubes/columns/plateifu/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5", "searchfilter": "nsa.z<0.1"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "chunk": 100, "count": 4, "data": ["8485-1901", "8485-1902", "8485-12701", "7443-12701", "8485-12702"], }
- POST /marvin/api/query/cubes/getsubset/¶
Remotely grab a subset of results from a query
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
searchfilter – your string searchfilter expression
params – the list of return parameters
rettype – the string indicating your Marvin Tool conversion object
start – the starting page index of results you wish to grab
end – the ending page index of the results you wish to grab
limit – the limiting number of results to return for large results
sort – a string parameter name to sort on
order – the order of the sort, either
desc
orasc
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
results (list) – the list of results
query (string) – the raw SQL string of your query
chunk (int) – the page limit of the results
filter (string) – the searchfilter used
returnparams (list) – the list of return parameters
params (list) – the list of parameters used in the query
queryparams_order (list) – the list of parameters used in the query
runtime (dict) – a dictionary of query time (days, minutes, seconds)
totalcount (int) – the total count of results
count (int) – the count in the current page of results
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cubes/getsubset/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5", "searchfilter": "nsa.z<0.1", "start":10, "end":15}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "chunk": 100, "count": 4, "data": [["1-209232",8485,"8485-1901","1901",0.0407447], ["1-209113",8485,"8485-1902","1902",0.0378877], ["1-209191",8485,"8485-12701","12701",0.0234253], ["1-209151",8485,"8485-12702","12702",0.0185246] ], "filter": "nsa.z<0.1", "params": ["cube.mangaid","cube.plate","cube.plateifu","ifu.name","nsa.z"], "query": "SELECT ... FROM ... WHERE ...", "queryparams_order": ["mangaid","plate","plateifu","name","z"], "returnparams": null, "runtime": {"days": 0,"microseconds": 55986,"seconds": 0}, "totalcount": 4 }
- GET /marvin/api/query/cubes/getsubset/¶
Remotely grab a subset of results from a query
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
searchfilter – your string searchfilter expression
params – the list of return parameters
rettype – the string indicating your Marvin Tool conversion object
start – the starting page index of results you wish to grab
end – the ending page index of the results you wish to grab
limit – the limiting number of results to return for large results
sort – a string parameter name to sort on
order – the order of the sort, either
desc
orasc
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
results (list) – the list of results
query (string) – the raw SQL string of your query
chunk (int) – the page limit of the results
filter (string) – the searchfilter used
returnparams (list) – the list of return parameters
params (list) – the list of parameters used in the query
queryparams_order (list) – the list of parameters used in the query
runtime (dict) – a dictionary of query time (days, minutes, seconds)
totalcount (int) – the total count of results
count (int) – the count in the current page of results
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/cubes/getsubset/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5", "searchfilter": "nsa.z<0.1", "start":10, "end":15}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "chunk": 100, "count": 4, "data": [["1-209232",8485,"8485-1901","1901",0.0407447], ["1-209113",8485,"8485-1902","1902",0.0378877], ["1-209191",8485,"8485-12701","12701",0.0234253], ["1-209151",8485,"8485-12702","12702",0.0185246] ], "filter": "nsa.z<0.1", "params": ["cube.mangaid","cube.plate","cube.plateifu","ifu.name","nsa.z"], "query": "SELECT ... FROM ... WHERE ...", "queryparams_order": ["mangaid","plate","plateifu","name","z"], "returnparams": null, "runtime": {"days": 0,"microseconds": 55986,"seconds": 0}, "totalcount": 4 }
- POST /marvin/api/query/getallparams/¶
Retrieve all the query parameters for all releases at once
- GET /marvin/api/query/getallparams/¶
Retrieve all the query parameters for all releases at once
- POST /marvin/api/query/getparamslist/¶
Retrieve a list of all available input parameters into the query
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
paramdisplay –
all
orbest
, type of parameters to return
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
params (list) – the list of queryable parameters
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/getparamslist/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": ['nsa.z', 'cube.ra', 'cube.dec', ...] }
- GET /marvin/api/query/getparamslist/¶
Retrieve a list of all available input parameters into the query
- Query Parameters
release (string) – the release of MaNGA
- Form Parameters
paramdisplay –
all
orbest
, type of parameters to return
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (string) – dictionary of returned data
- JSON Parameters
params (list) – the list of queryable parameters
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/query/getparamslist/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": ['nsa.z', 'cube.ra', 'cube.dec', ...] }
- GET /marvin/api/query/set_allowed_releases/¶
set the supported API / web MaNGA releases
- POST /marvin/api/query/stream/¶
test query generator stream
- GET /marvin/api/query/stream/¶
test query generator stream
- POST /marvin/api/rss/(name)/¶
This method performs a get request at the url route /rss/<id>.
- Parameters
name – The name of the cube as plate-ifu or mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
empty (string) – the data dict is empty
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/rss/8485-1901/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {} }
- GET /marvin/api/rss/(name)/¶
This method performs a get request at the url route /rss/<id>.
- Parameters
name – The name of the cube as plate-ifu or mangaid
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- JSON Parameters
empty (string) – the data dict is empty
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/rss/8485-1901/ HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {} }
- POST /marvin/api/rss/(name)/fibers/(fiberid)¶
Returns a list of all the RSS arrays for a given fibre.
- Parameters
name – The name of the cube as plate-ifu or mangaid
fiberid – The fiberid of the fibre to retrieve.
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/rss/8485-1901/fibers/15 HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"flux": [1., 2., 3., ...] "wavelength": [3621.6, 3622.43, 3623.26, ...], "ivar: ..., "mask: ..., "dispersion": ... ... } }
- GET /marvin/api/rss/(name)/fibers/(fiberid)¶
Returns a list of all the RSS arrays for a given fibre.
- Parameters
name – The name of the cube as plate-ifu or mangaid
fiberid – The fiberid of the fibre to retrieve.
- Form Parameters
release – the release of MaNGA
- Response JSON Object
status (int) – status of response. 1 if good, -1 if bad.
error (string) – error message, null if None
inconfig (json) – json of incoming configuration
utahconfig (json) – json of outcoming configuration
traceback (string) – traceback of an error, null if None
data (json) – dictionary of returned data
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – no error
422 Unprocessable Entity – invalid input parameters
Example request:
GET /marvin/api/rss/8485-1901/fibers/15 HTTP/1.1 Host: api.sdss.org Accept: application/json, */*
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "status": 1, "error": null, "inconfig": {"release": "MPL-5"}, "utahconfig": {"release": "MPL-5", "mode": "local"}, "traceback": null, "data": {"flux": [1., 2., 3., ...] "wavelength": [3621.6, 3622.43, 3623.26, ...], "ivar: ..., "mask: ..., "dispersion": ... ... } }
- GET /marvin/api/rss/check_release/(release)/¶
check a release against the list of supported API releases
- GET /marvin/api/rss/set_allowed_releases/¶
set the supported API / web MaNGA releases