GLAMERDOC++
Gravitational Lensing Code Library
|
Source that represents an analytic galaxy surface brightness model. It encapsulates a OverzierSource which is a model from R.Overzier et al. 2012 with a bulge and a disk. More...
#include <sourceAnaGalaxy.h>
Public Member Functions | |
SourceMultiAnaGalaxy (PosType mag, PosType mag_bulge, Band band, PosType zero_point, PosType Reff, PosType Rdisk, PosType PA, PosType inclination, PosType my_z, PosType *my_theta, Utilities::RandomNumbers_NR &ran) | |
Source model for a single analytic galaxy model. | |
SourceMultiAnaGalaxy (SourceOverzierPlus *my_galaxy) | |
PosType | SurfaceBrightness (const PosType *x) const |
Surface brightness of current galaxy. | |
PosType | getTotalFlux () const |
Total flux coming from the current galaxy in erg/sec/Hz/cm^2. | |
void | printSource () |
Print info on current source parameters. | |
void | AddAGalaxy (SourceOverzierPlus *my_galaxy) |
SourceOverzierPlus & | setIndex (std::size_t i) |
Used to change the "current" source that is returned when the surface brightness is subsequently called. It also returns a reference to the particular OverzierSource source model. | |
SourceOverzierPlus & | operator[] (std::size_t i) |
The indexing operator can be used to change the "current" source that is returned when the surface brightness is subsequently called. It also returns a reference to the particular OverzierSource source model. | |
const SourceOverzierPlus & | operator[] (std::size_t i) const |
SourceOverzierPlus & | CurrentGalaxy () |
PosType | getZ () const |
Return redshift of current source. | |
PosType | getRadius () const |
void | setZ (PosType my_z) |
Set redshift of current source. Only changes the redshift while leaving position fixed. | |
void | resetBand (Band my_band) |
unsigned long | getID () |
Point_2d | getTheta () const |
Return angular position of current source. | |
void | setTheta (PosType my_theta[2]) |
Set angular position of current source. | |
void | setTheta (PosType my_x, PosType my_y) |
void | setTheta (const Point_2d &p) |
std::size_t | getNumberOfGalaxies () const |
void | multiplier (PosType z, PosType mag_cut, int Multiplicity, Utilities::RandomNumbers_NR &ran) |
Artificially increase the number of sources to increase the incidence of strong lenses. | |
void | sortInRedshift () |
Sort the sources by redshift in assending order. | |
void | sortInMag (Band tmp_band) |
Sort the sources by magnitude in assending order. | |
void | sortInID () |
Sort the sources by magnitude in assending order. | |
PosType | getFOV () |
returns field-of-view in deg^2 assuming region is square | |
std::size_t | findclosestonsky (PosType theta[], PosType *radius) |
Finds the closest source to the position theta[] on the sky in Cartesian distance. Returns the index of that source and its distance from theta[]. | |
void | findclosestonsky (PosType theta[], std::vector< PosType > &radius, std::vector< size_t > &indexes) |
finds closest sources to theta on umlensed sky. "radius" should have a size equal ti the number wanted | |
void | findonsky (PosType theta[], float radius, std::list< size_t > &indexes) |
finds objects within radios of theta[] on umlensed sky. | |
void | findnear (PosType theta[], float radius, std::list< size_t > &indexes, PosType z_range[]) |
finds objects within radios of theta[] on unlensed sky and within a redshift range. | |
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) | |
Source & | operator= (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. | |
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. | |
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. | |
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 |
Source that represents an analytic galaxy surface brightness model. It encapsulates a OverzierSource which is a model from R.Overzier et al. 2012 with a bulge and a disk.
Input parameters are only needed if the third constructor is used so that an input catalog is read Input Parameters: source_input_galaxy_file file with catalog of galaxies source_band Band that these sources are to be observed in. Must be one of the following SDSS_U,SDSS_G,SDSS_R,SDSS_I,SDSS_Z,J,H,Ks,IRAC1,IRAC2 source_band source_mag_limit magnitude limit source_sb_limit Minimum surface brightness limit for truncating sources. By default it is 30. mag/sq. arcsec *
SourceMultiAnaGalaxy::SourceMultiAnaGalaxy | ( | PosType | mag, |
PosType | mag_bulge, | ||
Band | band, | ||
PosType | zero_point, | ||
PosType | Reff, | ||
PosType | Rdisk, | ||
PosType | PA, | ||
PosType | inclination, | ||
PosType | my_z, | ||
PosType * | my_theta, | ||
Utilities::RandomNumbers_NR & | ran ) |
Source model for a single analytic galaxy model.
mag | Total magnitude |
mag_bulge | magnitude of Bulge |
zero_point | magnitude zero point |
Reff | Bulge half light radius (arcs) |
Rdisk | disk scale hight (arcs) |
PA | Position angle (radians) |
inclination | inclination of disk (radians) |
my_z | redshift of source |
my_theta | position on the sky |
SourceMultiAnaGalaxy::SourceMultiAnaGalaxy | ( | SourceOverzierPlus * | my_galaxy | ) |
Constructor for passing in a pointer to the galaxy model or a list of galaxies instead of constructing it internally. Useful when there is a list of pre-allocated sources. The redshifts and sky positions need to be set separately.
|
inlinevirtual |
Total flux coming from the current galaxy in erg/sec/Hz/cm^2.
Implements Source.
void SourceMultiAnaGalaxy::multiplier | ( | PosType | z, |
PosType | mag_cut, | ||
int | multiplicity, | ||
Utilities::RandomNumbers_NR & | ran ) |
Artificially increase the number of sources to increase the incidence of strong lenses.
Sources above the limiting redshift and below the limiting magnitude are copied and given random position angles, inclinations and positions within the field of view. The field of view is determined directly from the range of already existing source positions. The field is assumed to be rectangular.
z | limiting redshift, only sources above this redshift are copied |
mag_cut | limiting magnitude, only sources with magnitudes below this limit will be copied |
multiplicity | the number of times each of these sources should be multiplied |
ran | random number seed |
|
virtual |
Print info on current source parameters.
Implements Source.
|
inlinevirtual |
Surface brightness of current galaxy.
Implements Source.