sncosmo.read_griddata_fits¶
- sncosmo.read_griddata_fits(name_or_obj, ext=0)[source]¶
Read a multi-dimensional grid of data from a FITS file, where the grid coordinates are encoded in the FITS-WCS header keywords.
- Parameters:
- name_or_objstr or file-like object
- Returns:
- x0, x1, …
ndarray
1-d arrays giving coordinates of grid. The number of these arrays will depend on the dimension of the data array. For example, if the data have two dimensions, a total of three arrays will be returned:
x0, x1, y
, withx0
giving the coordinates of the first axis ofy
. If the data have three dimensions, a total of four arrays will be returned:x0, x1, x2, y
, and so on with higher dimensions.- y
ndarray
n-d array of shape
(len(x0), len(x1), ...)
. For three dimensions for example, the value aty[i, j, k]
corresponds to coordinates(x0[i], x1[j], x2[k])
.
- x0, x1, …