Data Structures | |
| struct | pmFPA |
| Focal plane array (the entirety of the camera). More... | |
| struct | pmChip |
| A chip (contiguous detector element). More... | |
| struct | pmCell |
| Cell data structure. More... | |
| struct | pmReadout |
| A readout (individual read of a cell). More... | |
| struct | pmFPAfile |
| struct | pmFPAview |
| Identifier for FPA components. More... | |
| struct | pmHDU |
| An instance of the FITS Header Data Unit. More... | |
Defines | |
| #define | FPA_ASTROM 1 |
| Include astrometry information in the structures? | |
Enumerations | |
| enum | pmFPAfilePlace { PM_FPA_BEFORE, PM_FPA_AFTER } |
| enum | pmFPAfileType { PM_FPA_FILE_NONE, PM_FPA_FILE_SX, PM_FPA_FILE_OBJ, PM_FPA_FILE_CMP, PM_FPA_FILE_CMF, PM_FPA_FILE_RAW, PM_FPA_FILE_IMAGE, PM_FPA_FILE_PSF, PM_FPA_FILE_JPEG, PM_FPA_FILE_KAPA, PM_FPA_FILE_MANAPLOT, PM_FPA_FILE_MASK, PM_FPA_FILE_WEIGHT, PM_FPA_FILE_FRINGE } |
| enum | pmFPAfileMode { PM_FPA_MODE_NONE, PM_FPA_MODE_READ, PM_FPA_MODE_WRITE, PM_FPA_MODE_INTERNAL, PM_FPA_MODE_REFERENCE } |
| enum | pmFPAfileState { PM_FPA_STATE_OPEN = 0x01, PM_FPA_STATE_CLOSED = 0x02, PM_FPA_STATE_INACTIVE = 0x04 } |
| enum | pmFPALevel { PM_FPA_LEVEL_NONE, PM_FPA_LEVEL_FPA, PM_FPA_LEVEL_CHIP, PM_FPA_LEVEL_CELL, PM_FPA_LEVEL_READOUT } |
| Specify the level of the FPA hierarchy. More... | |
| enum | pmMaskValue { PM_MASK_CLEAR = 0x00, PM_MASK_TRAP = 0x01, PM_MASK_BADCOL = 0x02, PM_MASK_SAT = 0x04, PM_MASK_BAD = 0x08, PM_MASK_FLAT = 0x10, PM_MASK_MARK = 0x20, PM_MASK_EXT1 = 0x40, PM_MASK_EXT2 = 0x80 } |
| Pixel mask values. More... | |
Functions | |
| void | pmCellFreeReadouts (pmCell *cell) |
| Free all readouts within a cell. | |
| void | pmChipFreeCells (pmChip *chip) |
| Free all cells within a chip. | |
| void | pmReadoutFreeData (pmReadout *readout) |
| Free all data within a readout. | |
| void | pmCellFreeData (pmCell *cell) |
| Free all data within a cell (all readouts as well as metadata). | |
| void | pmChipFreeData (pmChip *chip) |
| Free all data within a chip (all cells as well as metadata). | |
| void | pmFPAFreeData (pmFPA *fpa) |
| Free all data within an FPA (all chips as well as metadata). | |
| pmReadout * | pmReadoutAlloc (pmCell *cell) |
| Allocate a readout associated with a cell. | |
| pmCell * | pmCellAlloc (pmChip *chip, const char *name) |
| Allocate a cell associated with a chip. | |
| pmChip * | pmChipAlloc (pmFPA *fpa, const char *name) |
| Allocate a chip associated with an FPA. | |
| pmFPA * | pmFPAAlloc (const psMetadata *camera) |
| Allocate an FPA. | |
| bool | pmFPACheckParents (pmFPA *fpa) |
| Check parent links within an FPA. | |
| bool | pmFPAviewWriteJPEG (const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmFPAviewWriteMANAPLOT (const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| bool | pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| pmFPA * | pmFPAConstruct (const psMetadata *camera) |
| Construct an FPA instance on the basis of a camera configuration. | |
| bool | pmFPAAddSourceFromView (pmFPA *fpa, const pmFPAview *phuView, const psMetadata *format) |
| Add an (input or output) source to the focal plane hierarchy, specified by a view. | |
| pmFPAview * | pmFPAAddSourceFromHeader (pmFPA *fpa, psMetadata *phu, const psMetadata *format) |
| Add an (input or output) source to the focal plane hierarchy, specified by a (primary) header. | |
| pmFPAview * | pmFPAIdentifySourceFromHeader (pmFPA *fpa, psMetadata *phu, const psMetadata *format) |
| Identify a source in the focal plane hierarchy, specified by a (primary) header. | |
| void | pmFPAPrint (FILE *fd, const pmFPA *fpa, bool header, bool concepts) |
| Print a representation of the FPA, including its headers and concepts. | |
| pmFPALevel | pmFPAPHULevel (const psMetadata *format) |
| Return the PHU level for an FPA, given the format. | |
| pmFPALevel | pmFPAExtensionsLevel (const psMetadata *format) |
| Return the Extensions level for an FPA, given the format. | |
| bool | pmFPACopy (pmFPA *target, const pmFPA *source) |
| Copy an FPA and components, including the pixels, to a different representation of the same camera. | |
| bool | pmChipCopy (pmChip *target, const pmChip *source) |
| Copy a chip and components, including the pixels, to a different representation of the same camera. | |
| bool | pmCellCopy (pmCell *target, const pmCell *source) |
| Copy a cell and components, including the pixels, to a different representation of the same camera. | |
| bool | pmFPACopyStructure (pmFPA *target, const pmFPA *source, int xBin, int yBin) |
| Copy an FPA, but not the pixels, to a different representation of the same camera. | |
| bool | pmChipCopyStructure (pmChip *target, const pmChip *source, int xBin, int yBin) |
| Copy a chip, but not the pixels, to a different representation of the same camera. | |
| bool | pmCellCopyStructure (pmCell *target, const pmCell *source, int xBin, int yBin) |
| Copy a cell, but not the pixels, to a different representation of the same camera. | |
| psRegion * | pmReadoutExtent (const pmReadout *readout) |
| Return the extent of a readout. | |
| psRegion * | pmCellExtent (const pmCell *cell) |
| Return the extent of a cell. | |
| psRegion * | pmChipExtent (const pmChip *chip) |
| Return the extent of a chip. | |
| psRegion * | pmFPAExtent (const pmFPA *fpa) |
| Return the extent of an FPA. | |
| pmFPAfile * | pmFPAfileAlloc () |
| pmReadout * | pmFPAfileThisReadout (psMetadata *files, const pmFPAview *view, const char *name) |
| pmCell * | pmFPAfileThisCell (psMetadata *files, const pmFPAview *view, const char *name) |
| pmChip * | pmFPAfileThisChip (psMetadata *files, const pmFPAview *view, const char *name) |
| bool | pmFPAfileAddFileNames (psMetadata *files, char *name, char *value, int mode) |
| char * | pmFPAfileNameFromRule (char *rule, pmFPAfile *file, const pmFPAview *view) |
| bool | pmFPAfileCopyView (pmFPA *out, pmFPA *in, const pmFPAview *view) |
| bool | pmFPAfileCopyStructureView (pmFPA *out, pmFPA *in, int xBin, int yBin, const pmFPAview *view) |
| pmFPAfileType | pmFPAfileTypeFromString (const char *type) |
| pmFPAfile * | pmFPAfileDefineInput (pmConfig *config, pmFPA *fpa, const char *name) |
| pmFPAfile * | pmFPAfileDefineOutput (pmConfig *config, pmFPA *fpa, const char *name) |
| pmFPAfile * | pmFPAfileDefineFromArgs (bool *found, pmConfig *config, const char *filename, const char *argname) |
| pmFPAfile * | pmFPAfileBindFromArgs (bool *found, pmFPAfile *input, pmConfig *config, const char *filename, const char *argname) |
| pmFPAfile * | pmFPAfileDefineFromConf (bool *found, pmConfig *config, const char *filename) |
| pmFPAfile * | pmFPAfileDefineFromDetDB (bool *found, pmConfig *config, const char *filename, pmFPA *input, pmDetrendType type) |
| pmFPAfile * | pmFPAfileDefineFromFPA (pmConfig *config, pmFPA *src, int xBin, int yBin, const char *filename) |
| pmFPAfile * | pmFPAfileDefineNewCamera (pmConfig *config, const char *filename) |
| pmFPAfile * | pmFPAfileDefineChipMosaic (pmConfig *config, pmFPA *src, const char *filename) |
| Create a new output pmFPAfile based upon a chip mosaic of an existing FPA. | |
| pmFPAfile * | pmFPAfileDefineFPAMosaic (pmConfig *config, pmFPA *src, const char *filename) |
| Create a new output pmFPAfile based upon an FPA mosaic of an existing FPA. | |
| pmReadout * | pmFPAfileDefineInternal (psMetadata *files, const char *name, int Nx, int Ny, int type) |
| bool | pmFPAfileDropInternal (psMetadata *files, const char *name) |
| pmFPAfile * | pmFPAfileDefineSingleFromArgs (bool *found, pmConfig *config, const char *filename, const char *argname, int entry) |
| bool | pmFPAviewReadFitsImage (const pmFPAview *view, pmFPAfile *file) |
| Read an image into the current view. | |
| bool | pmFPAviewReadFitsMask (const pmFPAview *view, pmFPAfile *file) |
| Read a mask into the current view. | |
| bool | pmFPAviewReadFitsWeight (const pmFPAview *view, pmFPAfile *file) |
| Read a weight map into the current view. | |
| bool | pmFPAviewWriteFitsImage (const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| Write the image for the specified view. | |
| bool | pmFPAviewWriteFitsMask (const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| Write the mask for the specified view. | |
| bool | pmFPAviewWriteFitsWeight (const pmFPAview *view, pmFPAfile *file, pmConfig *config) |
| Write the weight map for the specified view. | |
| bool | pmFPAviewFreeData (const pmFPAview *view, pmFPAfile *file) |
| Free the data for the specified view. | |
| bool | pmFPAviewReadFitsTable (const pmFPAview *view, pmFPAfile *file, const char *name) |
| Read a table into the current view. | |
| bool | pmFPAviewWriteFitsTable (const pmFPAview *view, pmFPAfile *file, const char *name) |
| Write the table for the specified view. | |
| pmFPA * | pmFPAfileSuitableFPA (const pmFPAfile *file, const pmFPAview *view, const pmConfig *config) |
| Produce a suitable FPA for writing, on the basis of the input FPAfile. | |
| bool | pmFPAfileOpen (pmFPAfile *file, const pmFPAview *view, pmConfig *config) |
| bool | pmFPAfileRead (pmFPAfile *file, const pmFPAview *view, pmConfig *config) |
| bool | pmFPAfileCreate (pmFPAfile *file, const pmFPAview *view, pmConfig *config) |
| bool | pmFPAfileWrite (pmFPAfile *file, const pmFPAview *view, pmConfig *config) |
| bool | pmFPAfileClose (pmFPAfile *file, const pmFPAview *view) |
| bool | pmFPAfileFreeData (pmFPAfile *file, const pmFPAview *view) |
| bool | pmFPAfileActivate (psMetadata *files, bool state, char *name) |
| bool | pmFPAfileIOChecks (pmConfig *config, const pmFPAview *view, pmFPAfilePlace place) |
| bool | pmFPASetFileStatus (pmFPA *fpa, bool status) |
| Set the file_exists flag for an FPA and components. | |
| bool | pmChipSetFileStatus (pmChip *chip, bool status) |
| Set the file_exists flag for a chip and components. | |
| bool | pmCellSetFileStatus (pmCell *cell, bool status) |
| Set the file_exists flag for a cell and components. | |
| bool | pmFPACheckFileStatus (const pmFPA *fpa) |
| Return the file_exists status for an FPA and components. | |
| bool | pmChipCheckFileStatus (const pmChip *chip) |
| Return the file_exists status for a chip and components. | |
| bool | pmCellCheckFileStatus (const pmCell *cell) |
| Return the file_exists status for a chip and components. | |
| bool | pmFPASetDataStatus (pmFPA *fpa, bool status) |
| Set the data_exists flag for an FPA and components. | |
| bool | pmChipSetDataStatus (pmChip *chip, bool status) |
| Set the data_exists flag for a chip and components. | |
| bool | pmCellSetDataStatus (pmCell *cell, bool status) |
| Set the data_exists flag for a cell and components. | |
| bool | pmFPASelectChip (pmFPA *fpa, int chipNum, bool exclusive) |
| Select a chip within an FPA for processing. | |
| bool | pmChipSelectCell (pmChip *chip, int cellNum, bool exclusive) |
| Select a chip within a chip for processing. | |
| int | pmFPAExcludeChip (pmFPA *fpa, int chipNum) |
| Exclude a chip within an FPA from processing. | |
| int | pmChipExcludeCell (pmChip *chip, int cellNum) |
| Exclude a cell within a chip from processing. | |
| bool | pmFPAReadHeader (pmFPA *fpa, psFits *fits) |
| Read the FITS header (and ingest concepts) for an FPA, if it exists at this level. | |
| bool | pmChipReadHeader (pmChip *chip, psFits *fits) |
| Read the FITS header (and ingest concepts) for a chip, if it exists at this level. | |
| bool | pmCellReadHeader (pmCell *cell, psFits *fits) |
| Read the FITS header (and ingest concepts) for a cell, if it exists at this level. | |
| const char * | pmFPALevelToName (pmFPALevel level) |
| Return the string representation of the FPA level. | |
| pmFPALevel | pmFPALevelFromName (const char *name) |
| Return the enum representation of the FPA level. | |
| bool | pmReadoutSetMask (pmReadout *readout) |
| Set a temporary readout mask using CELL.SATURATION and CELL.BAD. | |
| bool | pmReadoutSetWeight (pmReadout *readout, bool poisson) |
| Set a temporary readout weight map using CELL.GAIN and CELL.READNOISE. | |
| bool | pmReadoutGenerateMask (pmReadout *readout) |
| Generate a readout mask (suitable for output) using CELL.SATURATION and CELL.BAD. | |
| bool | pmReadoutGenerateWeight (pmReadout *readout, bool poisson) |
| Generate a weight map (suitable for output) using CELL.GAIN and CELL.READNOISE. | |
| bool | pmReadoutGenerateMaskWeight (pmReadout *readout, bool poisson) |
| Generate mask and weight map for a readout. | |
| bool | pmCellGenerateMaskWeight (pmCell *cell, bool poisson) |
| Generate mask and weight maps for all readouts within a cell. | |
| bool | pmChipMosaic (pmChip *target, const pmChip *source) |
| Mosaic all cells within a chip. | |
| bool | pmFPAMosaic (pmFPA *target, const pmFPA *source) |
| Mosaic all cells within an FPA. | |
| bool | pmReadoutReadNext (pmReadout *readout, psFits *fits, int z, int numRows) |
| Read a readout incrementally. | |
| bool | pmCellRead (pmCell *cell, psFits *fits, psDB *db) |
| Read an entire cell. | |
| bool | pmChipRead (pmChip *chip, psFits *fits, psDB *db) |
| Read a chip. | |
| bool | pmFPARead (pmFPA *fpa, psFits *fits, psDB *db) |
| Read an FPA. | |
| bool | pmCellReadMask (pmCell *cell, psFits *fits, psDB *db) |
| Read an entire cell into the mask. | |
| bool | pmChipReadMask (pmChip *chip, psFits *fits, psDB *db) |
| Read an entire chip into the mask. | |
| bool | pmFPAReadMask (pmFPA *fpa, psFits *fits, psDB *db) |
| Read an entire FPA into the mask. | |
| bool | pmCellReadWeight (pmCell *cell, psFits *fits, psDB *db) |
| Read an entire cell into the weight. | |
| bool | pmChipReadWeight (pmChip *chip, psFits *fits, psDB *db) |
| Read an entire chip into the weight. | |
| bool | pmFPAReadWeight (pmFPA *fpa, psFits *fits, psDB *db) |
| Read an entire FPA into the weight. | |
| int | pmCellReadTable (pmCell *cell, psFits *fits, const char *name) |
| Read a FITS table into the cell. | |
| int | pmChipReadTable (pmChip *chip, psFits *fits, const char *name) |
| Read a FITS table into the component cells. | |
| int | pmFPAReadTable (pmFPA *fpa, psFits *fits, const char *name) |
| Read a FITS table into the component cells. | |
| int | pmFPAFindChip (const pmFPA *fpa, const char *name) |
| Find a chip by name; return the index. | |
| int | pmChipFindCell (const pmChip *chip, const char *name) |
| Find a cell by name; return the index. | |
| pmFPAview * | pmFPAviewAlloc (int nRows) |
| Allocator for pmFPAview. | |
| bool | pmFPAviewReset (pmFPAview *view) |
| Reset a view to select all components. | |
| pmFPALevel | pmFPAviewLevel (const pmFPAview *view) |
| Determine the current view level. | |
| pmChip * | pmFPAviewThisChip (const pmFPAview *view, const pmFPA *fpa) |
| Return the currently selected chip for this view. | |
| pmCell * | pmFPAviewThisCell (const pmFPAview *view, const pmFPA *fpa) |
| Return the currently selected cell for this view. | |
| pmReadout * | pmFPAviewThisReadout (const pmFPAview *view, const pmFPA *fpa) |
| Return the currently selected readout for this view. | |
| pmChip * | pmFPAviewNextChip (pmFPAview *view, const pmFPA *fpa, int nStep) |
| Advance view to the next chip. | |
| pmCell * | pmFPAviewNextCell (pmFPAview *view, const pmFPA *fpa, int nStep) |
| Advance view to the next cell. | |
| pmReadout * | pmFPAviewNextReadout (pmFPAview *view, const pmFPA *fpa, int nStep) |
| Advance view to the next readout. | |
| pmHDU * | pmFPAviewThisHDU (const pmFPAview *view, const pmFPA *fpa) |
| Return the HDU corresponding to the current view. | |
| pmHDU * | pmFPAviewThisPHU (const pmFPAview *view, const pmFPA *fpa) |
| Return the blank Primary HDU corresponding to the current view, if any. | |
| bool | pmReadoutWriteNext (pmReadout *readout, psFits *fits, int z) |
| Write a readout incrementally. | |
| bool | pmCellWrite (pmCell *cell, psFits *fits, psDB *db, bool blank) |
| Write a cell to a FITS file. | |
| bool | pmChipWrite (pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse) |
| Write a chip to a FITS file. | |
| bool | pmFPAWrite (pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse) |
| Write an FPA to a FITS file. | |
| bool | pmCellWriteMask (pmCell *cell, psFits *fits, psDB *db, bool blank) |
| Write a cell mask to a FITS file. | |
| bool | pmChipWriteMask (pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse) |
| Write a chip mask to a FITS file. | |
| bool | pmFPAWriteMask (pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse) |
| Write an FPA mask to a FITS file. | |
| bool | pmCellWriteWeight (pmCell *cell, psFits *fits, psDB *db, bool blank) |
| Write a cell weight to a FITS file. | |
| bool | pmChipWriteWeight (pmChip *chip, psFits *fits, psDB *db, bool blank, bool recurse) |
| Write a chip weight to a FITS file. | |
| bool | pmFPAWriteWeight (pmFPA *fpa, psFits *fits, psDB *db, bool blank, bool recurse) |
| Write an FPA weight to a FITS file. | |
| int | pmCellWriteTable (psFits *fits, const pmCell *cell, const char *name) |
| Write a FITS table from the cell's analysis metadata. | |
| int | pmChipWriteTable (psFits *fits, const pmChip *chip, const char *name) |
| int | pmFPAWriteTable (psFits *fits, const pmFPA *fpa, const char *name) |
| pmHDU * | pmHDUAlloc (const char *extname) |
| Allocator for pmHDU. | |
| bool | pmHDUReadHeader (pmHDU *hdu, psFits *fits) |
| Read the HDU header only. | |
| bool | pmHDURead (pmHDU *hdu, psFits *fits) |
| Read the HDU header and pixels. | |
| bool | pmHDUReadMask (pmHDU *hdu, psFits *fits) |
| Read the HDU header and mask. | |
| bool | pmHDUReadWeight (pmHDU *hdu, psFits *fits) |
| Read the HDU header and weight map. | |
| bool | pmHDUWrite (pmHDU *hdu, psFits *fits) |
| Write the HDU header and pixels. | |
| bool | pmHDUWriteMask (pmHDU *hdu, psFits *fits) |
| Write the HDU header and mask. | |
| bool | pmHDUWriteWeight (pmHDU *hdu, psFits *fits) |
| Write the HDU header and weight map. | |
| bool | pmHDUGenerateForCell (pmCell *cell) |
| Generate an HDU (with CELL.TRIMSEC, CELL.BIASSEC and pixels) for a cell with pixels. | |
| bool | pmHDUGenerateForChip (pmChip *chip) |
| Generate an HDU (with CELL.TRIMSEC, CELL.BIASSEC and pixels) for a cell with pixels. | |
| bool | pmHDUGenerateForFPA (pmFPA *fpa) |
| The write functions for the FPA hierarchy use pmHDUWrite, which assumes that the images in the readouts are subimages of the pixels in the HDU structure. | |
| pmHDU * | pmHDUGetLowest (const pmFPA *fpa, const pmChip *chip, const pmCell *cell) |
| Get the lowest HDU in the hierarchy. | |
| pmHDU * | pmHDUGetHighest (const pmFPA *fpa, const pmChip *chip, const pmCell *cell) |
| Get the highest HDU in the hierarchy. | |
| pmHDU * | pmHDUFromFPA (const pmFPA *fpa) |
| Given an FPA, return the HDU (or NULL if all HDUs reside below the FPA). | |
| pmHDU * | pmHDUFromChip (const pmChip *chip) |
| Given a chip, return the HDU (or NULL if it resides below the chip). | |
| pmHDU * | pmHDUFromCell (const pmCell *cell) |
| Given a cell, return the HDU. | |
| pmHDU * | pmHDUFromReadout (const pmReadout *readout) |
| Given a readout, return the HDU. | |
| void | pmHDUPrint (FILE *fd, const pmHDU *hdu, int level, bool header) |
| Print details about an HDU. | |
| #define FPA_ASTROM 1 |
| enum pmFPAfileMode |
| PM_FPA_MODE_NONE | |
| PM_FPA_MODE_READ | |
| PM_FPA_MODE_WRITE | |
| PM_FPA_MODE_INTERNAL | |
| PM_FPA_MODE_REFERENCE |
Definition at line 44 of file pmFPAfile.h.
| enum pmFPAfilePlace |
| enum pmFPAfileState |
Definition at line 52 of file pmFPAfile.h.
| enum pmFPAfileType |
Definition at line 27 of file pmFPAfile.h.
| enum pmFPALevel |
Specify the level of the FPA hierarchy.
Definition at line 18 of file pmFPALevel.h.
| enum pmMaskValue |
Pixel mask values.
Definition at line 21 of file pmFPAMaskWeight.h.
Allocate a cell associated with a chip.
The name is used to set CELL.NAME within the concepts.
| chip | Parent chip, or NULL |
| name | Name of cell, for CELL.NAME |
| bool pmCellCheckFileStatus | ( | const pmCell * | cell | ) |
Return the file_exists status for a chip and components.
| cell | Cell for which to check status |
Copy a cell and components, including the pixels, to a different representation of the same camera.
This function is useful for converting between different representations of the same camera. For example, between Megacam "RAW" (one amp per extension) and Megacam "SPLICED" formats (two amps = 1 chip per extension, spliced together). Components are spliced together as necessary.
| target | The target cell |
| source | The source cell, to be copied |
Copy a cell, but not the pixels, to a different representation of the same camera.
This function the same as pmCellCopy, except that the pixels are not copied (though images of sufficient size are allocated in the target). Changes the CELL.XBIN and CELL.YBIN according to the provided binning factors.
| target | The target cell |
| source | The source cell, to be copied |
| yBin | Binning factors in x and y |
| psRegion* pmCellExtent | ( | const pmCell * | cell | ) |
Return the extent of a cell.
The extent is determined from the extent of the component readouts, plus CELL.X0,Y0
| cell | The cell of interest |
| void pmCellFreeData | ( | pmCell * | cell | ) |
Free all data within a cell (all readouts as well as metadata).
| cell | Cell for which to free data |
| void pmCellFreeReadouts | ( | pmCell * | cell | ) |
Free all readouts within a cell.
| cell | Cell for which to free readouts |
| bool pmCellGenerateMaskWeight | ( | pmCell * | cell, | |
| bool | poisson | |||
| ) |
Generate mask and weight maps for all readouts within a cell.
Calls pmReadoutGenerateMaskWeight for each readout within the cell.
| cell | Cell for which to generate mask and weights |
| poisson | Use poisson weights (in addition to read noise)? |
| bool pmCellRead | ( | pmCell * | cell, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an entire cell.
Reads the appropriate HDU, ingests concepts from the header, and portions pixels into readouts. Pixels are converted to F32.
| bool pmCellReadHeader | ( | pmCell * | cell, | |
| psFits * | fits | |||
| ) |
Read the FITS header (and ingest concepts) for a cell, if it exists at this level.
Returns false if there was a problem. Returns true if it successfully read the header, or if the header was already there. No iteration to lower levels is performed.
| cell | Cell for which to read header |
| fits | FITS file handle |
| bool pmCellReadMask | ( | pmCell * | cell, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an entire cell into the mask.
Same as pmCellRead, but reads into the mask element of the readouts.
| int pmCellReadTable | ( | pmCell * | cell, | |
| psFits * | fits, | |||
| const char * | name | |||
| ) |
Read a FITS table into the cell.
Given a name, which is combined with the chip and cell to identify the extension name ("NAME_CHIP_CELL"), read the FITS table into the cell analysis metadata (with key being the provided name). The header is also read and included in the cell analysis metadata under "name.HEADER".
| cell | Cell for which to read table |
| fits | FITS file from which the table |
| name | Specifies the extension name, and target in the analysis metadata |
| bool pmCellReadWeight | ( | pmCell * | cell, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an entire cell into the weight.
Same as pmCellRead, but reads into the weight element of the readouts.
| bool pmCellSetDataStatus | ( | pmCell * | cell, | |
| bool | status | |||
| ) |
Set the data_exists flag for a cell and components.
| cell | Cell for which to set status |
| status | Status to set |
| bool pmCellSetFileStatus | ( | pmCell * | cell, | |
| bool | status | |||
| ) |
Set the file_exists flag for a cell and components.
| cell | Cell for which to set status |
| status | Status to set |
| bool pmCellWrite | ( | pmCell * | cell, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank | |||
| ) |
Write a cell to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU to the FITS file. This function should be called at the beginning of the output cell loop with blank=true in order to produce the correct file structure.
| cell | Cell to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| bool pmCellWriteMANAPLOT | ( | pmCell * | cell, | |
| const pmFPAview * | view, | |||
| pmFPAfile * | file, | |||
| pmConfig * | config | |||
| ) |
| bool pmCellWriteMask | ( | pmCell * | cell, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank | |||
| ) |
Write a cell mask to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU mask pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU mask to the FITS file. This function should be called at the beginning of the output cell loop with blank=true in order to produce the correct file structure.
| cell | Cell to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| int pmCellWriteTable | ( | psFits * | fits, | |
| const pmCell * | cell, | |||
| const char * | name | |||
| ) |
Write a FITS table from the cell's analysis metadata.
The FITS table (a psArray of psMetadatas) from the cell's analysis metadata (under "name") is written to the FITS file, at an extension specified by the name, chip name and cell name ("NAME_CHIP_CELL"). If a header is present in the analysis metadata ("name.HEADER"), then it is written also.
| fits | FITS file to which to write |
| cell | Cell containing FITS table in the analysis metadata |
| name | Name for the table data, and the extension name |
| bool pmCellWriteWeight | ( | pmCell * | cell, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank | |||
| ) |
Write a cell weight to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU weight pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU weight to the FITS file. This function should be called at the beginning of the output cell loop with blank=true in order to produce the correct file structure.
| cell | Cell to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
Allocate a chip associated with an FPA.
The name is used to set CHIP.NAME within the concepts
| fpa | Parent FPA, or NULL |
| name | Name of chip, for CHIP.NAME |
| bool pmChipCheckFileStatus | ( | const pmChip * | chip | ) |
Return the file_exists status for a chip and components.
| chip | Chip for which to check status |
Copy a chip and components, including the pixels, to a different representation of the same camera.
This function is useful for converting between different representations of the same camera. For example, between Megacam "RAW" (one amp per extension) and Megacam "SPLICED" formats (two amps = 1 chip per extension, spliced together). Components are spliced together as necessary.
| target | The target chip |
| source | The source chip, to be copied |
Copy a chip, but not the pixels, to a different representation of the same camera.
This function the same as pmChipCopy, except that the pixels are not copied (though images of sufficient size are allocated in the target). Changes the CELL.XBIN and CELL.YBIN according to the provided binning factors.
| target | The target chip |
| source | The source chip, to be copied |
| yBin | Binning factors in x and y |
| int pmChipExcludeCell | ( | pmChip * | chip, | |
| int | cellNum | |||
| ) |
Exclude a cell within a chip from processing.
| chip | Chip containing the chip of interest |
| cellNum | Cell number to exclude |
| psRegion* pmChipExtent | ( | const pmChip * | chip | ) |
Return the extent of a chip.
The extent is determined from the extent of the component cells, plus CHIP.X0,Y0
| chip | The chip of interest |
| int pmChipFindCell | ( | const pmChip * | chip, | |
| const char * | name | |||
| ) |
Find a cell by name; return the index.
Looks for a cell within the chip with CELL.NAME matching the provided name. Returns the index of the cell, or -1 if it was not found.
| void pmChipFreeCells | ( | pmChip * | chip | ) |
Free all cells within a chip.
| chip | Chip for which to free cells |
| void pmChipFreeData | ( | pmChip * | chip | ) |
Free all data within a chip (all cells as well as metadata).
| chip | Chip for which to free data |
Mosaic all cells within a chip.
Mosaics all cells within the source into a single cell within the target (which must have only a single cell). Cells are placed on the chip according to the CELL.X0 and CELL.Y0 offsets. This is useful for getting an image of the chip on the sky. The mosaicking is done so as to avoid performing a deep copy of the pixels, if possible.
| target | Target chip --- may contain only a single cell |
| source | Source chip whose cells will be mosaicked |
| bool pmChipRead | ( | pmChip * | chip, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read a chip.
Iterates over component cells, reading each with pmCellRead.
| bool pmChipReadHeader | ( | pmChip * | chip, | |
| psFits * | fits | |||
| ) |
Read the FITS header (and ingest concepts) for a chip, if it exists at this level.
Returns false if there was a problem. Returns true if it successfully read the header, or if the header was already there. No iteration to lower levels is performed.
| chip | Chip for which to read header |
| fits | FITS file handle |
| bool pmChipReadMask | ( | pmChip * | chip, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an entire chip into the mask.
Same as pmChipRead, but reads into the mask element of the readouts.
| int pmChipReadTable | ( | pmChip * | chip, | |
| psFits * | fits, | |||
| const char * | name | |||
| ) |
Read a FITS table into the component cells.
Iterates over component cells, calling pmCellReadTable.
| chip | Cell for which to read table |
| fits | FITS file from which the table |
| name | Specifies the extension name, and target in the analysis metadata |
| bool pmChipReadWeight | ( | pmChip * | chip, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an entire chip into the weight.
Same as pmChipRead, but reads into the weight element of the readouts.
| bool pmChipSelectCell | ( | pmChip * | chip, | |
| int | cellNum, | |||
| bool | exclusive | |||
| ) |
Select a chip within a chip for processing.
If exclusive is true, the specified cell is the only chip to be processed. A negative value for cellNum is valid and, in combinations with exclusive, de-selects all chips.
| chip | Chip containing the cell of interest |
| cellNum | Cell number to select |
| exclusive | Process this cell exclusive of the others? |
| bool pmChipSetDataStatus | ( | pmChip * | chip, | |
| bool | status | |||
| ) |
Set the data_exists flag for a chip and components.
| chip | Chip for which to set status |
| status | Status to set |
| bool pmChipSetFileStatus | ( | pmChip * | chip, | |
| bool | status | |||
| ) |
Set the file_exists flag for a chip and components.
| chip | Chip for which to set status |
| status | Status to set |
| bool pmChipWrite | ( | pmChip * | chip, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank, | |||
| bool | recurse | |||
| ) |
Write a chip to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU to the FITS file, optionally recursing to lower levels. This function should be called at the beginning of the output chip loop with blank=true and recurse=false in order to produce the correct file structure.
| chip | Chip to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| recurse | Recurse to lower levels? |
| bool pmChipWriteMANAPLOT | ( | pmChip * | chip, | |
| const pmFPAview * | view, | |||
| pmFPAfile * | file, | |||
| pmConfig * | config | |||
| ) |
| bool pmChipWriteMask | ( | pmChip * | chip, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank, | |||
| bool | recurse | |||
| ) |
Write a chip mask to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU mask pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU mask to the FITS file, optionally recursing to lower levels. This function should be called at the beginning of the output chip loop with blank=true and recurse=false in order to produce the correct file structure.
| chip | Chip to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| recurse | Recurse to lower levels? |
| int pmChipWriteTable | ( | psFits * | fits, | |
| const pmChip * | chip, | |||
| const char * | name | |||
| ) |
| fits | FITS file to which to write |
| chip | Chip containing cells with tables to write |
| name | Name for the table data, and the extension name |
| bool pmChipWriteWeight | ( | pmChip * | chip, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank, | |||
| bool | recurse | |||
| ) |
Write a chip weight to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU weight pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU weight to the FITS file, optionally recursing to lower levels. This function should be called at the beginning of the output chip loop with blank=true and recurse=false in order to produce the correct file structure.
| chip | Chip to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| recurse | Recurse to lower levels? |
Add an (input or output) source to the focal plane hierarchy, specified by a (primary) header.
Given an FPA, add an HDU by specifying a primary header, which is used to determine the FITS file contents, and therefore the proper location for the HDU. The camera format configuration is required in order to describe how the FPA is laid out in terms of disk files.
| fpa | The FPA |
| phu | Primary header of file |
| format | Format of file |
Add an (input or output) source to the focal plane hierarchy, specified by a view.
Given an FPA, add an HDU by specifying where it goes (i.e., by an FPAview). The camera format configuration is required in order to describe how the FPA is laid out in terms of disk files.
| fpa | The FPA |
| phuView | The view, corresponding to the PHU |
| format | Format of file |
| pmFPA* pmFPAAlloc | ( | const psMetadata * | camera | ) |
Allocate an FPA.
| camera | Camera configuration (to store in FPA) |
| bool pmFPACheckFileStatus | ( | const pmFPA * | fpa | ) |
Return the file_exists status for an FPA and components.
| fpa | FPA for which to check status |
| bool pmFPACheckParents | ( | pmFPA * | fpa | ) |
Check parent links within an FPA.
Iterates through the FPA to verify that the "parent" links in the chip, cell and readout are set correctly. If there are any incorrect links, they are fixed, and the function returns false.
| fpa | FPA to check |
| pmFPA* pmFPAConstruct | ( | const psMetadata * | camera | ) |
Construct an FPA instance on the basis of a camera configuration.
This is the function that creates the FPA hierarchy on the basis of the camera configuration. The "FPA" entry in the camera configuration specifies the chips (each of type STR) with their component cells listed as the corresponding values (whitespace separated). The FPA hierarchy is created devoid of any input/output sources (i.e., HDUs).
| camera | The camera configuration |
Copy an FPA and components, including the pixels, to a different representation of the same camera.
This function is useful for converting between different representations of the same camera. For example, between Megacam "RAW" (one amp per extension) and Megacam "SPLICED" formats (two amps = 1 chip per extension, spliced together). Components are spliced together as necessary.
| target | The target FPA |
| source | The source FPA, to be copied |
Copy an FPA, but not the pixels, to a different representation of the same camera.
This function the same as pmFPACopy, except that the pixels are not copied (though images of sufficient size are allocated in the target). Changes the CELL.XBIN and CELL.YBIN according to the provided binning factors.
| target | The target FPA |
| source | The source FPA, to be copied |
| yBin | Binning factors in x and y |
| int pmFPAExcludeChip | ( | pmFPA * | fpa, | |
| int | chipNum | |||
| ) |
Exclude a chip within an FPA from processing.
| fpa | FPA containing the chip of interest |
| chipNum | Chip number to exclude |
| pmFPALevel pmFPAExtensionsLevel | ( | const psMetadata * | format | ) |
Return the Extensions level for an FPA, given the format.
| psRegion* pmFPAExtent | ( | const pmFPA * | fpa | ) |
Return the extent of an FPA.
The extent is determined from the extent of the component chips.
| fpa | The FPA of interest |
| bool pmFPAfileActivate | ( | psMetadata * | files, | |
| bool | state, | |||
| char * | name | |||
| ) |
| bool pmFPAfileAddFileNames | ( | psMetadata * | files, | |
| char * | name, | |||
| char * | value, | |||
| int | mode | |||
| ) |
| pmFPAfile* pmFPAfileAlloc | ( | ) |
| pmFPAfile* pmFPAfileBindFromArgs | ( | bool * | found, | |
| pmFPAfile * | input, | |||
| pmConfig * | config, | |||
| const char * | filename, | |||
| const char * | argname | |||
| ) |
| bool pmFPAfileCopyStructureView | ( | pmFPA * | out, | |
| pmFPA * | in, | |||
| int | xBin, | |||
| int | yBin, | |||
| const pmFPAview * | view | |||
| ) |
Create a new output pmFPAfile based upon a chip mosaic of an existing FPA.
The new pmFPAfile is inserted into the config->files metadata, freed and returned; so that the user does not have to (and should not!) free the result.
| config | Configuration data |
| src | Source FPA |
| filename | Output (root) filename |
Create a new output pmFPAfile based upon an FPA mosaic of an existing FPA.
The new pmFPAfile is inserted into the config->files metadata, freed and returned; so that the user does not have to (and should not!) free the result.
| config | Configuration data |
| src | Source FPA |
| filename | Output (root) filename |
| pmFPAfile* pmFPAfileDefineFromArgs | ( | bool * | found, | |
| pmConfig * | config, | |||
| const char * | filename, | |||
| const char * | argname | |||
| ) |
| pmFPAfile* pmFPAfileDefineFromDetDB | ( | bool * | found, | |
| pmConfig * | config, | |||
| const char * | filename, | |||
| pmFPA * | input, | |||
| pmDetrendType | type | |||
| ) |
| pmFPAfile* pmFPAfileDefineFromFPA | ( | pmConfig * | config, | |
| pmFPA * | src, | |||
| int | xBin, | |||
| int | yBin, | |||
| const char * | filename | |||
| ) |
| pmReadout* pmFPAfileDefineInternal | ( | psMetadata * | files, | |
| const char * | name, | |||
| int | Nx, | |||
| int | Ny, | |||
| int | type | |||
| ) |
| pmFPAfile* pmFPAfileDefineSingleFromArgs | ( | bool * | found, | |
| pmConfig * | config, | |||
| const char * | filename, | |||
| const char * | argname, | |||
| int | entry | |||
| ) |
| bool pmFPAfileDropInternal | ( | psMetadata * | files, | |
| const char * | name | |||
| ) |
| bool pmFPAfileIOChecks | ( | pmConfig * | config, | |
| const pmFPAview * | view, | |||
| pmFPAfilePlace | place | |||
| ) |
| pmFPA* pmFPAfileSuitableFPA | ( | const pmFPAfile * | file, | |
| const pmFPAview * | view, | |||
| const pmConfig * | config | |||
| ) |
Produce a suitable FPA for writing, on the basis of the input FPAfile.
A new FPA with a changed format is generated if required (file->format is set and file->camera is equal to the default, indicating a change in the format without changing the camera --- changes to the camera are handled using other systems --- see pmFPAfileDefineChipMosaic, pmFPAfileDefineFPAMosaic). Otherwise the file->fpa is returned (incremented).
| file | File containing the fpa |
| view | View at which to produce the fpa |
| config | Configuration |
| pmFPAfileType pmFPAfileTypeFromString | ( | const char * | type | ) |
| int pmFPAFindChip | ( | const pmFPA * | fpa, | |
| const char * | name | |||
| ) |
Find a chip by name; return the index.
Looks for a chip within the FPA with CHIP.NAME matching the provided name. Returns the index of the chip, or -1 if it was not found.
| fpa | FPA in which to find the chip |
| name | Name of the chip |
| void pmFPAFreeData | ( | pmFPA * | fpa | ) |
Free all data within an FPA (all chips as well as metadata).
| fpa | FPA for which to free data |
| pmFPAview* pmFPAIdentifySourceFromHeader | ( | pmFPA * | fpa, | |
| psMetadata * | phu, | |||
| const psMetadata * | format | |||
| ) |
Identify a source in the focal plane hierarchy, specified by a (primary) header.
This is the same as pmFPAAddSourceFromHeader, except the input is not added into the FPA hierarchy. This function serves only to identify where in the hierarchy it should go, not prepare for reading, etc.
| pmFPALevel pmFPALevelFromName | ( | const char * | name | ) |
Return the enum representation of the FPA level.
| name | Level name |
| const char* pmFPALevelToName | ( | pmFPALevel | level | ) |
Return the string representation of the FPA level.
| level | Level enum |
Mosaic all cells within an FPA.
Mosaics all cells within the source into a single chip with single cell within the target (which must have only a single chip with single cell). Cells are placed on the FPA according to the CHIP.X0, CHIP.Y0, CELL.X0 and CELL.Y0 offsets. This is useful for getting an image of the FPA on the sky. The mosaicking is done so as to avoid performing a deep copy of the pixels, if possible.
| target | Target FPA --- may contain only a single chip with a single cell |
| source | FPA whose chips and cells will be mosaicked |
| pmFPALevel pmFPAPHULevel | ( | const psMetadata * | format | ) |
Return the PHU level for an FPA, given the format.
| void pmFPAPrint | ( | FILE * | fd, | |
| const pmFPA * | fpa, | |||
| bool | header, | |||
| bool | concepts | |||
| ) |
Print a representation of the FPA, including its headers and concepts.
This function is intended for testing and development purposes.
| fd | File descriptor to which to print |
| fpa | FPA to print |
| header | Print headers? |
| concepts | Print concepts? |
| bool pmFPARead | ( | pmFPA * | fpa, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an FPA.
Iterates over component chips, reading each with pmChipRead.
| bool pmFPAReadHeader | ( | pmFPA * | fpa, | |
| psFits * | fits | |||
| ) |
Read the FITS header (and ingest concepts) for an FPA, if it exists at this level.
Returns false if there was a problem. Returns true if it successfully read the header, or if the header was already there. No iteration to lower levels is performed.
| fpa | FPA for which to read header |
| fits | FITS file handle |
| bool pmFPAReadMask | ( | pmFPA * | fpa, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an entire FPA into the mask.
Same as pmFPARead, but reads into the mask element of the readouts.
| int pmFPAReadTable | ( | pmFPA * | fpa, | |
| psFits * | fits, | |||
| const char * | name | |||
| ) |
Read a FITS table into the component cells.
Iterates over component chips, calling pmChipReadTable.
| fpa | Cell for which to read table |
| fits | FITS file from which the table |
| name | Specifies the extension name, and target in the analysis metadata |
| bool pmFPAReadWeight | ( | pmFPA * | fpa, | |
| psFits * | fits, | |||
| psDB * | db | |||
| ) |
Read an entire FPA into the weight.
Same as pmFPARead, but reads into the weight element of the readouts.
| bool pmFPASelectChip | ( | pmFPA * | fpa, | |
| int | chipNum, | |||
| bool | exclusive | |||
| ) |
Select a chip within an FPA for processing.
If exclusive is true, the specified chip is the only chip to be processed. A negative value for chipNum is valid and, in combinations with exclusive, de-selects all chips.
| fpa | FPA containing the chip of interest |
| chipNum | Chip number to select |
| exclusive | Process this chip exclusive of the others? |
| bool pmFPASetDataStatus | ( | pmFPA * | fpa, | |
| bool | status | |||
| ) |
Set the data_exists flag for an FPA and components.
| fpa | FPA for which to set status |
| status | Status to set |
| bool pmFPASetFileStatus | ( | pmFPA * | fpa, | |
| bool | status | |||
| ) |
Set the file_exists flag for an FPA and components.
| fpa | FPA for which to set status |
| status | Status to set |
| pmFPAview* pmFPAviewAlloc | ( | int | nRows | ) |
Allocator for pmFPAview.
| nRows | Maximum number of rows per readout segment read, or 0 for all |
Free the data for the specified view.
| view | View specifying level of interest |
| file | FPA file to free data |
| pmFPALevel pmFPAviewLevel | ( | const pmFPAview * | view | ) |
Determine the current view level.
Returns the level appropriate for the view
| view | View to examine |
Advance view to the next cell.
Returns NULL if there is no next
| view | Current view |
| fpa | FPA containing cells |
| nStep | Number of cells to increment |
Advance view to the next chip.
Returns NULL if there is no next
| view | Current view |
| fpa | FPA containing chips |
| nStep | Number of chips to increment |
Advance view to the next readout.
Returns NULL if there is no next
| view | Current view |
| fpa | FPA containing readouts |
| nStep | Number of readouts to increment |
Read an image into the current view.
| view | View specifying level of interest |
| file | FPA file into which to read |
Read a mask into the current view.
| view | View specifying level of interest |
| file | FPA file into which to read |
Read a table into the current view.
| view | View specifying level of interest |
| file | FPA file into which to read |
| name | Name of table |
Read a weight map into the current view.
| view | View specifying level of interest |
| file | FPA file into which to read |
| bool pmFPAviewReset | ( | pmFPAview * | view | ) |
Reset a view to select all components.
| view | View to reset |
Return the currently selected cell for this view.
Returns NULL if the selection is not specific or invalid
| view | Current view |
| fpa | FPA containing cell |
Return the currently selected chip for this view.
Returns NULL if the selection is not specific or invalid
| view | Current view |
| fpa | FPA containing chip |
Return the HDU corresponding to the current view.
Uses the pmHDUFrom* functions, combined with the view.
| view | Current view |
| fpa | FPA for view |
Return the blank Primary HDU corresponding to the current view, if any.
Similar to pmFPAviewThisHDU, except returns NULL if no HDU is found, or the HDU is not a blank Primary HDU
| view | Current view |
| fpa | FPA for view |
Return the currently selected readout for this view.
Returns NULL if the selection is not specific or invalid
| view | Current view |
| fpa | FPA containing readout |
Write the image for the specified view.
| view | View specifying level of interest |
| file | FPA file to write |
| config | Configuration |
Write the mask for the specified view.
| view | View specifying level of interest |
| file | FPA file to write |
| config | Configuration |
Write the table for the specified view.
| view | View specifying level of interest |
| file | FPA file to write |
| name | Name of table |
Write the weight map for the specified view.
| view | View specifying level of interest |
| file | FPA file to write |
| config | Configuration |
| bool pmFPAWrite | ( | pmFPA * | fpa, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank, | |||
| bool | recurse | |||
| ) |
Write an FPA to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU to the FITS file, optionally recursing to lower levels. This function should be called at the beginning of the output FPA loop with blank=true and recurse=false in order to produce the correct file structure.
| fpa | FPA to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| recurse | Recurse to lower levels? |
| bool pmFPAWriteMANAPLOT | ( | pmFPA * | fpa, | |
| const pmFPAview * | view, | |||
| pmFPAfile * | file, | |||
| pmConfig * | config | |||
| ) |
| bool pmFPAWriteMask | ( | pmFPA * | fpa, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank, | |||
| bool | recurse | |||
| ) |
Write an FPA mask to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU mask pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU mask to the FITS file, optionally recursing to lower levels. This function should be called at the beginning of the output FPA loop with blank=true and recurse=false in order to produce the correct file structure.
| fpa | FPA to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| recurse | Recurse to lower levels? |
| int pmFPAWriteTable | ( | psFits * | fits, | |
| const pmFPA * | fpa, | |||
| const char * | name | |||
| ) |
| fits | FITS file to which to write |
| fpa | FPA containing cells with tables to write |
| name | Name for the table data, and the extension name |
| bool pmFPAWriteWeight | ( | pmFPA * | fpa, | |
| psFits * | fits, | |||
| psDB * | db, | |||
| bool | blank, | |||
| bool | recurse | |||
| ) |
Write an FPA weight to a FITS file.
Generates CELL.TRIMSEC, CELL.BIASSEC and the HDU weight pixels if required. A blank (i.e., image-less header) is written only if specifically requested. Writes the concepts to the various locations, and then the HDU weight to the FITS file, optionally recursing to lower levels. This function should be called at the beginning of the output FPA loop with blank=true and recurse=false in order to produce the correct file structure.
| fpa | FPA to write |
| fits | FITS file to which to write |
| db | Database handle for "concepts" update |
| blank | Write a blank PHU? |
| recurse | Recurse to lower levels? |
| pmHDU* pmHDUAlloc | ( | const char * | extname | ) |
Given a cell, return the HDU.
| cell | Cell for which to find HDU |
Given a chip, return the HDU (or NULL if it resides below the chip).
| chip | Chip for which to find HDU |
Given an FPA, return the HDU (or NULL if all HDUs reside below the FPA).
| fpa | FPA for which to find HDU |
Given a readout, return the HDU.
| readout | Readout for which to find HDU |
| bool pmHDUGenerateForCell | ( | pmCell * | cell | ) |
Generate an HDU (with CELL.TRIMSEC, CELL.BIASSEC and pixels) for a cell with pixels.
The write functions for the FPA hierarchy use pmHDUWrite, which assumes that the images in the readouts are subimages of the pixels in the HDU structure. If this is not the case, the HDU pixels can be generated using some simple assumptions. Splices the images and overscans together without regard for CELL.X0 and CELL.Y0 (for a proper mosaic, see pmFPAMosaic), though it should respect CELL.READDIR (so that the bias and trim sections match properly). A warning may be generated after running this function if the bias and trim sections are specified in the camera format by default values rather than in the header. Failure of this function is often due to a bad camera format file.
| cell | The cell for which to generate an HDU |
| bool pmHDUGenerateForChip | ( | pmChip * | chip | ) |
Generate an HDU (with CELL.TRIMSEC, CELL.BIASSEC and pixels) for a cell with pixels.
The write functions for the FPA hierarchy use pmHDUWrite, which assumes that the images in the readouts are subimages of the pixels in the HDU structure. If this is not the case, the HDU pixels can be generated using some simple assumptions. Splices the images and overscans together without regard for CELL.X0 and CELL.Y0 (for a proper mosaic, see pmFPAMosaic), though it should respect CELL.READDIR (so that the bias and trim sections match properly). A warning may be generated after running this function if the bias and trim sections are specified in the camera format by default values rather than in the header. Failure of this function is often due to a bad camera format file.
| chip | The chip for which to generate an HDU |
| bool pmHDUGenerateForFPA | ( | pmFPA * | fpa | ) |
The write functions for the FPA hierarchy use pmHDUWrite, which assumes that the images in the readouts are subimages of the pixels in the HDU structure.
If this is not the case, the HDU pixels can be generated using some simple assumptions. Splices the images and overscans together without regard for CELL.X0 and CELL.Y0 (for a proper mosaic, see pmFPAMosaic), though it should respect CELL.READDIR (so that the bias and trim sections match properly). A warning may be generated after running this function if the bias and trim sections are specified in the camera format by default values rather than in the header. Failure of this function is often due to a bad camera format file.
| fpa | The fpa for which to generate an HDU |
Get the highest HDU in the hierarchy.
The highest HDU in the hierarchy will be the PHU (might get NULL if not all levels are supplied)
| fpa | The FPA |
| chip | The chip, or NULL |
| cell | The cell, or NULL |
Get the lowest HDU in the hierarchy.
The lowest HDU in the hierarchy will be the one with the actual pixels (if all levels are supplied).
| fpa | The FPA |
| chip | The chip, or NULL |
| cell | The cell, or NULL |
| void pmHDUPrint | ( | FILE * | fd, | |
| const pmHDU * | hdu, | |||
| int | level, | |||
| bool | header | |||
| ) |
Print details about an HDU.
This is intended for testing or development use.
| fd | File descriptor to which to print |
| hdu | HDU to print |
| level | Level at which to print |
| header | Print header? |
| bool pmHDURead | ( | pmHDU * | hdu, | |
| psFits * | fits | |||
| ) |
Read the HDU header and pixels.
Moves to the appropriate extension
| hdu | HDU to read |
| fits | FITS file to read from |
| bool pmHDUReadHeader | ( | pmHDU * | hdu, | |
| psFits * | fits | |||
| ) |
Read the HDU header only.
Moves to the appropriate extension
| hdu | HDU for which to read header |
| fits | FITS file from which to read |
| bool pmHDUReadMask | ( | pmHDU * | hdu, | |
| psFits * | fits | |||
| ) |
Read the HDU header and mask.
Moves to the appropriate extension
| hdu | HDU to read |
| fits | FITS file to read from |
| bool pmHDUReadWeight | ( | pmHDU * | hdu, | |
| psFits * | fits | |||
| ) |
Read the HDU header and weight map.
Moves to the appropriate extension
| hdu | HDU to read |
| fits | FITS file to read from |
| bool pmHDUWrite | ( | pmHDU * | hdu, | |
| psFits * | fits | |||
| ) |
Write the HDU header and pixels.
| hdu | HDU to write |
| fits | FITS file to write to |
| bool pmHDUWriteMask | ( | pmHDU * | hdu, | |
| psFits * | fits | |||
| ) |
Write the HDU header and mask.
| hdu | HDU to write |
| fits | FITS file to write to |
| bool pmHDUWriteWeight | ( | pmHDU * | hdu, | |
| psFits * | fits | |||
| ) |
Write the HDU header and weight map.
| hdu | HDU to write |
| fits | FITS file to write to |
Allocate a readout associated with a cell.
| cell | Parent cell, or NULL |
| psRegion* pmReadoutExtent | ( | const pmReadout * | readout | ) |
Return the extent of a readout.
The extent is determined from an image, if present, or the CELL.TRIMSEC otherwise.
| readout | The readout of interest |
| void pmReadoutFreeData | ( | pmReadout * | readout | ) |
Free all data within a readout.
| readout | Readout for which to free data |
| bool pmReadoutGenerateMask | ( | pmReadout * | readout | ) |
Generate a readout mask (suitable for output) using CELL.SATURATION and CELL.BAD.
Identifies pixels that are saturated (>= CELL.SATURATION) or bad (<= CELL.BAD). The mask that is produced is suitable for output (complete with HDU entry). This is intended for most operations.
| readout | Readout for which to generate mask |
| bool pmReadoutGenerateMaskWeight | ( | pmReadout * | readout, | |
| bool | poisson | |||
| ) |
Generate mask and weight map for a readout.
Calls pmReadoutGenerateMask and pmReadoutGenerateWeight for the readout
| readout | Readout for which to generate mask and weights |
| poisson | Use poisson weights (in addition to read noise)? |
| bool pmReadoutGenerateWeight | ( | pmReadout * | readout, | |
| bool | poisson | |||
| ) |
Generate a weight map (suitable for output) using CELL.GAIN and CELL.READNOISE.
Calculates weights (actually variances) for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise (CELL.READNOISE). The weight map that is produced within the readout is suitable for output (complete with HDU entry). This is intended for most operations.
| readout | Readout for which to generate weight |
| poisson | Use poisson weights (in addition to read noise)? |
| bool pmReadoutReadNext | ( | pmReadout * | readout, | |
| psFits * | fits, | |||
| int | z, | |||
| int | numRows | |||
| ) |
Read a readout incrementally.
Multiple calls to this function moves through a readout within a cell incrementally. It is required to pass the readout previously acquired (or a newly-allocated one) in order to preserve state information (where the read is at). Only a maximum of numRows rows are read at a time. Returns true if pixels are read, and false otherwise. To facilitate looping, no error is generated for reading a plane that doesn't exist. Note that this function doesn't put pixels in the HDU. It is therefore NOT COMPATIBLE with pmCellWrite, pmChipWrite, and pmFPAWrite (or any function that uses or creates an HDU for that matter). Use pmReadoutWriteNext to write the data that's read by this function. This function is intended for reading in many readouts into memory at once (e.g., for stacking) where the input is not written out.
| bool pmReadoutSetMask | ( | pmReadout * | readout | ) |
Set a temporary readout mask using CELL.SATURATION and CELL.BAD.
Identifies pixels that are saturated (>= CELL.SATURATION) or bad (<= CELL.BAD). The mask that is produced within the readout is temporary --- it is not added to the HDU. This is intended for when the user is iterating using pmReadoutReadNext, in which case the HDU can't be generated.
| readout | Readout for which to set mask |
| bool pmReadoutSetWeight | ( | pmReadout * | readout, | |
| bool | poisson | |||
| ) |
Set a temporary readout weight map using CELL.GAIN and CELL.READNOISE.
Calculates weights (actually variances) for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise (CELL.READNOISE). The weight map that is produced within the readout is temporary --- it is not added to the HDU. This is intended for when the user is iterating using pmReadoutReadNext, in which case the HDU can't be generated.
| readout | Readout for which to set weight |
| poisson | Use poisson weights (in addition to read noise)? |
| bool pmReadoutWriteJPEG | ( | pmReadout * | readout, | |
| const pmFPAview * | view, | |||
| pmFPAfile * | file, | |||
| pmConfig * | config | |||
| ) |
| bool pmReadoutWriteMANAPLOT | ( | pmReadout * | readout, | |
| const pmFPAview * | view, | |||
| pmFPAfile * | file, | |||
| pmConfig * | config | |||
| ) |
| bool pmReadoutWriteNext | ( | pmReadout * | readout, | |
| psFits * | fits, | |||
| int | z | |||
| ) |
Write a readout incrementally.
Writes a readout to a FITS file, perhaps incrementally (if it has been read in using pmReadoutReadNext). Relies on the FITS header to specify how many image planes there are, and the width and height.
| readout | Readout to write |
| fits | FITS file to which to write |
| z | Image plane to write |
1.5.1