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

Class for sources described by an array of pixels. More...

#include <source.h>

Inheritance diagram for SourcePixelled:
Inheritance graph
[legend]
Collaboration diagram for SourcePixelled:
Collaboration graph
[legend]

Public Member Functions

 SourcePixelled (PosType my_z, PosType *center, int Npixels, PosType resolution, PosType *arr_val, PosType zero_point)
 
 SourcePixelled (const PixelMap &gal_map, PosType z, PosType factor, PosType zero_point)
 Creates a SourcePixelled from a PixelMap image. The idea is to use stamps of observed galaxies as input sources for simuations. Surface brightness of the source is conserved, taking into account the input pixel size. Factor allows for rescaling of the flux, in case one wants to simulate a different observation. More...
 
PosType SurfaceBrightness (const PosType *y) const
 
void printSource ()
 
PosType getTotalFlux () const
 
PosType getRadius () const
 
PosType * getEll ()
 
PosType getQuad (int i, int j)
 
PosType getSize ()
 
PosType * getCentroid ()
 
PosType getMag ()
 
- Public Member Functions inherited from Source
 Source (PosType r, Point_2d x, PosType z, PosType SBlimit, PosType zero_point)
 shell constructor
 
 Source (const Source &s)
 
Sourceoperator= (const Source &s)
 
double SBlimit_magarcsec (double limit)
 convert mag/arcsec^2 to flux units
 
PosType getSBlimit ()
 Gets sb_limit in erg/cm^2/sec/rad^2/Hz.
 
PosType getSBlimit_magarcsec ()
 Gets sb_limit in mag/arcsec^2.
 
PosType getZ () const
 Redshift of source.
 
void setZ (PosType my_z)
 
PosType getRadius () const
 Radius of source in radians.
 
void setRadius (PosType my_radius)
 Reset the radius of the source in radians.
 
Point_2d getTheta () const
 position of source in radians
 
void getTheta (PosType *x) const
 position of source in radians
 
void getTheta (Point_2d &x) const
 position of source in radians
 
void setTheta (PosType *xx)
 Reset the position of the source in radians.
 
void setTheta (PosType my_x, PosType my_y)
 
void setTheta (const Point_2d &p)
 
void setSBlimit (float limit)
 Sets sb_limit in erg/cm^2/sec/rad^2/Hz.
 
void setMagZeroPoint (float zeropoint)
 
double getMagZeroPoint ()
 
PosType changeFilter (std::string filter_in, std::string filter_out, std::string sed)
 Calculates the difference in magnitude when changing the observing filter. More...
 
PosType integrateFilter (std::vector< PosType > wavel_fil, std::vector< PosType > fil)
 Calculates the integral of the filter curve given as an array of (x,y) values. More...
 
PosType integrateFilterSED (std::vector< PosType > wavel_fil, std::vector< PosType > fil, std::vector< PosType > wavel_sed, std::vector< PosType > sed)
 Calculates the integral of the sed multiplied by the filter curve. More...
 
double TEST_surface_brightness (double res, int N)
 test if flux in pixels matches total flux
 
long getID () const
 
void setID (long i)
 

Additional Inherited Members

- Static Public Member Functions inherited from Source
static PosType * getx (Source &source)
 
- Protected Member Functions inherited from Source
double flux_to_mag (double flux) const
 
- Protected Attributes inherited from Source
PosType source_r
 charactoristic source size
 
Point_2d source_x
 center of source
 
PosType zsource
 redshift of source
 
PosType sb_limit
 
long id
 
double mag_zero_point
 

Detailed Description

Class for sources described by an array of pixels.

The sources are created as a square array of pixels of dimension Npixels x Npixels and pixel size equal to resolution.

Constructor & Destructor Documentation

◆ SourcePixelled() [1/2]

SourcePixelled::SourcePixelled ( PosType  my_z,
PosType *  my_center,
int  my_Npixels,
PosType  my_resolution,
PosType *  arr_val,
PosType  zero_point 
)
Parameters
my_zredshift of the source
my_centercenter (in rad)
my_Npixelsnumber of pixels per side
my_resolutionresolution (in rad)
arr_valarray of pixel values (must be of size = Npixels*Npixels)
zero_pointmagnitude zero point

◆ SourcePixelled() [2/2]

SourcePixelled::SourcePixelled ( const PixelMap gal_map,
PosType  my_z,
PosType  factor,
PosType  zero_point 
)

Creates a SourcePixelled from a PixelMap image. The idea is to use stamps of observed galaxies as input sources for simuations. Surface brightness of the source is conserved, taking into account the input pixel size. Factor allows for rescaling of the flux, in case one wants to simulate a different observation.

Parameters
gal_mapInput image and information
my_zredshift of the source
factoroptional rescaling factor for the flux

Member Function Documentation

◆ SurfaceBrightness()

PosType SourcePixelled::SurfaceBrightness ( const PosType *  y) const
virtual

Surface brightness of source in grid coordinates not source centered coordinates.

The units shuld be ergs / s / Hz / cm^2

Implements Source.


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