MUSE Pipeline Reference Manual
2.1.1
|
Data Structures | |
struct | muse_pixels_ext |
The pixel extension map. More... | |
struct | muse_pixgrid |
The pixel grid. More... | |
Functions | |
muse_pixgrid * | muse_pixgrid_create (muse_pixtable *aPixtable, cpl_propertylist *aHeader, cpl_size aXSize, cpl_size aYSize, cpl_size aZSize) |
Convert selected rows of a pixel table into pixel grid, linking the grid points to entries (=rows) in the pixel table. More... | |
muse_pixgrid * | muse_pixgrid_2d_create (cpl_table *aTable, double aDX, double aZMin, double aZMax, double aDZ, float *aXMin) |
Convert selected rows of a pixel table into 2D pixel grid, linking the grid points to entries (=rows) in the pixel table. More... | |
void | muse_pixgrid_delete (muse_pixgrid *aGrid) |
Delete a pixel grid and remove its memory. More... | |
static cpl_size | muse_pixgrid_get_index (muse_pixgrid *aGrid, cpl_size aX, cpl_size aY, cpl_size aZ, cpl_boolean aAllowOutside) |
Get the grid index determined from all three coordinates. More... | |
static cpl_size | muse_pixgrid_get_count (muse_pixgrid *aGrid, cpl_size aIndex) |
Return the number of rows stored in one pixel. More... | |
static const cpl_size * | muse_pixgrid_get_rows (muse_pixgrid *aGrid, cpl_size aIndex) |
Return a pointer to the rows stored in one pixel. More... | |
The pixel grid is an index structure that is used when resampling a pixel table into a datacube but can generally be used to find neighbors in the 3D data of the pixel table.
muse_pixgrid* muse_pixgrid_2d_create | ( | cpl_table * | aTable, |
double | aDX, | ||
double | aZMin, | ||
double | aZMax, | ||
double | aDZ, | ||
float * | aXMin | ||
) |
Convert selected rows of a pixel table into 2D pixel grid, linking the grid points to entries (=rows) in the pixel table.
aTable | the table component of a MUSE pixel table |
aDX | X (spaxel) bin size |
aZMin | Lower z (wavelength) limit |
aZMax | Upper z (wavelength) limit |
aDZ | Z (wavelength) bin size |
aXMin | Lower x (spaxel) limit computed here (can be NULL) |
The Y coordinate is ignored in this function.
set CPL_ERROR_NULL_INPUT, return NULL | aTable is NULL or it contains zero rows |
set CPL_ERROR_ILLEGAL_INPUT, return NULL | one of the sizes is not positive |
set CPL_ERROR_DATA_NOT_FOUND, return NULL | aTable is missing one of the coordinate columns |
Definition at line 507 of file muse_pixgrid.c.
References muse_pixgrid_get_index(), MUSE_PIXTABLE_LAMBDA, and MUSE_PIXTABLE_XPOS.
Referenced by muse_pixgrid_get_rows(), and muse_resampling_collapse_pixgrid().
muse_pixgrid* muse_pixgrid_create | ( | muse_pixtable * | aPixtable, |
cpl_propertylist * | aHeader, | ||
cpl_size | aXSize, | ||
cpl_size | aYSize, | ||
cpl_size | aZSize | ||
) |
Convert selected rows of a pixel table into pixel grid, linking the grid points to entries (=rows) in the pixel table.
aPixtable | the input pixel table |
aHeader | the FITS header of the MUSE datacube to be created |
aXSize | x size of the output grid |
aYSize | y size of the output grid |
aZSize | z size of the output grid (wavelength direction) |
Construct a standard C array, where the array indices representing the 3D grid in the sense the the x-coordinate is varying fastest, the lambda-coordinate varying slowest (like in FITS buffers), i.e. index = [i + nx * j + nx*ny * l] (i: x-axis index, j: y-axis index, l: lambda-axis index, nx: x-axis length, ny: y-axis length). For each pixel table row search for the closest grid point. Store the pixel table row number in that grid point.
set CPL_ERROR_NULL_INPUT, return NULL | aPixtable is NULL or it contains zero rows |
set CPL_ERROR_ILLEGAL_INPUT, return NULL | one of the sizes is not positive |
set CPL_ERROR_UNSUPPORTED_MODE, return NULL | the WCS in the pixel table is neither in pixels nor degrees |
set CPL_ERROR_DATA_NOT_FOUND, return NULL | aPixtable is missing one of the coordinate columns |
set CPL_ERROR_ILLEGAL_OUTPUT and ERROR message, but return created grid | aPixtable contains different number of pixels than the output pixel grid |
Definition at line 237 of file muse_pixgrid.c.
References muse_wcs::cd22, muse_wcs::crpix2, muse_wcs::crval2, muse_pixtable::header, muse_wcs::iscelsph, muse_pfits_get_cd(), muse_pfits_get_crpix(), muse_pfits_get_crval(), muse_pfits_get_ctype(), muse_pixgrid_get_count(), muse_pixgrid_get_index(), muse_pixtable_get_nrow(), MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_WCS_CELSPH, muse_pixtable_wcs_check(), MUSE_PIXTABLE_WCS_PIXEL, MUSE_PIXTABLE_XPOS, MUSE_PIXTABLE_YPOS, muse_wcs_new(), muse_wcs_pixel_from_celestial_fast(), muse_wcs_pixel_from_projplane_fast(), and muse_pixtable::table.
Referenced by muse_pixgrid_get_rows(), and muse_resampling_cube().
void muse_pixgrid_delete | ( | muse_pixgrid * | aGrid | ) |
Delete a pixel grid and remove its memory.
aGrid | Pointer to pixel grid. |
Definition at line 575 of file muse_pixgrid.c.
Referenced by muse_dar_check(), muse_pixgrid_get_rows(), muse_postproc_cube_resample_and_collapse(), muse_resampling_collapse_pixgrid(), and muse_resampling_cube().
|
static |
Return the number of rows stored in one pixel.
aGrid | Pointer to pixel grid. |
aIndex | Pixel index, as computed by muse_pixgrid_get_index(). |
Definition at line 140 of file muse_pixgrid.h.
Referenced by muse_dar_check(), muse_pixgrid_create(), muse_resampling_collapse_pixgrid(), and muse_resampling_params_delete().
|
static |
Get the grid index determined from all three coordinates.
aGrid | Pointer to pixel grid. |
aX | x index |
aY | y index |
aZ | z index |
aAllowOutside | if true, return a positive value for pixels nominally outside the grid |
Definition at line 100 of file muse_pixgrid.h.
Referenced by muse_dar_check(), muse_pixgrid_2d_create(), muse_pixgrid_create(), muse_resampling_collapse_pixgrid(), and muse_resampling_params_delete().
|
static |
Return a pointer to the rows stored in one pixel.
aGrid | Pointer to pixel grid. |
aIndex | Pixel index, as computed by muse_pixgrid_get_index(). |
Definition at line 171 of file muse_pixgrid.h.
References muse_pixgrid_2d_create(), muse_pixgrid_create(), and muse_pixgrid_delete().
Referenced by muse_dar_check(), muse_resampling_collapse_pixgrid(), and muse_resampling_params_delete().