VFrame Class Reference

Public Types

Public Member Functions

Data Fields




Member Enumeration Documentation

Enumerator:
combined_frame_mode 
split_frame_mode 

Constructor & Destructor Documentation

VFrame::VFrame ( frame_read_mode  mode = combined_frame_mode  )  [inline]
virtual VFrame::~VFrame (  )  [inline, virtual]

Member Function Documentation

frame_read_mode VFrame::frame_mode (  )  const [inline]

return the frame mode we are running in

References read_mode_.

Referenced by mkimage_dither_files().

void VFrame::read_frames ( const string &  basename  ) 
void VFrame::write_frames ( const string &  basename  )  const

write the CCD frames for the whole virus unit.

References __NSPECTGR__, eHeaders_, eSpecs_, Headers_, indexToName(), prepend_filename(), and Specs_.

Referenced by main(), and DitherEnvironment::setup_projectors().

void VFrame::read_distortions ( const string &  basename  ) 

read the distortion solutions for the whole virus unit.

References __NSPECTGR__, Ds_, indexToName(), and Distortion::init_from_file().

Referenced by main(), mkimage_single_files(), read_data_and_models(), and DitherEnvironment::setup_projectors().

void VFrame::read_fibermodels ( const string &  basename  ) 

read the fiber profile models for the whole virus unit.

References __NSPECTGR__, Fs_, indexToName(), and FiberModel::init_from_file().

Referenced by main(), read_data_and_models(), and DitherEnvironment::setup_projectors().

void VFrame::read_psfmodels ( const string &  basename  ) 

read the PSF models for the whole virus unit.

References __NSPECTGR__, indexToName(), PsfModel::init_from_file(), P, and Ps_.

Referenced by main(), read_data_and_models(), and DitherEnvironment::setup_projectors().

void VFrame::read_data_and_models ( const string &  basename,
const string &  modelbasename 
)

Shortcut for reading frames, distortion models, fiber models and PSF models all at once.

References read_distortions(), read_fibermodels(), read_frames(), and read_psfmodels().

Referenced by mkimage_dither_files().

const Distortion& VFrame::get_distortion ( const int  spectgr  )  const [inline]
void VFrame::set_data ( const int  spectgr,
MArray< float, 2 >  data 
) [inline]

Sets the spectrum that belongs to a specific target unit spectrograph. Note: If the data arrays of this VFrame have already been initialized, then data must have the same dimensions as Spec{A,B}_.

References Specs_.

void VFrame::set_edata ( const int  spectgr,
MArray< float, 2 >  edata 
) [inline]

Sets the spectrum that belongs to a specific target unit spectrograph. Note: If the data arrays of this VFrame have already been initialized, then data must have the same dimensions as Spec{A,B}_.

References eSpecs_.

const MArray<float,2>& VFrame::get_data ( const int  spectgr  )  const [inline]

Returns MArray holding the spectrum that belongs to a specific target unit spectrograph

References Specs_.

Referenced by add_flux_in_fibers(), extract_fibers_in_aperture(), main(), and mkimage_list().

const MArray<float,2>& VFrame::get_edata ( const int  spectgr  )  const [inline]

Returns MArray holding the error spectrum that belongs to a specific target unit spectrograph

References eSpecs_.

Referenced by add_flux_in_fibers(), and extract_fibers_in_aperture().

const PsfModel& VFrame::get_psfmodel ( const int  spectgr  )  const [inline]

Returns psfmodel object that belongs to a specific target unit spectrograph

References Ps_.

Referenced by Projector::fill_in_point_source_model(), and Projector::get_psf_grid().

const FiberModel& VFrame::get_fibermodel ( const int  spectgr  )  const [inline]

Returns fibermodel object that belongs to a specific target unit spectrograph

References Fs_.

Referenced by SourceSimulator::add_continuum_source_to_images(), SourceSimulator::add_sersic_source_to_images(), SourceSimulator::AddSky(), and PointSourceDetector::make_image().

int VFrame::get_ccdx (  )  const [inline]
int VFrame::get_ccdy (  )  const [inline]
const MArray<float,2>& VFrame::get_cont ( const int  spectgr  )  const [inline]

Returns MArray holding the continuum that belongs to a specific target unit spectrograph

References Conts_.

Referenced by ContSourceDetector::compute_sigma(), PointSourceDetector::equivalent_width(), and PointSourceDetector::photometry().

const MArray<float,2>& VFrame::get_econt ( const int  spectgr  )  const [inline]

Returns MArray holding the continuum error that belongs to a specific target unit spectrograph

References eConts_.

Referenced by ContSourceDetector::compute_sigma().

