Changeset 7205 for trunk/MagicSoft/Mars/mpointing
- Timestamp:
- 07/21/05 17:45:25 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mpointing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
r7203 r7205 27 27 // MPointingDevCalc 28 28 // 29 // Calculates the pointing deviation from the starguider information. 30 // 31 // There are some quality parameters to steer which are the valid 32 // starguider data points: 33 // * MPointingDevCalc.NumMinStars: 8 34 // Minimum number of identified stars required to accep the data 35 // * MPointingDevCalc.NsbLevel: 3.0 36 // Minimum deviation (in rms) from the the mean allowed for the measured 37 // NSB (noise in the ccd camera) 38 // * MPointingDevCalc.NsbMin: 30 39 // - minimum NSB to be used in mean/rms calculation 40 // * MPointingDevCalc.NsbMax: 60 41 // - maximum NSB to be used in mean/rms calculation 42 // * MPointingDevCalc.MaxAbsDev: 15 43 // - Maximum absolute deviation which is consideres as valid (arcmin) 44 // 45 // Starguider data which doens't fullfill this requirements is ignored. 46 // If the measures NSB==0 (file too old, starguider didn't write down 47 // these values) the checks based on NSB and NumMinStar are skipped. 48 // 49 // The calculation of NSB mean and rms is reset for each file (ReInit) 50 // 51 // 29 52 // Input Container: 30 53 // MReportStarguider … … 129 152 if (nsb>0) 130 153 { 131 if (nsb> 30 && nsb<60)154 if (nsb>fNsbMin && nsb<fNsbMax) 132 155 { 133 156 fNsbSum += nsb; … … 141 164 const Double_t sq = fNsbSq /fNsbCount; 142 165 143 const Double_t rms = TMath::Sqrt(sq - sum*sum);144 145 if (nsb<sum- 3*rms || nsb>sum+3*rms)166 const Double_t rms = fNsbLevel*TMath::Sqrt(sq - sum*sum); 167 168 if (nsb<sum-rms || nsb>sum+rms) 146 169 { 147 170 fSkip[2]++; … … 150 173 } 151 174 152 if (fReport->GetNumIdentifiedStars()< 8)175 if (fReport->GetNumIdentifiedStars()<fNumMinStars) 153 176 { 154 177 fSkip[3]++; … … 166 189 167 190 // Sanity check... larger deviation are strange and ignored 168 if (dev >0.25)191 if (dev*60>fMaxAbsDev) 169 192 { 170 193 fSkip[4]++; … … 213 236 *fLog << GetDescriptor() << " execution statistics:" << endl; 214 237 PrintSkipped(fSkip[1], "Starguider deviation not set, is exactly 0/0"); 215 PrintSkipped(fSkip[2], "NSB out of 3 sigma range");216 PrintSkipped(fSkip[3], "Number of identified stars < 8");217 PrintSkipped(fSkip[4], "Absolute deviation > 0.25deg");238 PrintSkipped(fSkip[2], Form("NSB out of %.1f sigma range", fNsbLevel)); 239 PrintSkipped(fSkip[3], Form("Number of identified stars < %d", fNumMinStars)); 240 PrintSkipped(fSkip[4], Form("Absolute deviation > %.1farcmin", fMaxAbsDev)); 218 241 *fLog << " " << (int)fSkip[0] << " (" << Form("%5.1f", 100.*fSkip[0]/GetNumExecutions()) << "%) Evts survived calculation!" << endl; 219 242 *fLog << endl; … … 221 244 return kTRUE; 222 245 } 246 247 // -------------------------------------------------------------------------- 248 // 249 // MPointingDevCalc.NumMinStars: 8 250 // MPointingDevCalc.NsbLevel: 3.0 251 // MPointingDevCalc.NsbMin: 30 252 // MPointingDevCalc.NsbMax: 60 253 // MPointingDevCalc.MaxAbsDev: 15 254 // 255 Int_t MPointingDevCalc::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 256 { 257 Bool_t rc = kFALSE; 258 if (IsEnvDefined(env, prefix, "NumMinStars", print)) 259 { 260 SetNumMInStars(GetEnvValue(env, prefix, "NumMinStars", fNumMinStars)); 261 rc = kTRUE; 262 } 263 if (IsEnvDefined(env, prefix, "NsbLevel", print)) 264 { 265 SetNsbLevel(GetEnvValue(env, prefix, "NsbLevel", fNsbLevel)); 266 rc = kTRUE; 267 } 268 if (IsEnvDefined(env, prefix, "NsbMin", print)) 269 { 270 SetNsbMin(GetEnvValue(env, prefix, "NsbMin", fNsbMin)); 271 rc = kTRUE; 272 } 273 if (IsEnvDefined(env, prefix, "NsbMax", print)) 274 { 275 SetNsbMax(GetEnvValue(env, prefix, "NsbMax", fNsbMax)); 276 rc = kTRUE; 277 } 278 if (IsEnvDefined(env, prefix, "MaxAbsDev", print)) 279 { 280 SetMaxAbsDev(GetEnvValue(env, prefix, "MaxAbsDev", fMaxAbsDev)); 281 rc = kTRUE; 282 } 283 284 return rc; 285 } -
trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.h
r7203 r7205 27 27 TArrayI fSkip; //! Counter for execution statistics 28 28 29 UInt_t fNumMinStars; // Minimum number of identified stars 30 Float_t fNsbLevel; // Minimum deviation from mean in sigma 31 Float_t fNsbMin; // Minimum NSB to calc mean and rms 32 Float_t fNsbMax; // Maximum NSB to calc mean and rms 33 Float_t fMaxAbsDev; // [arcmin] Maximum considered absolute deviation 34 29 35 // MPointingDevCalc 30 36 Int_t ProcessStarguiderReport(); 37 38 // MParContainer 31 39 32 40 // MTask … … 37 45 38 46 public: 39 MPointingDevCalc() : fReport(0), fDeviation(0), fSkip(5) 47 MPointingDevCalc() : fReport(0), fDeviation(0), fSkip(5), fNumMinStars(8), 48 fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15) 40 49 { 41 50 fName = "MPointingDevCalc"; … … 43 52 } 44 53 54 void SetNumMinStars(UInt_t n) { fNumMinStars=8; } 55 void SetNsbLevel(Float_t lvl) { fNsbLevel=lvl; } 56 void SetNsbMin(Float_t nsb) { fNsbMin=nsb; } 57 void SetNsbMax(Float_t nsb) { fNsbMax=nsb; } 58 void SetMaxAbsDev(Float_t max) { fMaxAbsDev=max; } 59 45 60 ClassDef(MPointingDevCalc, 0) //Task calculating the pointing deviation 46 61 }; -
trunk/MagicSoft/Mars/mpointing/MPointingPos.h
r7178 r7205 6 6 #endif 7 7 8 // FIXME: Should not be here... 8 // FIXME: Should not be here... (ZdAz) 9 9 #ifndef MARS_MPointing 10 10 #include "MPointing.h" -
trunk/MagicSoft/Mars/mpointing/MPointingPosCalc.h
r5935 r7205 1 #ifndef MARS_MPointingPos itionCalc2 #define MARS_MPointingPos itionCalc1 #ifndef MARS_MPointingPosCalc 2 #define MARS_MPointingPosCalc 3 3 4 4 #ifndef MARS_MTask
Note:
See TracChangeset
for help on using the changeset viewer.