[3788] | 1 | /* ------------------------ Projet BAORadio --------------------
|
---|
| 2 | Estimation et soustraction d'avant plan radio
|
---|
| 3 | R. Ansari , C. Magneville - Juin 2010
|
---|
| 4 | --------------------------------------------------------------- */
|
---|
| 5 |
|
---|
| 6 | #ifndef FGNDSUB_SEEN
|
---|
| 7 | #define FGNDSUB_SEEN
|
---|
| 8 |
|
---|
| 9 | #include "machdefs.h" // SOPHYA .h
|
---|
| 10 | #include "sopnamsp.h" // SOPHYA .h
|
---|
| 11 | #include <math.h>
|
---|
| 12 | #include <iostream>
|
---|
| 13 | #include <vector>
|
---|
| 14 | #include <string>
|
---|
| 15 |
|
---|
| 16 | #include "tarray.h"
|
---|
| 17 | #include "vector3d.h"
|
---|
| 18 | #include "lobe.h"
|
---|
| 19 | #include "mdish.h"
|
---|
| 20 |
|
---|
| 21 | #ifndef TF
|
---|
| 22 | #define TF r_4
|
---|
| 23 | #endif
|
---|
| 24 |
|
---|
[4022] | 25 | //------------------------------------------------------------------------------------
|
---|
| 26 | // Cacarterisation du comportement en loi de puissance des cubes de temperature
|
---|
| 27 | class PowerLawChecker {
|
---|
| 28 | public:
|
---|
| 29 | PowerLawChecker(TArray< TF >& skycube);
|
---|
| 30 | void CheckXYMean();
|
---|
| 31 |
|
---|
| 32 | TArray< TF > skycube_;
|
---|
| 33 | };
|
---|
| 34 |
|
---|
| 35 | //------------------------------------------------------------------------------------
|
---|
| 36 | // Classe implementant la soustraction des avant-plans sous forme de loi de puissance
|
---|
[3788] | 37 | class ForegroundCleaner {
|
---|
| 38 | public:
|
---|
[3986] | 39 | ForegroundCleaner(Four2DResponse& arrep, Four2DResponse& tbeam, TArray< TF >& skycube, double maxratio=10.);
|
---|
[3788] | 40 | void BeamCorrections();
|
---|
[4022] | 41 | int FixMeanXYTemp(double T0, double alpha);
|
---|
[3789] | 42 | int CleanNegatives(TF seuil=1.e-6);
|
---|
[3788] | 43 | int CleanPointSources(double nsigmas=5.);
|
---|
[3830] | 44 | // Ajustement d'une droite (a x + b) sur ln(Temp) = f(ln(Freq))
|
---|
| 45 | TArray< TF > extractLSSCubeP1(TArray< TF >& synctemp, TArray< TF >& specidx);
|
---|
| 46 | // Ajustement d'une parabole (a x^2 + b x + c) sur ln(Temp) = f(ln(Freq))
|
---|
| 47 | TArray< TF > extractLSSCubeP2(TArray< TF >& synctemp, TArray< TF >& specidx);
|
---|
[3788] | 48 |
|
---|
| 49 | Four2DResponse& arrep_; // Array/Instrument beam response
|
---|
| 50 | Four2DResponse& tbeam_; // Target beam to which would be corrected using BeamCorrections()
|
---|
| 51 | TArray< TF > skycube_;
|
---|
[3986] | 52 | double maxratio_;
|
---|
[3788] | 53 | double dx_, dy_; // taille des pixels (radians) de skycube
|
---|
[4022] | 54 | double freq0_, dfreq_; // 1ere frequence et bin en frequence de skycube_;
|
---|
[3788] | 55 | };
|
---|
| 56 |
|
---|
[4022] | 57 |
|
---|
[3788] | 58 | #endif
|
---|