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. | |
| 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 pixgrid, linking the grid points to entries (=rows) in the pixel table. | |
| void | muse_pixgrid_delete (muse_pixgrid *aPixels) |
| Delete a pixgrid and remove its memory. | |
| static cpl_size | muse_pixgrid_get_index (muse_pixgrid *aPixels, cpl_size aX, cpl_size aY, cpl_size aZ, cpl_boolean aAllowOutside) |
| Get the grid index determined from all three coordinates. | |
| static cpl_size | muse_pixgrid_get_count (muse_pixgrid *aPixels, cpl_size aIndex) |
| Return the number of rows stored in one pixel. | |
| static const cpl_size * | muse_pixgrid_get_rows (muse_pixgrid *aPixels, cpl_size aIndex) |
| Return a pointer to the rows stored in one pixel. | |
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 pixgrid, 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 332 of file muse_pixgrid.c.
References muse_pixgrid_get_index().
| 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 |
Definition at line 169 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_WCS_CELSPH, muse_pixtable_wcs_check(), MUSE_PIXTABLE_WCS_PIXEL, muse_wcs_new(), muse_wcs_pixel_from_celestial_fast(), muse_wcs_pixel_from_projplane_fast(), and muse_pixtable::table.
Referenced by muse_resampling_cube().
| void muse_pixgrid_delete | ( | muse_pixgrid * | aPixels | ) |
Delete a pixgrid and remove its memory.
| aPixels | Pointer to pixgrid. |
Definition at line 400 of file muse_pixgrid.c.
Referenced by muse_dar_check(), muse_postproc_cube_resample_and_collapse(), and muse_resampling_cube().
| static cpl_size muse_pixgrid_get_count | ( | muse_pixgrid * | aPixels, | |
| cpl_size | aIndex | |||
| ) | [static] |
Return the number of rows stored in one pixel.
| aPixels | Pointer to pixgrid. | |
| aIndex | Pixel index, as computed by muse_pixgrid_get_index(). |
Definition at line 129 of file muse_pixgrid.h.
Referenced by muse_dar_check(), muse_pixgrid_create(), and muse_resampling_collapse_pixgrid().
| static cpl_size muse_pixgrid_get_index | ( | muse_pixgrid * | aPixels, | |
| cpl_size | aX, | |||
| cpl_size | aY, | |||
| cpl_size | aZ, | |||
| cpl_boolean | aAllowOutside | |||
| ) | [static] |
Get the grid index determined from all three coordinates.
| aPixels | Pointer to pixgrid. | |
| 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 89 of file muse_pixgrid.h.
Referenced by muse_dar_check(), muse_pixgrid_2d_create(), muse_pixgrid_create(), and muse_resampling_collapse_pixgrid().
| static const cpl_size* muse_pixgrid_get_rows | ( | muse_pixgrid * | aPixels, | |
| cpl_size | aIndex | |||
| ) | [static] |
Return a pointer to the rows stored in one pixel.
| aPixels | Pointer to pixgrid. | |
| aIndex | Pixel index, as computed by muse_pixgrid_get_index(). |
Definition at line 150 of file muse_pixgrid.h.
Referenced by muse_dar_check(), and muse_resampling_collapse_pixgrid().
1.6.1