|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Class to manage interactions with a FITS file.
This class wraps the functionality of cfitsio.
| dataT | is the datatype to use for in-memory storage of the image. This does not have to match the data type stored on disk for reading, but will be the type used for writing. |
Definition at line 52 of file fitsFile.hpp.
#include <ioutils/fits/fitsFile.hpp>
Inherited by mx::unitTest::fitsTest::fitsFileTest::fitsFile_test< dataT >.
Public Member Functions | |
| fitsFile () | |
| Default constructor. | |
| fitsFile (error_t &errc) | |
| Default constructor with error code. | |
| fitsFile (const std::string &fname, error_t &errc) | |
| Constructor with file name and error code. | |
| fitsFile (const std::string &fname, bool doopen=true) | |
| Constructor with file name, and option to open. | |
| fitsFile (const std::string &fname, bool doopen, error_t &errc) | |
| Constructor with file name, option to open, and error code. | |
| ~fitsFile () | |
| Destructor. | |
| std::string | fileName () |
| Get the current value of m_fileName. | |
| error_t | fileName (const std::string &fname, bool doopen=true) |
| Set the file path, and optionally open the file. | |
| int | naxis () |
| Get the current value of m_naxis. | |
| long | naxes (int dim) |
| Get the current value of m_naxes for the specified dimension. | |
| error_t | open () |
| Open the file and gets its dimensions. | |
| error_t | open (const std::string &fname) |
| Open the file, first setting the file path. | |
| error_t | close () |
| Close the file. | |
| int | getDimensions (error_t &errc) |
| Get the number of dimensions (i.e. m_naxis) | |
| long | getSize (error_t &errc) |
| Get the total size. | |
| long | getSize (size_t axis, error_t &errc) |
| Get the size of a specific dimension. | |
Reading Eigen Arrays | |
These methods read FITS data into array types with an Eigen-like interface. | |
| template<typename arrT > | |
| error_t | read (arrT &data) |
| Read the contents of the FITS file into an Eigen array type (not a simple pointer). | |
| template<typename arrT > | |
| error_t | read (arrT &data, fitsHeader< verboseT > &head) |
| Read the contents of the FITS file into an Eigen array type (not a simple pointer). | |
| template<typename arrT > | |
| error_t | read (arrT &data, const std::string &fname) |
| Read the contents of the FITS file into an Eigen array type (not a simple pointer). | |
| template<typename arrT > | |
| error_t | read (arrT &data, fitsHeader< verboseT > &head, const std::string &fname) |
| Read the contents of the FITS file into an Eigen array type (not a simple pointer). | |
| template<typename cubeT > | |
| error_t | read (cubeT &cube, const std::vector< std::string > &flist, std::vector< fitsHeader< verboseT > > *heads=0) |
| Read data from a vector list of files into an image cube. | |
| template<typename cubeT > | |
| error_t | read (cubeT &cube, std::vector< fitsHeader< verboseT > > &heads, const std::vector< std::string > &flist) |
| Read data from a vector of files into an image cube with individual headers. | |
Reading Headers | |
| error_t | readHeader (fitsHeader< verboseT > &head) |
| Read the header from the fits file. | |
| error_t | readHeader (fitsHeader< verboseT > &head, const std::string &fname) |
| Read the header from the fits file. | |
| error_t | readHeader (std::vector< fitsHeader< verboseT > > &heads, const std::vector< std::string > &flist) |
| Read the headers from a list of FITS files. | |
Writing Basic Arrays | |
These methods write basic arrays specified by a pointer to FITS. | |
| error_t | write (const dataT *im, int d1, int d2, int d3, fitsHeader< verboseT > *head) |
| Write the contents of a raw array to the FITS file. | |
| error_t | write (const dataT *im, int d1, int d2, int d3) |
| Write the contents of a raw array to the FITS file. | |
| error_t | write (const dataT *im, int d1, int d2, int d3, fitsHeader< verboseT > &head) |
| Write the contents of a raw array to the FITS file. | |
| error_t | write (const std::string &fname, const dataT *im, int d1, int d2, int d3) |
| Write the contents of a raw array to the FITS file. | |
| error_t | write (const std::string &fname, const dataT *im, int d1, int d2, int d3, fitsHeader< verboseT > &head) |
| Write the contents of a raw array to the FITS file. | |
Writing Eigen Arrays | |
These methods write array types with an Eigen-like interface. | |
| template<typename arrT > | |
| error_t | write (const std::string &fname, const arrT &im) |
| Write the contents of an Eigen-type array to a FITS file. | |
| template<typename arrT > | |
| error_t | write (const std::string &fname, const arrT &im, fitsHeader< verboseT > &head) |
| Write the contents of an Eigen-type array to a FITS file. | |
Reading Subsets | |
It is often desirable to read only a subset of an image or images into memory. These methods allow you to specify this. | |
| void | setReadSize () |
| Set to read all the pixels in the file. | |
| void | setReadSize (long x0, long y0, long xpix, long ypix) |
| Set to read only a subset of the pixels in the file. | |
| void | setCubeReadSize () |
| Set to read all frames from a cube. | |
| void | setCubeReadSize (long z0, long zframes) |
| Set the number of frames to read from a cube. | |
Protected Member Functions | |
| void | construct () |
| One time initialization common to all constructors. | |
Protected Attributes | |
| std::string | m_fileName |
| The path to the file. | |
| fitsfile * | m_fptr { nullptr } |
| The cfitsio data structure. | |
| int | m_naxis { 0 } |
| The dimensions of the image (1D, 2D, or 3D) | |
| long | m_naxes [3] |
| The size of each dimension. | |
| bool | m_isOpen { false } |
| Flag indicating whether the file is open or not. | |
| dataT | m_nulval { 0 } |
| The value to replace null values with. | |
| int | m_anynul { 0 } |
| Records whether any null values were replaced. | |
| int | m_noComment { 0 } |
| Flag to control whether the comment string is read. | |
| long | m_x0 { -1 } |
| The starting x-pixel to read from. | |
| long | m_y0 { -1 } |
| The starting y-pixel to read from. | |
| long | m_xpix { -1 } |
| The number of x-pixels to read. | |
| long | m_ypix { -1 } |
| The number of y-pixels to read. | |
| long | m_z0 { -1 } |
| The starting frame to read from a cube. | |
| long | m_zframes { -1 } |
| The number of frames to read from a cube. | |
Reading Basic Arrays | |
These methods read FITS data into basic or raw arrays specified by a pointer. | |
| error_t | calcPixarrs (pixarrT &pixarr) |
| Fill in the read-size arrays for reading a subset (always used) | |
| error_t | read (dataT *data) |
| Read the contents of the FITS file into an array. | |
| error_t | read (dataT *data, fitsHeader< verboseT > &head) |
| Read the contents of the FITS file into an array. | |
| error_t | read (dataT *data, const std::string &fname) |
| Read the contents of the FITS file into an array. | |
| error_t | read (dataT *data, fitsHeader< verboseT > &head, const std::string &fname) |
| Read the contents of the FITS file into an array and read the header. | |
| error_t | read (dataT *im, const std::vector< std::string > &flist) |
| Read data from a vector list of files into an image cube. | |
| error_t | read (dataT *im, std::vector< fitsHeader< verboseT > > &heads, const std::vector< std::string > &flist) |
| Read data from a vector of files into an image cube with individual headers. | |
| mx::fits::fitsFile< dataT, verboseT >::fitsFile | ( | ) |
Default constructor.
Definition at line 681 of file fitsFile.hpp.
| mx::fits::fitsFile< dataT, verboseT >::fitsFile | ( | error_t & | errc | ) |
Default constructor with error code.
| [out] | errc | error_t code indicating success or error |
Definition at line 686 of file fitsFile.hpp.
References mx::noerror.
| mx::fits::fitsFile< dataT, verboseT >::fitsFile | ( | const std::string & | fname, |
| error_t & | errc | ||
| ) |
Constructor with file name and error code.
The file is not opened.
| [in] | fname | File name to set on construction |
| [out] | errc | error_t code indicating success or error |
Definition at line 692 of file fitsFile.hpp.
| mx::fits::fitsFile< dataT, verboseT >::fitsFile | ( | const std::string & | fname, |
| bool | doopen = true |
||
| ) |
Constructor with file name, and option to open.
| [in] | fname | File name to set on construction |
| [in] | doopen | [optional] If true, then the file is opened (the default). |
Definition at line 699 of file fitsFile.hpp.
| mx::fits::fitsFile< dataT, verboseT >::fitsFile | ( | const std::string & | fname, |
| bool | doopen, | ||
| error_t & | errc | ||
| ) |
Constructor with file name, option to open, and error code.
| fname | File name to set on construction | |
| doopen | If true, then the file is opened (the default). | |
| [out] | errc | error_t code indicating success or error |
Definition at line 707 of file fitsFile.hpp.
| mx::fits::fitsFile< dataT, verboseT >::~fitsFile | ( | ) |
Destructor.
Definition at line 715 of file fitsFile.hpp.
|
protected |
Fill in the read-size arrays for reading a subset (always used)
| [out] | pixarr | Populated with the allocated read-size arrays |
Definition at line 915 of file fitsFile.hpp.
References mx::noerror, and mx::paramnotset.
Referenced by mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| error_t mx::fits::fitsFile< dataT, verboseT >::close | ( | ) |
Close the file.
Definition at line 821 of file fitsFile.hpp.
References mx::fits_status2error_t(), and mx::noerror.
|
protected |
One time initialization common to all constructors.
| std::string mx::fits::fitsFile< dataT, verboseT >::fileName | ( | ) |
Get the current value of m_fileName.
Definition at line 725 of file fitsFile.hpp.
| error_t mx::fits::fitsFile< dataT, verboseT >::fileName | ( | const std::string & | fname, |
| bool | doopen = true |
||
| ) |
Set the file path, and optionally open the file.
| fname | The new file name. |
| doopen | If true, then the file is opened (the default). |
Definition at line 731 of file fitsFile.hpp.
References mxlib_error_check, and mx::noerror.
| int mx::fits::fitsFile< dataT, verboseT >::getDimensions | ( | error_t & | errc | ) |
Get the number of dimensions (i.e. m_naxis)
Definition at line 844 of file fitsFile.hpp.
References mx::invalidconfig.
| long mx::fits::fitsFile< dataT, verboseT >::getSize | ( | error_t & | errc | ) |
Get the total size.
Definition at line 856 of file fitsFile.hpp.
References mx::invalidconfig, and mx::noerror.
| long mx::fits::fitsFile< dataT, verboseT >::getSize | ( | size_t | axis, |
| error_t & | errc | ||
| ) |
Get the size of a specific dimension.
Definition at line 884 of file fitsFile.hpp.
References mx::invalidarg, mx::invalidconfig, and mx::noerror.
| long mx::fits::fitsFile< dataT, verboseT >::naxes | ( | int | dim | ) |
Get the current value of m_naxes for the specified dimension.
| [in] | dim | the dimension |
Definition at line 755 of file fitsFile.hpp.
Referenced by mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| int mx::fits::fitsFile< dataT, verboseT >::naxis | ( | ) |
Get the current value of m_naxis.
Definition at line 749 of file fitsFile.hpp.
Referenced by mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| error_t mx::fits::fitsFile< dataT, verboseT >::open | ( | ) |
Open the file and gets its dimensions.
File name needs to already have been set. If the file has already been opened, this returns immediately with no re-open.
Definition at line 766 of file fitsFile.hpp.
References mx::allocerr, mx::fits_status2error_t(), mx::invalidconfig, and mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::open | ( | const std::string & | fname | ) |
Open the file, first setting the file path.
| fname | The name of the file to open. |
Definition at line 815 of file fitsFile.hpp.
References mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | arrT & | data | ) |
Read the contents of the FITS file into an Eigen array type (not a simple pointer).
The type arrT can be any type with the following members defined:
| arrT | is the type of array, see requirements above. |
| [out] | data | is the array, which will be resized as necessary using its resize(int, int) member |
Definition at line 1205 of file fitsFile.hpp.
References mx::fits_status2error_t(), mxlib_error_check, and mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | arrT & | data, |
| const std::string & | fname | ||
| ) |
Read the contents of the FITS file into an Eigen array type (not a simple pointer).
The type arrT can be any type with the following members defined:
| arrT | is the type of array, see requirements above. |
| [out] | data | is the array, which will be resized as necessary using its resize(int, int) member |
| [in] | fname | is the file path, which is passed to fileName |
Definition at line 1278 of file fitsFile.hpp.
References mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | arrT & | data, |
| fitsHeader< verboseT > & | head | ||
| ) |
Read the contents of the FITS file into an Eigen array type (not a simple pointer).
The type arrT can be any type with the following members defined:
| arrT | is the type of array, see requirements above. |
| [out] | data | is the array, which will be resized as necessary using its resize(int, int) member |
| [out] | head | is a fitsHeader object which is passed to readHeader |
Definition at line 1258 of file fitsFile.hpp.
References mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | arrT & | data, |
| fitsHeader< verboseT > & | head, | ||
| const std::string & | fname | ||
| ) |
Read the contents of the FITS file into an Eigen array type (not a simple pointer).
The type arrT can be any type with the following members defined:
| arrT | is the type of array, see requirements above. |
| [out] | data | the array, which will be resized as necessary using its resize(int, int) member |
| [out] | head | a fitsHeader object which is passed to readHeader |
| [in] | fname | the file path, which is passed to fileName |
Definition at line 1297 of file fitsFile.hpp.
References mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | cubeT & | cube, |
| const std::vector< std::string > & | flist, | ||
| std::vector< fitsHeader< verboseT > > * | heads = 0 |
||
| ) |
Read data from a vector list of files into an image cube.
The type cubeT can be any type with the following members defined:
| cubeT | is the type of array, see requirements above. |
| [out] | cube | A cube which will be resized using its resize(int, int, int) member. |
| [in] | flist | The list of files to read. |
| [out] | heads | [optional] A vector of fits headers, allocated to contain one per image. |
Definition at line 1323 of file fitsFile.hpp.
References mx::fits_status2error_t(), mx::invalidarg, and mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | cubeT & | cube, |
| std::vector< fitsHeader< verboseT > > & | heads, | ||
| const std::vector< std::string > & | flist | ||
| ) |
Read data from a vector of files into an image cube with individual headers.
The type cubeT can be any type with the following members defined:
| cubeT | is the type of array, see requirements above. |
| [out] | cube | A cube which will be resized using its resize(int, int, int) member. |
| [out] | heads | The vector of fits headers, allocated to contain one per image. |
| [in] | flist | The list of files to read. |
Definition at line 1419 of file fitsFile.hpp.
References mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | dataT * | data | ) |
Read the contents of the FITS file into an array.
The array pointed to by data must have been allocated.
| [out] | data | an allocated arrray large enough to hold the entire image |
Definition at line 992 of file fitsFile.hpp.
References mx::fits_status2error_t(), mxlib_error_check, and mx::noerror.
Referenced by mx::AO::analysis::calculatedWFS< realT, iosT >::beta_p(), mx::AO::analysis::calculatedWFS< realT, iosT >::beta_r(), mx::AO::sim::turbAtmosphere< _aoSystemT, _verboseT >::genLayers(), mx::AO::ifPInv(), mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::initSystem(), mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::intensityPSD(), mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::loadApodizer(), mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::loadFocalMask(), mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::loadLyotStop(), mx::wfp::idealCoronagraph< _realT >::loadPupil(), mx::AO::sim::directPhaseReconstructor< realT >::loadRecon(), mx::AO::m2cMatrix(), mx::AO::modalDMM2cMatrix(), mx::AO::modesOnDM(), and mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | dataT * | data, |
| const std::string & | fname | ||
| ) |
Read the contents of the FITS file into an array.
The array pointed to by data must have been allocated.
| [out] | data | is an allocated arrray large enough to hold the entire image |
| [in] | fname | is the file path, which is passed to fileName |
Definition at line 1035 of file fitsFile.hpp.
References mxlib_error_check, and mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | dataT * | data, |
| fitsHeader< verboseT > & | head | ||
| ) |
Read the contents of the FITS file into an array.
The array pointed to by data must have been allocated.
| [out] | data | an allocated arrray large enough to hold the entire image |
| [out] | head | a fitsHeader object which is passed to readHeader |
Definition at line 1027 of file fitsFile.hpp.
References mxlib_error_check, and mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | dataT * | data, |
| fitsHeader< verboseT > & | head, | ||
| const std::string & | fname | ||
| ) |
Read the contents of the FITS file into an array and read the header.
The array pointed to by data must have been allocated.
| [out] | data | an allocated arrray large enough to hold the entire image |
| [out] | head | a fitsHeader object which is passed to readHeader |
| [in] | fname | the file path, which is passed to fileName |
Definition at line 1043 of file fitsFile.hpp.
References mxlib_error_check, and mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | dataT * | im, |
| const std::vector< std::string > & | flist | ||
| ) |
Read data from a vector list of files into an image cube.
| [out] | im | An allocated array large enough to hold all the images |
| [in] | flist | The list of files to read. |
Definition at line 1053 of file fitsFile.hpp.
References mx::invalidarg, mxlib_error_check, and mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::read | ( | dataT * | im, |
| std::vector< fitsHeader< verboseT > > & | heads, | ||
| const std::vector< std::string > & | flist | ||
| ) |
Read data from a vector of files into an image cube with individual headers.
| [out] | im | An allocated array large enough to hold all the images |
| heads | [in/out] The vector of fits headers, allocated to contain one per image. | |
| [in] | flist | The list of files to read. |
Definition at line 1080 of file fitsFile.hpp.
References mx::invalidarg, mxlib_error_check, and mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::readHeader | ( | fitsHeader< verboseT > & | head | ) |
Read the header from the fits file.
If head is not empty, then only the keywords already in head are updated. Otherwise the complete header is read.
| [out] | head | a fitsHeader object |
Definition at line 1427 of file fitsFile.hpp.
References mx::fits::fitsHeader< verboseT >::append(), mx::fits::fitsHeader< verboseT >::begin(), mx::fits::fitsHeader< verboseT >::end(), mx::fits::fitsHeader< verboseT >::erase(), mx::fits_status2error_t(), mxlib_error_check, mx::noerror, and mx::fits::fitsHeader< verboseT >::size().
Referenced by mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| error_t mx::fits::fitsFile< dataT, verboseT >::readHeader | ( | fitsHeader< verboseT > & | head, |
| const std::string & | fname | ||
| ) |
Read the header from the fits file.
If head is not empty, then only the keywords already in head are updated. Otherwise the complete header is read.
| [out] | head | a fitsHeader object |
| [in] | fname | the file path, which is passed to fileName |
Definition at line 1553 of file fitsFile.hpp.
References mxlib_error_check, and mx::noerror.
| error_t mx::fits::fitsFile< dataT, verboseT >::readHeader | ( | std::vector< fitsHeader< verboseT > > & | heads, |
| const std::vector< std::string > & | flist | ||
| ) |
Read the headers from a list of FITS files.
In each case, if the header is not empty then only the keywords already in head are updated. Otherwise the complete header is read.
| flist | A vector of fitsHeader objects to read into. [in] A list of files, each of which is passed to fileName |
Definition at line 1562 of file fitsFile.hpp.
References mx::invalidarg, mxlib_error_check, and mx::noerror.
| void mx::fits::fitsFile< dataT, verboseT >::setCubeReadSize | ( | ) |
Set to read all frames from a cube.
Definition at line 1745 of file fitsFile.hpp.
Referenced by mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| void mx::fits::fitsFile< dataT, verboseT >::setCubeReadSize | ( | long | z0, |
| long | zframes | ||
| ) |
Set the number of frames to read from a cube.
| z0 | is the starting frame to read |
| zframes | is the number of frames to read |
Definition at line 1752 of file fitsFile.hpp.
| void mx::fits::fitsFile< dataT, verboseT >::setReadSize | ( | ) |
Set to read all the pixels in the file.
Definition at line 1727 of file fitsFile.hpp.
Referenced by mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| void mx::fits::fitsFile< dataT, verboseT >::setReadSize | ( | long | x0, |
| long | y0, | ||
| long | xpix, | ||
| long | ypix | ||
| ) |
Set to read only a subset of the pixels in the file.
| x0 | is the starting x-pixel to read |
| y0 | is the starting y-pixel to read |
| xpix | is the number of x-pixels to read |
| ypix | is the number of y-pixels to read |
Definition at line 1736 of file fitsFile.hpp.
| error_t mx::fits::fitsFile< dataT, verboseT >::write | ( | const dataT * | im, |
| int | d1, | ||
| int | d2, | ||
| int | d3 | ||
| ) |
Write the contents of a raw array to the FITS file.
| [in] | im | is the array |
| [in] | d1 | is the first dimension |
| [in] | d2 | is the second dimension |
| [in] | d3 | is the third dimenesion (minimum value is 1) |
Definition at line 1680 of file fitsFile.hpp.
References mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::write | ( | const dataT * | im, |
| int | d1, | ||
| int | d2, | ||
| int | d3, | ||
| fitsHeader< verboseT > & | head | ||
| ) |
Write the contents of a raw array to the FITS file.
Note: the type of the array must match dataT
| [in] | im | is the array |
| [in] | d1 | is the first dimension |
| [in] | d2 | is the second dimension |
| [in] | d3 | is the third dimenesion (minimum value is 1) |
| [in] | head | is the header |
Definition at line 1686 of file fitsFile.hpp.
References mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::write | ( | const dataT * | im, |
| int | d1, | ||
| int | d2, | ||
| int | d3, | ||
| fitsHeader< verboseT > * | head | ||
| ) |
Write the contents of a raw array to the FITS file.
| [in] | im | is the array |
| [in] | d1 | is the first dimension |
| [in] | d2 | is the second dimension |
| [in] | d3 | is the third dimenesion (minimum value is 1) |
| [in] | head | a pointer to the header. Set to 0 if not used. |
Definition at line 1587 of file fitsFile.hpp.
References mx::allocerr, mx::fits::fitsHeader< verboseT >::begin(), mx::fits::fitsHeader< verboseT >::end(), mx::fits_status2error_t(), mxlib_error_check, mxlib_error_return, and mx::noerror.
Referenced by mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::~simulatedAOSystem(), mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::analyzePSDGrid(), mx::AO::circularApodizedPupil(), mx::AO::circularPupil(), mx::AO::analysis::fourierCovarMap(), mx::AO::sim::turbAtmosphere< _aoSystemT, _verboseT >::genLayers(), mx::AO::ifPInv(), mx::AO::influenceFunctionsGaussian(), mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::intensityPSD(), mx::AO::m2cMatrix(), mx::AO::makeModfBasis(), mx::AO::modalDMM2cMatrix(), mx::AO::modesOnDM(), mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::optimizeAPLCMC(), mx::wfp::lyotCoronagraph< _realT, _fpmaskFloatT >::optimizeAPLCMC(), mx::AO::sim::directPhaseReconstructor< realT >::saveRMat(), mx::unitTest::fitsTest::fitsFileTest::TEST_CASE(), mx::unitTest::fitsTest::fitsFileTest::TEST_CASE(), and mx::unitTest::fitsTest::fitsFileTest::TEST_CASE().
| error_t mx::fits::fitsFile< dataT, verboseT >::write | ( | const std::string & | fname, |
| const arrT & | im | ||
| ) |
Write the contents of an Eigen-type array to a FITS file.
The type arrT can be any type with the following members defined:
Note: as with all write methods, the Scalar type of the array must match dataT
| arrT | is the type of array, see requirements above. |
| [in] | fname | is the name of the file. |
| [in] | im | is the array |
Definition at line 1710 of file fitsFile.hpp.
References mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::write | ( | const std::string & | fname, |
| const arrT & | im, | ||
| fitsHeader< verboseT > & | head | ||
| ) |
Write the contents of an Eigen-type array to a FITS file.
The type arrT can be any type with the following members defined:
Note: as with all write methods, the Scalar type of the array must match dataT
| arrT | is the type of array, see requirements above. |
| [in] | fname | is the file path, which is passed to fileName |
| [in] | im | is the array |
| [in] | head | is a fitsHeader object which is passed to readHeader |
Definition at line 1719 of file fitsFile.hpp.
| error_t mx::fits::fitsFile< dataT, verboseT >::write | ( | const std::string & | fname, |
| const dataT * | im, | ||
| int | d1, | ||
| int | d2, | ||
| int | d3 | ||
| ) |
Write the contents of a raw array to the FITS file.
| [in] | fname | is the name of the file. |
| [in] | im | is the array |
| [in] | d1 | is the first dimension |
| [in] | d2 | is the second dimension |
| [in] | d3 | is the third dimenesion (minimum value is 1) |
Definition at line 1692 of file fitsFile.hpp.
References mxlib_error_check, and mxlib_error_return.
| error_t mx::fits::fitsFile< dataT, verboseT >::write | ( | const std::string & | fname, |
| const dataT * | im, | ||
| int | d1, | ||
| int | d2, | ||
| int | d3, | ||
| fitsHeader< verboseT > & | head | ||
| ) |
Write the contents of a raw array to the FITS file.
| [in] | fname | is the name of the file. |
| [in] | im | is the array |
| [in] | d1 | is the first dimension |
| [in] | d2 | is the second dimension |
| [in] | d3 | is the third dimenesion (minimum value is 1) |
| [in] | head | is the header |
Definition at line 1700 of file fitsFile.hpp.
References mxlib_error_check, and mxlib_error_return.
|
protected |
Records whether any null values were replaced.
Definition at line 80 of file fitsFile.hpp.
|
protected |
The path to the file.
Definition at line 62 of file fitsFile.hpp.
|
protected |
The cfitsio data structure.
Definition at line 65 of file fitsFile.hpp.
|
protected |
Flag indicating whether the file is open or not.
Definition at line 74 of file fitsFile.hpp.
|
protected |
The size of each dimension.
Definition at line 71 of file fitsFile.hpp.
|
protected |
The dimensions of the image (1D, 2D, or 3D)
Definition at line 68 of file fitsFile.hpp.
|
protected |
Flag to control whether the comment string is read.
Definition at line 83 of file fitsFile.hpp.
|
protected |
The value to replace null values with.
Definition at line 77 of file fitsFile.hpp.
|
protected |
The starting x-pixel to read from.
Definition at line 86 of file fitsFile.hpp.
|
protected |
The number of x-pixels to read.
Definition at line 92 of file fitsFile.hpp.
|
protected |
The starting y-pixel to read from.
Definition at line 89 of file fitsFile.hpp.
|
protected |
The number of y-pixels to read.
Definition at line 95 of file fitsFile.hpp.
|
protected |
The starting frame to read from a cube.
Definition at line 98 of file fitsFile.hpp.
|
protected |
The number of frames to read from a cube.
Definition at line 101 of file fitsFile.hpp.