Collect all necessary data to work on a dithered set of observations. This class loads the images, all the information from the diter file, created the set of Projector
objects, pre-processes the images (calculates continuum estimates and optionally subtract it), and deals with the sky sampling grids used for creating the significance maps.
It is also used in photometry/spectral extraction of catalog objects.
virtual DitherEnvironment::~DitherEnvironment | ( | ) | [inline, virtual] |
void DitherEnvironment::set_detect_parameters | ( | const DetectOptions & | d | ) | [inline] |
References detect_pars_.
Referenced by main().
void DitherEnvironment::set_cmd_line | ( | int | argc, | |
char ** | argv | |||
) | [inline] |
void DitherEnvironment::write_cmd_line | ( | std::ostream & | os, | |
const bool | nodate = false | |||
) | const [inline] |
References argc_, argv_, and version.
Referenced by PointSourceDetector::optimizeSegments(), PointSourceDetector::placePointSourceModels(), ContSourceDetector::write_continuum_catalog(), and PointSourceDetector::writeCutout().
const DetectOptions& DitherEnvironment::get_detect_parameters | ( | ) | const [inline] |
References detect_pars_.
Referenced by PointSourceDetector::computeSignificanceMap(), ContSourceDetector::computeSignificanceMap(), PointSourceDetector::detect(), ContSourceDetector::detect(), PointSourceDetector::generatePointSource(), PointSourceDetector::optimizeModelOnGrid(), PointSourceDetector::optimizeSegments(), and PointSourceDetector::placePointSourceModels().
void DitherEnvironment::read_ditherfile | ( | const string & | ditherfile | ) |
References airmass_, datafiles_, ditherfile_, dithers_, ditherx_, dithery_, fluxnorm_, modelfiles_, and seeing_.
Referenced by main().
void DitherEnvironment::setup_projectors | ( | const bool | calc_continua = true |
) |
Setup the projectors for this ditherset. There will be one projector for each dither. For each projector this routine will read the data frames, the distortions, the fibermodels and the PDf models.
References ProjectorSet::addProjector(), airmass_, VFrame::calc_continua(), datafiles_, detect_pars_, dithers_, ditherx_, dithery_, DetectOptions::dump_cont, fluxnorm_, VFrame::get_ccdx(), VFrame::get_ccdy(), Projector::get_ifu(), ProjectorSet::getProjector(), DetectOptions::ifu_file, modelfiles_, P, P_, prepend_filename(), DetectOptions::psf_size, VFrame::read_distortions(), VFrame::read_fibermodels(), VFrame::read_frames(), VFrame::read_psfmodels(), seeing_, setup_grid_limits(), DetectOptions::sub_cont, VFrame::subtract_continua(), vframes_, and VFrame::write_frames().
Referenced by main().
void DitherEnvironment::dump_psf_grid | ( | void | ) | const |
References datafiles_, dithers_, Projector::get_psf_grid(), ProjectorSet::getProjector(), P_, and version.
Referenced by main().
References __LEFTSPECTGR__, SkySampleLimits::calc_nstep(), detect_pars_, VFrame::get_ccdx(), VFrame::get_ccdy(), VFrame::get_distortion(), ifu::get_fiberd(), ifu::get_ifu_max_x(), ifu::get_ifu_max_y(), ifu::get_ifu_min_x(), ifu::get_ifu_min_y(), grid_, DetectOptions::ifurange, SkySampleLimits::lmax, SkySampleLimits::lmin, DetectOptions::lrange, DetectOptions::lsample, DetectOptions::lsample_fine, SkySampleLimits::lstep, SkySampleLimits::lstep_fine, Distortion::map_xy_wavelength(), DetectOptions::sample, DetectOptions::sample_fine, DetectOptions::simsrc, DetectOptions::xdetect_file, DetectOptions::xdetect_size, SkySampleLimits::xmax, SkySampleLimits::xmin, SkySampleLimits::xstep, SkySampleLimits::xstep_fine, SkySampleLimits::ymax, SkySampleLimits::ymin, and SkySampleLimits::ystep.
Referenced by setup_projectors().
list<SkySampleLimits> DitherEnvironment::get_grid_limits | ( | void | ) | const [inline] |
int DitherEnvironment::get_num_dithers | ( | void | ) | const [inline] |
References dithers_.
Referenced by SourceSimulator::AddPoissonNoise(), SourceSimulator::AddSky(), and main().
string DitherEnvironment::get_output_basename | ( | void | ) | const |
const ProjectorSet& DitherEnvironment::get_projector_set | ( | ) | const [inline] |
References P_.
Referenced by SourceSimulator::add_sersic_source_to_images(), SourceSimulator::AddContSource(), SourceSimulator::AddLineSource(), SourceSimulator::AddSersicContSource(), SourceSimulator::AddSky(), PointSourceDetector::computeSignificanceMap(), ContSourceDetector::computeSignificanceMap(), PointSourceDetector::generatePointSource(), and main().
void DitherEnvironment::apply_atmospheric_extinction | ( | bool | atmext | ) | [inline] |
References ProjectorSet::apply_atmospheric_extinction(), and P_.
Referenced by main().
const vector<VFrame>& DitherEnvironment::get_vframes | ( | ) | const [inline] |
const VFrame& DitherEnvironment::get_vframe | ( | const int | shot | ) | const [inline] |
References vframes_.
Referenced by SourceSimulator::add_continuum_source_to_images(), add_flux_in_fibers(), SourceSimulator::add_sersic_source_to_images(), SourceSimulator::AddSky(), ContSourceDetector::compute_sigma(), PointSourceDetector::equivalent_width(), extract_fibers_in_aperture(), main(), PointSourceDetector::make_image(), PointSourceDetector::make_image_header(), and PointSourceDetector::photometry().
const MArray<float,1>& DitherEnvironment::get_seeing | ( | ) | const [inline] |
get a reference to the continuum of frame shot
get a reference to the continua get a reference to the continua errors get a reference to the Distortion of frame shot
get a reference to the FiberModel of frame shot
get a reference to the seeing vector
References seeing_.
Referenced by main(), and PointSourceDetector::make_image_header().
const MArray<float,1>& DitherEnvironment::get_fluxnorm | ( | ) | const [inline] |
References fluxnorm_.
Referenced by PointSourceDetector::photometry().
const string& DitherEnvironment::get_datafile | ( | const int | shot | ) | const [inline] |
References datafiles_.
Referenced by PointSourceDetector::make_image_header().
void DitherEnvironment::mask_wavelength | ( | MArray< float, 2 > & | In, | |
MArray< float, 2 > & | In_e, | |||
const Distortion & | D, | |||
const float | wavelength, | |||
const float | width | |||
) |
Mask a region around a particular wavelength. Used mainly to mask 5577.
References Distortion::map_wf_x(), and Distortion::map_xy_wavelength().
string DitherEnvironment::version = "$Id: ditherenv.cpp 840 2013-06-17 15:17:14Z snigula $" [static] |
Collect all necessary data to work on a dithered set of observations. This class loads the images, all the information from the diter file, created the set of Projector
objects, pre-processes the images (calculates continuum estimates and optionally subtract it), and deals with the sky sampling grids used for creating the significance maps.
It is also used in photometry/spectral extraction of catalog objects.
Referenced by dump_psf_grid(), main(), and write_cmd_line().
vector<VFrame> DitherEnvironment::vframes_ [protected] |
Referenced by get_vframe(), get_vframes(), and setup_projectors().
ProjectorSet DitherEnvironment::P_ [protected] |
Referenced by apply_atmospheric_extinction(), dump_psf_grid(), get_projector_set(), and setup_projectors().
DetectOptions DitherEnvironment::detect_pars_ [protected] |
Referenced by get_detect_parameters(), get_output_basename(), set_detect_parameters(), setup_grid_limits(), and setup_projectors().
list<SkySampleLimits> DitherEnvironment::grid_ [protected] |
Referenced by get_grid_limits(), and setup_grid_limits().
string DitherEnvironment::ditherfile_ [protected] |
Referenced by read_ditherfile().
vector<string> DitherEnvironment::datafiles_ [protected] |
Referenced by dump_psf_grid(), get_datafile(), read_ditherfile(), and setup_projectors().
vector<string> DitherEnvironment::modelfiles_ [protected] |
Referenced by read_ditherfile(), and setup_projectors().
int DitherEnvironment::dithers_ [protected] |
Referenced by DitherEnvironment(), dump_psf_grid(), get_num_dithers(), read_ditherfile(), and setup_projectors().
MArray<float,1> DitherEnvironment::ditherx_ [protected] |
Referenced by read_ditherfile(), and setup_projectors().
MArray<float,1> DitherEnvironment::dithery_ [protected] |
Referenced by read_ditherfile(), and setup_projectors().
MArray<float,1> DitherEnvironment::seeing_ [protected] |
Referenced by get_seeing(), read_ditherfile(), and setup_projectors().
MArray<float,1> DitherEnvironment::fluxnorm_ [protected] |
Referenced by get_fluxnorm(), read_ditherfile(), and setup_projectors().
MArray<float,1> DitherEnvironment::airmass_ [protected] |
Referenced by read_ditherfile(), and setup_projectors().
MArray<float,1> DitherEnvironment::ron_ [protected] |
MArray<float,1> DitherEnvironment::gain_ [protected] |
int DitherEnvironment::argc_ [protected] |
Referenced by DitherEnvironment(), set_cmd_line(), and write_cmd_line().
char** DitherEnvironment::argv_ [protected] |
Referenced by DitherEnvironment(), set_cmd_line(), and write_cmd_line().