7#ifndef OVERZIER_SOURCE_H_
8#define OVERZIER_SOURCE_H_
11#include "sersic_source.h"
15#define PI 3.141592653589793238462643383279502884
26 SourceOverzier(PosType mag,PosType mag_bulge,
Band band,
double zero_point,PosType Reff,PosType Rdisk,PosType PA,PosType inclination,
unsigned long my_id,PosType my_z,
const PosType *theta);
32 void setInternals(PosType mag,PosType mag_bulge,
Band band,PosType Reff,PosType Rdisk,PosType PA,PosType inclination,
unsigned long my_id,PosType my_z,
const PosType *my_theta);
34 PosType getTotalFlux()
const;
38 PosType
getMag()
const {
return current.mag; }
40 PosType getMagBulge()
const {
return current.mag_bulge; }
41 PosType getMagBulge(
Band band)
const;
45 void setUMag(PosType m) { mag_u = m; }
47 void setGMag(PosType m) { mag_g = m; }
49 void setRMag(PosType m) { mag_r = m; }
51 void setIMag(PosType m) { mag_i = m; }
53 void setZMag(PosType m) { mag_z = m; }
55 void setJMag(PosType m) { mag_J = m; }
57 void setHMag(PosType m) { mag_H = m; }
59 void setKMag(PosType m) { mag_Ks = m; }
63 virtual void setMag(PosType my_mag,
Band band,PosType zero_point){
64 current.mag_map[band] = my_mag;
65 zeropoints[band] = zero_point;
69 current.bulge_mag_map[band] = my_mag;
70 zeropoints[band] = zero_point;
74 PosType
getReff()
const {
return current.Reff/arcsecTOradians; }
76 PosType
getRdisk()
const {
return current.Rdisk/arcsecTOradians; }
79 PosType
getBtoT()
const {
return pow(10,(-current.mag_bulge + current.mag)/2.5); }
81 PosType
getPA()
const {
return current.PA; }
84 float getSEDtype()
const {
return sedtype;}
85 void setSEDtype(
float s){ sedtype = s;}
93 inline PosType
getMinSize(PosType f) {
return std::min(1.678*current.Reff*fabs(cos(current.inclination))*pow(-log (f)/7.67,4),current.Rdisk*(-log (f)/1.67));}
100 static std::map<Band,PosType> zeropoints;
104 void renormalize_current();
116 PosType inclination=0;
127 std::map<Band,double> mag_map;
128 std::map<Band,double> bulge_mag_map;
133 std::cout <<
"Reff :" << Reff/arcsecTOradians <<
" arcsec ";
134 std::cout <<
"Rdisk :" << Rdisk/arcsecTOradians <<
" arcsec ";
135 std::cout <<
"PA :" << PA <<
" ";
136 std::cout <<
"inclination :" << inclination <<
" radians";
137 std::cout <<
"sbDo :" << sbDo <<
" ";
138 std::cout <<
"mag :" << mag <<
" ";
139 std::cout <<
"mag_bulge :" << mag_bulge <<
" ";
141 std::cout <<
"BtoT :" << pow(10,(-mag_bulge + mag)/2.5) << std::endl;
160 ,PosType my_mag_bulge
162 ,PosType mag_zero_point
165 ,PosType my_bulge_index
171 ,
const PosType *theta
177 ,PosType my_mag_bulge
179 ,PosType mag_zero_point
186 ,
const PosType *theta
204 current.mag_map[band] = my_mag;
205 original.mag_map[band] = my_mag;
206 zeropoints[band] = zeropoint;
210 current.bulge_mag_map[band] = my_mag;
211 original.bulge_mag_map[band] = my_mag;
212 zeropoints[band] = zeropoint;
213 spheroid.setMag(my_mag,band,zeropoint);
217 PosType
getPA()
const {
return PA; }
218 void setPA(
double pa);
220 int getNarms()
const {
return Narms;}
221 PosType getArmAmplitude()
const {
return Ad;}
222 PosType getArmAlpha()
const {
return arm_alpha;}
223 PosType getSphIndex()
const {
return spheroid.getSersicIndex();}
224 PosType getSphAxisRatio()
const {
return spheroid.getAxesRatio();}
235 virtual void setTheta(PosType my_x,PosType my_y){
242 void setBulgeAxisRatio(PosType q){
243 spheroid.setAxesRatio(q);
245 void setBulgeSersicIndex(
double index){
246 spheroid.setSersicIndex(index);
252 PosType Ad,mctalpha,arm_alpha;
254 std::vector<PosType> modes;
256 PosType cosPA,sinPA,cosi,PA;
258 SourceOverzier::Params original;
Base class for all sources.
Definition source.h:44
Point_2d source_x
center of source
Definition source.h:173
Structure for holding parameters for one or more galaxy images according to the Overzier model.
Definition overzier_source.h:23
PosType getPA() const
position angle in radians
Definition overzier_source.h:81
virtual void setMag(PosType my_mag, Band band, PosType zero_point)
magnitude in specific band
Definition overzier_source.h:63
PosType getMinSize(PosType f)
Definition overzier_source.h:93
void setInternals(PosType mag, PosType mag_bulge, Band band, PosType Reff, PosType Rdisk, PosType PA, PosType inclination, unsigned long my_id, PosType my_z, const PosType *my_theta)
Sets internal variables. If default constructor is used this must be called before the surface bright...
Definition overzier.cpp:69
SourceOverzier(PosType mag, PosType mag_bulge, Band band, double zero_point, PosType Reff, PosType Rdisk, PosType PA, PosType inclination, unsigned long my_id, PosType my_z, const PosType *theta)
Definition overzier.cpp:14
PosType getInclination() const
inclination in radians
Definition overzier_source.h:83
PosType getReff() const
bulge half light radius in arcseconds
Definition overzier_source.h:74
virtual void setMagBulge(PosType my_mag, Band band, PosType zero_point)
magnitude in specific band
Definition overzier_source.h:68
virtual void changeBand(Band band)
change the working band
Definition overzier.cpp:160
PosType getMag() const
get magnitude of whole galaxy. Which band this is in depends on which was passed in the constructor
Definition overzier_source.h:38
PosType getRdisk() const
disk scale height in arcseconds
Definition overzier_source.h:76
PosType getBtoT() const
the bulge to total flux ratio
Definition overzier_source.h:79
virtual PosType SurfaceBrightness(const PosType *x) const
Surface brightness in erg/cm^2/sec/rad^2/Hz.
Definition overzier.cpp:113
Adds some extra features to the SourceOverzier source like spiral arms, and randomizations.
Definition overzier_source.h:155
void randomize(Utilities::RandomNumbers_NR &ran)
Randomly change some of the internal paramters and angles of the source.
Definition overzier.cpp:414
void setMagBulge(PosType my_mag, Band band, double zeropoint)
magnitude in specific band
Definition overzier_source.h:209
virtual void setTheta(PosType *xx)
Reset the position of the source in radians.
Definition overzier_source.h:231
PosType getPA() const
position angle in radians
Definition overzier_source.h:217
SourceOverzierPlus(PosType my_mag, PosType my_mag_bulge, Band band, PosType mag_zero_point, PosType my_Reff, PosType my_bulge_q, PosType my_bulge_index, PosType my_Rdisk, PosType my_PA, PosType inclination, unsigned long my_id, PosType my_z, const PosType *theta, Utilities::RandomNumbers_NR &ran)
Definition overzier.cpp:234
void changeBand(Band band)
change the working band
Definition overzier.cpp:401
void setMag(PosType my_mag, Band band, double zeropoint)
magnitude in specific band
Definition overzier_source.h:203
PosType SurfaceBrightness(const PosType *y) const
Surface brightness in erg/cm^2/sec/rad^2/Hz.
Definition overzier.cpp:337
Class for sources described by a Sersic profile.
Definition sersic_source.h:21
This is a class for generating random numbers. It simplifies and fool proofs initialization and allow...
Definition utilities_slsim.h:1059
Class for representing points or vectors in 2 dimensions. Not that the dereferencing operator is over...
Definition point.h:48