geirs2Panic  Richard J. Mathar
Fits header keyword batch editor
 All Classes Files Functions Variables Macros Pages
Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
WindowSet Class Reference

#include <WindowSet.h>

Collaboration diagram for WindowSet:
Collaboration graph

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...
 

Detailed Description

Since
2012-11-08
Author
Richard J. Mathar

Constructor & Destructor Documentation

WindowSet::WindowSet ( const char *  fitsIname,
int  gp = 0,
int  csiz = 2048 
)
Parameters
[in]fitsnameThe name of the FITS file to be read.
[in]gpThe width of the gap between individual chips in the mosaic in units of pixels.
[in]csizThe dimension along each edge of each chip in pixels.
Since
2012-10-23
Author
Richard J. Mathar
WindowSet::~WindowSet ( )

Destructor.

Member Function Documentation

void WindowSet::win2win ( const int  rotRight90,
const bool  flip 
)

Compute the window location after splicing and optional flip-rotation.

Parameters
[in]rotRight90Number of right-90 rotations requested.
[in]flipIf 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.

Parameters
[in]verboseIf true, print each file's name removed to stdout.
Since
2012-11-20
Author
Richard J. Mathar
vector< string > WindowSet::ifileset ( const char *  fitsIname)
staticprotected

Determine the list of all fits file names that match the base name.

Parameters
[in]fitsnameThe basename name of the FITS file to be read.
Returns
The existing files of the format of the argument with suffix .fits, and the existing files with suffices *_wini.fits, with i a set of consecutive increasing integer numbers.

Member Data Documentation

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.