My Project
|
Classes | |
struct | FitsAxisCard |
struct | FitsBunitCard |
struct | FitsDataType |
struct | Phdu |
Public Types | |
enum | FitsAxis { AX_DEG, AX_RAD, AX_UV, AX_UNKNOWN } |
enum | FitsBunit { BU_MJYSR, BU_JYBEAM, BU_MUK, BU_UNKNOWN } |
Public Member Functions | |
FitsIo () | |
virtual | ~FitsIo () |
void | putPhdu (const char *name, const char *val, const char *comment, FILE *fp=0) |
void | setObsRa (HourAngle ra) |
void | setObsDec (DecAngle dec) |
void | setTelescopeName (std::string telescope) |
void | setTelescopeLocations (std::vector< std::vector< double > > &locations) |
void | setInstrument (std::string instrument) |
void | setSourceName (std::string srcName) |
void | setNumberOfIfs (unsigned nIf) |
void | setIfFrequencies (std::vector< Frequency > &frequencies) |
void | setDeltaIfFrequencies (std::vector< Frequency > &frequencies) |
void | setStartingIfFrequency (Frequency frequency) |
void | setDeltaIfFrequency (Frequency frequency) |
void | setNumberOfChannelsPerIf (unsigned nChan) |
void | setDeltaChannelFrequency (Frequency frequency) |
void | setNumberOfFrames (unsigned nFrame) |
void | setNumberOfBaselines (unsigned nBaseline) |
void | setNumberOfStokesParameters (unsigned nStokes) |
void | setDate () |
void | checkParameters () |
void | openFile (std::string fileName) |
void | initHeader () |
void | finishHeader (FILE *fp=0) |
void | writeFileHeaderBody (FILE *fp=0) |
void | writeAntennaTableHeaderBody (FILE *fp=0) |
void | writeFrequencyTableHeaderBody (FILE *fp=0) |
void | writeFileHeader (FILE *fp=0) |
void | writeAntennaTableHeader (FILE *fp=0) |
void | writeFrequencyTableHeader (FILE *fp=0) |
void | initVisibilityData () |
void | writeVisibilityDataBody (double *vis, double *date, double *uvw, FILE *fp=0) |
void | finishVisibilityData (FILE *fp=0) |
void | writeVisibilityData (double *vis, double *date, double *uvw, FILE *fp=0) |
void | initAntennaTableDataBody () |
void | writeAntennaTableDataBody (FILE *fp=0) |
void | finishAntennaTableDataBody (FILE *fp=0) |
void | writeAntennaTableData (FILE *fp=0) |
void | writeAntennaTableEntry (int i, double X, double Y, double Z, FILE *fp=0) |
void | writeAntennaTable (FILE *fp=0) |
void | initFrequencyTableDataBody () |
void | writeFrequencyTableDataBody (FILE *fp=0) |
void | finishFrequencyTableDataBody (FILE *fp=0) |
void | writeFrequencyTableData (FILE *fp=0) |
void | writeFrequencyTable (FILE *fp=0) |
void | writeUvfFile (double *data, double *date, double *uvw, FILE *fp=0) |
FILE * | getFptr (FILE *fp) |
void | getTelescopeIndices (unsigned baslineIndex, unsigned *iRow, unsigned *iCol, unsigned nTel) |
Static Public Member Functions | |
static void | nullStr (char *buf, const char *val) |
static void | logStr (char *buf, const char *val) |
static void | intStr (char *buf, const char *val) |
static void | fltStr (char *buf, const char *val) |
static void | strStr (char *buf, const char *val) |
static void | rdNull (FitsDataType &data, char *str) |
static void | rdLog (FitsDataType &data, char *str) |
static void | rdStr (FitsDataType &data, char *str) |
static void | rdInt (FitsDataType &data, char *str) |
static void | rdFlt (FitsDataType &data, char *str) |
static void | rdBunit (FitsDataType &data, char *str) |
static void | rdAxis (FitsDataType &data, char *str) |
Static Public Attributes | |
static const unsigned | nBytePerHeader_ =80 |
static const unsigned | nHeaderPerDataRecord_ = 36 |
static const unsigned | nBytePerDataRecord_ |
static const unsigned | nBytePerKeyword_ =8 |
static const unsigned | logPos_ =30 |
static const unsigned | nBytePerFrequencyTableEntry_ = 32 |
static const unsigned | secondsPerDay_ = 86400 |
static FitsAxisCard | fitsAxes_ [] |
static unsigned | nFitsAxes_ = sizeof(fitsAxes_)/sizeof(FitsAxisCard) |
static FitsBunitCard | fitsUnits_ [] |
static unsigned | nFitsUnits_ = sizeof(fitsUnits_)/sizeof(FitsBunitCard) |
static FitsIo::Phdu | phdus_ [] |
static unsigned | nPhdus_ = sizeof(phdus_)/sizeof(Phdu) |
FitsIo::FitsIo | ( | ) |
Constructor.
....................................................................... Constructor.
|
virtual |
Destructor.
....................................................................... Destructor.
void FitsIo::finishAntennaTableDataBody | ( | FILE * | fp = 0 | ) |
....................................................................... Finish writing the antenna table data
void FitsIo::finishHeader | ( | FILE * | fp = 0 | ) |
....................................................................... Perform appropriate buffering of the header
void FitsIo::finishVisibilityData | ( | FILE * | fp = 0 | ) |
....................................................................... Finish writing the visibility portion of the file
|
static |
....................................................................... Convert a float to a string.
FILE * FitsIo::getFptr | ( | FILE * | fp | ) |
....................................................................... Get the FILE pointer to which we will write
void FitsIo::getTelescopeIndices | ( | unsigned | baselineIndex, |
unsigned * | iRow, | ||
unsigned * | iCol, | ||
unsigned | nTel | ||
) |
....................................................................... Return the antenna indices associated with a given visibility index.
void FitsIo::initAntennaTableDataBody | ( | ) |
....................................................................... Initialize resources for writing the antenna table data
void FitsIo::initHeader | ( | ) |
....................................................................... Initialize the header
void FitsIo::initVisibilityData | ( | ) |
....................................................................... Initialize writing visibilities
|
static |
....................................................................... Convert an integer to a string.
|
static |
....................................................................... Print a logical argument in column 30.
|
static |
....................................................................... A do-nothing function for null value header keys.
void FitsIo::putPhdu | ( | const char * | name, |
const char * | val, | ||
const char * | comment, | ||
FILE * | fp = 0 |
||
) |
....................................................................... Write a header key to a file.
|
static |
....................................................................... Read a FitsAxis derived type.
|
static |
....................................................................... Read a FitsBunit derived type.
|
static |
....................................................................... Convert a string to a float argument.
|
static |
....................................................................... Convert a string to an integer argument.
|
static |
....................................................................... Read a logical argument.
|
static |
....................................................................... A do-nothing read function for null value header keys.
|
static |
....................................................................... Read a string.
void FitsIo::setDeltaIfFrequencies | ( | std::vector< Frequency > & | frequencies | ) |
....................................................................... Install a vector of IF bandwidths
void FitsIo::setIfFrequencies | ( | std::vector< Frequency > & | frequencies | ) |
....................................................................... Install a vector of IF frequencies
void FitsIo::setTelescopeLocations | ( | std::vector< std::vector< double > > & | locations | ) |
....................................................................... Install a vector of antenna locations
|
static |
....................................................................... Print a string.
void FitsIo::writeAntennaTable | ( | FILE * | fp = 0 | ) |
....................................................................... Write the whole antenna table
void FitsIo::writeAntennaTableData | ( | FILE * | fp = 0 | ) |
....................................................................... Write the antenna table data
void FitsIo::writeAntennaTableDataBody | ( | FILE * | fp = 0 | ) |
....................................................................... Write the body of the antenna table
void FitsIo::writeAntennaTableEntry | ( | int | i, |
double | X, | ||
double | Y, | ||
double | Z, | ||
FILE * | fp = 0 |
||
) |
....................................................................... Write a single entry of the antenna table
void FitsIo::writeAntennaTableHeader | ( | FILE * | fp = 0 | ) |
....................................................................... Construct a header for the antenna table
void FitsIo::writeFileHeader | ( | FILE * | fp = 0 | ) |
....................................................................... Pull it all together – write the FILE header
void FitsIo::writeFrequencyTableHeader | ( | FILE * | fp = 0 | ) |
....................................................................... Construct a header for the frequency table
void FitsIo::writeVisibilityData | ( | double * | vis, |
double * | date, | ||
double * | uvw, | ||
FILE * | fp = 0 |
||
) |
....................................................................... Write the whole visibility segment of the file
void FitsIo::writeVisibilityDataBody | ( | double * | vis, |
double * | date, | ||
double * | uvw, | ||
FILE * | fp = 0 |
||
) |
....................................................................... Write out visibility data
|
static |
|
static |
|
static |