GLAMERDOC++
Gravitational Lensing Code Library
|
It creates a realistic image from the output of a ray-tracing simulation. More...
#include <image_processing.h>
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. | |
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 | |
float | getBackgroundNoise () const |
template<typename T > | |
void | AddNoise (PixelMap< T > &pmap, PixelMap< T > &error_map, Utilities::RandomNumbers_NR &ran, bool dummy) |
Applies realistic noise (read-out + Poisson) on an image, returns noise map. | |
template<typename T > | |
void | Convert (PixelMap< T > &map_in, PixelMap< T > &map_out, PixelMap< T > &error_map, bool psf, bool noise, Utilities::RandomNumbers_NR &ran, bool cosmic=false) |
Converts the input map to a realistic image. | |
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 |
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).
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::Observation | ( | float | diameter, |
float | transmission, | ||
float | my_exp_time, | ||
int | my_exp_num, | ||
float | my_back_mag, | ||
float | my_read_out_noise, | ||
size_t | Npix_x, | ||
size_t | Npix_y, | ||
double | my_pix_size, | ||
float | my_seeing = 0. ) |
diameter | Diameter of telescope (in cm) (Collecting area is pi/4.*diameter^2) |
transmission | Total transmission of the telescope (/int T(\lambda)/\lambda d\lambda) |
exp_time | Total exposure time |
exp_num | Number of exposures |
back_mag | Flux due to background and/or sky in mag/arcsec^2 |
read_out_noise | Read-out noise in electrons/pixel |
seeing | FWHM in arcsecs of the image |
Observation::Observation | ( | float | diameter, |
float | transmission, | ||
float | my_exp_time, | ||
int | my_exp_num, | ||
float | my_back_mag, | ||
float | ron, | ||
std::string | psf_file, | ||
size_t | Npix_x, | ||
size_t | Npix_y, | ||
double | my_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.
diameter | Diameter of telescope (in cm) (Collecting area is pi/4.*diameter^2) |
transmission | Total transmission of the telescope (/int T(\lambda)/\lambda d\lambda) |
exp_time | Total exposure time |
exp_num | Number of exposures |
back_mag | Flux due to background and/or sky in mag/arcsec^2 |
read_out_noise | Read-out noise in electrons/pixel |
psf_file | Input PSF image |
oversample | Oversampling rate of the PSF image |
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.
zeropoint_mag | Magnitude that produces one count per second on the detector |
exp_time | Total exposure time |
exp_num | Number of exposures |
back_mag | Flux due to background and/or sky in mag/arcsec^2 |
read_out_noise | Read-out noise in electrons/pixel |
seeing | FWHM in arcsecs of the image |
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.
zeropoint_mag | Magnitude that produces one count per second on the detector |
exp_time | Total exposure time |
exp_num | Number of exposures |
back_mag | Flux due to background and/or sky in mag/arcsec^2 |
read_out_noise | Read-out noise in electrons/pixel |
psf_file | Input PSF image |
oversample | Oversampling rate of the PSF image |
void Observation::Convert | ( | PixelMap< T > & | map_in, |
PixelMap< T > & | map_out, | ||
PixelMap< T > & | error_map, | ||
bool | psf, | ||
bool | noise, | ||
Utilities::RandomNumbers_NR & | ran, | ||
bool | cosmic = false ) |
Converts the input map to a realistic image.
map | Input map in photons/(cm^2*Hz) |
psf | Decides if the psf smoothing is applied |
noise | Decides if noise is added |
unit | Decides units of output (if flux, output is in 10**(-0.4*mag)) |
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