GLAMERDOC++
Gravitational Lensing Code Library
Public Member Functions | List of all members
Observation Class Reference

It creates a realistic image from the output of a ray-tracing simulation. More...

#include <image_processing.h>

Inherits Obs.

Public Member Functions

 Observation (Telescope tel_name, double exposure_time, int exposure_num, size_t Npix_x, size_t Npix_y, float oversample)
 Creates an observation setup that mimics a known instrument. More...
 
 Observation (float diameter, float transmission, float exp_time, int exp_num, float back_mag, float read_out_noise, size_t Npix_x, size_t Npix_y, double pix_size, float seeing=0.)
 
 Observation (float diameter, float transmission, float exp_time, int exp_num, float back_mag, float read_out_noise, std::string psf_file, size_t Npix_x, size_t Npix_y, double pix_size, float oversample=1.)
 
 Observation (float zeropoint_mag, float exp_time, int exp_num, float back_mag, float read_out_noise, size_t Npix_x, size_t Npix_y, double pix_size, float seeing=0)
 
 Observation (float zeropoint_mag, float exp_time, int exp_num, float back_mag, float read_out_noise, std::string psf_file, size_t Npix_x, size_t Npix_y, double pix_size, float oversample=1.)
 
float getExpTime () const
 
int getExpNum () const
 
float getBackMag () const
 
float getRon () const
 read-out noise in electrons/pixel
 
float getSeeing () const
 seeing in arcsecs
 
float getZeropoint () const
 
void setZeropoint (double zpoint)
 
float getBackgroundNoise (float resolution, UnitType unit=UnitType::counts_x_sec) const
 pixel size in radians More...
 
float getBackgroundNoise () const
 
void AddNoise (PixelMap &pmap, PixelMap &error_map, Utilities::RandomNumbers_NR &ran, bool dummy)
 Applies realistic noise (read-out + Poisson) on an image, returns noise map.
 
void Convert (PixelMap &map_in, PixelMap &map_out, PixelMap &error_map, bool psf, bool noise, Utilities::RandomNumbers_NR &ran, bool cosmic=false)
 Converts the input map to a realistic image. More...
 
void setExpTime (float time)
 returns factor by which code image units need to be multiplied by to get flux units
 
void setPixelSize (float pixel_size)
 
double mag_to_counts (double m) const
 
double counts_to_mag (double flux) const
 
double zeropoint () const
 

Detailed Description

It creates a realistic image from the output of a ray-tracing simulation.

It translates pixel values in observed units (counts/sec), applies PSF and noise. Input must be in ergs/(s*cm^2*Hz).

see https://www.ucolick.org/~bolte/AY257/s_n.pdf

Constructor & Destructor Documentation

◆ Observation() [1/5]

Observation::Observation ( Telescope  tel_name,
double  exposure_time,
int  exposure_num,
size_t  Npix_x,
size_t  Npix_y,
float  oversample 
)

Creates an observation setup that mimics a known instrument.

◆ Observation() [2/5]

Observation::Observation ( float  diameter,
float  transmission,
float  exp_time,
int  exp_num,
float  back_mag,
float  read_out_noise,
size_t  Npix_x,
size_t  Npix_y,
double  pix_size,
float  seeing = 0. 
)
  • Creates a custom observation setup with parameters decided by the user.
Parameters
diameterDiameter of telescope (in cm) (Collecting area is pi/4.*diameter^2)
transmissionTotal transmission of the telescope (/int T(\lambda)/\lambda d\lambda)
exp_timeTotal exposure time
exp_numNumber of exposures
back_magFlux due to background and/or sky in mag/arcsec^2
read_out_noiseRead-out noise in electrons/pixel
seeingFWHM in arcsecs of the image

◆ Observation() [3/5]

Observation::Observation ( float  diameter,
float  transmission,
float  exp_time,
int  exp_num,
float  back_mag,
float  ron,
std::string  psf_file,
size_t  Npix_x,
size_t  Npix_y,
double  pix_size,
float  oversample = 1. 
)

Creates a custom observation setup with parameters decided by the user. Allows for the use of a psf fits image.

Parameters
diameterDiameter of telescope (in cm) (Collecting area is pi/4.*diameter^2)
transmissionTotal transmission of the telescope (/int T(\lambda)/\lambda d\lambda)
exp_timeTotal exposure time
exp_numNumber of exposures
back_magFlux due to background and/or sky in mag/arcsec^2
read_out_noiseRead-out noise in electrons/pixel
psf_fileInput PSF image
oversampleOversampling rate of the PSF image

◆ Observation() [4/5]

Observation::Observation ( float  zeropoint_mag,
float  exp_time,
int  exp_num,
float  back_mag,
float  read_out_noise,
size_t  Npix_x,
size_t  Npix_y,
double  pix_size,
float  seeing = 0 
)

Creates a custom observation setup with parameters decided by the user.

Parameters
zeropoint_magMagnitude that produces one count per second on the detector
exp_timeTotal exposure time
exp_numNumber of exposures
back_magFlux due to background and/or sky in mag/arcsec^2
read_out_noiseRead-out noise in electrons/pixel
seeingFWHM in arcsecs of the image

◆ Observation() [5/5]

Observation::Observation ( float  zeropoint_mag,
float  exp_time,
int  exp_num,
float  back_mag,
float  myread_out_noise,
std::string  psf_file,
size_t  Npix_x,
size_t  Npix_y,
double  pix_size,
float  oversample = 1. 
)

Creates a custom observation setup with parameters decided by the user. Allows for the use of a psf fits image.

Parameters
zeropoint_magMagnitude that produces one count per second on the detector
exp_timeTotal exposure time
exp_numNumber of exposures
back_magFlux due to background and/or sky in mag/arcsec^2
read_out_noiseRead-out noise in electrons/pixel
psf_fileInput PSF image
oversampleOversampling rate of the PSF image

Member Function Documentation

◆ Convert()

void Observation::Convert ( PixelMap map_in,
PixelMap map_out,
PixelMap error_map,
bool  psf,
bool  noise,
Utilities::RandomNumbers_NR ran,
bool  cosmic = false 
)

Converts the input map to a realistic image.

Parameters
mapInput map in photons/(cm^2*Hz)
psfDecides if the psf smoothing is applied
noiseDecides if noise is added
unitDecides units of output (if flux, output is in 10**(-0.4*mag))

◆ getBackgroundNoise()

float Observation::getBackgroundNoise ( float  resolution,
UnitType  unit = UnitType::counts_x_sec 
) const

pixel size in radians

Outputs rms of noise counts due to background and instrument in the unit decided by the user


The documentation for this class was generated from the following files: