mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
The basic high contrast imaging data type.
This class manages file reading, resizing, co-adding, pre-processing (masking and filtering), and final image combination.
_realT | is the floating point type in which to do all arithmetic. |
Definition at line 82 of file HCIobservation.hpp.
#include <improc/HCIobservation.hpp>
Public Types | |
typedef _realT | realT |
The arithmetic type used for calculations. Does not have to match the type in images on disk. More... | |
typedef Eigen::Array< realT, Eigen::Dynamic, Eigen::Dynamic > | eigenImageT |
The Eigen image array type basted on realT. More... | |
Public Member Functions | |
int | readPSFSub (const std::string &dir, const std::string &prefix, const std::string &ext, size_t nReductions) |
Read in already PSF-subtracted files. More... | |
Construction and Initialization | |
HCIobservation () | |
Default c'tor. More... | |
HCIobservation (const std::string &dir, const std::string &prefix, const std::string &ext) | |
Construct and load the target file list. More... | |
HCIobservation (const std::string &fileListFile) | |
Construct using a file containing the target file list. More... | |
HCIobservation (const std::string &dir, const std::string &prefix, const std::string &ext, const std::string &RDIdir, const std::string &RDIprefix, const std::string &RDIext="") | |
Construct and load the target file list and the RDI file list. More... | |
HCIobservation (const std::string &fileListFile, const std::string &RDIfileListFile) | |
Construct using a file containing the target file list and a file containing the RDI target file list. More... | |
void | load_fileList (const std::string &dir, const std::string &prefix, const std::string &ext) |
Load the file list. More... | |
void | load_fileList (const std::string &fileListFile) |
Load the file list from a file. More... | |
void | load_RDIfileList (const std::string &dir, const std::string &prefix, const std::string &ext) |
Load the RDI basis file list. More... | |
void | load_RDIfileList (const std::string &fileListFile) |
Load the RDI basis file list from a file. More... | |
Thresholding | |
Thresholds are applied to a list of files before it is read, based on the image qualities supplied. | |
int | threshold (std::vector< std::string > &fileList, const std::string &qualityFile, realT qualityThreshold) |
Read the image qualities from a qualityFile and apply the threshold to a fileList. More... | |
Public Attributes | |
The Input Target Images | |
eigenCube< realT > | m_tgtIms |
The target image cube. More... | |
int | m_Nims {0} |
Number of images in m_tgtIms. More... | |
int | m_Nrows {0} |
Number of rows of the images in m_tgtIms. More... | |
int | m_Ncols {0} |
Number of columns of the images in m_tgtIms. More... | |
int | m_Npix {0} |
Pixels per image, that is Nrows*Ncols. More... | |
std::vector< double > | m_imageMJD |
Vector of target image times, in MJD. More... | |
std::vector< fits::fitsHeader > | m_heads |
Vector of FITS headers, one per file, populated with the values for the keywords. More... | |
bool | m_filesRead {false} |
Whether or not the m_fileList has been read. More... | |
bool | m_filesDeleted {false} |
Whether or not the specified files have been deleted from m_fileList. More... | |
std::vector< realT > | m_comboWeights |
Vector to hold the image weights read from the m_weightFile. More... | |
The Input Reference Images | |
eigenCube< realT > | m_refIms |
The optional reference image cube. More... | |
std::vector< double > | m_RDIimageMJD |
Vector of reference image times, in MJD. More... | |
std::vector< fits::fitsHeader > | m_RDIheads |
Vector of FITS headers, one per reference file, populated with the values for the keywords. More... | |
bool | m_RDIfilesRead {false} |
Whether or not the reference files have been read. More... | |
bool | m_RDIfilesDeleted {false} |
Whether or not the specified files have been deleted from m_RDIfileList. More... | |
The Reduced Data | |
std::vector< eigenCube< realT > > | m_psfsub |
The PSF subtracted images. More... | |
eigenCube< realT > | m_finim |
The final combined images, one for each cube in psfsub. More... | |
Target File Reading | |
Options to control which files are read, how they are read, what meta data is extracted from FITS headers, sizing and masking, etc. | |
std::vector< std::string > | m_fileList |
The list of files to read in. More... | |
int | m_deleteFront {0} |
Specify how many files from m_fileList to delete from the front of the list. More... | |
int | m_deleteBack {0} |
Specify how many files from m_fileList to delete from the back of the list. More... | |
std::string | m_qualityFile |
File containing 2 space-delimited columns of fileVame qualityValue pairs. More... | |
realT | m_qualityThreshold {0} |
Threshold to apply to qualityValues read from qualityFile. More... | |
bool | m_thresholdOnly {false} |
Just prints the names and qualities of the files which pass threshold, and stop. More... | |
std::string | m_MJDKeyword {"DATE-OBS"} |
Name of the keyword to use for the image date. More... | |
bool | m_MJDisISO8601 {true} |
Whether or not the date is in ISO 8601 format. More... | |
realT | m_MJDUnits {1.0} |
If the date is not ISO 8601, this specifies the conversion to Julian Days (i.e. seconds to days) More... | |
std::vector< std::string > | m_keywords |
Vector of FITS header keywords to read from the files in m_fileList. More... | |
int | m_imSize {0} |
Set the image size. Images are cut down to this size after reading. More... | |
int | readFiles () |
Read the list of files, cut to size, and preprocess. More... | |
virtual int | postReadFiles () |
Perform post-read actions for the target images, for use by derived classes. More... | |
virtual int | postCoadd () |
Perform post-coadd actions for the target images, for use by derived classes. More... | |
Reference File Reading | |
For RDI, Options to control which files are read, how they are read, what meta data is extracted from FITS headers, sizing and masking, etc. | |
std::vector< std::string > | m_RDIfileList |
The list of files to read in for the RDI basis. More... | |
int | m_RDIdeleteFront {0} |
Specify how many files from m_RDIfileList to delete from the front of the list. More... | |
int | m_RDIdeleteBack {0} |
Specify how many files from m_RDIfileList to delete from the back of the list. More... | |
std::string | m_RDIqualityFile |
File containing 2 space-delimited columns of fileMame qualityValue pairs for the reference images. More... | |
realT | m_RDIqualityThreshold {0} |
Threshold to apply to qualityValues read from qualityFile. More... | |
std::vector< std::string > | m_RDIkeywords |
Vector of FITS header keywords to read from the files in m_fileList. More... | |
int | readRDIFiles () |
Read the list of reference files, cut to size, and preprocess. More... | |
virtual int | postRDIReadFiles () |
Perform post-read actions for the RDI images, for use by derived classes. More... | |
virtual int | postRDICoadd () |
Perform post-coadd actions, for use by derived classes. More... | |
Coadding | |
These parameters control whether and how the images are coadded after being read. Coadding can be done up to a given number of images, and/or a given elapsed time. Averages the values of given Keywords as well. | |
int | m_coaddCombineMethod {HCI::noCombine} |
Determine how to coadd the raw images. More... | |
int | m_coaddMaxImno {0} |
Maximum number of images to coadd. More... | |
realT | m_coaddMaxTime {0} |
Maximum elapsed time over which to coadd the images. More... | |
std::vector< std::string > | m_coaddKeywords |
The values of these keywords will be averaged and replaced. More... | |
void | coaddImages (int coaddCombineMethod, int coaddMaxImno, int coaddMaxTime, std::vector< std::string > &coaddKeywords, std::vector< double > &imageMJD, std::vector< fits::fitsHeader > &heads, eigenCube< realT > &ims) |
Coadd the images. More... | |
Masking | |
A 1/0 mask can be supplied, which is used in pre-processing and in image combination. | |
std::string | m_maskFile |
Specify a mask file to apply. More... | |
eigenImageT | m_mask |
The mask. More... | |
eigenCube< realT > | m_maskCube |
A cube of masks, one for each input image, which may be modified versions (e.g. rotated) of mask. More... | |
void | readMask () |
Read the mask file, resizing to imSize if needed. More... | |
virtual void | makeMaskCube () |
Populate the mask cube which is used for post-processing. Derived classes can do this as appropriate, e.g. by rotating the mask. More... | |
Pre-Processing | |
These options control the pre-processing masking and filtering. They are performed in the following order:
| |
bool | m_skipPreProcess {false} |
Don't do any of the pre-processing steps (including coadding). More... | |
bool | m_preProcess_beforeCoadd {false} |
controls whether pre-processing takes place before or after coadding More... | |
bool | m_preProcess_mask {true} |
If true, the mask is applied during each pre-processing step. More... | |
bool | m_preProcess_subradprof {false} |
If true, a radial profile is subtracted from each image. More... | |
realT | m_preProcess_azUSM_azW {0} |
Azimuthal boxcar width for azimuthal unsharp mask [pixels]. More... | |
realT | m_preProcess_azUSM_maxAz {45} |
Mazimum azimuthal boxcar width for azimuthal unsharp mask [degrees]. More... | |
realT | m_preProcess_azUSM_radW {0} |
Radial boxcar width for azimuthal unsharp mask [pixels]. More... | |
int | m_preProcess_medianUSM_fwhm {0} |
Kernel FWHM for symmetric box median unsharp mask (USM) More... | |
realT | m_preProcess_gaussUSM_fwhm {0} |
Kernel FWHM for symmetric Gaussian unsharp mask (USM) More... | |
std::string | m_preProcess_outputPrefix |
Set path and file prefix to output the pre-processed images. More... | |
bool | m_preProcess_only {false} |
If true, then we stop after pre-processing. More... | |
void | preProcess (eigenCube< realT > &ims) |
Do the pre-processing. More... | |
Image Combination | |
These options control how the final image combination is performed. | |
int | m_combineMethod {HCI::meanCombine} |
Determine how to combine the PSF subtracted images. More... | |
std::string | m_weightFile |
Specifies a file containing the image weights, for combining with weighted mean. More... | |
realT | m_sigmaThreshold {0} |
The standard deviation threshold used if combineMethod == HCI::sigmaMeanCombine. More... | |
realT | m_minGoodFract {0.0} |
The minimum fraction of good (un-masked) pixels to include in the final combination (0.0 to 1.0). If not met, then the pixel will be NaN-ed. More... | |
int | readWeights () |
Read the image weights from m_weightFile. More... | |
void | combineFinim () |
Combine the images into a single final image. More... | |
Output | |
These options control the ouput of the final combined images and the individual PSF subtracted images. | |
int | m_doWriteFinim {1} |
Set whether the final combined image is written to disk. More... | |
std::string | m_outputDir |
The directory where to write output files. More... | |
std::string | m_finimName {"finim_"} |
The base file name of the output final image. More... | |
bool | m_exactFinimName {false} |
Use m_finimName exactly as specified, without appending a number or an extension. More... | |
bool | m_doOutputPSFSub {false} |
Controls whether or not the individual PSF subtracted images are written to disk. More... | |
std::string | m_PSFSubPrefix |
Prefix of the FITS file names used to write individual PSF subtracted images to disk if m_doOutputPSFSub is true. More... | |
void | outputPreProcessed () |
Output the pre-processed target images. More... | |
void | outputRDIPreProcessed () |
Output the pre-processed reference images. More... | |
void | stdFitsHeader (fits::fitsHeader &head) |
Fill in the HCIobservation standard FITS header. More... | |
void | writeFinim (fits::fitsHeader *addHead=0) |
Write the final combined image to disk. More... | |
void | outputPSFSub (fits::fitsHeader *addHead=0) |
Write the PSF subtracted images to disk. More... | |
typedef Eigen::Array<realT, Eigen::Dynamic, Eigen::Dynamic> mx::improc::HCIobservation< _realT >::eigenImageT |
The Eigen image array type basted on realT.
Definition at line 89 of file HCIobservation.hpp.
typedef _realT mx::improc::HCIobservation< _realT >::realT |
The arithmetic type used for calculations. Does not have to match the type in images on disk.
Definition at line 86 of file HCIobservation.hpp.
mx::improc::HCIobservation< _realT >::HCIobservation |
Default c'tor.
Definition at line 676 of file HCIobservation.hpp.
mx::improc::HCIobservation< _realT >::HCIobservation | ( | const std::string & | dir, |
const std::string & | prefix, | ||
const std::string & | ext | ||
) |
Construct and load the target file list.
Populates the m_fileList vector by searching on disk for files which match "dir/prefix*.ext". See load_fileList
[in] | dir | the directory to search. |
[in] | prefix | the initial part of the file name. Can be empty "". |
[in] | ext | the extension to append to the file name, must include the '.'. |
Definition at line 681 of file HCIobservation.hpp.
|
explicit |
Construct using a file containing the target file list.
Populates the m_fileList vector by reading the file, which should be a single column of new-line delimited file names.
[in] | fileListFile | a file name path to read. |
Definition at line 690 of file HCIobservation.hpp.
mx::improc::HCIobservation< _realT >::HCIobservation | ( | const std::string & | dir, |
const std::string & | prefix, | ||
const std::string & | ext, | ||
const std::string & | RDIdir, | ||
const std::string & | RDIprefix, | ||
const std::string & | RDIext = "" |
||
) |
Construct and load the target file list and the RDI file list.
Populates the m_fileList vector by searching on disk for files which match "dir/prefix*.ext". See load_fileList
Populates the m_RDIfileList vector by searching on disk for files which match "RDIdir/RDIprefix*.RDIext". See load_RDIfileList
[in] | dir | the directory to search. |
[in] | prefix | the initial part of the file name. Can be empty "". |
[in] | ext | the extension to append to the file name, must include the '.'. |
[in] | RDIdir | the directory to search for the reference files. |
[in] | RDIprefix | the initial part of the file name for the reference files. Can be empty "". |
[in] | RDIext | [optional] the extension to append to the RDI file name, must include the '.'. If empty "" then same extension as target files is used. |
Definition at line 697 of file HCIobservation.hpp.
mx::improc::HCIobservation< _realT >::HCIobservation | ( | const std::string & | fileListFile, |
const std::string & | RDIfileListFile | ||
) |
Construct using a file containing the target file list and a file containing the RDI target file list.
Populates the m_fileList vector by reading the file, which should be a single column of new-line delimited file names.
Populates the m_RDIfileList vector by reading the file, which should be a single column of new-line delimited file names.
[in] | fileListFile | a file name path to read for the target file names. |
[in] | RDIfileListFile | a file name path to read for the reference file names. |
Definition at line 719 of file HCIobservation.hpp.
void mx::improc::HCIobservation< _realT >::coaddImages | ( | int | coaddCombineMethod, |
int | coaddMaxImno, | ||
int | coaddMaxTime, | ||
std::vector< std::string > & | coaddKeywords, | ||
std::vector< double > & | imageMJD, | ||
std::vector< fits::fitsHeader > & | heads, | ||
eigenCube< realT > & | ims | ||
) |
Coadd the images.
Definition at line 1193 of file HCIobservation.hpp.
References mx::sys::get_curr_time(), mx::improc::eigenCube< dataT >::image(), mx::improc::eigenCube< dataT >::mean(), mx::improc::HCI::meanCombine, mx::improc::eigenCube< dataT >::median(), mx::improc::HCI::medianCombine, and mx::improc::HCI::noCombine.
void mx::improc::HCIobservation< _realT >::combineFinim |
Combine the images into a single final image.
Images are combined by the method specified in combineMethod
Definition at line 1608 of file HCIobservation.hpp.
References mx::sys::get_curr_time(), mx::improc::HCI::meanCombine, mx::improc::HCI::medianCombine, mx::improc::HCI::noCombine, and mx::improc::HCI::sigmaMeanCombine.
void mx::improc::HCIobservation< _realT >::load_fileList | ( | const std::string & | dir, |
const std::string & | prefix, | ||
const std::string & | ext | ||
) |
Load the file list.
Populates the m_fileList vector by searching on disk for files which match the given parameters. Uses mx::getFileNames to search for all files which match "dir/prefix*.ext".
[in] | dir | the directory to search. |
[in] | prefix | the initial part of the file name. Can be empty "". |
[in] | ext | the extension to append to the file name, which must include the '.'. Can be empty "". |
Definition at line 728 of file HCIobservation.hpp.
References mx::ioutils::getFileNames().
void mx::improc::HCIobservation< _realT >::load_fileList | ( | const std::string & | fileListFile | ) |
Load the file list from a file.
Populates the m_fileList vector by reading the file, which should be a single column of new-line delimited file names.
[in] | fileListFile | a file name path to read. |
Definition at line 738 of file HCIobservation.hpp.
References mx::ioutils::readColumns().
void mx::improc::HCIobservation< _realT >::load_RDIfileList | ( | const std::string & | dir, |
const std::string & | prefix, | ||
const std::string & | ext | ||
) |
Load the RDI basis file list.
Populates the m_RDIfileList vector by searching on disk for files which match the given parameters. Uses mx::getFileNames to search for all files which match "dir/prefix*.ext".
[in] | dir | the directory to search. |
[in] | prefix | the initial part of the file name. Can be empty "". |
[in] | ext | the extension to append to the file name, which must include the '.'. Can be empty "". |
Definition at line 745 of file HCIobservation.hpp.
References mx::ioutils::getFileNames().
void mx::improc::HCIobservation< _realT >::load_RDIfileList | ( | const std::string & | fileListFile | ) |
Load the RDI basis file list from a file.
Populates the m_fileList vector by reading the file, which should be a single column of new-line delimited file names.
[in] | fileListFile | a file name path to read. |
Definition at line 755 of file HCIobservation.hpp.
References mx::ioutils::readColumns().
|
virtual |
Populate the mask cube which is used for post-processing. Derived classes can do this as appropriate, e.g. by rotating the mask.
Reimplemented in mx::improc::ADIobservation< _realT, _derotFunctObj >.
Definition at line 1381 of file HCIobservation.hpp.
void mx::improc::HCIobservation< _realT >::outputPreProcessed |
Output the pre-processed target images.
Definition at line 1716 of file HCIobservation.hpp.
References mx::ioutils::pathFilename(), and mx::fits::fitsFile< dataT >::write().
void mx::improc::HCIobservation< _realT >::outputPSFSub | ( | fits::fitsHeader * | addHead = 0 | ) |
Write the PSF subtracted images to disk.
Definition at line 1822 of file HCIobservation.hpp.
References mx::fits::fitsHeader::append(), mx::fits::fitsHeaderGitStatus(), mx::astro::constants::h(), and mx::fits::fitsFile< dataT >::write().
void mx::improc::HCIobservation< _realT >::outputRDIPreProcessed | ( | ) |
Output the pre-processed reference images.
|
virtual |
Perform post-coadd actions for the target images, for use by derived classes.
Reimplemented in mx::improc::ADIobservation< _realT, _derotFunctObj >.
Definition at line 970 of file HCIobservation.hpp.
|
virtual |
Perform post-coadd actions, for use by derived classes.
A key example is to update keywords after the averaging occurs in coaddImages().
Reimplemented in mx::improc::ADIobservation< _realT, _derotFunctObj >.
Definition at line 1141 of file HCIobservation.hpp.
|
virtual |
Perform post-read actions for the RDI images, for use by derived classes.
Reimplemented in mx::improc::ADIobservation< _realT, _derotFunctObj >.
Definition at line 1135 of file HCIobservation.hpp.
|
virtual |
Perform post-read actions for the target images, for use by derived classes.
Reimplemented in mx::improc::ADIobservation< _realT, _derotFunctObj >.
Definition at line 964 of file HCIobservation.hpp.
void mx::improc::HCIobservation< _realT >::preProcess | ( | eigenCube< realT > & | ims | ) |
Do the pre-processing.
[in] | ims | the image cube, should be either m_tgtIms or m_refIms |
Definition at line 1398 of file HCIobservation.hpp.
References mx::improc::filterImage(), mx::sys::get_curr_time(), mx::improc::eigenCube< dataT >::image(), mx::improc::medianSmooth(), and mx::improc::radprofim().
int mx::improc::HCIobservation< _realT >::readFiles |
Read the list of files, cut to size, and preprocess.
Definition at line 765 of file HCIobservation.hpp.
References mx::fits::fitsHeader::append(), mx::fits::fitsHeader::count(), mx::sys::get_curr_time(), mx::sys::ISO8601date2mjd(), mx::improc::HCI::noCombine, mx::fits::fitsFile< dataT >::read(), mx::fits::fitsFile< dataT >::setReadSize(), and mx::improc::zeroNaNCube().
void mx::improc::HCIobservation< _realT >::readMask |
Read the mask file, resizing to imSize if needed.
Definition at line 1359 of file HCIobservation.hpp.
References mx::fits::fitsFile< dataT >::read().
int mx::improc::HCIobservation< _realT >::readPSFSub | ( | const std::string & | dir, |
const std::string & | prefix, | ||
const std::string & | ext, | ||
size_t | nReductions | ||
) |
Read in already PSF-subtracted files.
Used to take up final processing after applying some non-klipReduce processing steps to PSF-subtracted images.
Definition at line 1896 of file HCIobservation.hpp.
References mx::fits::fitsHeader::append(), mx::improc::HCI::combineMethodFmStr(), mx::fits::fitsHeader::count(), mx::sys::get_curr_time(), mx::ioutils::getFileNames(), mx::sys::ISO8601date2mjd(), mx::fits::fitsFile< dataT >::read(), mx::ioutils::readColumns(), mx::fits::fitsFile< dataT >::setReadSize(), and mx::improc::zeroNaNCube().
int mx::improc::HCIobservation< _realT >::readRDIFiles |
Read the list of reference files, cut to size, and preprocess.
The target files must be read with readFiles() before calling this method.
Definition at line 977 of file HCIobservation.hpp.
References mx::fits::fitsHeader::append(), mx::sys::get_curr_time(), mx::sys::ISO8601date2mjd(), mx::improc::HCI::noCombine, mx::fits::fitsFile< dataT >::read(), mx::fits::fitsFile< dataT >::setReadSize(), and mx::improc::zeroNaNCube().
int mx::improc::HCIobservation< _realT >::readWeights |
Read the image weights from m_weightFile.
This is called by readFiles().
Definition at line 1553 of file HCIobservation.hpp.
References mx::ioutils::pathFilename(), and mx::ioutils::readColumns().
void mx::improc::HCIobservation< _realT >::stdFitsHeader | ( | fits::fitsHeader & | head | ) |
Fill in the HCIobservation standard FITS header.
head | [in.out] the fistHeader structure which will have cards appended to it. |
Definition at line 1734 of file HCIobservation.hpp.
References mx::fits::fitsHeader::append(), mx::improc::HCI::combineMethodStr(), mx::improc::HCI::noCombine, and mx::ioutils::pathFilename().
int mx::improc::HCIobservation< _realT >::threshold | ( | std::vector< std::string > & | fileList, |
const std::string & | qualityFile, | ||
realT | qualityThreshold | ||
) |
Read the image qualities from a qualityFile and apply the threshold to a fileList.
This is called by readFiles().
fileList | [in.out] the fileList to threshold | |
[in] | qualityFile | the path to the file containing qualities, one per file. |
[in] | qualityThreshold | the quality threshold to apply |
Definition at line 1147 of file HCIobservation.hpp.
References mx::ioutils::pathFilename(), and mx::ioutils::readColumns().
void mx::improc::HCIobservation< _realT >::writeFinim | ( | fits::fitsHeader * | addHead = 0 | ) |
Write the final combined image to disk.
Definition at line 1776 of file HCIobservation.hpp.
References mx::fits::fitsHeader::append(), mx::improc::HCI::combineMethodStr(), mx::fits::fitsHeaderGitStatus(), mx::ioutils::getSequentialFilename(), mx::improc::HCI::sigmaMeanCombine, and mx::fits::fitsFile< dataT >::write().
int mx::improc::HCIobservation< _realT >::m_coaddCombineMethod {HCI::noCombine} |
Determine how to coadd the raw images.
Possibilities are
No other types of combination are currently supported for coadding.
Definition at line 414 of file HCIobservation.hpp.
std::vector<std::string> mx::improc::HCIobservation< _realT >::m_coaddKeywords |
The values of these keywords will be averaged and replaced.
Definition at line 423 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_coaddMaxImno {0} |
Maximum number of images to coadd.
Definition at line 417 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_coaddMaxTime {0} |
Maximum elapsed time over which to coadd the images.
Definition at line 420 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_combineMethod {HCI::meanCombine} |
Determine how to combine the PSF subtracted images.
Possibilities are
Definition at line 539 of file HCIobservation.hpp.
std::vector<realT> mx::improc::HCIobservation< _realT >::m_comboWeights |
Vector to hold the image weights read from the m_weightFile.
After readWeights is executed by readFiles, this will contain the normalized weights.
Definition at line 205 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_deleteBack {0} |
Specify how many files from m_fileList to delete from the back of the list.
Definition at line 260 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_deleteFront {0} |
Specify how many files from m_fileList to delete from the front of the list.
Definition at line 257 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_doOutputPSFSub {false} |
Controls whether or not the individual PSF subtracted images are written to disk.
Definition at line 596 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_doWriteFinim {1} |
Set whether the final combined image is written to disk.
Definition at line 575 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_exactFinimName {false} |
Use m_finimName exactly as specified, without appending a number or an extension.
Output is still FITS format, regardless of extension. This will overwrite an existing file without asking.
Definition at line 590 of file HCIobservation.hpp.
std::vector<std::string> mx::improc::HCIobservation< _realT >::m_fileList |
The list of files to read in.
This can be set on construction or by calling load_fileList
Definition at line 254 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_filesDeleted {false} |
Whether or not the specified files have been deleted from m_fileList.
Definition at line 199 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_filesRead {false} |
Whether or not the m_fileList has been read.
Definition at line 196 of file HCIobservation.hpp.
eigenCube<realT> mx::improc::HCIobservation< _realT >::m_finim |
The final combined images, one for each cube in psfsub.
Definition at line 240 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_finimName {"finim_"} |
The base file name of the output final image.
The complete name is formed by combining with a sequential number and the ".fits" extension. that is: m_finimName0000.fits. This behavior can be modified with m_exactFinimName.
Definition at line 584 of file HCIobservation.hpp.
std::vector<fits::fitsHeader> mx::improc::HCIobservation< _realT >::m_heads |
Vector of FITS headers, one per file, populated with the values for the keywords.
Definition at line 193 of file HCIobservation.hpp.
std::vector<double> mx::improc::HCIobservation< _realT >::m_imageMJD |
Vector of target image times, in MJD.
Definition at line 190 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_imSize {0} |
Set the image size. Images are cut down to this size after reading.
Set to <= 0 to use images uncut.
Image sizes are not increased if this is larger than their size on disk.
Definition at line 305 of file HCIobservation.hpp.
std::vector<std::string> mx::improc::HCIobservation< _realT >::m_keywords |
Vector of FITS header keywords to read from the files in m_fileList.
Definition at line 298 of file HCIobservation.hpp.
eigenImageT mx::improc::HCIobservation< _realT >::m_mask |
The mask.
Definition at line 448 of file HCIobservation.hpp.
eigenCube<realT> mx::improc::HCIobservation< _realT >::m_maskCube |
A cube of masks, one for each input image, which may be modified versions (e.g. rotated) of mask.
Definition at line 450 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_maskFile |
Specify a mask file to apply.
No mask is applied if this is empty.
Definition at line 446 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_minGoodFract {0.0} |
The minimum fraction of good (un-masked) pixels to include in the final combination (0.0 to 1.0). If not met, then the pixel will be NaN-ed.
Definition at line 553 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_MJDisISO8601 {true} |
Whether or not the date is in ISO 8601 format.
Definition at line 292 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_MJDKeyword {"DATE-OBS"} |
Name of the keyword to use for the image date.
Specifies the keyword corresponding to the date. This is the "DATE" keyword for file write time, and usually "DATE-OBS" for actual observation time.
Default is "DATE-OBS".
If empty "", then image date is not read.
Definition at line 289 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_MJDUnits {1.0} |
If the date is not ISO 8601, this specifies the conversion to Julian Days (i.e. seconds to days)
Definition at line 295 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_Ncols {0} |
Number of columns of the images in m_tgtIms.
Definition at line 186 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_Nims {0} |
Number of images in m_tgtIms.
Definition at line 184 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_Npix {0} |
Pixels per image, that is Nrows*Ncols.
Definition at line 187 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_Nrows {0} |
Number of rows of the images in m_tgtIms.
Definition at line 185 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_outputDir |
The directory where to write output files.
Definition at line 578 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_preProcess_azUSM_azW {0} |
Azimuthal boxcar width for azimuthal unsharp mask [pixels].
If this is 0 then azimuthal-USM is not performed.
Definition at line 490 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_preProcess_azUSM_maxAz {45} |
Mazimum azimuthal boxcar width for azimuthal unsharp mask [degrees].
Limits width close to center, preventing wrap-around. Default is 45 degrees. Set to 0 for no maximum.
Definition at line 495 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_preProcess_azUSM_radW {0} |
Radial boxcar width for azimuthal unsharp mask [pixels].
If this is 0 then azimuthal-USM is not performed.
Definition at line 500 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_preProcess_beforeCoadd {false} |
controls whether pre-processing takes place before or after coadding
Definition at line 481 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_preProcess_gaussUSM_fwhm {0} |
Kernel FWHM for symmetric Gaussian unsharp mask (USM)
USM is not performed if this is 0.
Definition at line 510 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_preProcess_mask {true} |
If true, the mask is applied during each pre-processing step.
Definition at line 483 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_preProcess_medianUSM_fwhm {0} |
Kernel FWHM for symmetric box median unsharp mask (USM)
USM is not performed if this is 0.
Definition at line 505 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_preProcess_only {false} |
If true, then we stop after pre-processing.
Definition at line 518 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_preProcess_outputPrefix |
Set path and file prefix to output the pre-processed images.
If empty, then pre-processed images are not output.
Definition at line 515 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_preProcess_subradprof {false} |
If true, a radial profile is subtracted from each image.
Definition at line 485 of file HCIobservation.hpp.
std::vector<eigenCube<realT> > mx::improc::HCIobservation< _realT >::m_psfsub |
The PSF subtracted images.
This is a vector of cubes so that it can contain results from different reductions, e.g. different modes when using KLIP.
Definition at line 237 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_PSFSubPrefix |
Prefix of the FITS file names used to write individual PSF subtracted images to disk if m_doOutputPSFSub is true.
Definition at line 599 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_qualityFile |
File containing 2 space-delimited columns of fileVame qualityValue pairs.
If this is not empty and qualityThreshold is > 0, then only images where qualityValue >= qualityThreshold are read and processed.
The only restriction on qualityThreshold is that it is > 0. It is intendend to be something like Strehl ratio.
Definition at line 269 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_qualityThreshold {0} |
Threshold to apply to qualityValues read from qualityFile.
If <= 0, then thresholding is not performed.
Definition at line 274 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_RDIdeleteBack {0} |
Specify how many files from m_RDIfileList to delete from the back of the list.
Definition at line 340 of file HCIobservation.hpp.
int mx::improc::HCIobservation< _realT >::m_RDIdeleteFront {0} |
Specify how many files from m_RDIfileList to delete from the front of the list.
Definition at line 337 of file HCIobservation.hpp.
std::vector<std::string> mx::improc::HCIobservation< _realT >::m_RDIfileList |
The list of files to read in for the RDI basis.
This is set by calling load_RDIfileList
Definition at line 334 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_RDIfilesDeleted {false} |
Whether or not the specified files have been deleted from m_RDIfileList.
Definition at line 226 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_RDIfilesRead {false} |
Whether or not the reference files have been read.
Definition at line 223 of file HCIobservation.hpp.
std::vector<fits::fitsHeader> mx::improc::HCIobservation< _realT >::m_RDIheads |
Vector of FITS headers, one per reference file, populated with the values for the keywords.
Definition at line 220 of file HCIobservation.hpp.
std::vector<double> mx::improc::HCIobservation< _realT >::m_RDIimageMJD |
Vector of reference image times, in MJD.
Definition at line 217 of file HCIobservation.hpp.
std::vector<std::string> mx::improc::HCIobservation< _realT >::m_RDIkeywords |
Vector of FITS header keywords to read from the files in m_fileList.
Definition at line 357 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_RDIqualityFile |
File containing 2 space-delimited columns of fileMame qualityValue pairs for the reference images.
If this is not empty and m_RDIqualityThreshold is > 0, then only images where qualityValue >= qualityThreshold are read and processed.
The only restriction on m_RDIqualityThreshold is that it is > 0. It is intendend to be something like Strehl ratio.
Definition at line 349 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_RDIqualityThreshold {0} |
Threshold to apply to qualityValues read from qualityFile.
If <= 0, then thresholding is not performed.
Definition at line 354 of file HCIobservation.hpp.
eigenCube<realT> mx::improc::HCIobservation< _realT >::m_refIms |
The optional reference image cube.
Definition at line 214 of file HCIobservation.hpp.
realT mx::improc::HCIobservation< _realT >::m_sigmaThreshold {0} |
The standard deviation threshold used if combineMethod == HCI::sigmaMeanCombine.
Definition at line 550 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_skipPreProcess {false} |
Don't do any of the pre-processing steps (including coadding).
Definition at line 479 of file HCIobservation.hpp.
eigenCube<realT> mx::improc::HCIobservation< _realT >::m_tgtIms |
The target image cube.
Definition at line 182 of file HCIobservation.hpp.
bool mx::improc::HCIobservation< _realT >::m_thresholdOnly {false} |
Just prints the names and qualities of the files which pass threshold, and stop.
Useful mainly for debugging.
Definition at line 279 of file HCIobservation.hpp.
std::string mx::improc::HCIobservation< _realT >::m_weightFile |
Specifies a file containing the image weights, for combining with weighted mean.
This 2-column space-delimited ASCII file containing filenames and weights. It must be specified before readFiles() is executed. In readFiles this is loaded after the m_fileList is cutdown and matched to the remaining files.
Definition at line 545 of file HCIobservation.hpp.