const MArray<char,2>& VFrame::get_cosmics_mask ( const int  spectgr  )  const [inline]

Returns MArray holding the cosmics / bad pixel mask that belongs to a specific target unit spectrograph

References Cosmics_.

FitsHeader& VFrame::get_header ( const int  spectgr  )  [inline]

Returns FitsHeader for data frame

References Headers_.

Referenced by mkimage_single_files().

FitsHeader& VFrame::get_eheader ( const int  spectgr  )  [inline]

Returns FitsHeader for error frame

References eHeaders_.

Extractor VFrame::get_extractor ( const int  spectgr  )  const [inline]

Returns an extractor object for a given unit spectrograph.

References Ds_.

Referenced by mkimage_list().

string VFrame::get_basename (  )  const [inline]

Returns basename.

References basename_.

FitsHeader VFrame::read_single_frame_and_combine ( const string &  basename,
MArray< float, 2 > &  f 
)

Simultaneously reads all four frames that belong to one exposure of a double unit, i.e. the two split halves of unit A and B.

Referenced by read_frames().

FitsHeader VFrame::read_single_eframe_and_combine ( const string &  basename,
MArray< float, 2 > &  f 
)

Simultaneously reads all four error frames that belong to one exposure of a double unit, i.e. the two split halves of unit A and B.

Referenced by read_frames().

FitsHeader VFrame::read_single_frame ( const string &  basename,
MArray< float, 2 > &  f 
)

Alternative non-split version read_single_frame_and_combine. Simultaneously reads the two frames that belong to one exposure of a double unit.

Referenced by read_frames().

FitsHeader VFrame::read_single_eframe ( const string &  basename,
MArray< float, 2 > &  f 
)

Alternative non-split version of read_single_eframe_and_combine. Simultaneously reads the two frames that belong to one exposure of a double unit.

Referenced by read_frames().

void VFrame::calc_continua (  ) 

Calculates continua and strores them in the respective ContA_, ContB_ fields.

Calculates continua and stores them in the respective ContA_, ContB_ fields.

References __NSPECTGR__, Conts_, Cosmics_, create_cosmics_mask(), Ds_, eConts_, eSpecs_, Fs_, Continuum::get_continua(), Continuum::smooth_continua(), and Specs_.

Referenced by main(), and DitherEnvironment::setup_projectors().

void VFrame::subtract_continua (  ) 

Subtracts continua from science data.

References __NSPECTGR__, Conts_, Ds_, eSpecs_, Fs_, Specs_, and Continuum::subtract_continuum().

Referenced by DitherEnvironment::setup_projectors().

void VFrame::create_cosmics_mask ( const int  rad = 2,
const float  kappa = 5.0 
)

Crude and quick median-based cosmic filter

References __NSPECTGR__, Cosmics_, Ds_, eSpecs_, immedian::ImMedian< T >::evaluateBox(), Fs_, and Specs_.

Referenced by calc_continua().

string VFrame::indexToName ( const int  i  )  const

Translation of spectrograph index number to letter.

References __LEFTSPECTGR__, and __RIGHTSPECTGR__.

Referenced by read_distortions(), read_fibermodels(), read_frames(), read_psfmodels(), and write_frames().

int VFrame::nameToIndex ( const string &  s  )  const

Translation of spectrograph index letter to number.

References __LEFTSPECTGR__, and __RIGHTSPECTGR__.


Field Documentation

Referenced by frame_mode(), and read_frames().

Referenced by get_basename(), and read_frames().

vector< MArray<float,2> > VFrame::Specs_

Data arrays for the spectra, the error spectra and the continuum subtracted spectra.

Referenced by calc_continua(), create_cosmics_mask(), get_ccdx(), get_ccdy(), get_data(), read_frames(), set_data(), subtract_continua(), and write_frames().

vector< MArray<float,2> > VFrame::eSpecs_
vector< FitsHeader> VFrame::Headers_
vector< FitsHeader> VFrame::eHeaders_
vector< PsfModel > VFrame::Ps_

Referenced by get_psfmodel(), and read_psfmodels().

vector< MArray<float,2> > VFrame::Conts_

Arrays for the continua in both frames.

Referenced by calc_continua(), get_cont(), and subtract_continua().

vector< MArray<float,2> > VFrame::eConts_

Referenced by calc_continua(), and get_econt().

vector< MArray<char,2> > VFrame::Cosmics_

Cosmics/bad pixels masks (1 if pix is bad, zero otherwise)

Referenced by calc_continua(), create_cosmics_mask(), and get_cosmics_mask().


Generated on 4 Nov 2015 for CURE by  doxygen 1.6.1