GLAMERDOC++
Gravitational Lensing Code Library
Loading...
Searching...
No Matches
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
16double mag_to_jansky_AB(double);
17double jansky_to_mag_AB(double flux);
18
20double mag_to_flux_AB(double);
22double flux_to_mag_AB(double flux);
23
24template <typename T>
25T flux_to_mag(T flux,T zeropoint){
26 if(flux <=0) return 100;
27 return -2.5 * log10(flux) + zeropoint;
28}
29
30template <typename T>
31T mag_to_flux(T m,T zeropoint){
32 if(m == 100) return 0;
33 return pow(10,-0.4*(m - zeropoint));
34}
35
36//double mag_to_flux(double m,double zeropoint);
37//double flux_to_mag(double flux,double zeropoint);
38
39
43class Source
44{
45
46public:
48 Source(PosType r
49 ,Point_2d x
50 ,PosType z
51 ,PosType SBlimit // surface brightness limit in mags per arcsecond
52 ,PosType zero_point // the magnitude zero point
53 ):source_r(r),source_x(x),zsource(z),sb_limit(SBlimit),mag_zero_point(zero_point)
54 {
55 //setSBlimit_magarcsec(SBlimit);
56 id=-1;
57 };
58
59 virtual ~Source();
60
61 Source(const Source &s):
65 sb_limit(s.sb_limit),
66 id(s.id),
67 mag_zero_point(s.mag_zero_point){ }
68
69 Source & operator=(const Source &s){
70 if(this == &s) return *this;
73 zsource = s.zsource;
74 sb_limit = s.sb_limit;
75 id = s.id;
76 mag_zero_point = s.mag_zero_point;
77
78 return *this;
79 }
80
81 // in lens.cpp
86 virtual PosType SurfaceBrightness(const PosType *y) const = 0;
87 virtual PosType getTotalFlux() const = 0;
88 virtual void printSource() = 0;
89
91 double SBlimit_magarcsec(double limit) {return mag_to_flux(limit,mag_zero_point)*pow(180*60*60/PI,2);}
92
94 PosType getSBlimit(){return sb_limit;}
96 PosType getSBlimit_magarcsec(){return SBlimit_magarcsec(sb_limit);}
97
98 // accessor functions that will sometimes be over ridden in class derivatives
100 PosType getZ() const {return zsource;}
101 void setZ(PosType my_z){zsource = my_z;}
103 inline PosType getRadius() const {return source_r;}
105 void setRadius(PosType my_radius){source_r = my_radius;}
107 inline Point_2d getTheta() const {return source_x;}
109 inline void getTheta(PosType *x) const {x[0] = source_x.x[0]; x[1] = source_x.x[0];}
111 inline void getTheta(Point_2d &x) const {x = source_x;}
112
114 void setTheta(PosType *xx){source_x[0] = xx[0]; source_x[1] = xx[1];}
115 void setTheta(PosType my_x,PosType my_y){source_x[0] = my_x; source_x[1] = my_y;}
116 void setTheta(const Point_2d &p){source_x = p;}
117
119 void setSBlimit(float limit) {sb_limit = limit;}
120
121 void setMagZeroPoint(float zeropoint){mag_zero_point=zeropoint;}
122 double getMagZeroPoint(){return mag_zero_point;}
123
124 PosType changeFilter(std::string filter_in, std::string filter_out, std::string sed);
125 PosType integrateFilter(std::vector<PosType> wavel_fil, std::vector<PosType> fil);
126 PosType integrateFilterSED(std::vector<PosType> wavel_fil, std::vector<PosType> fil, std::vector<PosType> wavel_sed, std::vector<PosType> sed);
127
128 static PosType *getx(Source &source){return source.source_x.x;}
129
131 double TEST_surface_brightness(double res,int N){
132
133 Point_2d x = source_x;
134 x[0] -= res*N/2.;
135 x[1] -= res*N/2.;
136 double total_flux = 0;
137
138 for(size_t i=0 ; i<N ; ++i){
139 for(size_t j=0 ; j<N ; ++j){
140 total_flux += SurfaceBrightness(x.x);
141 x[1] += res;
142 }
143 x[0] += res;
144 x[1] = source_x[1] - res*N/2.;
145 }
146 total_flux *= res*res;
147
148 std::cout << "------- check flux ----------" << std::endl;
149 std::cout << " total flux in pixels : " << total_flux << std::endl;
150 std::cout << " getTotalFlux() : " << getTotalFlux() << std::endl;
151 std::cout << " fractional difference : " << (total_flux - getTotalFlux()) / getTotalFlux() << std::endl;
152 std::cout << " magnitude from flux in pixels : " << flux_to_mag(total_flux) << std::endl;
153 std::cout << " mag from getTotalFlux() : " << flux_to_mag(getTotalFlux()) << std::endl;
154 std::cout << "-----------------------------" << std::endl;
155
156 if(abs( (total_flux - getTotalFlux()) / getTotalFlux() ) > 0.1 ){
157 //assert( abs( (total_flux - getTotalFlux()) / getTotalFlux() ) < 0.1 );
158 }
159
160 return total_flux;
161 }
162
163 long getID() const {return id;}
164 void setID(long i){id=i;}
165
166protected:
167 virtual void assignParams(InputParams& params){};
168
169 // source parameters
171 PosType source_r;
174
176 PosType zsource;
177 PosType sb_limit;
178
179 double flux_to_mag(double flux) const {
180 if(flux <=0) return 100;
181 return -2.5 * log10(flux) + mag_zero_point;
182 }
183
184// double mag_to_flux(double mag) const {
185// if(mag == 100) return 0;
186// return pow(10,-0.4*(mag - mag_zero_point));
187// }
188
189 long id;
190 double mag_zero_point;
191};
192
193class SourceColored : public Source{
194public:
195 SourceColored(PosType magnitude,PosType r,Point_2d x,PosType z
196 ,PosType SBlimit,Band band)
197 :Source(r,x,z,SBlimit,zeropoints.at(band))
198 {
199 if(zeropoints.find(band) == zeropoints.end()){
200 std::cerr << "SourceColored band " << to_string(band) << " zeropoint needs to be set." << std::endl;
201 throw std::runtime_error("unset zeropoint");
202 }
203 //zeropoints[Band::NoBand] = zero_point;
204 current_band = band;
205
206 mag_map[current_band]=magnitude;
207 mag = magnitude;
208 flux_total = mag_to_flux(mag,zeropoints.at(band));
209 setID(-1);
210 }
211
212 SourceColored(PosType magnitude,PosType r,Point_2d x,PosType z
213 ,PosType SBlimit,double zero_point,Band band)
214 :Source(r,x,z,SBlimit,zero_point)
215 {
216 zeropoints[band] = zero_point;
217 current_band = band;
218
219 mag_map[current_band]=magnitude;
220 mag = magnitude;
221 flux_total = mag_to_flux(mag,zero_point);
222 setID(-1);
223 }
224
225 SourceColored(const SourceColored &s):Source(s){
226 mag = s.mag;
227 mag_map = s.mag_map;
228 current_band = s.current_band;
229 sed_type = s.sed_type;
230 flux_total = s.flux_total;
231 }
232
233 SourceColored & operator= (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
247 SourceColored & copy_color(const SourceColored &s){
248 if(this == &s) return *this;
249
250 Source::operator=(s);
251 mag = s.mag;
252 mag_map = s.mag_map;
253 current_band = s.current_band;
254 sed_type = s.sed_type;
255 flux_total = s.flux_total;
256
257 return *this;
258 }
259
260 virtual ~SourceColored(){};
261
262 PosType getMag() const { assert(current_band != Band::NoBand); return mag;}
263 PosType getMag(Band band) const {return (mag_map.size() > 0) ? mag_map.at(band) : mag;}
264 Band getBand() const{return current_band;}
265 float getSEDtype() const {return sed_type;}
266 double getMagZeroPoint(Band band) const {return zeropoints.at(band);}
267
268 void setSEDtype(float sed) {sed_type = sed;}
269 static void setMagZeroPoint(Band band,double zeropoint){zeropoints[band]=zeropoint;}
270 static void setMagZeroPoints(std::map<Band,PosType> &zero_points){
271 for(auto &p : zero_points){
272 zeropoints[p.first] = p.second;
273 }
274 }
275
276 void setActiveBand(Band band);
277
278 inline PosType getTotalFlux() const {return flux_total;}
279 void setMag(float magnitude,Band band,double zeropoint){
280 mag_map[band]=magnitude;
281 zeropoints[band]=zeropoint;
282 if(band==current_band) flux_total = mag_to_flux(mag,zeropoint);
283 }
284
286 void setMag(float magnitude,Band band){
287 mag_map[band]=magnitude;
288 if(band==current_band) flux_total = mag_to_flux(mag,zeropoints.at(band));
289 }
290
291 // rotate on the sky
292 virtual void rotate(PosType theta) = 0;
293
295 void shiftmag(float delta_mag){
296 mag += delta_mag;
297 flux_total = mag_to_flux(mag,zeropoints[current_band]);
298 for(auto &b : mag_map){
299 b.second += delta_mag;
300 }
301 }
302
303
304protected:
305 static std::map<Band,PosType> zeropoints;
306
307 Band current_band;
308 float sed_type;
309 double mag;
310 double flux_total;
311private:
312 std::map<Band,PosType> mag_map;
313};
314
315
316
322class SourcePixelled: public Source{
323public:
324 SourcePixelled(PosType my_z, PosType* center, int Npixels, PosType resolution, PosType* arr_val,PosType zero_point);
325 template <typename T>
326 SourcePixelled(const PixelMap<T>& gal_map, PosType z, PosType factor, PosType zero_point);
327 //SourcePixelled(InputParams& params);
328
330 PosType SurfaceBrightness(const PosType *y) const;
331 void printSource();
332 inline PosType getTotalFlux() const {return flux;}
333 inline PosType getRadius() const {return source_r;}
334 inline PosType* getEll(){return ell;};
335 inline PosType getQuad(int i, int j){return quad[i][j];};
336 inline PosType getSize(){return size;};
337 inline PosType* getCentroid(){return centroid;};
338 inline PosType getMag(){return flux_to_mag(flux);};
339private:
340 void assignParams(InputParams& params);
341 void calcEll();
342 void calcSize();
343 void calcCentroid();
344 void calcTotalFlux();
345 PosType resolution;
346 PosType range;
347 long Npixels;
348 PosType flux;
349 PosType quad[2][2];
350 PosType ell[2];
351 PosType size;
352 PosType centroid[2];
353 std::valarray<PosType> values;
354};
355
357
365class SourceShapelets: public SourceColored{
366public:
367
369 //SourceShapelets();
370 SourceShapelets(PosType my_z, PosType my_mag, PosType my_scale, std::valarray<PosType> my_coeff, PosType* my_center, PosType my_ang,PosType zero_point,Band band);
371 SourceShapelets(PosType my_z, PosType my_mag, std::string shap_file, PosType *my_center, PosType my_ang, PosType zero_point,Band band);
372 SourceShapelets(std::string shap_file, PosType my_ang, PosType zero_point,Band band);
373
374 ~SourceShapelets(){--count;}
375
376 SourceShapelets(const SourceShapelets &s):SourceColored(s){
377 coeff = s.coeff;
378 n1 = s.n1;
379 n2 = s.n2;
380 //ang = s.ang;
381 cos_sin[0] = s.cos_sin[0];
382 cos_sin[1] = s.cos_sin[1];
383 coeff_flux = s.coeff_flux;
384 ++count;
385 }
386
387 SourceShapelets & operator= (const SourceShapelets &s){
388 if(this == &s) return *this;
389
390 SourceColored::operator=(s);
391 coeff = s.coeff;
392 n1 = s.n1;
393 n2 = s.n2;
394 //ang = s.ang;
395 cos_sin[0] = s.cos_sin[0];
396 cos_sin[1] = s.cos_sin[1];
397 coeff_flux = s.coeff_flux;
398
399 return *this;
400 }
401
403 void rotate(PosType ang
404 ){
405 cos_sin[0] = cos(ang);
406 cos_sin[1] = sin(ang);
407 }
408
409 PosType SurfaceBrightness(const PosType *y) const;
410 void printSource();
412 inline PosType getRadius() const {return source_r*10.;}
413
414 void pepper(int n,double s,Utilities::RandomNumbers_NR &ran){
415
416 double f = SurfaceBrightness(source_x.x);
417
418 double t=0.9,t2=0.3;
419
420 for(int i=0 ; i < n ; ++i){
421 double r = source_r*sqrt(ran());
422 double theta = 2*PI*ran();
423 double ff = f*( t - t2 * ran() );
424
425 Point_2d x( r*cos(theta) , r*sin(theta) );
426
427 grains.emplace_back(ff,s,x);
428 }
429 }
430
431 double sub_structure_sb(double *x){
432
433 double sum = 0;
434 for(auto &g : grains){
435 sum += g(x);
436 }
437
438 return sum;
439 }
440
441 class PepperCorn{
442 public:
443 PepperCorn(double f,double sig,Point_2d &x):
444 x(x),sigma(sig),fo(f){};
445
446 double operator()(double *y){
447 return fo * exp(-( (x[0]-y[0])*(x[0]-y[0]) - (x[1]-y[1])*(x[1]-y[1]) ) /sigma/sigma);
448 }
449
450 private:
451 Point_2d x;
452 double sigma;
453 double fo;
454 };
455
456private:
457
458
459 void assignParams(InputParams& params);
460 void Hermite(std::vector<PosType> &hg,int N, PosType x) const;
461
462 void NormalizeFlux();
463 std::valarray<PosType> coeff;
464 int n1,n2;
465
466 //PosType ang;
467 PosType cos_sin[2]; // [0] is cos(ang), [1] is sin(ang)
468 PosType coeff_flux;
469
470 std::vector<SourceShapelets::PepperCorn> grains;
471
472 static size_t count;
473};
474
476class SourceUniform : public Source{
477public:
478
479 SourceUniform(Point_2d position
480 ,PosType z
481 ,PosType radius_in_radians
482 );
484
485 PosType SurfaceBrightness(const PosType *y) const;
486 void assignParams(InputParams& params);
487 void printSource();
488 PosType getTotalFlux() const {return PI*source_r*source_r;}
489};
490
491
493class SourcePoint : public SourceColored{
494public:
496 Point_2d position
497 ,PosType z
498 ,PosType magnitude
499 ,PosType radius_in_radians
500 ,double SBlimit
501 ,Band band
502):SourceColored(magnitude,radius_in_radians,position,z,SBlimit,band)
503{
504 sed_type = 1;
505 };
506
507 ~SourcePoint(){};
508
509 virtual PosType SurfaceBrightness(const PosType *y)const {return 0.0;};
510 void printSource(){};
511 void assignParams(InputParams& params){}; // do nothing
512 void rotate(PosType t){}; // do nothing
513};
514
515/*** \brief A source with a Gaussian surface brightness profile
516
517 This is normalized so that it is equal to 1 at the center
518 */
519class SourceGaussian : public Source{
520public:
521 //SourceGaussian(InputParams& params);
522 SourceGaussian(
523 Point_2d position
524 ,double r_size
525 ,double z
526 ,double SBlimit
527 ,double zero_point
528 ):
529 Source(0,position,z,SBlimit,zero_point),source_gauss_r2(r_size*r_size)
530 {
531 zsource = z;
532 source_r = 5*sqrt(source_gauss_r2);
533 //setSBlimit_magarcsec(100.);
534 }
535
536 ~SourceGaussian();
537
539 PosType source_gauss_r2;
540
541 PosType SurfaceBrightness(const PosType *y) const;
542 void assignParams(InputParams& params);
543 void printSource();
544 PosType getTotalFlux() const {return 2*PI*source_gauss_r2;/*std::cout << "No total flux in SourceGaussian yet" << std::endl; exit(1);*/}
545};
546
548class SourceBLR : public Source{
549public:
550 //SourceBLR(InputParams& params);
551 ~SourceBLR();
552
553 void printSource();
554 PosType getTotalFlux() const {std::cout << "No total flux in SourceBLR yet" << std::endl; exit(1);}
555
556 virtual inline PosType getRadius() const {return source_r_out;}
557
559 PosType source_tau;
561 PosType source_nu;
562 float source_nuo;
569 float source_opening_angle;
570 float source_gamma;
571 float source_BHmass;
576
577 inline PosType getDlDs() const{return DlDs;}
578
579private:
580 PosType DlDs;
581
582 void assignParams(InputParams& params);
583};
584
587public:
588 PosType SurfaceBrightness(const PosType *y) const;
589 PosType getTotalFlux() const {std::cout << "No total flux in SourceBLRDisk yet" << std::endl; exit(1);}
590
591 //SourceBLRDisk(InputParams&);
593};
594
597public:
598 PosType SurfaceBrightness(const PosType *y) const;
599 PosType getTotalFlux() const {std::cout << "No total flux in SourceBLRSph1 yet" << std::endl; exit(1);}
600
601 //SourceBLRSph1(InputParams&);
603};
604
607public:
608 PosType SurfaceBrightness(const PosType *y) const;
609 PosType getTotalFlux() const {std::cout << "No total flux in SourceBLRSph2 yet" << std::endl; exit(1);}
610
611 //SourceBLRSph2(InputParams&);
613};
614
616//PosType (Source::*SurfaceBrightness)(PosType *y);
617
618
626 public:
627 //QuasarLF(PosType red, PosType mag_limit, InputParams &params);
628 ~QuasarLF();
629 // returns the integral of the luminosity function at redshift red
630 PosType getNorm() {return pow(10,log_phi)*norm;}; // in Mpc^(-3)
633 PosType getColor(Band band);
634 PosType getFluxRatio(Band band);
635
636 private:
637 PosType kcorr;
638 //PosType red;
639 //PosType mag_limit;
640 //PosType mstar;
641 PosType log_phi;
642 //PosType alpha;
643 //PosType beta;
644 PosType norm;
645 int arr_nbin;
646 PosType* mag_arr;
647 PosType* lf_arr;
648 PosType dl;
649 PosType colors[4];
650 PosType ave_colors[4];
651 PosType color_dev[4];
652
653 std::string kcorr_file, colors_file;
654
655 void assignParams(InputParams& params);
656
657 //typedef PosType (QuasarLF::*pt2MemFunc)(PosType) const;
658 //PosType nintegrateQLF(pt2MemFunc func, PosType a,PosType b,PosType tols) const;
659 //PosType trapzQLFlocal(pt2MemFunc func, PosType a, PosType b, int n, PosType *s2) const;
660 //PosType lf_kernel (PosType mag) const;
661
662 struct LF_kernel
663 {
664 LF_kernel(PosType alpha,PosType beta,PosType mstar)
665 : alpha(alpha),beta(beta),mstar(mstar){};
666
667 PosType alpha;
668 PosType beta;
669 PosType mstar;
670
671 double operator () (double mag) {
672 return 1.0/( pow(10,0.4*(alpha+1)*(mag-mstar)) + pow(10,0.4*(beta+1)*(mag-mstar)) );
673 }
674 };
675
676};
677
680{
681 SourceFunctor(Source& source) : source(source) {}
682
683 double operator()(double x, double y)
684 {
685 // TODO: make const double[2] as soon as possible
686 double z[2] = {x, y};
687 return source.SurfaceBrightness(z);
688 }
689
690 Source& source;
691};
692
693
699template <typename T>
701 const PixelMap<T>& gal_map
702 , PosType my_z
703 , PosType factor
704 , PosType zero_point
705)
706:Source(0,Point_2d(0,0),0,-1,zero_point){
707 if(gal_map.getNx() != gal_map.getNy()){
708 std::cout << "SourcePixelled::SourcePixelled() Doesn't work on nonsquare maps" << std::endl;
709 throw std::runtime_error("nonsquare");
710 }
711
712 zsource = my_z;
713 resolution = gal_map.getResolution();
714 Npixels = gal_map.getNx();
715 range = resolution*(Npixels-1);
716 source_x[0] = gal_map.getCenter()[0];
717 source_x[1] = gal_map.getCenter()[1];
718 source_r = range/sqrt(2.);
719 values.resize(Npixels*Npixels);
720
721 double convertion = 1.0/resolution/resolution*factor;
722 for (int i = 0; i < Npixels*Npixels; i++)
723 values[i] = gal_map(i)*convertion;
724
725 calcTotalFlux();
726 calcCentroid();
727 calcEll();
728 calcSize();
729}
730
731
732
733#endif /* SOURCE_H_ */
Band
Photometric bands.
Definition InputParams.h:79
Structure for reading and writing parameters to and from a parameter file as well as a container for ...
Definition InputParams.h:99
Image structure that can be manipulated and exported to/from fits files.
Definition pixelmap.h:42
pointer to surface brightness function
Definition source.h:625
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
PosType getColor(Band band)
Returns mean color (band - i) for a quasar at the redshift equal to QuasarLF::red.
Definition quasarLF.cpp:183
PosType getRandomMag(Utilities::RandomNumbers_NR &rand)
returns random apparent magnitude according to the luminosity function in I band
Definition quasarLF.cpp:138
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
A source representing a BLR with a Keplarian disk.
Definition source.h:586
PosType SurfaceBrightness(const PosType *y) const
Definition source.cpp:215
Base class for all sources representing the Broad Line Region (BLR) of a AGN/QSO.
Definition source.h:548
PosType source_nu
frequency
Definition source.h:561
float source_inclination
inclination of BLR in radians, face on is
Definition source.h:568
float source_fK
fraction of Keplerian velocity in random motions
Definition source.h:573
PosType source_tau
lag time
Definition source.h:559
bool source_monocrome
set to true to integrate over frequency
Definition source.h:575
float source_r_out
outer radius of BLR
Definition source.h:566
float source_r_in
inner radius of BLR
Definition source.h:564
A source representing a BLR with a spherical symmetry and circular orbits.
Definition source.h:596
PosType SurfaceBrightness(const PosType *y) const
Definition source.cpp:220
A source representing a BLR with a spherical symmetry and random velocity dispersion.
Definition source.h:606
PosType SurfaceBrightness(const PosType *y) const
Definition source.cpp:223
Base class for all sources.
Definition source.h:44
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:425
PosType source_r
charactoristic source size
Definition source.h:171
void setTheta(PosType *xx)
Reset the position of the source in radians.
Definition source.h:114
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:342
PosType getRadius() const
Radius of source in radians.
Definition source.h:103
virtual PosType SurfaceBrightness(const PosType *y) const =0
void getTheta(Point_2d &x) const
position of source in radians
Definition source.h:111
Point_2d source_x
center of source
Definition source.h:173
PosType getZ() const
Redshift of source.
Definition source.h:100
void setRadius(PosType my_radius)
Reset the radius of the source in radians.
Definition source.h:105
PosType getSBlimit_magarcsec()
Gets sb_limit in mag/arcsec^2.
Definition source.h:96
void getTheta(PosType *x) const
position of source in radians
Definition source.h:109
PosType zsource
redshift of source
Definition source.h:176
double TEST_surface_brightness(double res, int N)
test if flux in pixels matches total flux
Definition source.h:131
void setSBlimit(float limit)
Sets sb_limit in erg/cm^2/sec/rad^2/Hz.
Definition source.h:119
double SBlimit_magarcsec(double limit)
convert mag/arcsec^2 to flux units
Definition source.h:91
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:437
Point_2d getTheta() const
position of source in radians
Definition source.h:107
Source(PosType r, Point_2d x, PosType z, PosType SBlimit, PosType zero_point)
shell constructor
Definition source.h:48
PosType getSBlimit()
Gets sb_limit in erg/cm^2/sec/rad^2/Hz.
Definition source.h:94
Class for reading in and handling an array of SourceShapelets, made on the model of SourceMultiAnaGal...
Definition sourceAnaGalaxy.h:184
Class for sources described by an array of pixels.
Definition source.h:322
SourcePixelled(PosType my_z, PosType *center, int Npixels, PosType resolution, PosType *arr_val, PosType zero_point)
Definition source.cpp:233
PosType SurfaceBrightness(const PosType *y) const
Definition source.cpp:318
A uniform surface brightness circular source.
Definition source.h:493
virtual PosType SurfaceBrightness(const PosType *y) const
Definition source.h:509
SourcePoint(Point_2d position, PosType z, PosType magnitude, PosType radius_in_radians, double SBlimit, Band band)
Definition source.h:495
Class for sources described by shapelets.
Definition source.h:365
PosType getRadius() const
maximum size
Definition source.h:412
PosType SurfaceBrightness(const PosType *y) const
Definition source.cpp:642
void rotate(PosType ang)
rotate source
Definition source.h:403
SourceShapelets(PosType my_z, PosType my_mag, PosType my_scale, std::valarray< PosType > my_coeff, PosType *my_center, PosType my_ang, PosType zero_point, Band band)
Definition source.cpp:497
A uniform surface brightness circular source.
Definition source.h:476
SourceUniform(Point_2d position, PosType z, PosType radius_in_radians)
Definition source.cpp:43
PosType SurfaceBrightness(const PosType *y) const
Definition source.cpp:207
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
Functor to turn sources into binary functions.
Definition source.h:680