source: Sophya/trunk/SigPredictor/fastlobes.h@ 798

Last change on this file since 798 was 798, checked in by ansari, 25 years ago

Creation du module SigPredictor (Simulation de signal Archeops/Planck)

de Dominique Yvon - Reza 30/3/2000

File size: 2.1 KB
Line 
1 // Dominique YVON, CEA/DAPNIA/SPP 02/2000
2
3#ifndef FastLOBE_SEEN
4#define FastLOBE_SEEN
5
6#include <math.h>
7#ifdef __MWERKS__
8 #include "mwerksmath.h"
9 #include "unixmac.h"
10#endif
11#include "meanlobe.h"
12
13
14class LobeGaussien:public MeanFreqLobe
15{
16 public:
17 LobeGaussien(double FWHM_degre, double freqMin, double freqMax)
18 :MeanFreqLobe(freqMin,freqMax){
19 sigma=minToRad(FWHM_degre/2.354*60.);
20 angleMax=3.*sigma;
21// angleMax=1.5*sigma; // BUGG XXXX pour debug
22 cosanglemax=cos(angleMax);
23 sprintf(Name,"Lobe Gaussien");
24 }
25 virtual ~LobeGaussien(){ };
26 virtual double weigthAmpl(const UnitVector& VInteg, const UnitVector& VP,
27 const UnitVector& VY) const {
28 double cosinus=VP*VInteg;
29 if(cosinus>cosanglemax)
30 { if(cosinus<1.)
31 { double ang= acos(cosinus);
32 //return tabFExp(-ang*ang/(2*sigma*sigma));
33 return exp(-ang*ang/(2*sigma*sigma));
34 }
35 else return 1.;
36 }
37 else return 0.;
38 }
39 virtual double lobeResol() const{
40 return sigma*2.354/3.; // On veut pixeliser/calculer ˆ au moins FWHM/3.
41 }
42 virtual double ResolutionCurve(double angleShift) const{
43 return 1.;
44 //return (double) (1.+(angleShift/sigma/7.));
45 }
46 protected:
47 double sigma;
48};
49
50class LobeConique:public MeanFreqLobe {
51 // Usefull to degrade map resolutions without loosing points objects
52 public:
53 LobeConique(double halfAngle_degre, double freqMin, double freqMax)
54 :MeanFreqLobe(freqMin,freqMax){
55 halfAng=minToRad(halfAngle_degre*60.);
56 // cosHalfAng=cos(halfAng);
57 angleMax=halfAng;
58 cosanglemax=cos(halfAng);
59 sprintf(Name,"Lobe Conique");
60 }
61 virtual ~LobeConique() { }
62
63 virtual double weigthAmpl(const UnitVector& VInteg, const UnitVector& VP,
64 const UnitVector& VY) const {
65 double cosinus=VP*VInteg;
66 if(cosinus>cosanglemax) return 1.;
67 else return 0.;
68 }
69 virtual double lobeResol() const{
70 return halfAng/1.5;
71 }
72
73 virtual double ResolutionCurve(double angle) const {
74 return 1.;
75 }
76 protected:
77 double halfAng; // demi angle d ouverture du cone
78};
79
80
81#endif
Note: See TracBrowser for help on using the repository browser.