MUSE Pipeline Reference Manual
2.1.1
|
Data Structures | |
struct | muse_pixtable |
Structure definition of MUSE pixel table. More... | |
Macros | |
#define | MUSE_PIXTABLE_DATA "data" |
#define | MUSE_PIXTABLE_DQ "dq" |
#define | MUSE_PIXTABLE_STAT "stat" |
#define | MUSE_PIXTABLE_XPOS "xpos" |
#define | MUSE_PIXTABLE_YPOS "ypos" |
#define | MUSE_PIXTABLE_LAMBDA "lambda" |
#define | MUSE_PIXTABLE_ORIGIN "origin" |
#define | MUSE_PIXTABLE_WEIGHT "weight" |
#define | MUSE_PIXTABLE_FF_EXT "PIXTABLE_FLAT_FIELD" |
#define | MUSE_PIXTABLE_FFLAMBDA MUSE_PIXTABLE_LAMBDA |
#define | MUSE_PIXTABLE_FFDATA MUSE_PIXTABLE_DATA |
#define | MUSE_HDR_PT_IFU_SLICE_OFFSET "ESO DRS MUSE PIXTABLE EXP%u IFU%02hu SLICE%02hu XOFFSET" |
FITS header keyword for the horizontal slice offset on the CCD. More... | |
#define | MUSE_HDR_PT_TYPE "ESO DRS MUSE PIXTABLE TYPE" |
Pixel table "type" stored in the FITS header. More... | |
#define | MUSE_HDR_PT_EXP_FST "ESO DRS MUSE PIXTABLE EXP%u FIRST" |
FITS header keyword defining the first row index for a given exposure. More... | |
#define | MUSE_HDR_PT_EXP_LST "ESO DRS MUSE PIXTABLE EXP%u LAST" |
FITS header keyword defining the last row index for a given exposure. More... | |
#define | MUSE_HDR_PT_ILLUMi "ESO DRS MUSE PIXTABLE ILLUM%hu" |
#define | MUSE_HDR_PT_ILLUM_MEAN "ESO DRS MUSE PIXTABLE ILLUM MEAN" |
#define | MUSE_HDR_PT_ILLUM_STDEV "ESO DRS MUSE PIXTABLE ILLUM STDEV" |
#define | MUSE_HDR_PT_ILLUM_REGEXP "^ESO DRS MUSE PIXTABLE ILLUM" |
#define | MUSE_HDR_PT_XLO "ESO DRS MUSE PIXTABLE LIMITS X LOW" |
FITS header keyword contains the lower limit of the data in x-direction. More... | |
#define | MUSE_HDR_PT_XHI "ESO DRS MUSE PIXTABLE LIMITS X HIGH" |
FITS header keyword contains the upper limit of the data in x-ion. More... | |
#define | MUSE_HDR_PT_YLO "ESO DRS MUSE PIXTABLE LIMITS Y LOW" |
FITS header keyword contains the lower limit of the data in y-direction. More... | |
#define | MUSE_HDR_PT_YHI "ESO DRS MUSE PIXTABLE LIMITS Y HIGH" |
FITS header keyword contains the upper limit of the data in y-direction. More... | |
#define | MUSE_HDR_PT_LLO "ESO DRS MUSE PIXTABLE LIMITS LAMBDA LOW" |
FITS header keyword contains the lower limit of the data in spectral direction. More... | |
#define | MUSE_HDR_PT_LHI "ESO DRS MUSE PIXTABLE LIMITS LAMBDA HIGH" |
FITS header keyword contains the upper limit of the data in spectral direction. More... | |
#define | MUSE_HDR_PT_ILO "ESO DRS MUSE PIXTABLE LIMITS IFU LOW" |
FITS header keyword contains the lowest IFU number in the data. More... | |
#define | MUSE_HDR_PT_IHI "ESO DRS MUSE PIXTABLE LIMITS IFU HIGH" |
FITS header keyword contains the highest IFU number in the data. More... | |
#define | MUSE_HDR_PT_SLO "ESO DRS MUSE PIXTABLE LIMITS SLICE LOW" |
FITS header keyword contains the lowest slice number in the data. More... | |
#define | MUSE_HDR_PT_SHI "ESO DRS MUSE PIXTABLE LIMITS SLICE HIGH" |
FITS header keyword contains the highest slice number in the data. More... | |
#define | MUSE_HDR_PT_PREDAR_XLO "ESO DRS MUSE PIXTABLE PREDAR LIMITS XLO" |
#define | MUSE_HDR_PT_PREDAR_XHI "ESO DRS MUSE PIXTABLE PREDAR LIMITS XHI" |
#define | MUSE_HDR_PT_PREDAR_YLO "ESO DRS MUSE PIXTABLE PREDAR LIMITS YLO" |
#define | MUSE_HDR_PT_PREDAR_YHI "ESO DRS MUSE PIXTABLE PREDAR LIMITS YHI" |
#define | MUSE_HDR_PT_FFCORR "ESO DRS MUSE PIXTABLE FFCORR" /* int */ |
#define | MUSE_HDR_PT_MERGED "ESO DRS MUSE PIXTABLE MERGED" /* int */ |
#define | MUSE_HDR_PT_SKYSUB "ESO DRS MUSE PIXTABLE SKYSUB" /* bool */ |
#define | MUSE_HDR_PT_DAR_NAME "ESO DRS MUSE PIXTABLE DAR CORRECT" |
#define | MUSE_HDR_PT_DAR_CHECK "ESO DRS MUSE PIXTABLE DAR CHECK" |
#define | MUSE_HDR_PT_DAR_CORR "ESO DRS MUSE PIXTABLE DAR CORRECT RESIDUAL" |
#define | MUSE_HDR_PT_RVCORR "ESO DRS MUSE PIXTABLE RVCORR" |
#define | MUSE_HDR_PT_FLUXCAL "ESO DRS MUSE PIXTABLE FLUXCAL" /* bool */ |
#define | MUSE_HDR_PT_WCS "ESO DRS MUSE PIXTABLE WCS" /* string */ |
#define | MUSE_HDR_PT_WCS_PROJ "projected (intermediate)" |
#define | MUSE_HDR_PT_WCS_POSI "positioned (final)" |
#define | MUSE_HDR_PT_WEIGHTED "ESO DRS MUSE PIXTABLE WEIGHTED" /* bool */ |
#define | MUSE_HDR_PT_COMBINED "ESO DRS MUSE PIXTABLE COMBINED" /* int */ |
#define | MUSE_HDR_PT_SPEC_TYPE "ESO DRS MUSE PIXTABLE SPECTYPE" /* string */ |
Enumerations |
Functions | |
uint32_t | muse_pixtable_origin_encode (unsigned int aX, unsigned int aY, unsigned short aIFU, unsigned short aSlice, unsigned int aOffset) |
Encode the three CCD coordinates defining the origin of one MUSE pixel into a 32bit integer. More... | |
unsigned int | muse_pixtable_origin_get_x (uint32_t aOrigin, muse_pixtable *aPixtable, cpl_size aRow) |
Get the horizontal coordinate from the encoded 32bit origin number. More... | |
unsigned int | muse_pixtable_origin_get_y (uint32_t aOrigin) |
Get the vertical coordinate from the encoded 32bit origin number. More... | |
unsigned short | muse_pixtable_origin_get_ifu (uint32_t aOrigin) |
Get the IFU number from the encoded 32bit origin number. More... | |
unsigned short | muse_pixtable_origin_get_slice (uint32_t aOrigin) |
Get the slice number from the encoded 32bit origin number. More... | |
unsigned int | muse_pixtable_origin_set_offset (muse_pixtable *aPixtable, cpl_polynomial *aLTrace, unsigned short aIFU, unsigned short aSlice) |
Set the slice offset from the pixel table header. More... | |
unsigned int | muse_pixtable_origin_get_offset (muse_pixtable *aPixtable, unsigned int aExpNum, unsigned short aIFU, unsigned short aSlice) |
Get the slice offset from the pixel table header. More... | |
cpl_error_code | muse_pixtable_origin_copy_offsets (muse_pixtable *aOut, muse_pixtable *aFrom, unsigned int aNum) |
Copy MUSE_HDR_PT_IFU_SLICE_OFFSET keywords between pixel tables. More... | |
unsigned int | muse_pixtable_get_expnum (muse_pixtable *aPixtable, cpl_size aRow) |
Get the exposure number of a given row in a pixel table. More... | |
muse_pixtable * | muse_pixtable_create (muse_image *aImage, cpl_table *aTrace, cpl_table *aWave, cpl_table *aGeoTable) |
Create the pixel table for one CCD. More... | |
muse_pixtable * | muse_pixtable_duplicate (muse_pixtable *aPixtable) |
Make a copy of the pixtanle. More... | |
void | muse_pixtable_delete (muse_pixtable *aPixtable) |
Deallocate memory associated to a pixel table object. More... | |
cpl_error_code | muse_pixtable_append_ff (muse_pixtable *aPixtable, muse_image *aFF, cpl_table *aTrace, cpl_table *aWave, float aSampling) |
Create flat-field spectrum and append to pixel table. More... | |
cpl_error_code | muse_pixtable_save (muse_pixtable *aPixtable, const char *aFilename) |
Save a MUSE pixel table to a file on disk. More... | |
muse_pixtable * | muse_pixtable_load_window (const char *aFilename, cpl_size aStart, cpl_size aNRows) |
Load a range of rows from the table and all the FITS headers of a MUSE pixel table from a file. More... | |
muse_pixtable * | muse_pixtable_load (const char *aFilename) |
Load the table itself and the FITS headers of a MUSE pixel table from a file. More... | |
muse_pixtable * | muse_pixtable_load_restricted_wavelength (const char *aFilename, double aLambdaMin, double aLambdaMax) |
Load a pixel table from file and cut down the wavelength range. More... | |
muse_pixtable * | muse_pixtable_load_merge_channels (cpl_table *aExposureList, double aLambdaMin, double aLambdaMax) |
Load and merge the pixel tables of the 24 MUSE sub-fields. More... | |
int | muse_pixtable_get_type (muse_pixtable *aPixtable) |
Determine the type of pixel table. More... | |
cpl_size | muse_pixtable_get_nrow (const muse_pixtable *aPixtable) |
get the number of rows within the pixel table More... | |
cpl_error_code | muse_pixtable_compute_limits (muse_pixtable *aPixtable) |
(Re-)Compute the limits of the coordinate columns of a pixel table. More... | |
cpl_error_code | muse_pixtable_flux_multiply (muse_pixtable *aPixtable, double aScale) |
Scale the flux of a pixel table with correct treatment of variance. More... | |
cpl_error_code | muse_pixtable_spectrum_apply (muse_pixtable *aPixtable, const cpl_array *aLambdas, const cpl_array *aFlux, muse_pixtable_operation aOperation) |
Apply a spectrum given by two arrays with an operation to a pixel table. More... | |
static cpl_error_code | muse_pixtable_fix_exp_headers (muse_pixtable *aPixtable) |
Fix the exposure ranges in the header of a pixel table. More... | |
cpl_error_code | muse_pixtable_restrict_wavelength (muse_pixtable *aPixtable, double aLow, double aHigh) |
Restrict a pixel table to a certain wavelength range. More... | |
cpl_error_code | muse_pixtable_restrict_xpos (muse_pixtable *aPixtable, double aLo, double aHi) |
Restrict a pixel table to a certain x coordinate range. More... | |
cpl_error_code | muse_pixtable_restrict_ypos (muse_pixtable *aPixtable, double aLo, double aHi) |
Restrict a pixel table to a certain y coordinate range. More... | |
cpl_error_code | muse_pixtable_erase_ifu_slice (muse_pixtable *aPixtable, unsigned char aIFU, unsigned short aSlice) |
Erase pixel table rows related to one slice of one IFU. More... | |
cpl_error_code | muse_pixtable_and_selected_mask (muse_pixtable *aPixtable, muse_mask *aMask) |
Select all pixels where the (x,y) positions are enabled in the given mask. More... | |
cpl_error_code | muse_pixtable_dump (muse_pixtable *aPixtable, cpl_size aStart, cpl_size aCount, unsigned char aDisplayHeader) |
Dump a MUSE pixel table to the screen, resolving the origin column. More... | |
muse_pixtable_wcs | muse_pixtable_wcs_check (muse_pixtable *aPixtable) |
Check the state of the world coordinate system of a pixel table. More... | |
cpl_boolean | muse_pixtable_is_fluxcal (muse_pixtable *aPixtable) |
Determine whether the pixel table is flux calibrated. More... | |
cpl_boolean | muse_pixtable_is_skysub (muse_pixtable *aPixtable) |
Determine whether the pixel table is sky subtracted. More... | |
cpl_boolean | muse_pixtable_is_rvcorr (muse_pixtable *aPixtable) |
Determine whether the pixel table is radial-velocity corrected. More... | |
cpl_error_code | muse_pixtable_reset_dq (muse_pixtable *aPixtable, unsigned int aDQ) |
Reset a given bad pixel status (DQ flag) for all pixels in the table. More... | |
muse_imagelist * | muse_pixtable_to_imagelist (muse_pixtable *aPixtable) |
Project a pixel table with data from one IFU back onto its image. More... | |
cpl_error_code | muse_pixtable_from_imagelist (muse_pixtable *aPixtable, muse_imagelist *aList) |
Get pixel table values back from a per-IFU imagelist. More... | |
muse_pixtable ** | muse_pixtable_extracted_get_slices (muse_pixtable *aPixtable) |
Extract one pixel table per IFU and slice. More... | |
cpl_size | muse_pixtable_extracted_get_size (muse_pixtable **aPixtables) |
Get the size of an array of extracted pixel tables. More... | |
void | muse_pixtable_extracted_delete (muse_pixtable **aPixtables) |
Delete a pixel table array. More... | |
Variables | |
const muse_cpltable_def | muse_pixtable_def [] |
MUSE pixel table definition. More... | |
const muse_cpltable_def | muse_pixtable_def [] |
MUSE pixel table definition. More... | |
To be able to easily handle the muse_pixtable structure as defined in DRLDesign Sect. 5, a number of functions are used in the MUSE DRL.
The MUSE pixel table has the following columns:
It may additionally contain a column 'weight' which per-pixel weight information to be used for resampling.
The information in the "origin" column is optimized for RAM usage, encoding several separate values into one 32bit integer. The offset of each slice of each IFU is stored in a FITS keyword, then x coordinates can be stored relative to that.
Storage sizes needed for the numbers involved in the origin column:
+ X per slice 1...~90 (use range 0... 127 --> 7 bits) + Y trimmed 1...4112 (use range 0...8191 --> 13 bits) + IFU 1...24 (use range 0... 31 --> 5 bits) + Slice 1...48 (use range 0... 63 --> 6 bits) 31 bits
Bit usage in the origin column:
30 20 10 0 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 ^-X in slice-^ ^-----Y on trimmed CCD-----^ ^--IFU---^ ^--slice---^ (the highest bit stays empty)
The layout of these bits can change any time, so software using this should use the accessor functions muse_pixtable_origin_get_*
() to decode required values.
#define MUSE_HDR_PT_COMBINED "ESO DRS MUSE PIXTABLE COMBINED" /* int */ |
Combined exposures that went into this pixel table
Definition at line 215 of file muse_pixtable.h.
Referenced by muse_xcombine_tables().
#define MUSE_HDR_PT_DAR_CHECK "ESO DRS MUSE PIXTABLE DAR CHECK" |
empirical DAR check done, found this maximum residual DAR offsets [arcsec]
Definition at line 192 of file muse_pixtable.h.
Referenced by muse_dar_check().
#define MUSE_HDR_PT_DAR_CORR "ESO DRS MUSE PIXTABLE DAR CORRECT RESIDUAL" |
empirical DAR correction done, relative to this reference wavelength [Angstrom]
Definition at line 195 of file muse_pixtable.h.
Referenced by muse_dar_check(), and muse_wcs_locate_sources().
#define MUSE_HDR_PT_DAR_NAME "ESO DRS MUSE PIXTABLE DAR CORRECT" |
theoretical DAR correction done with this reference wavelength [Angstrom]
Definition at line 188 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), muse_resampling_euro3d(), and muse_wcs_locate_sources().
#define MUSE_HDR_PT_EXP_FST "ESO DRS MUSE PIXTABLE EXP%u FIRST" |
FITS header keyword defining the first row index for a given exposure.
Definition at line 93 of file muse_pixtable.h.
Referenced by muse_pixtable_fix_exp_headers(), muse_pixtable_get_expnum(), and muse_xcombine_tables().
#define MUSE_HDR_PT_EXP_LST "ESO DRS MUSE PIXTABLE EXP%u LAST" |
FITS header keyword defining the last row index for a given exposure.
Definition at line 98 of file muse_pixtable.h.
Referenced by muse_pixtable_fix_exp_headers(), muse_pixtable_get_expnum(), and muse_xcombine_tables().
#define MUSE_HDR_PT_FFCORR "ESO DRS MUSE PIXTABLE FFCORR" /* int */ |
Flat-field corrected pixel table, number is the IFUs that had flat-fields
Definition at line 178 of file muse_pixtable.h.
Referenced by muse_flux_calibrate(), muse_pixtable_load_merge_channels(), muse_postproc_revert_ffspec_maybe(), muse_resampling_cube(), and muse_resampling_image().
#define MUSE_HDR_PT_FLUXCAL "ESO DRS MUSE PIXTABLE FLUXCAL" /* bool */ |
Pixel table was flux-calibrated
Definition at line 201 of file muse_pixtable.h.
Referenced by muse_flux_calibrate(), and muse_pixtable_is_fluxcal().
#define MUSE_HDR_PT_IFU_SLICE_OFFSET "ESO DRS MUSE PIXTABLE EXP%u IFU%02hu SLICE%02hu XOFFSET" |
FITS header keyword for the horizontal slice offset on the CCD.
This FITS header entry is needed to transform the "origin" column back to CCD pixels. The "EXP" part is originally created with EXP0, signifying a single exposure. When multiple exposures are merged into a single pixel table, the EXP number is updated to reflect the exposure number for which this entry is to be used. See MUSE_HDR_PT_EXP_FST, MUSE_HDR_PT_EXP_LST.
Definition at line 74 of file muse_pixtable.h.
Referenced by muse_pixtable_origin_copy_offsets(), muse_pixtable_origin_get_offset(), and muse_pixtable_origin_set_offset().
#define MUSE_HDR_PT_IHI "ESO DRS MUSE PIXTABLE LIMITS IFU HIGH" |
FITS header keyword contains the highest IFU number in the data.
Definition at line 152 of file muse_pixtable.h.
Referenced by muse_pixtable_compute_limits().
#define MUSE_HDR_PT_ILLUM_MEAN "ESO DRS MUSE PIXTABLE ILLUM MEAN" |
illumination-correction statistics: mean
Definition at line 106 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_illum().
#define MUSE_HDR_PT_ILLUM_REGEXP "^ESO DRS MUSE PIXTABLE ILLUM" |
regular expression to remove the illum values and statistics from a header
Definition at line 110 of file muse_pixtable.h.
Referenced by muse_pixtable_load_merge_channels().
#define MUSE_HDR_PT_ILLUM_STDEV "ESO DRS MUSE PIXTABLE ILLUM STDEV" |
illumination-correction statistics: stdev
Definition at line 108 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_illum().
#define MUSE_HDR_PT_ILLUMi "ESO DRS MUSE PIXTABLE ILLUM%hu" |
illumination-correction (multiplication) factors for each slice
Definition at line 104 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_illum().
#define MUSE_HDR_PT_ILO "ESO DRS MUSE PIXTABLE LIMITS IFU LOW" |
FITS header keyword contains the lowest IFU number in the data.
Definition at line 147 of file muse_pixtable.h.
Referenced by muse_pixtable_compute_limits().
#define MUSE_HDR_PT_LHI "ESO DRS MUSE PIXTABLE LIMITS LAMBDA HIGH" |
FITS header keyword contains the upper limit of the data in spectral direction.
Definition at line 142 of file muse_pixtable.h.
Referenced by muse_basicproc_shift_pixtable(), muse_pixtable_compute_limits(), muse_pixtable_restrict_wavelength(), muse_resampling_collapse_pixgrid(), muse_resampling_image(), muse_resampling_params_delete(), and muse_resampling_spectrum().
#define MUSE_HDR_PT_LLO "ESO DRS MUSE PIXTABLE LIMITS LAMBDA LOW" |
FITS header keyword contains the lower limit of the data in spectral direction.
Definition at line 137 of file muse_pixtable.h.
Referenced by muse_basicproc_shift_pixtable(), muse_pixtable_compute_limits(), muse_pixtable_restrict_wavelength(), muse_resampling_collapse_pixgrid(), muse_resampling_cube(), muse_resampling_image(), muse_resampling_params_delete(), and muse_resampling_spectrum().
#define MUSE_HDR_PT_MERGED "ESO DRS MUSE PIXTABLE MERGED" /* int */ |
Merged IFUs that went into this pixel table
Definition at line 181 of file muse_pixtable.h.
Referenced by muse_pixtable_load_merge_channels().
#define MUSE_HDR_PT_PREDAR_XHI "ESO DRS MUSE PIXTABLE PREDAR LIMITS XHI" |
FITS header keyword contains the upper limit of the data in x-direction before DAR correction.
Definition at line 170 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_PREDAR_XLO "ESO DRS MUSE PIXTABLE PREDAR LIMITS XLO" |
FITS header keyword contains the lower limit of the data in x-direction before DAR correction.
Definition at line 168 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_PREDAR_YHI "ESO DRS MUSE PIXTABLE PREDAR LIMITS YHI" |
FITS header keyword contains the upper limit of the data in y-direction before DAR correction.
Definition at line 174 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_PREDAR_YLO "ESO DRS MUSE PIXTABLE PREDAR LIMITS YLO" |
FITS header keyword contains the lower limit of the data in y-direction before DAR correction.
Definition at line 172 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_RVCORR "ESO DRS MUSE PIXTABLE RVCORR" |
radial-velocity correction done, with the given velocity shift and reference
Definition at line 198 of file muse_pixtable.h.
Referenced by muse_pixtable_is_rvcorr(), and muse_rvcorrect().
#define MUSE_HDR_PT_SHI "ESO DRS MUSE PIXTABLE LIMITS SLICE HIGH" |
FITS header keyword contains the highest slice number in the data.
Definition at line 162 of file muse_pixtable.h.
Referenced by muse_pixtable_compute_limits().
#define MUSE_HDR_PT_SKYSUB "ESO DRS MUSE PIXTABLE SKYSUB" /* bool */ |
Pixel table was sky-subtracted
Definition at line 184 of file muse_pixtable.h.
Referenced by muse_pixtable_is_skysub(), and muse_sky_subtract_lines_old().
#define MUSE_HDR_PT_SLO "ESO DRS MUSE PIXTABLE LIMITS SLICE LOW" |
FITS header keyword contains the lowest slice number in the data.
Definition at line 157 of file muse_pixtable.h.
Referenced by muse_pixtable_compute_limits().
#define MUSE_HDR_PT_SPEC_TYPE "ESO DRS MUSE PIXTABLE SPECTYPE" /* string */ |
Spectral type code, set after converting from air to vacuum
Definition at line 218 of file muse_pixtable.h.
Referenced by muse_phys_air_to_vacuum().
#define MUSE_HDR_PT_TYPE "ESO DRS MUSE PIXTABLE TYPE" |
Pixel table "type" stored in the FITS header.
Can be either "GEOFULL" (for science use and 3D resampling) and "SIMPLE" for quick-look, tests, and calibration (2D resampling).
Definition at line 83 of file muse_pixtable.h.
Referenced by muse_pixtable_create(), and muse_pixtable_get_type().
#define MUSE_HDR_PT_WCS "ESO DRS MUSE PIXTABLE WCS" /* string */ |
Spatial world coordinate transformation applied to this pixel table
Definition at line 204 of file muse_pixtable.h.
Referenced by muse_wcs_position_celestial(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_WCS_POSI "positioned (final)" |
Value of MUSE_HDR_PT_WCS after positioning this pixel table to sky coordinates
Definition at line 209 of file muse_pixtable.h.
Referenced by muse_wcs_position_celestial().
#define MUSE_HDR_PT_WCS_PROJ "projected (intermediate)" |
Value of MUSE_HDR_PT_WCS with Gnomonic projection applied to this pixel table
Definition at line 206 of file muse_pixtable.h.
Referenced by muse_wcs_project_tan().
#define MUSE_HDR_PT_WEIGHTED "ESO DRS MUSE PIXTABLE WEIGHTED" /* bool */ |
Pixel table was weighted relative to other exposures
Definition at line 212 of file muse_pixtable.h.
Referenced by muse_xcombine_weights().
#define MUSE_HDR_PT_XHI "ESO DRS MUSE PIXTABLE LIMITS X HIGH" |
FITS header keyword contains the upper limit of the data in x-ion.
Definition at line 122 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), muse_pixtable_compute_limits(), muse_pixtable_restrict_xpos(), muse_resampling_params_delete(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_XLO "ESO DRS MUSE PIXTABLE LIMITS X LOW" |
FITS header keyword contains the lower limit of the data in x-direction.
Definition at line 117 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), muse_pixtable_compute_limits(), muse_pixtable_restrict_xpos(), muse_resampling_cube(), muse_resampling_params_delete(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_YHI "ESO DRS MUSE PIXTABLE LIMITS Y HIGH" |
FITS header keyword contains the upper limit of the data in y-direction.
Definition at line 132 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), muse_pixtable_compute_limits(), muse_pixtable_restrict_ypos(), muse_resampling_params_delete(), and muse_wcs_project_tan().
#define MUSE_HDR_PT_YLO "ESO DRS MUSE PIXTABLE LIMITS Y LOW" |
FITS header keyword contains the lower limit of the data in y-direction.
Definition at line 127 of file muse_pixtable.h.
Referenced by muse_dar_check(), muse_dar_correct(), muse_pixtable_compute_limits(), muse_pixtable_restrict_ypos(), muse_resampling_cube(), muse_resampling_params_delete(), and muse_wcs_project_tan().
#define MUSE_PIXTABLE_DATA "data" |
data column of a MUSE pixel table
Definition at line 48 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_illum(), muse_basicproc_apply_twilight(), muse_basicproc_load_reduced(), muse_dar_check(), muse_flux_calibrate(), muse_lsf_check_arc_line(), muse_lsf_fit_polynomial(), muse_lsf_params_fit(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_flux_multiply(), muse_pixtable_from_imagelist(), muse_pixtable_save(), muse_pixtable_spectrum_apply(), muse_pixtable_to_imagelist(), muse_resampling_collapse_pixgrid(), muse_resampling_cube(), muse_resampling_euro3d(), muse_resampling_params_delete(), muse_resampling_spectrum(), muse_resampling_spectrum_iterate(), muse_sky_lines_spectrum(), and muse_sky_subtract_lines_old().
#define MUSE_PIXTABLE_DQ "dq" |
data quality column of a MUSE pixel table
Definition at line 49 of file muse_pixtable.h.
Referenced by muse_basicproc_mask_notch_filter(), muse_dar_check(), muse_flux_integrate_std(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_reset_dq(), muse_pixtable_to_imagelist(), muse_resampling_collapse_pixgrid(), muse_resampling_params_delete(), muse_resampling_spectrum(), and muse_resampling_spectrum_iterate().
#define MUSE_PIXTABLE_FF_EXT "PIXTABLE_FLAT_FIELD" |
flat-field extension of a MUSE pixel table (optional)
Definition at line 59 of file muse_pixtable.h.
Referenced by muse_pixtable_append_ff(), and muse_pixtable_save().
#define MUSE_PIXTABLE_FFDATA MUSE_PIXTABLE_DATA |
wavelength column for the flat-field extension of a MUSE pixel table
Definition at line 61 of file muse_pixtable.h.
Referenced by muse_pixtable_load_merge_channels(), and muse_postproc_revert_ffspec_maybe().
#define MUSE_PIXTABLE_FFLAMBDA MUSE_PIXTABLE_LAMBDA |
wavelength column for the flat-field extension of a MUSE pixel table
Definition at line 60 of file muse_pixtable.h.
Referenced by muse_pixtable_load_merge_channels(), muse_pixtable_restrict_wavelength(), and muse_postproc_revert_ffspec_maybe().
#define MUSE_PIXTABLE_LAMBDA "lambda" |
wavelength column of a MUSE pixel table
Definition at line 53 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_twilight(), muse_basicproc_mask_notch_filter(), muse_basicproc_shift_pixtable(), muse_dar_check(), muse_dar_correct(), muse_flux_calibrate(), muse_lsf_check_arc_line(), muse_lsf_fit_slice(), muse_lsf_params_fit(), muse_phys_air_to_vacuum(), muse_pixgrid_2d_create(), muse_pixgrid_create(), muse_pixtable_compute_limits(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_extracted_get_slices(), muse_pixtable_restrict_wavelength(), muse_pixtable_spectrum_apply(), muse_resampling_collapse_pixgrid(), muse_resampling_params_delete(), muse_resampling_spectrum(), muse_resampling_spectrum_iterate(), muse_rvcorrect(), muse_sky_lines_spectrum(), muse_sky_subtract_lines_old(), muse_utils_pixtable_fit_line_gaussian(), and select_arc_line().
#define MUSE_PIXTABLE_ORIGIN "origin" |
origin column of a MUSE pixel table
Definition at line 54 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_illum(), muse_basicproc_load_reduced(), muse_lsf_average_cube_all(), muse_lsf_check_arc_line(), muse_lsf_fit_slice(), muse_lsf_params_fit(), muse_pixtable_compute_limits(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_erase_ifu_slice(), muse_pixtable_extracted_get_slices(), muse_pixtable_from_imagelist(), muse_pixtable_to_imagelist(), muse_resampling_params_delete(), muse_sky_subtract_lines(), and muse_sky_subtract_lines_old().
#define MUSE_PIXTABLE_STAT "stat" |
variance column of a MUSE pixel table
Definition at line 50 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_illum(), muse_basicproc_apply_twilight(), muse_dar_check(), muse_flux_calibrate(), muse_lsf_check_arc_line(), muse_lsf_params_fit(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_flux_multiply(), muse_pixtable_from_imagelist(), muse_pixtable_spectrum_apply(), muse_pixtable_to_imagelist(), muse_resampling_collapse_pixgrid(), muse_resampling_euro3d(), muse_resampling_params_delete(), and muse_resampling_spectrum().
#define MUSE_PIXTABLE_WEIGHT "weight" |
weight column of a MUSE pixel table (optional)
Definition at line 56 of file muse_pixtable.h.
Referenced by muse_pixtable_dump(), muse_resampling_collapse_pixgrid(), muse_resampling_params_delete(), muse_resampling_spectrum(), and muse_xcombine_weights().
#define MUSE_PIXTABLE_XPOS "xpos" |
x-position column of a MUSE pixel table
Definition at line 51 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_twilight(), muse_dar_check(), muse_dar_correct(), muse_pixgrid_2d_create(), muse_pixgrid_create(), muse_pixtable_and_selected_mask(), muse_pixtable_compute_limits(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_restrict_xpos(), muse_pixtable_wcs_check(), muse_resampling_collapse_pixgrid(), muse_resampling_image(), muse_resampling_params_delete(), muse_wcs_position_celestial(), muse_wcs_project_tan(), and muse_xcombine_tables().
#define MUSE_PIXTABLE_YPOS "ypos" |
y-position column of a MUSE pixel table
Definition at line 52 of file muse_pixtable.h.
Referenced by muse_basicproc_apply_twilight(), muse_dar_check(), muse_dar_correct(), muse_pixgrid_create(), muse_pixtable_and_selected_mask(), muse_pixtable_compute_limits(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_restrict_ypos(), muse_pixtable_wcs_check(), muse_resampling_collapse_pixgrid(), muse_resampling_params_delete(), muse_wcs_position_celestial(), muse_wcs_project_tan(), and muse_xcombine_tables().
enum muse_pixtable_type |
Type of a MUSE pixel table.
Definition at line 268 of file muse_pixtable.h.
enum muse_pixtable_wcs |
State of the astrometric calibration of a MUSE pixel table.
Definition at line 293 of file muse_pixtable.h.
cpl_error_code muse_pixtable_and_selected_mask | ( | muse_pixtable * | aPixtable, |
muse_mask * | aMask | ||
) |
Select all pixels where the (x,y) positions are enabled in the given mask.
aPixtable | The pixel table |
aMask | The mask to select pixels |
Pixels which are outside of the mask are not selected at all.
XXX This only works for WCS without rotation and with positions in pixels! It could be made more flexible by combining this with muse_wcs* functions instead of the custom projection-plane-to-pixel code used here.
CPL_ERROR_NULL_INPUT | (aPixtable && aPixtable->table) not fulfilled |
CPL_ERROR_NULL_INPUT | (aMask) not fulfilled |
Definition at line 2344 of file muse_pixtable.c.
References muse_mask::header, muse_mask::mask, muse_pfits_get_cd(), muse_pfits_get_crpix(), muse_pfits_get_crval(), MUSE_PIXTABLE_XPOS, MUSE_PIXTABLE_YPOS, and table.
Referenced by muse_postproc_process_exposure().
cpl_error_code muse_pixtable_append_ff | ( | muse_pixtable * | aPixtable, |
muse_image * | aFF, | ||
cpl_table * | aTrace, | ||
cpl_table * | aWave, | ||
float | aSampling | ||
) |
Create flat-field spectrum and append to pixel table.
aPixtable | input MUSE pixel table |
aFF | the MUSE image containing a master-flat field exposure |
aTrace | the table containing the trace solution |
aWave | the table containing the wavelength calibration solution |
aSampling | the sampling for the flat-field spectrum [Angstrom/pix] |
This function creates a pixel table from the input image (aFF) and tables (aTrace and aWave) using muse_pixtable_create(), and then resamples it to a spectrum table, using muse_resampling_spectrum(). The variance and quality columns or this spectrum are then discarded, the columns of the table created here are hence MUSE_PIXTABLE_FFLAMBDA and MUSE_PIXTABLE_FFDATA. The table is attached to the input pixel table (aPixtable) in the ffspec component.
Any table that is set in the ffspec component of the input pixel table before the call to this function is deleted.
set and return CPL_ERROR_NULL_INPUT | aPixtable is NULL |
propagate error code of muse_pixtable_create() | muse_pixtable_create() fails |
Definition at line 1030 of file muse_pixtable.c.
References ffspec, muse_pixtable_create(), muse_pixtable_delete(), MUSE_PIXTABLE_FF_EXT, muse_pixtable_get_nrow(), muse_resampling_spectrum(), and table.
cpl_error_code muse_pixtable_compute_limits | ( | muse_pixtable * | aPixtable | ) |
(Re-)Compute the limits of the coordinate columns of a pixel table.
aPixtable | the pixel table |
CPL_ERROR_NONE | on success |
This function searches the pixel table for the extreme values of each coordinate. The limits it finds are returned in the header of the pixel table in the keywords containing "MUSEPT" (see muse_pixtable.h).
return CPL_ERROR_NULL_INPUT | aPixtable or one of its components are NULL |
return CPL_ERROR_DATA_NOT_FOUND | the table component of aPixtable does not have a pixel table structure |
Definition at line 1864 of file muse_pixtable.c.
References header, muse_cpltable_check(), MUSE_HDR_PT_IHI, MUSE_HDR_PT_ILO, MUSE_HDR_PT_LHI, MUSE_HDR_PT_LLO, MUSE_HDR_PT_SHI, MUSE_HDR_PT_SLO, MUSE_HDR_PT_XHI, MUSE_HDR_PT_XLO, MUSE_HDR_PT_YHI, MUSE_HDR_PT_YLO, muse_pfits_get_crval(), muse_pixtable_get_nrow(), MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_ORIGIN, MUSE_PIXTABLE_WCS_CELSPH, muse_pixtable_wcs_check(), MUSE_PIXTABLE_XPOS, MUSE_PIXTABLE_YPOS, and table.
Referenced by muse_dar_check(), muse_dar_correct(), muse_phys_air_to_vacuum(), muse_pixtable_create(), muse_pixtable_erase_ifu_slice(), muse_pixtable_extracted_get_slices(), muse_pixtable_load_merge_channels(), muse_pixtable_restrict_wavelength(), muse_pixtable_restrict_xpos(), muse_pixtable_restrict_ypos(), muse_wcs_position_celestial(), muse_wcs_project_tan(), and muse_xcombine_tables().
muse_pixtable* muse_pixtable_create | ( | muse_image * | aImage, |
cpl_table * | aTrace, | ||
cpl_table * | aWave, | ||
cpl_table * | aGeoTable | ||
) |
Create the pixel table for one CCD.
aImage | muse_image to be transformed to a pixel table |
aTrace | the table containing the trace solution |
aWave | the table containing the wavelength calibration solution |
aGeoTable | MUSE geometry table containing at least the IFU in question (optional) |
Create the output table and table columns. Loop through all pixels in the input image. Evaluate, if the pixel is within a slice. If so, evaluate the respective wavelength solution, and the trace, and set the coordinates accordingly. Then set the pixel values (data, dq, and stat) to the values in the input image.
set CPL_ERROR_DATA_NOT_FOUND, return NULL | the IFU number found in the input image header is not valid |
set CPL_ERROR_INCOMPATIBLE_INPUT, return NULL | no BUNIT is given in the header of aImage, or it is not "count" |
set CPL_ERROR_NULL_INPUT, return NULL | the input image, the input wavelength calibration solution table, or the input trace solution table are NULL |
use simple slice locations | the input geometry table is NULL |
set CPL_ERROR_ILLEGAL_INPUT, return NULL | geometry table is given but unusable (missing IFU or missing x or y columns) |
set CPL_ERROR_BAD_FILE_FORMAT, and either continue with defaults (MUSE_EXPERT_USER) or return NULL | geometry table does not contain angle or width columns |
set CPL_ERROR_ILLEGAL_INPUT, output error message, and either continue (MUSE_EXPERT_USER), skipping the related slice, or return NULL | the wavelength calibration table is invalid for a slice |
set CPL_ERROR_ILLEGAL_INPUT, output error message, and either continue (MUSE_EXPERT_USER), skipping the related slice, or return NULL | the trace table is invalid for a slice |
skip rest of that slice, output warning | trace table gives invalid results for one vertical position of a slice |
Definition at line 569 of file muse_pixtable.c.
References muse_image::data, muse_image::dq, muse_image::header, header, muse_cpltable_new(), muse_geo_table_extract_ifu(), MUSE_HDR_PT_TYPE, muse_pfits_get_bunit(), muse_pixtable_compute_limits(), MUSE_PIXTABLE_DATA, muse_pixtable_delete(), MUSE_PIXTABLE_DQ, muse_pixtable_get_nrow(), MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_set_offset(), MUSE_PIXTABLE_STAT, MUSE_PIXTABLE_XPOS, MUSE_PIXTABLE_YPOS, muse_trace_polys_delete(), muse_trace_table_get_order(), muse_trace_table_get_polys_for_slice(), muse_utils_get_ifu(), muse_wave_table_get_orders(), muse_wave_table_get_poly_for_slice(), MUSE_WCS_KEYS, muse_image::stat, and table.
Referenced by muse_basicproc_get_illum(), muse_lsf_create_arcpixtable(), and muse_pixtable_append_ff().
void muse_pixtable_delete | ( | muse_pixtable * | aPixtable | ) |
Deallocate memory associated to a pixel table object.
aPixtable | input MUSE pixel table |
Calls cpl_table_delete() and cpl_propertylist_delete() for the two components of a muse_pixtable, and frees memory for the aPixtable pointer. As a safeguard, it checks if a valid pointer was passed, so that crashes cannot occur.
Definition at line 981 of file muse_pixtable.c.
References ffspec, header, and table.
Referenced by muse_basicproc_get_illum(), muse_lsf_create_arcpixtable(), muse_pixtable_append_ff(), muse_pixtable_create(), muse_pixtable_load_merge_channels(), muse_pixtable_load_restricted_wavelength(), muse_pixtable_load_window(), muse_postproc_process_exposure(), and muse_xcombine_tables().
cpl_error_code muse_pixtable_dump | ( | muse_pixtable * | aPixtable, |
cpl_size | aStart, | ||
cpl_size | aCount, | ||
unsigned char | aDisplayHeader | ||
) |
Dump a MUSE pixel table to the screen, resolving the origin column.
aPixtable | the pixel table |
aStart | first row to print (starting at 0) |
aCount | number of rows to print |
aDisplayHeader | if 1, a header is displayed above the table; if greater than 1, it does not include units |
This function basically does the same as cpl_table_dump(), with two differences: it can resolve the origin column to the real on-CCD origin and it can list exposures numbers that are only available in the pixel table headers.
It also tries to convert the CCD coordinates (after trimming) to raw CCD coordinates (before trimming). But this only works under the assumption that all over- and pre-scans are kMusePreOverscanSize pixels wide and each quadrant is (kMuseOutputXRight/2)x(kMuseOutputYTop/2) pixels in size.
return CPL_ERROR_NULL_INPUT | aPixtable or one of its components is NULL |
return CPL_ERROR_ILLEGAL_INPUT | aStart is negative or larger than the number of rows in the table, or aCount is negative |
return CPL_ERROR_BAD_FILE_FORMAT | one of the 6 mandatory columns is missing |
Definition at line 2424 of file muse_pixtable.c.
References header, muse_pfits_get_crval(), MUSE_PIXTABLE_DATA, MUSE_PIXTABLE_DQ, muse_pixtable_get_expnum(), muse_pixtable_get_nrow(), MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_x(), MUSE_PIXTABLE_STAT, MUSE_PIXTABLE_WCS_CELSPH, muse_pixtable_wcs_check(), MUSE_PIXTABLE_WCS_NATSPH, MUSE_PIXTABLE_WEIGHT, MUSE_PIXTABLE_XPOS, MUSE_PIXTABLE_YPOS, muse_quadrants_coords_to_raw(), and table.
Referenced by muse_resampling_collapse_pixgrid(), and muse_resampling_params_delete().
muse_pixtable* muse_pixtable_duplicate | ( | muse_pixtable * | aPixtable | ) |
Make a copy of the pixtanle.
aPixtable | MUSE pixel table |
The copy operation is done "in depth": column data are duplicated too, not just their pointers. Also the selection flags of the original table are transferred to the new table. The header of the pixel table are copied, too.
Definition at line 959 of file muse_pixtable.c.
Referenced by muse_postproc_process_exposure().
cpl_error_code muse_pixtable_erase_ifu_slice | ( | muse_pixtable * | aPixtable, |
unsigned char | aIFU, | ||
unsigned short | aSlice | ||
) |
Erase pixel table rows related to one slice of one IFU.
aPixtable | the pixel table |
aIFU | the IFU number |
aSlice | the slice number |
This function selects all rows in the given pixel table which originated in aIFU and aSlice. Then all selected slices are erased.
return CPL_ERROR_NULL_INPUT | aPixtable is NULL |
return CPL_ERROR_DATA_NOT_FOUND | no rows found in aPixtable |
Definition at line 2297 of file muse_pixtable.c.
References muse_pixtable_compute_limits(), muse_pixtable_fix_exp_headers(), muse_pixtable_get_nrow(), MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_ifu(), muse_pixtable_origin_get_slice(), and table.
void muse_pixtable_extracted_delete | ( | muse_pixtable ** | aPixtables | ) |
Delete a pixel table array.
aPixtables | The pixel table array. |
This deletes only the array itself, not the columns, since they are shared with the "mother" pixel table.
Definition at line 2954 of file muse_pixtable.c.
Referenced by muse_basicproc_apply_illum(), muse_basicproc_load_reduced(), muse_lsf_create_arcpixtable(), muse_pixtable_from_imagelist(), muse_pixtable_spectrum_apply(), muse_pixtable_to_imagelist(), muse_resampling_image(), muse_sky_subtract_lines(), and muse_sky_subtract_lines_old().
cpl_size muse_pixtable_extracted_get_size | ( | muse_pixtable ** | aPixtables | ) |
Get the size of an array of extracted pixel tables.
aPixtables | The pixel table array. |
Since the table array is NULL terminated, it just searches for the NULL entry.
set CPL_ERROR_NULL_INPUT, return NULL | aPixtable is NULL |
Definition at line 2932 of file muse_pixtable.c.
Referenced by muse_basicproc_apply_illum(), muse_basicproc_load_reduced(), muse_lsf_create_arcpixtable(), muse_pixtable_from_imagelist(), muse_pixtable_spectrum_apply(), muse_pixtable_to_imagelist(), muse_resampling_image(), muse_sky_subtract_lines(), and muse_sky_subtract_lines_old().
muse_pixtable** muse_pixtable_extracted_get_slices | ( | muse_pixtable * | aPixtable | ) |
Extract one pixel table per IFU and slice.
aPixtable | the pixel table |
The pixel table is re-sorted for slice and IFU. The slice pixel tables are not copied from the original table but share the data in memory. So they should not be deleted individually but with the function muse_pixtable_extracted_delete().
set CPL_ERROR_NULL_INPUT, return NULL | aPixtable is NULL |
Definition at line 2834 of file muse_pixtable.c.
References header, muse_pixtable_compute_limits(), MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_ORIGIN, and table.
Referenced by muse_basicproc_apply_illum(), muse_basicproc_load_reduced(), muse_lsf_create_arcpixtable(), muse_pixtable_from_imagelist(), muse_pixtable_spectrum_apply(), muse_pixtable_to_imagelist(), muse_resampling_image(), muse_sky_subtract_lines(), and muse_sky_subtract_lines_old().
|
static |
Fix the exposure ranges in the header of a pixel table.
aPixtable | the pixel table |
CPL_ERROR_NONE | on success, another cpl_error_code on failure. |
This function assumes that all selected rows are going to be erased, and resets the header keywords MUSE_HDR_PT_EXP_FST and MUSE_HDR_PT_EXP_LST accordingly.
Definition at line 2094 of file muse_pixtable.c.
References header, muse_cplpropertylist_update_long_long(), MUSE_HDR_PT_EXP_FST, MUSE_HDR_PT_EXP_LST, and table.
Referenced by muse_pixtable_erase_ifu_slice(), muse_pixtable_restrict_wavelength(), muse_pixtable_restrict_xpos(), and muse_pixtable_restrict_ypos().
cpl_error_code muse_pixtable_flux_multiply | ( | muse_pixtable * | aPixtable, |
double | aScale | ||
) |
Scale the flux of a pixel table with correct treatment of variance.
aPixtable | pixel table to be changed |
aScale | the flux scale factor |
Scaling here is meant to be multiplicative with the input aScale factor.
This function assumes that the scale is corrective, so that it leaves keywords related to flux units untouched.
set and return CPL_ERROR_NULL_INPUT | aPixtable or its table component are NULL |
Definition at line 1946 of file muse_pixtable.c.
References MUSE_PIXTABLE_DATA, MUSE_PIXTABLE_STAT, and table.
Referenced by muse_pixtable_load_merge_channels(), and muse_xcombine_tables().
cpl_error_code muse_pixtable_from_imagelist | ( | muse_pixtable * | aPixtable, |
muse_imagelist * | aList | ||
) |
Get pixel table values back from a per-IFU imagelist.
aPixtable | the pixel table |
aList | the image list |
This function basically does the inverse of muse_pixtable_to_imagelist(): it assumes that the input image list was created by that function, and processed in some way, that did not affect the pixel positions. Then it does the same split into per-IFU / per-slice subtables and reads the respective pixel values and their variance back from the images, using the location saved in the MUSE_PIXTABLE_ORIGIN column.
return CPL_ERROR_NULL_INPUT | aPixtable or its header component are NULL |
return CPL_ERROR_ILLEGAL_INPUT | aPixtable contains data from more than one exposure |
return CPL_ERROR_INCOMPATIBLE_INPUT | aPixtable and aList contain a different number of IFUs |
Definition at line 2764 of file muse_pixtable.c.
References muse_image::data, header, muse_imagelist_get(), muse_imagelist_get_size(), MUSE_PIXTABLE_DATA, muse_pixtable_extracted_delete(), muse_pixtable_extracted_get_size(), muse_pixtable_extracted_get_slices(), muse_pixtable_get_expnum(), muse_pixtable_get_nrow(), MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_offset(), MUSE_PIXTABLE_STAT, and muse_image::stat.
unsigned int muse_pixtable_get_expnum | ( | muse_pixtable * | aPixtable, |
cpl_size | aRow | ||
) |
Get the exposure number of a given row in a pixel table.
aPixtable | The pixel table to query. |
aRow | The row index (starting at zero). |
set CPL_ERROR_NULL_INPUT, return 0 | input pixel table or its header component are NULL |
set CPL_ERROR_ILLEGAL_INPUT, return 0 | the row index is negative or beyond the table length |
set CPL_ERROR_ILLEGAL_OUTPUT, return 0 | output exposure number does not agree with low/high boundaries |
Definition at line 451 of file muse_pixtable.c.
References header, MUSE_HDR_PT_EXP_FST, MUSE_HDR_PT_EXP_LST, and muse_pixtable_get_nrow().
Referenced by muse_pixtable_dump(), muse_pixtable_from_imagelist(), muse_pixtable_origin_get_x(), and muse_pixtable_to_imagelist().
cpl_size muse_pixtable_get_nrow | ( | const muse_pixtable * | aPixtable | ) |
get the number of rows within the pixel table
aPixtable | the pixel table |
This function is a simple wrapper for cpl_table_get_nrow() to abstract out the internal pixel table structure.
Definition at line 1836 of file muse_pixtable.c.
References table.
Referenced by muse_basicproc_apply_twilight(), muse_dar_check(), muse_dar_correct(), muse_flux_calibrate(), muse_flux_integrate_std(), muse_lsf_average_cube_all(), muse_lsf_fit_slice(), muse_phys_air_to_vacuum(), muse_pixgrid_create(), muse_pixtable_append_ff(), muse_pixtable_compute_limits(), muse_pixtable_create(), muse_pixtable_dump(), muse_pixtable_erase_ifu_slice(), muse_pixtable_from_imagelist(), muse_pixtable_get_expnum(), muse_pixtable_load_merge_channels(), muse_pixtable_load_restricted_wavelength(), muse_pixtable_reset_dq(), muse_pixtable_to_imagelist(), muse_resampling_image(), muse_rvcorrect(), muse_sky_subtract_lines(), muse_sky_subtract_lines_old(), muse_wcs_position_celestial(), muse_wcs_project_tan(), muse_xcombine_tables(), and muse_xcombine_weights().
int muse_pixtable_get_type | ( | muse_pixtable * | aPixtable | ) |
Determine the type of pixel table.
aPixtable | the pixel table to query |
set CPL_ERROR_NULL_INPUT, return MUSE_PIXTABLE_TYPE_UNKNOWN | aPixtable is NULL |
return MUSE_PIXTABLE_TYPE_UNKNOWN, propagate CPL error code | cpl_propertylist_get_string fails to return the header parameter |
Definition at line 1803 of file muse_pixtable.c.
References header, MUSE_HDR_PT_TYPE, MUSE_PIXTABLE_TYPE_FULL, MUSE_PIXTABLE_TYPE_SIMPLE, and MUSE_PIXTABLE_TYPE_UNKNOWN.
Referenced by muse_pixtable_load_window(), muse_resampling_cube(), and muse_resampling_image().
cpl_boolean muse_pixtable_is_fluxcal | ( | muse_pixtable * | aPixtable | ) |
Determine whether the pixel table is flux calibrated.
aPixtable | the pixel table |
set CPL_ERROR_NULL_INPUT, return CPL_FALSE | aPixtable is NULL |
Definition at line 2562 of file muse_pixtable.c.
References header, and MUSE_HDR_PT_FLUXCAL.
cpl_boolean muse_pixtable_is_rvcorr | ( | muse_pixtable * | aPixtable | ) |
Determine whether the pixel table is radial-velocity corrected.
aPixtable | the pixel table |
set CPL_ERROR_NULL_INPUT, return CPL_FALSE | aPixtable is NULL |
Definition at line 2602 of file muse_pixtable.c.
References header, and MUSE_HDR_PT_RVCORR.
Referenced by muse_xcombine_tables().
cpl_boolean muse_pixtable_is_skysub | ( | muse_pixtable * | aPixtable | ) |
Determine whether the pixel table is sky subtracted.
aPixtable | the pixel table |
set CPL_ERROR_NULL_INPUT, return CPL_FALSE | aPixtable is NULL |
Definition at line 2582 of file muse_pixtable.c.
References header, and MUSE_HDR_PT_SKYSUB.
muse_pixtable* muse_pixtable_load | ( | const char * | aFilename | ) |
Load the table itself and the FITS headers of a MUSE pixel table from a file.
aFilename | name of the file to load |
This function tries to load the header from the FITS file and uses that to query the full length of the table before it calls muse_pixtable_load_window() to actually load the complete pixel table.
See muse_pixtable_load_window() for the behavior regaring the flat-field spectrum.
return NULL, propagate CPL error code | loading the binary table header fails |
return NULL, propagate CPL error code | muse_pixtable_load_window() fails |
Definition at line 1476 of file muse_pixtable.c.
References muse_pixtable_load_window().
Referenced by muse_pixtable_load_restricted_wavelength().
muse_pixtable* muse_pixtable_load_merge_channels | ( | cpl_table * | aExposureList, |
double | aLambdaMin, | ||
double | aLambdaMax | ||
) |
Load and merge the pixel tables of the 24 MUSE sub-fields.
aExposureList | the one-row table listing all pixel table filenames |
aLambdaMin | low wavelength limit [Angstrom] |
aLambdaMax | high wavelength limit [Angstrom] |
This function simply loops through all filenames and loads the corresponding pixel table. For each pixel table it loops through all pixels and copies the data values into the output table. It uses the flat-field level relative to the first exposure to scale the data values across sub-fields to a common level.
If the pixel tables have an attached flat-field spectrum, this is averaged over all exposures involved and applied to the merged pixel table. If only a subset of exposures comes with this flat-field spectrum, the function fails. The output flat-field spectrum is cut to about the same wavelength range as the pixel table itself, but keeping an approximate MUSE resolution element extra on each side, in case further resampling is necessary. If the flat-field spectrum was applied to the pixel table (i.e. it was taken out of the data), the keyword MUSE_HDR_PT_FFCORR is set in the header of the output pixel table, as value it contains the number of pixel tables merged.
leave the corresponding pixels out of the output table, output warning, but return the otherwise combined table | one or more of the input pixel tables of one exposure are missing |
set CPL_ERROR_INCOMPATIBLE_INPUT, return NULL | one or more of the input pixel tables correspond to data taken in a different instrument mode |
set CPL_ERROR_ILLEGAL_INPUT, return NULL | the number of input pixel tables is different from the pixel tables with flat-field spectrum attached |
propagate error, return partial pixel table | loading one of the input pixel tables fails |
set CPL_ERROR_FILE_NOT_FOUND, return NULL | none of the pixel tables given in aExposureList could be loaded |
Definition at line 1582 of file muse_pixtable.c.
References ffspec, header, muse_cplarray_interpolate_table_linear(), muse_cpltable_copy_array(), MUSE_HDR_PT_FFCORR, MUSE_HDR_PT_ILLUM_REGEXP, MUSE_HDR_PT_MERGED, muse_pixtable_compute_limits(), muse_pixtable_delete(), MUSE_PIXTABLE_FFDATA, MUSE_PIXTABLE_FFLAMBDA, muse_pixtable_flux_multiply(), muse_pixtable_get_nrow(), muse_pixtable_load_restricted_wavelength(), muse_pixtable_origin_copy_offsets(), muse_pixtable_spectrum_apply(), and table.
Referenced by muse_postproc_process_exposure().
muse_pixtable* muse_pixtable_load_restricted_wavelength | ( | const char * | aFilename, |
double | aLambdaMin, | ||
double | aLambdaMax | ||
) |
Load a pixel table from file and cut down the wavelength range.
aFilename | name of the file to load |
aLambdaMin | low wavelength limit [Angstrom] |
aLambdaMax | high wavelength limit [Angstrom] |
Just a wrapper for muse_pixtable_load() followed by muse_pixtable_restrict_wavelength() and a few checks.
return NULL, propagate CPL error code | muse_pixtable_load() fails |
return NULL, propagate CPL error code | muse_pixtable_restrict_wavelength() fails |
set CPL_ERROR_DATA_NOT_FOUND, return NULL | given reange is too short, no pixels are left |
Definition at line 1510 of file muse_pixtable.c.
References muse_pixtable_delete(), muse_pixtable_get_nrow(), muse_pixtable_load(), and muse_pixtable_restrict_wavelength().
Referenced by muse_pixtable_load_merge_channels().
muse_pixtable* muse_pixtable_load_window | ( | const char * | aFilename, |
cpl_size | aStart, | ||
cpl_size | aNRows | ||
) |
Load a range of rows from the table and all the FITS headers of a MUSE pixel table from a file.
aFilename | name of the file to load |
aStart | first table row index to read (starting at zero) |
aNRows | maximum number of rows to load |
The primary FITS header is loaded into the header element using cpl_propertylist_load(). Then cpl_table_load_window() is used to allocate and load the table elements of a muse_pixtable from the input FITS file.
It also loads the extension with extension name MUSE_PIXTABLE_FF_EXT as table, and stores the content in the ffspec component. If this does not exist, this component remains NULL. If this extension exists but cannot be loaded, a warning is printed but no error is set, since this is not a critical failure.
return NULL, propagate CPL error code | cpl_propertylist_load fails (this handles the case of an invalid or empty filename) |
return NULL, propagate CPL error code | cpl_table_load fails to load table contents |
Definition at line 1403 of file muse_pixtable.c.
References header, muse_cpltable_check(), muse_pixtable_delete(), muse_pixtable_get_type(), MUSE_PIXTABLE_TYPE_UNKNOWN, and table.
Referenced by muse_pixtable_load().
cpl_error_code muse_pixtable_origin_copy_offsets | ( | muse_pixtable * | aOut, |
muse_pixtable * | aFrom, | ||
unsigned int | aNum | ||
) |
Copy MUSE_HDR_PT_IFU_SLICE_OFFSET keywords between pixel tables.
aOut | output MUSE pixel table (can be input pixel table) |
aFrom | optional input MUSE pixel table (can be NULL) |
aNum | the exposure number to set in place of 0 |
This can be used to set the exposure number of MUSE_HDR_PT_IFU_SLICE_OFFSET header keywords or to copy them around between different pixel tables with the exposure number staying zero.
Loop through all possible IFU and slice numbers, copy the FITS keyword and value and delete the old one.
If aFrom is NULL, then all keywords are copied/moved within the one respective property list. If aFrom is a valid pixel table, the output entries are copied from there, with the exposure number corrected.
return CPL_ERROR_NULL_INPUT | aOut or its header component are NULL |
Definition at line 397 of file muse_pixtable.c.
References header, and MUSE_HDR_PT_IFU_SLICE_OFFSET.
Referenced by muse_pixtable_load_merge_channels(), and muse_xcombine_tables().
uint32_t muse_pixtable_origin_encode | ( | unsigned int | aX, |
unsigned int | aY, | ||
unsigned short | aIFU, | ||
unsigned short | aSlice, | ||
unsigned int | aOffset | ||
) |
Encode the three CCD coordinates defining the origin of one MUSE pixel into a 32bit integer.
aX | The horizontal coordinate of the origin. |
aY | The vertical coordinate of the origin. |
aIFU | The IFU number where this pixel originated. |
aSlice | The slice number where this pixel originated. |
aOffset | The offset of the slice on the CCD. |
aX and aY and aOffset have to be above 0 and below 8192; valid aIFU numbers are between 1 and 24, valid slice numbers between 1 and 48.
set CPL_ERROR_ILLEGAL_INPUT, return 0 | aX, aY, aIFU, aSlice, or aOffset are out of range |
Definition at line 167 of file muse_pixtable.c.
unsigned short muse_pixtable_origin_get_ifu | ( | uint32_t | aOrigin | ) |
Get the IFU number from the encoded 32bit origin number.
aOrigin | The encoded (32bit) integer. |
set CPL_ERROR_ILLEGAL_OUTPUT, return 0 | decoded IFU number is out of range |
Definition at line 268 of file muse_pixtable.c.
Referenced by muse_lsf_average_cube_all(), muse_lsf_check_arc_line(), muse_lsf_fit_slice(), muse_lsf_params_fit(), muse_pixtable_erase_ifu_slice(), muse_resampling_params_delete(), muse_sky_subtract_lines(), and muse_sky_subtract_lines_old().
unsigned int muse_pixtable_origin_get_offset | ( | muse_pixtable * | aPixtable, |
unsigned int | aExpNum, | ||
unsigned short | aIFU, | ||
unsigned short | aSlice | ||
) |
Get the slice offset from the pixel table header.
aPixtable | The pixel table. |
aExpNum | The relevant exposure number. |
aIFU | The relevant IFU number. |
aSlice | The relevant slice number. |
If the exposure number aExpNum is unknown, pass 0.
set CPL_ERROR_ILLEGAL_OUTPUT, return 0 | decoded slice offset is out of range or header keyword missing for this combination of aExpNum/aIFU/aSlice |
Definition at line 355 of file muse_pixtable.c.
References header, and MUSE_HDR_PT_IFU_SLICE_OFFSET.
Referenced by muse_pixtable_from_imagelist(), muse_pixtable_origin_get_x(), and muse_pixtable_to_imagelist().
unsigned short muse_pixtable_origin_get_slice | ( | uint32_t | aOrigin | ) |
Get the slice number from the encoded 32bit origin number.
aOrigin | The encoded (32bit) integer. |
set CPL_ERROR_ILLEGAL_OUTPUT, return 0 | decoded slice number is out of range |
Definition at line 290 of file muse_pixtable.c.
Referenced by muse_basicproc_apply_illum(), muse_basicproc_load_reduced(), muse_lsf_average_cube_all(), muse_lsf_check_arc_line(), muse_lsf_fit_slice(), muse_lsf_params_fit(), muse_pixtable_erase_ifu_slice(), muse_sky_subtract_lines(), and muse_sky_subtract_lines_old().
unsigned int muse_pixtable_origin_get_x | ( | uint32_t | aOrigin, |
muse_pixtable * | aPixtable, | ||
cpl_size | aRow | ||
) |
Get the horizontal coordinate from the encoded 32bit origin number.
aOrigin | The encoded (32bit) unsigned integer. |
aPixtable | The pixel table itself, the header component is needed to find the slice offset. |
aRow | The row index (starting at zero). |
The row index is needed because the horizontal position on a CCD is measured within each slice and the offset of each slice may depend on the exposure number and the IFU. If the row index is unknown or does not matter (because the pixel table only contains one exposure of one IFU), pass a negative number.
set CPL_ERROR_ILLEGAL_OUTPUT, return 0 | decoded horizontal coordinate value is out of range |
Definition at line 212 of file muse_pixtable.c.
References muse_pixtable_get_expnum(), and muse_pixtable_origin_get_offset().
Referenced by muse_pixtable_dump(), and muse_resampling_params_delete().
unsigned int muse_pixtable_origin_get_y | ( | uint32_t | aOrigin | ) |
Get the vertical coordinate from the encoded 32bit origin number.
aOrigin | The encoded (32bit) integer. |
set CPL_ERROR_ILLEGAL_OUTPUT, return 0 | decoded vertical coordinate value is out of range |
Definition at line 246 of file muse_pixtable.c.
Referenced by muse_resampling_params_delete().
unsigned int muse_pixtable_origin_set_offset | ( | muse_pixtable * | aPixtable, |
cpl_polynomial * | aLTrace, | ||
unsigned short | aIFU, | ||
unsigned short | aSlice | ||
) |
Set the slice offset from the pixel table header.
aPixtable | The pixel table. |
aLTrace | The tracing polynomial for the left edge of the slice. |
aIFU | The relevant IFU number. |
aSlice | The relevant slice number. |
This function computes the offset for a given slice of a given IFU, using the trace function, and stores it in the FITS header of the pixel table.
set CPL_ERROR_NULL_INPUT, return 0 | pixel table or its header are NULL |
propagate CPL error, return 0 | trace polynomial could not be evalutated |
Definition at line 320 of file muse_pixtable.c.
References header, and MUSE_HDR_PT_IFU_SLICE_OFFSET.
Referenced by muse_pixtable_create().
cpl_error_code muse_pixtable_reset_dq | ( | muse_pixtable * | aPixtable, |
unsigned int | aDQ | ||
) |
Reset a given bad pixel status (DQ flag) for all pixels in the table.
aPixtable | the pixel table |
aDQ | the (Euro3D) flag to reset |
return CPL_ERROR_NULL_INPUT | aPixtable is NULL |
Definition at line 2619 of file muse_pixtable.c.
References MUSE_PIXTABLE_DQ, muse_pixtable_get_nrow(), and table.
Referenced by muse_dar_check(), muse_resampling_spectrum_iterate(), and muse_wcs_locate_sources().
cpl_error_code muse_pixtable_restrict_wavelength | ( | muse_pixtable * | aPixtable, |
double | aLow, | ||
double | aHigh | ||
) |
Restrict a pixel table to a certain wavelength range.
aPixtable | the pixel table |
aLow | low wavelength limit [Angstrom] |
aHigh | high wavelength limit [Angstrom] |
CPL_ERROR_NONE | Everything went OK. |
Cut the data in the pixel table to the exact range [aLow, aHigh].
If it exists cut the ffspec component of aPixtable to [aLow-2.5, aHigh+2.5] to allow for more interpolation at the edges.
The exact wavelength range of entries left in aPixtable->table (and aPixtable->ffspec) of course depends on the incoming entries.
set CPL_ERROR_NULL_INPUT, return NULL | (aPixtable && aPixtable->table) not fulfilled |
Definition at line 2163 of file muse_pixtable.c.
References ffspec, header, MUSE_HDR_PT_LHI, MUSE_HDR_PT_LLO, muse_pixtable_compute_limits(), MUSE_PIXTABLE_FFLAMBDA, muse_pixtable_fix_exp_headers(), MUSE_PIXTABLE_LAMBDA, and table.
Referenced by muse_basicproc_load_reduced(), muse_pixtable_load_restricted_wavelength(), and muse_sky_subtract_continuum().
cpl_error_code muse_pixtable_restrict_xpos | ( | muse_pixtable * | aPixtable, |
double | aLo, | ||
double | aHi | ||
) |
Restrict a pixel table to a certain x coordinate range.
aPixtable | the pixel table |
aLo | low xpos limit |
aHi | high xpos limit |
return CPL_ERROR_NULL_INPUT | aPixtable or one of its components is NULL |
Definition at line 2214 of file muse_pixtable.c.
References header, MUSE_HDR_PT_XHI, MUSE_HDR_PT_XLO, muse_pfits_get_crval(), muse_pixtable_compute_limits(), muse_pixtable_fix_exp_headers(), MUSE_PIXTABLE_WCS_CELSPH, muse_pixtable_wcs_check(), MUSE_PIXTABLE_XPOS, and table.
cpl_error_code muse_pixtable_restrict_ypos | ( | muse_pixtable * | aPixtable, |
double | aLo, | ||
double | aHi | ||
) |
Restrict a pixel table to a certain y coordinate range.
aPixtable | the pixel table |
aLo | low ypos limit |
aHi | high ypos limit |
return CPL_ERROR_NULL_INPUT | aPixtable or one of its components is NULL |
Definition at line 2254 of file muse_pixtable.c.
References header, MUSE_HDR_PT_YHI, MUSE_HDR_PT_YLO, muse_pfits_get_crval(), muse_pixtable_compute_limits(), muse_pixtable_fix_exp_headers(), MUSE_PIXTABLE_WCS_CELSPH, muse_pixtable_wcs_check(), MUSE_PIXTABLE_YPOS, and table.
cpl_error_code muse_pixtable_save | ( | muse_pixtable * | aPixtable, |
const char * | aFilename | ||
) |
Save a MUSE pixel table to a file on disk.
aPixtable | input MUSE pixel table |
aFilename | name of the output file |
Simply calls cpl_propertylist_save() using the keywords in the header element of the muse_pixtable structure for construction of the primary header.
If the environment variable MUSE_PIXTABLE_SAVE_AS_TABLE is set to a positive integer, the pixel table is saved as FITS binary table using cpl_table_save(). Otherwise all columns are saved as separate FITS image extensions where the table column names are converted to EXTNAME of each extension and the column units are saved as BUNIT.
set and return CPL_ERROR_NULL_INPUT | aPixtable is NULL |
set error message, propagate CPL error code | failure to save headers |
propagate CPL error code | failure to save table |
Definition at line 1191 of file muse_pixtable.c.
References ffspec, header, muse_pfits_get_bunit(), muse_pfits_get_extname(), muse_pfits_get_naxis(), MUSE_PIXTABLE_DATA, MUSE_PIXTABLE_FF_EXT, and table.
Referenced by muse_flux_integrate_std(), muse_processing_save_table(), and muse_wcs_locate_sources().
cpl_error_code muse_pixtable_spectrum_apply | ( | muse_pixtable * | aPixtable, |
const cpl_array * | aLambdas, | ||
const cpl_array * | aFlux, | ||
muse_pixtable_operation | aOperation | ||
) |
Apply a spectrum given by two arrays with an operation to a pixel table.
aPixtable | pixel table to be changed |
aLambdas | wavelength array of the spectrum |
aFlux | flux array of the spectrum |
aOperation | the operation to be performed |
Supported operations so far are MUSE_PIXTABLE_OPERATION_SUBTRACT, MUSE_PIXTABLE_OPERATION_MULTIPLY, and MUSE_PIXTABLE_OPERATION_DIVIDE, any other aOperation leads to an error.
The arrays aLambdas and aFlux are expected to be of type CPL_TYPE_DOUBLE, and have to have the same lengths. These arrays are used to linearly interpolate the spectrum to the exact wavelengths of the pixels in the pixel table before applying the values to all pixels with the given aOperation.
This function assumes that the operation is corrective, so that it leaves keywords related to flux units untouched.
set and return CPL_ERROR_NULL_INPUT | aPixtable or its table component are NULL |
set and return CPL_ERROR_NULL_INPUT | aLambdas and/or aFlux are NULL |
set and return CPL_ERROR_ILLEGAL_INPUT | the lengths of aLambdas and/or aFlux are not equal or not positive |
set and return CPL_ERROR_INCOMPATIBLE_INPUT | the types of aLambdas and/or aFlux are not CPL_TYPE_DOUBLE |
set and return CPL_ERROR_UNSUPPORTED_MODE | aOperation is not MUSE_PIXTABLE_OPERATION_SUBTRACT or MUSE_PIXTABLE_OPERATION_MULTIPLY |
Definition at line 1994 of file muse_pixtable.c.
References muse_cplarray_interpolate_linear(), muse_cpltable_extract_column(), MUSE_PIXTABLE_DATA, muse_pixtable_extracted_delete(), muse_pixtable_extracted_get_size(), muse_pixtable_extracted_get_slices(), MUSE_PIXTABLE_LAMBDA, MUSE_PIXTABLE_STAT, and table.
Referenced by muse_pixtable_load_merge_channels(), muse_postproc_revert_ffspec_maybe(), and muse_sky_subtract_continuum().
muse_imagelist* muse_pixtable_to_imagelist | ( | muse_pixtable * | aPixtable | ) |
Project a pixel table with data from one IFU back onto its image.
aPixtable | the pixel table |
For each processed slice, an approximation of its horizontal center is written to the header of the respective image, in the form ESO.DRS.MUSE.SLICEi.CENTER (as float). The DQ extension for the gaps between slices and for locations not recorded in the input pixel table is set to EURO3D_MISSDATA.
set CPL_ERROR_NULL_INPUT, return NULL | aPixtable or its header component are NULL |
set CPL_ERROR_ILLEGAL_INPUT, return NULL | aPixtable contains data from more than one exposure |
Definition at line 2654 of file muse_pixtable.c.
References muse_image::data, muse_image::dq, muse_image::header, header, muse_image_new(), muse_imagelist_new(), muse_imagelist_set(), MUSE_PIXTABLE_DATA, MUSE_PIXTABLE_DQ, muse_pixtable_extracted_delete(), muse_pixtable_extracted_get_size(), muse_pixtable_extracted_get_slices(), muse_pixtable_get_expnum(), muse_pixtable_get_nrow(), MUSE_PIXTABLE_ORIGIN, muse_pixtable_origin_get_offset(), MUSE_PIXTABLE_STAT, and muse_image::stat.
muse_pixtable_wcs muse_pixtable_wcs_check | ( | muse_pixtable * | aPixtable | ) |
Check the state of the world coordinate system of a pixel table.
aPixtable | the pixel table |
This function check the column units of the MUSE_PIXTABLE_XPOS and MUSE_PIXTABLE_YPOS pixel table columns, to check the state of the WCS of the pixel table. If no column unit was set at all or xpos and ypos have different units, someone fiddled with the pixel table. In that case, we may get unwanted side effects, so set an error state.
set CPL_ERROR_NULL_INPUT, return MUSE_PIXTABLE_WCS_UNKNOWN | aPixtable is NULL |
set CPL_ERROR_DATA_NOT_FOUND, return MUSE_PIXTABLE_WCS_UNKNOWN | coordinate column without unit or not present |
set CPL_ERROR_INCOMPATIBLE_INPUT, return MUSE_PIXTABLE_WCS_UNKNOWN | coordinate column units for x and y are different |
set CPL_ERROR_ILLEGAL_INPUT, return MUSE_PIXTABLE_WCS_UNKNOWN | coordinate column unit is neither "pix" nor "deg" or "rad" |
Definition at line 2527 of file muse_pixtable.c.
References MUSE_PIXTABLE_WCS_CELSPH, MUSE_PIXTABLE_WCS_NATSPH, MUSE_PIXTABLE_WCS_PIXEL, MUSE_PIXTABLE_WCS_UNKNOWN, MUSE_PIXTABLE_XPOS, MUSE_PIXTABLE_YPOS, and table.
Referenced by muse_dar_check(), muse_dar_correct(), muse_pixgrid_create(), muse_pixtable_compute_limits(), muse_pixtable_dump(), muse_pixtable_restrict_xpos(), muse_pixtable_restrict_ypos(), muse_resampling_collapse_pixgrid(), muse_resampling_cube(), muse_resampling_euro3d(), muse_resampling_image(), muse_resampling_params_delete(), muse_wcs_position_celestial(), muse_wcs_project_tan(), and muse_xcombine_tables().
const muse_cpltable_def muse_pixtable_def[] |
MUSE pixel table definition.
The MUSE pixel table has the following columns:
It may additionally contain a column 'weight' which per-pixel weight information to be used for resampling.
Definition at line 502 of file muse_pixtable.c.
Referenced by muse_lsf_create_arcpixtable(), muse_phys_air_to_vacuum(), muse_resampling_spectrum(), muse_resampling_spectrum_iterate(), muse_sky_subtract_continuum(), and muse_sky_subtract_lines().
const muse_cpltable_def muse_pixtable_def[] |
MUSE pixel table definition.
The MUSE pixel table has the following columns:
It may additionally contain a column 'weight' which per-pixel weight information to be used for resampling.
Definition at line 502 of file muse_pixtable.c.
Referenced by muse_lsf_create_arcpixtable(), muse_phys_air_to_vacuum(), muse_resampling_spectrum(), muse_resampling_spectrum_iterate(), muse_sky_subtract_continuum(), and muse_sky_subtract_lines().