geirs2Panic
Richard J. Mathar
Fits header keyword batch editor
|
#include <WindowSet.h>
Public Member Functions | |
WindowSet (const char *fitsInname, int gp=0, int csiz=2048) | |
~WindowSet () | |
Destructor. More... | |
void | win2win (const int rotRight90, const bool flip) |
Compute the window location after splicing and optional flip-rotation. More... | |
void | rmFiles (bool verbose=false) |
Remove the input files from the file system. More... | |
Public Attributes | |
string | iname |
Name of the input file. More... | |
vector< Window * > | ws |
The individual windows. More... | |
int | trimsize [4] |
Window superframe origin and extension in the coordinate system of the spliced mosaic. More... | |
Static Protected Member Functions | |
static vector< string > | ifileset (const char *fitsIname) |
Determine the list of all fits file names that match the base name. More... | |
WindowSet::WindowSet | ( | const char * | fitsIname, |
int | gp = 0 , |
||
int | csiz = 2048 |
||
) |
[in] | fitsname | The name of the FITS file to be read. |
[in] | gp | The width of the gap between individual chips in the mosaic in units of pixels. |
[in] | csiz | The dimension along each edge of each chip in pixels. |
WindowSet::~WindowSet | ( | ) |
Destructor.
void WindowSet::win2win | ( | const int | rotRight90, |
const bool | flip | ||
) |
Compute the window location after splicing and optional flip-rotation.
[in] | rotRight90 | Number of right-90 rotations requested. |
[in] | flip | If true, perform antoher right-left flip around the y-coordinate. |
void WindowSet::rmFiles | ( | bool | verbose = false | ) |
Remove the input files from the file system.
This hazardous action removes the FITS files that have been used to define the windows and their contents.
[in] | verbose | If true, print each file's name removed to stdout. |
|
staticprotected |
Determine the list of all fits file names that match the base name.
[in] | fitsname | The basename name of the FITS file to be read. |
string WindowSet::iname |
Name of the input file.
The principal use is to look into the primary header for the SAVEARE (TRIMSIZE) keyword that relocates this window in the coordinate system of the mosaic of fused chips.
vector<Window *> WindowSet::ws |
The individual windows.
At this point an ugly decision is made to collect the vector of pointers to windows, because the Window class contains a pointer to FITS for which no copy ctor exists, so no copy ctor for Window exists (and that would be needed to avoid that at the time the dtor of ws[] goes out of scope the FITS contents is deleted, although we'd like to have acess to the keywords later on...)
int WindowSet::trimsize[4] |
Window superframe origin and extension in the coordinate system of the spliced mosaic.
This information is only relevant if one unites all windows in the output, but not if the subareas are individually spread over extension headers.