GLAMERDOC++
Gravitational Lensing Code Library
source.h
1 /*
2  * source.h
3  *
4  */
5 
6 #ifndef SOURCE_H_
7 #define SOURCE_H_
8 
9 #include <vector>
10 //#include "standard.h"
11 #include "utilities_slsim.h"
12 #include "InputParams.h"
13 //#include "image_processing.h"
14 #include "point.h"
15 
16 class PixelMap;
17 double mag_to_jansky_AB(double);
18 double jansky_to_mag_AB(double flux);
19 
21 double mag_to_flux_AB(double);
23 double flux_to_mag_AB(double flux);
24 
25 template <typename T>
26 T flux_to_mag(T flux,T zeropoint){
27  if(flux <=0) return 100;
28  return -2.5 * log10(flux) + zeropoint;
29 }
30 
31 template <typename T>
32 T mag_to_flux(T m,T zeropoint){
33  if(m == 100) return 0;
34  return pow(10,-0.4*(m - zeropoint));
35 }
36 
37 //double mag_to_flux(double m,double zeropoint);
38 //double flux_to_mag(double flux,double zeropoint);
39 
40 
44 class Source
45 {
46 
47 public:
49  Source(PosType r
50  ,Point_2d x
51  ,PosType z
52  ,PosType SBlimit // surface brightness limit in mags per arcsecond
53  ,PosType zero_point // the magnitude zero point
54  ):source_r(r),source_x(x),zsource(z),sb_limit(SBlimit),mag_zero_point(zero_point)
55  {
56  //setSBlimit_magarcsec(SBlimit);
57  id=-1;
58  };
59 
60  virtual ~Source();
61 
62  Source(const Source &s):
63  source_r(s.source_r),
64  source_x(s.source_x),
65  zsource(s.zsource),
66  sb_limit(s.sb_limit),
67  id(s.id),
68  mag_zero_point(s.mag_zero_point){ }
69 
70  Source & operator=(const Source &s){
71  if(this == &s) return *this;
72  source_r = s.source_r;
73  source_x = s.source_x;
74  zsource = s.zsource;
75  sb_limit = s.sb_limit;
76  id = s.id;
77  mag_zero_point = s.mag_zero_point;
78 
79  return *this;
80  }
81 
82  // in lens.cpp
87  virtual PosType SurfaceBrightness(const PosType *y) const = 0;
88  virtual PosType getTotalFlux() const = 0;
89  virtual void printSource() = 0;
90 
92  double SBlimit_magarcsec(double limit) {return mag_to_flux(limit,mag_zero_point)*pow(180*60*60/PI,2);}
93 
95  PosType getSBlimit(){return sb_limit;}
97  PosType getSBlimit_magarcsec(){return SBlimit_magarcsec(sb_limit);}
98 
99  // accessor functions that will sometimes be over ridden in class derivatives
101  PosType getZ() const {return zsource;}
102  void setZ(PosType my_z){zsource = my_z;}
104  inline PosType getRadius() const {return source_r;}
106  void setRadius(PosType my_radius){source_r = my_radius;}
108  inline Point_2d getTheta() const {return source_x;}
110  inline void getTheta(PosType *x) const {x[0] = source_x.x[0]; x[1] = source_x.x[0];}
112  inline void getTheta(Point_2d &x) const {x = source_x;}
113 
115  void setTheta(PosType *xx){source_x[0] = xx[0]; source_x[1] = xx[1];}
116  void setTheta(PosType my_x,PosType my_y){source_x[0] = my_x; source_x[1] = my_y;}
117  void setTheta(const Point_2d &p){source_x = p;}
118 
120  void setSBlimit(float limit) {sb_limit = limit;}
121 
122  void setMagZeroPoint(float zeropoint){mag_zero_point=zeropoint;}
123  double getMagZeroPoint(){return mag_zero_point;}
124 
125  PosType changeFilter(std::string filter_in, std::string filter_out, std::string sed);
126  PosType integrateFilter(std::vector<PosType> wavel_fil, std::vector<PosType> fil);
127  PosType integrateFilterSED(std::vector<PosType> wavel_fil, std::vector<PosType> fil, std::vector<PosType> wavel_sed, std::vector<PosType> sed);
128 
129  static PosType *getx(Source &source){return source.source_x.x;}
130 
132  double TEST_surface_brightness(double res,int N){
133 
134  Point_2d x = source_x;
135  x[0] -= res*N/2.;
136  x[1] -= res*N/2.;
137  double total_flux = 0;
138 
139  for(size_t i=0 ; i<N ; ++i){
140  for(size_t j=0 ; j<N ; ++j){
141  total_flux += SurfaceBrightness(x.x);
142  x[1] += res;
143  }
144  x[0] += res;
145  x[1] = source_x[1] - res*N/2.;
146  }
147  total_flux *= res*res;
148 
149  std::cout << "------- check flux ----------" << std::endl;
150  std::cout << " total flux in pixels : " << total_flux << std::endl;
151  std::cout << " getTotalFlux() : " << getTotalFlux() << std::endl;
152  std::cout << " fractional difference : " << (total_flux - getTotalFlux()) / getTotalFlux() << std::endl;
153  std::cout << " magnitude from flux in pixels : " << flux_to_mag(total_flux) << std::endl;
154  std::cout << " mag from getTotalFlux() : " << flux_to_mag(getTotalFlux()) << std::endl;
155  std::cout << "-----------------------------" << std::endl;
156 
157  if(abs( (total_flux - getTotalFlux()) / getTotalFlux() ) > 0.1 ){
158  //assert( abs( (total_flux - getTotalFlux()) / getTotalFlux() ) < 0.1 );
159  }
160 
161  return total_flux;
162  }
163 
164  long getID() const {return id;}
165  void setID(long i){id=i;}
166 
167 protected:
168  virtual void assignParams(InputParams& params){};
169 
170  // source parameters
172  PosType source_r;
175 
177  PosType zsource;
178  PosType sb_limit;
179 
180  double flux_to_mag(double flux) const {
181  if(flux <=0) return 100;
182  return -2.5 * log10(flux) + mag_zero_point;
183  }
184 
185 // double mag_to_flux(double mag) const {
186 // if(mag == 100) return 0;
187 // return pow(10,-0.4*(mag - mag_zero_point));
188 // }
189 
190  long id;
191  double mag_zero_point;
192 
193 };
194 
195 typedef Source *SourceHndl;
196 
197 class SourceColored : public Source{
198 public:
199  SourceColored(PosType magnitude,PosType r,Point_2d x,PosType z
200  ,PosType SBlimit,double zero_point)
201  :Source(r,x,z,SBlimit,zero_point)
202  {
203  zeropoints[Band::NoBand] = zero_point;
204  current_band = Band::NoBand;
205 
206  mag_map[current_band]=magnitude;
207  flux_total = mag_to_flux(mag,zero_point);
208  setID(-1);
209  }
210 
211  SourceColored(const SourceColored &s):Source(s){
212  mag = s.mag;
213  mag_map = s.mag_map;
214  current_band = s.current_band;
215  sed_type = s.sed_type;
216  flux_total = s.flux_total;
217  }
218 
219  SourceColored & operator= (const SourceColored &s){
220  if(this == &s) return *this;
221 
222  Source::operator=(s);
223  mag = s.mag;
224  mag_map = s.mag_map;
225  current_band = s.current_band;
226  sed_type = s.sed_type;
227  flux_total = s.flux_total;
228 
229  return *this;
230  }
231 
233  SourceColored & copy_color(const SourceColored &s){
234  if(this == &s) return *this;
235 
236  Source::operator=(s);
237  mag = s.mag;
238  mag_map = s.mag_map;
239  current_band = s.current_band;
240  sed_type = s.sed_type;
241  flux_total = s.flux_total;
242 
243  return *this;
244  }
245 
246  virtual ~SourceColored(){};
247 
248  PosType getMag() const { assert(current_band != Band::NoBand); return mag;}
249  PosType getMag(Band band) const {return (mag_map.size() > 0) ? mag_map.at(band) : mag;}
250  Band getBand() const{return current_band;}
251  float getSEDtype() const {return sed_type;}
252  double getMagZeroPoint(Band band) const {return zeropoints.at(band);}
253 
254  void setSEDtype(float sed) {sed_type = sed;}
255  static void setMagZeroPoint(Band band,double zeropoint){zeropoints[band]=zeropoint;}
256  static void setMagZeroPoints(std::map<Band,PosType> &zero_points){zeropoints=zero_points;}
257 
258  void setActiveBand(Band band);
259 
260  inline PosType getTotalFlux() const {return flux_total;}
261  void setMag(float magnitude,Band band,double zeropoint){
262  mag_map[band]=magnitude;
263  zeropoints[band]=zeropoint;
264  if(band==current_band) flux_total = mag_to_flux(mag,zeropoint);
265  }
266 
267  // rotate on the sky
268  virtual void rotate(PosType theta) = 0;
269 
271  void shiftmag(float delta_mag){
272  mag += delta_mag;
273  flux_total = mag_to_flux(mag,zeropoints[current_band]);
274  for(auto &b : mag_map){
275  b.second += delta_mag;
276  }
277  }
278 
279 
280 protected:
281  static std::map<Band,PosType> zeropoints;
282 
283  Band current_band;
284  float sed_type;
285  double mag;
286  double flux_total;
287 private:
288  std::map<Band,PosType> mag_map;
289 };
290 
291 
292 
298 class SourcePixelled: public Source{
299 public:
300  SourcePixelled(PosType my_z, PosType* center, int Npixels, PosType resolution, PosType* arr_val,PosType zero_point);
301  SourcePixelled(const PixelMap& gal_map, PosType z, PosType factor, PosType zero_point);
302  //SourcePixelled(InputParams& params);
303 
304  ~SourcePixelled();
305  PosType SurfaceBrightness(const PosType *y) const;
306  void printSource();
307  inline PosType getTotalFlux() const {return flux;}
308  inline PosType getRadius() const {return source_r;}
309  inline PosType* getEll(){return ell;};
310  inline PosType getQuad(int i, int j){return quad[i][j];};
311  inline PosType getSize(){return size;};
312  inline PosType* getCentroid(){return centroid;};
313  inline PosType getMag(){return flux_to_mag(flux);};
314 private:
315  void assignParams(InputParams& params);
316  void calcEll();
317  void calcSize();
318  void calcCentroid();
319  void calcTotalFlux();
320  PosType resolution;
321  PosType range;
322  long Npixels;
323  PosType flux;
324  PosType quad[2][2];
325  PosType ell[2];
326  PosType size;
327  PosType centroid[2];
328  std::valarray<PosType> values;
329 };
330 
332 
340 class SourceShapelets: public SourceColored{
341 public:
342 
343  friend SourceMultiShapelets;
344  //SourceShapelets();
345  SourceShapelets(PosType my_z, PosType my_mag, PosType my_scale, std::valarray<PosType> my_coeff, PosType* my_center, PosType my_ang,PosType zero_point);
346  SourceShapelets(PosType my_z, PosType my_mag, std::string shap_file, PosType *my_center, PosType my_ang, PosType zero_point);
347  SourceShapelets(std::string shap_file, PosType my_ang, PosType zero_point);
348 
349  ~SourceShapelets(){--count;}
350 
351  SourceShapelets(const SourceShapelets &s):SourceColored(s){
352  coeff = s.coeff;
353  n1 = s.n1;
354  n2 = s.n2;
355  //ang = s.ang;
356  cos_sin[0] = s.cos_sin[0];
357  cos_sin[1] = s.cos_sin[1];
358  coeff_flux = s.coeff_flux;
359  ++count;
360  }
361 
362  SourceShapelets & operator= (const SourceShapelets &s){
363  if(this == &s) return *this;
364 
365  SourceColored::operator=(s);
366  coeff = s.coeff;
367  n1 = s.n1;
368  n2 = s.n2;
369  //ang = s.ang;
370  cos_sin[0] = s.cos_sin[0];
371  cos_sin[1] = s.cos_sin[1];
372  coeff_flux = s.coeff_flux;
373 
374  return *this;
375  }
376 
378  void rotate(PosType ang
379  ){
380  cos_sin[0] = cos(ang);
381  cos_sin[1] = sin(ang);
382  }
383 
384  PosType SurfaceBrightness(const PosType *y) const;
385  void printSource();
387  inline PosType getRadius() const {return source_r*10.;}
388 
389  void pepper(int n,double s,Utilities::RandomNumbers_NR &ran){
390 
391  double f = SurfaceBrightness(source_x.x);
392 
393  double t=0.9,t2=0.3;
394 
395  for(int i=0 ; i < n ; ++i){
396  double r = source_r*sqrt(ran());
397  double theta = 2*PI*ran();
398  double ff = f*( t - t2 * ran() );
399 
400  Point_2d x( r*cos(theta) , r*sin(theta) );
401 
402  grains.emplace_back(ff,s,x);
403  }
404  }
405 
406  double sub_structure_sb(double *x){
407 
408  double sum = 0;
409  for(auto &g : grains){
410  sum += g(x);
411  }
412 
413  return sum;
414  }
415 
416  class PepperCorn{
417  public:
418  PepperCorn(double f,double sig,Point_2d &x):
419  x(x),sigma(sig),fo(f){};
420 
421  double operator()(double *y){
422  return fo * exp(-( (x[0]-y[0])*(x[0]-y[0]) - (x[1]-y[1])*(x[1]-y[1]) ) /sigma/sigma);
423  }
424 
425  private:
426  Point_2d x;
427  double sigma;
428  double fo;
429  };
430 
431 private:
432 
433 
434  void assignParams(InputParams& params);
435  void Hermite(std::vector<PosType> &hg,int N, PosType x) const;
436 
437  void NormalizeFlux();
438  std::valarray<PosType> coeff;
439  int n1,n2;
440 
441  //PosType ang;
442  PosType cos_sin[2]; // [0] is cos(ang), [1] is sin(ang)
443  PosType coeff_flux;
444 
445  std::vector<SourceShapelets::PepperCorn> grains;
446 
447  static size_t count;
448 };
449 
451 class SourceUniform : public Source{
452 public:
453 
454  SourceUniform(Point_2d position
455  ,PosType z
456  ,PosType radius_in_radians
457  );
458  ~SourceUniform();
459 
460  PosType SurfaceBrightness(const PosType *y) const;
461  void assignParams(InputParams& params);
462  void printSource();
463  PosType getTotalFlux() const {return PI*source_r*source_r;}
464 };
465 
466 
468 class SourcePoint : public SourceColored{
469 public:
471  Point_2d position
472  ,PosType z
473  ,PosType magnitude
474  ,PosType radius_in_radians
475  ,double SBlimit
476  ,PosType zero_point
477 ):SourceColored(magnitude,radius_in_radians,position,z,SBlimit,zero_point)
478 {
479  sed_type = 1;
480  };
481 
482  ~SourcePoint(){};
483 
484  virtual PosType SurfaceBrightness(const PosType *y)const {return 0.0;};
485  void printSource(){};
486  void assignParams(InputParams& params){}; // do nothing
487  void rotate(PosType t){}; // do nothing
488 };
489 
490 /*** \brief A source with a Gaussian surface brightness profile
491 
492  This is normalized so that it is equal to 1 at the center
493  */
494 class SourceGaussian : public Source{
495 public:
496  //SourceGaussian(InputParams& params);
497  SourceGaussian(
498  Point_2d position
499  ,double r_size
500  ,double z
501  ,double SBlimit
502  ,double zero_point
503  ):
504  Source(0,position,z,SBlimit,zero_point),source_gauss_r2(r_size*r_size)
505  {
506  zsource = z;
507  source_r = 5*sqrt(source_gauss_r2);
508  //setSBlimit_magarcsec(100.);
509  }
510 
511  ~SourceGaussian();
512 
514  PosType source_gauss_r2;
515 
516  PosType SurfaceBrightness(const PosType *y) const;
517  void assignParams(InputParams& params);
518  void printSource();
519  PosType getTotalFlux() const {return 2*PI*source_gauss_r2;/*std::cout << "No total flux in SourceGaussian yet" << std::endl; exit(1);*/}
520 };
521 
523 class SourceBLR : public Source{
524 public:
525  //SourceBLR(InputParams& params);
526  ~SourceBLR();
527 
528  void printSource();
529  PosType getTotalFlux() const {std::cout << "No total flux in SourceBLR yet" << std::endl; exit(1);}
530 
531  virtual inline PosType getRadius() const {return source_r_out;}
532 
534  PosType source_tau;
536  PosType source_nu;
537  float source_nuo;
539  float source_r_in;
544  float source_opening_angle;
545  float source_gamma;
546  float source_BHmass;
548  float source_fK;
551 
552  inline PosType getDlDs() const{return DlDs;}
553 
554 private:
555  PosType DlDs;
556 
557  void assignParams(InputParams& params);
558 };
559 
561 class SourceBLRDisk : public SourceBLR{
562 public:
563  PosType SurfaceBrightness(const PosType *y) const;
564  PosType getTotalFlux() const {std::cout << "No total flux in SourceBLRDisk yet" << std::endl; exit(1);}
565 
566  //SourceBLRDisk(InputParams&);
567  ~SourceBLRDisk();
568 };
569 
571 class SourceBLRSph1 : public SourceBLR{
572 public:
573  PosType SurfaceBrightness(const PosType *y) const;
574  PosType getTotalFlux() const {std::cout << "No total flux in SourceBLRSph1 yet" << std::endl; exit(1);}
575 
576  //SourceBLRSph1(InputParams&);
577  ~SourceBLRSph1();
578 };
579 
581 class SourceBLRSph2 : public SourceBLR{
582 public:
583  PosType SurfaceBrightness(const PosType *y) const;
584  PosType getTotalFlux() const {std::cout << "No total flux in SourceBLRSph2 yet" << std::endl; exit(1);}
585 
586  //SourceBLRSph2(InputParams&);
587  ~SourceBLRSph2();
588 };
589 
591 //PosType (Source::*SurfaceBrightness)(PosType *y);
592 
593 
600 class QuasarLF{
601  public:
602  //QuasarLF(PosType red, PosType mag_limit, InputParams &params);
603  ~QuasarLF();
604  // returns the integral of the luminosity function at redshift red
605  PosType getNorm() {return pow(10,log_phi)*norm;}; // in Mpc^(-3)
607  PosType getRandomFlux(Band band,Utilities::RandomNumbers_NR &rand);
608  PosType getColor(Band band);
609  PosType getFluxRatio(Band band);
610 
611  private:
612  PosType kcorr;
613  //PosType red;
614  //PosType mag_limit;
615  //PosType mstar;
616  PosType log_phi;
617  //PosType alpha;
618  //PosType beta;
619  PosType norm;
620  int arr_nbin;
621  PosType* mag_arr;
622  PosType* lf_arr;
623  PosType dl;
624  PosType colors[4];
625  PosType ave_colors[4];
626  PosType color_dev[4];
627 
628  std::string kcorr_file, colors_file;
629 
630  void assignParams(InputParams& params);
631 
632  //typedef PosType (QuasarLF::*pt2MemFunc)(PosType) const;
633  //PosType nintegrateQLF(pt2MemFunc func, PosType a,PosType b,PosType tols) const;
634  //PosType trapzQLFlocal(pt2MemFunc func, PosType a, PosType b, int n, PosType *s2) const;
635  //PosType lf_kernel (PosType mag) const;
636 
637  struct LF_kernel
638  {
639  LF_kernel(PosType alpha,PosType beta,PosType mstar)
640  : alpha(alpha),beta(beta),mstar(mstar){};
641 
642  PosType alpha;
643  PosType beta;
644  PosType mstar;
645 
646  double operator () (double mag) {
647  return 1.0/( pow(10,0.4*(alpha+1)*(mag-mstar)) + pow(10,0.4*(beta+1)*(mag-mstar)) );
648  }
649  };
650 
651 };
652 
655 {
656  SourceFunctor(Source& source) : source(source) {}
657 
658  double operator()(double x, double y)
659  {
660  // TODO: make const double[2] as soon as possible
661  double z[2] = {x, y};
662  return source.SurfaceBrightness(z);
663  }
664 
665  Source& source;
666 };
667 
668 
669 
670 
671 
672 #endif /* SOURCE_H_ */
SourceUniform::SourceUniform
SourceUniform(Point_2d position, PosType z, PosType radius_in_radians)
Definition: source.cpp:43
SourceBLRDisk
A source representing a BLR with a Keplarian disk.
Definition: source.h:561
SourceBLRSph1
A source representing a BLR with a spherical symmetry and circular orbits.
Definition: source.h:571
SourceBLR::source_fK
float source_fK
fraction of Keplerian velocity in random motions
Definition: source.h:548
Source::integrateFilter
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.
Definition: source.cpp:460
Source
Base class for all sources.
Definition: source.h:45
Source::setRadius
void setRadius(PosType my_radius)
Reset the radius of the source in radians.
Definition: source.h:106
SourceShapelets::getRadius
PosType getRadius() const
maximum size
Definition: source.h:387
Source::getZ
PosType getZ() const
Redshift of source.
Definition: source.h:101
Source::getTheta
void getTheta(Point_2d &x) const
position of source in radians
Definition: source.h:112
Source::getTheta
Point_2d getTheta() const
position of source in radians
Definition: source.h:108
Source::SurfaceBrightness
virtual PosType SurfaceBrightness(const PosType *y) const =0
QuasarLF::getRandomMag
PosType getRandomMag(Utilities::RandomNumbers_NR &rand)
returns random apparent magnitude according to the luminosity function in I band
Definition: quasarLF.cpp:138
SourcePixelled::SurfaceBrightness
PosType SurfaceBrightness(const PosType *y) const
Definition: source.cpp:353
QuasarLF::getColor
PosType getColor(Band band)
Returns mean color (band - i) for a quasar at the redshift equal to QuasarLF::red.
Definition: quasarLF.cpp:183
SourceShapelets::SurfaceBrightness
PosType SurfaceBrightness(const PosType *y) const
Definition: source.cpp:674
QuasarLF
pointer to surface brightness function
Definition: source.h:600
SourceBLRSph1::SurfaceBrightness
PosType SurfaceBrightness(const PosType *y) const
Definition: source.cpp:220
SourceShapelets::rotate
void rotate(PosType ang)
rotate source
Definition: source.h:378
Band
Band
Photometric bands.
Definition: InputParams.h:79
Point_2d
Class for representing points or vectors in 2 dimensions. Not that the dereferencing operator is over...
Definition: point.h:48
Source::changeFilter
PosType changeFilter(std::string filter_in, std::string filter_out, std::string sed)
Calculates the difference in magnitude when changing the observing filter.
Definition: source.cpp:377
SourceMultiShapelets
Class for reading in and handling an array of SourceShapelets, made on the model of SourceMultiAnaGal...
Definition: sourceAnaGalaxy.h:184
SourceBLR
Base class for all sources representing the Broad Line Region (BLR) of a AGN/QSO.
Definition: source.h:523
Utilities::RandomNumbers_NR
This is a class for generating random numbers. It simplifies and fool proofs initialization and allow...
Definition: utilities_slsim.h:1041
SourceBLR::source_r_in
float source_r_in
inner radius of BLR
Definition: source.h:539
SourcePoint::SourcePoint
SourcePoint(Point_2d position, PosType z, PosType magnitude, PosType radius_in_radians, double SBlimit, PosType zero_point)
Definition: source.h:470
SourceBLR::source_inclination
float source_inclination
inclination of BLR in radians, face on is
Definition: source.h:543
Source::source_x
Point_2d source_x
center of source
Definition: source.h:174
SourcePoint
A uniform surface brightness circular source.
Definition: source.h:468
Source::getRadius
PosType getRadius() const
Radius of source in radians.
Definition: source.h:104
Source::zsource
PosType zsource
redshift of source
Definition: source.h:177
Source::setSBlimit
void setSBlimit(float limit)
Sets sb_limit in erg/cm^2/sec/rad^2/Hz.
Definition: source.h:120
QuasarLF::getFluxRatio
PosType getFluxRatio(Band band)
Returns flux ratio (F_band/F_i) for a quasar at the redshift equal to QuasarLF::red.
Definition: quasarLF.cpp:200
QuasarLF::getRandomFlux
PosType getRandomFlux(Band band, Utilities::RandomNumbers_NR &rand)
returns random flux according to the luminosity function must be divided by an angular area in rad^2 ...
Definition: quasarLF.cpp:175
SourceUniform
A uniform surface brightness circular source.
Definition: source.h:451
SourceFunctor
Functor to turn sources into binary functions.
Definition: source.h:655
SourceBLRDisk::SurfaceBrightness
PosType SurfaceBrightness(const PosType *y) const
Definition: source.cpp:215
SourceBLR::source_nu
PosType source_nu
frequency
Definition: source.h:536
SourceUniform::SurfaceBrightness
PosType SurfaceBrightness(const PosType *y) const
Definition: source.cpp:207
Source::setTheta
void setTheta(PosType *xx)
Reset the position of the source in radians.
Definition: source.h:115
SourceBLR::source_monocrome
bool source_monocrome
set to true to integrate over frequency
Definition: source.h:550
Source::source_r
PosType source_r
charactoristic source size
Definition: source.h:168
SourceShapelets::SourceShapelets
SourceShapelets(PosType my_z, PosType my_mag, PosType my_scale, std::valarray< PosType > my_coeff, PosType *my_center, PosType my_ang, PosType zero_point)
Definition: source.cpp:532
SourceBLR::source_r_out
float source_r_out
outer radius of BLR
Definition: source.h:541
SourcePoint::SurfaceBrightness
virtual PosType SurfaceBrightness(const PosType *y) const
Definition: source.h:484
Source::getTheta
void getTheta(PosType *x) const
position of source in radians
Definition: source.h:110
Source::getSBlimit
PosType getSBlimit()
Gets sb_limit in erg/cm^2/sec/rad^2/Hz.
Definition: source.h:95
Source::Source
Source(PosType r, Point_2d x, PosType z, PosType SBlimit, PosType zero_point)
shell constructor
Definition: source.h:49
Source::getSBlimit_magarcsec
PosType getSBlimit_magarcsec()
Gets sb_limit in mag/arcsec^2.
Definition: source.h:97
SourceBLRSph2::SurfaceBrightness
PosType SurfaceBrightness(const PosType *y) const
Definition: source.cpp:223
InputParams.h
SourcePixelled::SourcePixelled
SourcePixelled(PosType my_z, PosType *center, int Npixels, PosType resolution, PosType *arr_val, PosType zero_point)
Definition: source.cpp:233
SourceShapelets
Class for sources described by shapelets.
Definition: source.h:340
SourceBLRSph2
A source representing a BLR with a spherical symmetry and random velocity dispersion.
Definition: source.h:581
Source::integrateFilterSED
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.
Definition: source.cpp:472
SourcePixelled
Class for sources described by an array of pixels.
Definition: source.h:298
PixelMap
Image structure that can be manipulated and exported to/from fits files.
Definition: image_processing.h:48
SourceBLR::source_tau
PosType source_tau
lag time
Definition: source.h:534
Source::SBlimit_magarcsec
double SBlimit_magarcsec(double limit)
convert mag/arcsec^2 to flux units
Definition: source.h:92
Source::TEST_surface_brightness
double TEST_surface_brightness(double res, int N)
test if flux in pixels matches total flux
Definition: source.h:132
InputParams
Structure for reading and writing parameters to and from a parameter file as well as a container for ...
Definition: InputParams.h:99