This class maps the flux distribution of a point-like source on the sky to the flux pattern registered on by a full dither of VIRUS frame.
The idea is that first, we find all the resolution elements that are receiving flux given a position on sky Then, we can fill in a model of a point source from the PsfModel
. This structure is used later to compare the detected flux to the point-source model.
A
ProjectorSet holds a number of Projector
instances to represent the full dither. It exposes the same interface as a single Projector
and delegates all calls to the individual Projectors
. It does not compute anything itself.
ProjectorSet::ProjectorSet | ( | ) | [inline] |
virtual ProjectorSet::~ProjectorSet | ( | ) | [inline, virtual] |
void ProjectorSet::addProjector | ( | Projector & | p, | |
const float | x_off, | |||
const float | y_off | |||
) | [inline] |
Add a projector object to the set and assign offsets in x and y to it. The offsets are relative to the positions of the fibers in the IFU description file and in the same units (arcseconds).
References pset_, x_off_, and y_off_.
Referenced by DitherEnvironment::setup_projectors().
const Projector& ProjectorSet::getProjector | ( | const int | i | ) | const [inline] |
References pset_.
Referenced by SourceSimulator::add_sersic_source_to_images(), SourceSimulator::AddContSource(), SourceSimulator::AddLineSource(), SourceSimulator::AddSersicContSource(), SourceSimulator::AddSky(), DitherEnvironment::dump_psf_grid(), PointSourceDetector::equivalent_width(), fillInPointSourceModel(), findResElemsForPointSourceInAperture(), findResElemsForPointSourceInEllAperture(), PointSourceDetector::make_image_header(), and DitherEnvironment::setup_projectors().
float ProjectorSet::getXOff | ( | const int | i | ) | const [inline] |
References x_off_.
Referenced by findResElemsForPointSourceInAperture(), findResElemsForPointSourceInEllAperture(), and get_fiber_x().
float ProjectorSet::getYOff | ( | const int | i | ) | const [inline] |
References y_off_.
Referenced by findResElemsForPointSourceInAperture(), findResElemsForPointSourceInEllAperture(), and get_fiber_y().
int ProjectorSet::getNDithers | ( | ) | const [inline] |
float ProjectorSet::get_fiber_x | ( | const int | dither, | |
const int | fib | |||
) | const [inline] |
References getXOff(), and pset_.
Referenced by PointSourceDetector::normalize_model().
float ProjectorSet::get_fiber_y | ( | const int | dither, | |
const int | fib | |||
) | const [inline] |
References getYOff(), and pset_.
Referenced by PointSourceDetector::normalize_model().
void ProjectorSet::apply_atmospheric_extinction | ( | bool | ext | ) | [inline] |
References getNDithers(), and pset_.
Referenced by DitherEnvironment::apply_atmospheric_extinction().
void ProjectorSet::findResElemsForPointSourceInAperture | ( | std::vector< ResElemList > & | modelPS, | |
const SkyPosition & | p, | |||
const float | ap | |||
) | const [inline] |
Determine the flux fractions in resolution elements in the whole dither-set for a point-like emitter at position x and y (in arcsec) and at wavelength l (in Angstroms). Only resolution elements within an aperture of ap*seeing
are considered. The area fractions touching the aperture are computed. The vector is assumed empty on entry. It is passed by reference instead of being returned for efficiency - to avoid one expensive and unnecessary copy operation.
References getNDithers(), getProjector(), getXOff(), getYOff(), Projector::SkyPosition::l_, Projector::SkyPosition::x_, and Projector::SkyPosition::y_.
Referenced by SourceSimulator::AddContSource(), SourceSimulator::AddLineSource(), PointSourceDetector::computeSignificanceMap(), ContSourceDetector::computeSignificanceMap(), PointSourceDetector::generatePointSource(), and main().
void ProjectorSet::findResElemsForPointSourceInEllAperture | ( | std::vector< ResElemList > & | modelPS, | |
const SkyPosition & | p, | |||
const float | a, | |||
const float | b, | |||
const float | pa | |||
) | const [inline] |
Determine the flux fractions in resolution elements in the whole dither-set at wavelength l (in Angstroms) for an elliptical aperture given as semi-axes a and b and position angle pa. The vector is assumed empty on entry. It is passed by reference instead of being returned for efficiency - to avoid one expensive and unnecessary copy operation.
References getNDithers(), getProjector(), getXOff(), getYOff(), Projector::SkyPosition::l_, Projector::SkyPosition::x_, and Projector::SkyPosition::y_.
Referenced by SourceSimulator::AddSersicContSource(), and main().
void ProjectorSet::fillInPointSourceModel | ( | vector< ResElemList > & | modelPS | ) | const [inline] |
Fill-in the images of the point-source model described by the vector<ResElemList>
. The model at entry is assumed to contain only the flux fraction in each ResElem
. This function generates a full model of the image of the point-source on the CCD(s) for the whole dither.
References Projector::fill_in_point_source_model(), getNDithers(), and getProjector().
Referenced by SourceSimulator::AddLineSource(), and PointSourceDetector::generatePointSource().
std::vector<Projector> ProjectorSet::pset_ [protected] |
Referenced by addProjector(), apply_atmospheric_extinction(), get_fiber_x(), get_fiber_y(), getNDithers(), getProjector(), and ProjectorSet().
std::vector<float> ProjectorSet::x_off_ [protected] |
Referenced by addProjector(), getXOff(), and ProjectorSet().
std::vector<float> ProjectorSet::y_off_ [protected] |
Referenced by addProjector(), getYOff(), and ProjectorSet().