[801] | 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 "unixmac.h"
|
---|
| 9 | #endif
|
---|
| 10 | #include "meanlobe.h"
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | class LobeGaussien:public MeanFreqLobe
|
---|
| 14 | {
|
---|
| 15 | public:
|
---|
| 16 | LobeGaussien(double FWHM_degre, double freqMin, double freqMax)
|
---|
| 17 | :MeanFreqLobe(freqMin,freqMax){
|
---|
| 18 | sigma=minToRad(FWHM_degre/2.354*60.);
|
---|
| 19 | angleMax=3.*sigma;
|
---|
| 20 | // angleMax=1.5*sigma; // BUGG XXXX pour debug
|
---|
| 21 | cosanglemax=cos(angleMax);
|
---|
| 22 | sprintf(Name,"Lobe Gaussien");
|
---|
| 23 | }
|
---|
[1148] | 24 | virtual ~LobeGaussien(){ };
|
---|
| 25 | virtual double weigthAmpl(const UnitVector& VInteg, const UnitVector& VP,
|
---|
| 26 | const UnitVector& VY) const
|
---|
| 27 | { double cosinus=VP*VInteg;
|
---|
| 28 | if(cosinus>cosanglemax)
|
---|
| 29 | { if(cosinus<1.)
|
---|
| 30 | { double ang= acos(cosinus);
|
---|
[801] | 31 | //return tabFExp(-ang*ang/(2*sigma*sigma));
|
---|
[1148] | 32 | return exp(-ang*ang/(2*sigma*sigma));
|
---|
| 33 | }
|
---|
| 34 | else return 1.;
|
---|
| 35 | }
|
---|
[801] | 36 | else return 0.;
|
---|
| 37 | }
|
---|
[1148] | 38 |
|
---|
[801] | 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 |
|
---|
| 50 | class 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
|
---|