SourceSimulator Class Reference

Data Structures

Public Member Functions

Data Fields


Detailed Description

Simulate a continuum point source observed through the IFU. Optionally add night sky.


Constructor & Destructor Documentation

SourceSimulator::SourceSimulator ( DitherEnvironment de,
const float  w_incr,
vector< MArray< float, 2 > > &  imgs_l,
vector< MArray< float, 2 > > &  imgs_r,
bool  virus_eff,
const float  ft 
) [inline]

Member Function Documentation

void SourceSimulator::AddContSource ( const MArray< float, 1 > &  f,
const MArray< float, 1 > &  l,
const float  x,
const float  y,
const float  aperture 
)
void SourceSimulator::AddSersicContSource ( const MArray< float, 1 > &  f,
const MArray< float, 1 > &  l,
const Sersic S,
const float  eaperture 
)
void SourceSimulator::AddLineSource ( const float  x,
const float  y,
const float  w,
const float  f,
const float  aperture 
)
void SourceSimulator::AddPoissonNoise (  ) 
void SourceSimulator::AddSky ( const string &  sky_file,
const float  mag,
const float  tint 
)

Add night sky spectrum from an ascii file to all fibers in an IFU (both spectrographs). The night sky is scaled to AB mag in the V filter, and and exposure time of tint seconds.

References __LEFTSPECTGR__, __RIGHTSPECTGR__, addSkyToFrame(), DE, VFrame::get_distortion(), ifu::get_fiberd(), VFrame::get_fibermodel(), Projector::get_ifu(), DitherEnvironment::get_num_dithers(), DitherEnvironment::get_projector_set(), DitherEnvironment::get_vframe(), ProjectorSet::getProjector(), imgs_left, and imgs_right.

Referenced by main().

float SourceSimulator::mag_to_electrons ( const float  g_mag,
const float  tint 
)

returns signal in detected electrons per cm^2/tint/A. Input magnitude is in the AB system in the g band.

References flambda_to_electrons().

Referenced by addSkyToFrame(), and main().

float SourceSimulator::flambda_to_electrons ( const float  flambda,
const float  lambda,
const float  tint 
)

returns signal in detected electrons per cm^2/tint/A. Input FLAMBDA is in ergs/cm^2/s/A !

References c.

Referenced by mag_to_electrons(), and main().

void SourceSimulator::addSkyToFrame ( const Distortion D,
const FiberModel F,
MArray< float, 2 > &  image,
const MArray< float, 1 > &  skyval,
const MArray< float, 1 > &  skywl,
const float  mag,
const float  tint 
)

Add a night sky spectrum to all fibers in a single CCD frame. The night sky is scaled to AB mag in the g filter, and and exposure time of tint seconds. Private version, driven externally by AddSky()

References apply_virus_eff, FiberModel::get_cumulative_fiberflux(), lin_interp(), mag_to_electrons(), Distortion::map_xy_wavelength_fast(), norm_to_sdss_g(), and virus_eff().

Referenced by AddSky().

float SourceSimulator::virus_eff ( const float  lambda  ) 

Third-order polynmomial approximation to VIRUS+HET+Atmosphere efficiency Taken from Gary's throughput_sep10v2 model, "realistic" version.

Lambda is the wavelength in Angstroms

Referenced by add_continuum_source_to_images(), add_sersic_source_to_images(), and addSkyToFrame().

void SourceSimulator::add_continuum_source_to_images ( const std::vector< ResElemList > &  data,
const MArray< float, 1 > &  ff,
const MArray< float, 1 > &  l 
)
void SourceSimulator::add_line_source_to_images ( vector< ResElemList > &  Model_LAE,
const float  flux 
)

This function adds the flux of a single emissionn line source to a dithered set of images at one column (x) of the CCDs. No noise is added at this step.

References __LEFTSPECTGR__, PooledList< T >::begin(), PooledList< T >::end(), Pixel::flux, ResElem::ignore, imgs_left, imgs_right, ResElem::mflux, ResElem::npix(), ResElem::p, ResElem::tu, Pixel::x, and Pixel::y.

Referenced by AddLineSource().

void SourceSimulator::add_sersic_source_to_images ( const std::vector< ResElemList > &  data,
const Sersic S,
const MArray< float, 1 > &  ff,
const MArray< float, 1 > &  l 
)
void SourceSimulator::log_fluxin ( std::ostream &  out,
const float  fluxin,
const float  fluxout,
const float  z_em,
const float  x,
const float  y 
)

Add a single emission line source affected pixels in data and error frames.

Referenced by main().


Field Documentation

vector<MArray<float,2> >& SourceSimulator::imgs_left
vector<MArray<float,2> >& SourceSimulator::imgs_right
const float SourceSimulator::dw
MArray<short,2> SourceSimulator::flags

Generated on 4 Nov 2015 for CURE by  doxygen 1.6.1