Changeset 8601 for trunk/MagicSoft
- Timestamp:
- 06/24/07 17:31:59 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8599 r8601 19 19 -*-*- END OF LINE -*-*- 20 20 21 22 2007/06/23 Thomas Bretz 23 24 * mbadpixels/MBadPixelsCam.cc: 25 - fixed some Print output 26 27 * mhflux/MHAlpha.cc: 28 - added the missing include of MHillas.h 29 - removed the obsolete ClassImp(MAlphaFitter) 30 31 * mhflux/MHFalseSource.cc, mimage/MHillasSrc.cc: 32 - added the missing include MHillas.h 33 34 * mimage/MHHillasSrc.cc, mimage/MHillasSrc.h: 35 - removed obsolete include of MHillas.h 36 37 * mpointing/MPointingDevCalc.[h,cc]: 38 - added the real starguider calibration using a pointing model 39 for the strguider. The dates for which the model is valid 40 can still be tuned. 41 42 * mpointing/MSrcPosCalc.cc, mreport/MReportStarguider.cc: 43 - added some comment 44 45 46 47 2007/06/23 Thomas Bretz 48 49 * mpointing/MPointing.cc: 50 - improved output 51 52 53 21 54 2007/06/23 Daniela Dorner 22 55 … … 51 84 * mhflux/MHThetaSqN.cc: 52 85 - fixed optimization (it just didn't work) 86 87 * mpointing/MPointing.[h,cc]: 88 - added some checks in Load 89 - fixed a problem with the constructors (the pointers MUST be 90 initialized to 0) 91 - renamed fNumPar to fgNumPar 92 - Load and Save now return kTRUE or kFALSE 53 93 54 94 -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
r8580 r8601 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MBadPixelsCam.cc,v 1.5 1 2007-06-18 14:35:39tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MBadPixelsCam.cc,v 1.52 2007-06-24 16:31:57 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 455 455 *fLog << endl; 456 456 457 // TO BE FIXED!!!458 459 457 PrintBadPixels(MBadPixelsPix::kPreviouslyExcluded,"Previously excluded"); 460 458 PrintBadPixels(MBadPixelsPix::kChargeIsPedestal,"Signal smaller 3 Pedestal RMS"); … … 468 466 PrintBadPixels(MBadPixelsPix::kLoGainOverFlow,"Low-Gain Histogram Overflow"); 469 467 PrintBadPixels(MBadPixelsPix::kDeadPedestalRms,"Presumably dead from Ped. Rms"); 470 // PrintBadPixels(MBadPixelsPix::kFluctuatingArrivalTimes,"Fluctuating Pulse Arrival Times"); 468 PrintBadPixels(MBadPixelsPix::kDeviatingAbsTimeResolution,"Deviating abs. time resolution"); 469 PrintBadPixels(MBadPixelsPix::kDeviatingRelTimeResolution,"Deviating rel. time resolution"); 470 // PrintBadPixels(MBadPixelsPix::kFluctuatingArrivalTimes,"Fluctuating Pulse Arrival Times"); 471 471 472 472 *fLog << endl; 473 473 *fLog << all << "Unreliable pixels statistics:" << endl; 474 474 *fLog << endl; 475 476 // TO BE FIXED!!!477 475 478 476 PrintBadPixels(MBadPixelsPix::kChargeSigmaNotValid,"Signal Sigma smaller Pedestal RMS"); … … 634 632 break; 635 633 case 6: 636 if (!(*this)[idx].GetUnsuitableCalLevel())637 return kFALSE;638 634 val = (*this)[idx].GetUnsuitableCalLevel(); 639 break;635 return val>0; 640 636 case 7: 641 if (!(*this)[idx].GetUnreliableCalLevel())642 return kFALSE;643 637 val = (*this)[idx].GetUnreliableCalLevel(); 644 break;638 return val>0; 645 639 case 8: 646 640 if (!(*this)[idx].IsUncalibrated(MBadPixelsPix::kHiGainNotFitted)) -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r8136 r8601 55 55 56 56 #include "MSrcPosCam.h" 57 #include "MHillas.h" 57 58 #include "MHillasSrc.h" 58 59 #include "MTime.h" … … 71 72 72 73 ClassImp(MHAlpha); 73 ClassImp(MAlphaFitter);74 74 75 75 using namespace std; -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r8185 r8601 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.2 1 2006-11-01 08:29:45tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.22 2007-06-24 16:31:57 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 132 132 #include "MGeomCam.h" 133 133 #include "MSrcPosCam.h" 134 #include "MHillas.h" 134 135 #include "MHillasSrc.h" 135 136 #include "MTime.h" -
trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc
r7170 r8601 45 45 #include "MParList.h" 46 46 47 #include "MHillas.h"48 47 #include "MHillasSrc.h" 49 48 -
trunk/MagicSoft/Mars/mimage/MHillasSrc.cc
r6869 r8601 78 78 79 79 #include "MGeomCam.h" 80 #include "MHillas.h" 80 81 #include "MSrcPosCam.h" 81 82 -
trunk/MagicSoft/Mars/mimage/MHillasSrc.h
r7103 r8601 2 2 #define MARS_MHillasSrc 3 3 4 #ifndef MARS_M Hillas5 #include "M Hillas.h"4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 6 #endif 7 7 8 class TArrayF; 9 10 class MHillas; 11 class MGeomCam; 8 12 class MSrcPosCam; 9 13 -
trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc
r8307 r8601 65 65 66 66 #include "MAstro.h" 67 #include "MPointing.h" 67 68 #include "MPointingDev.h" 68 69 #include "MRawRunHeader.h" … … 73 74 using namespace std; 74 75 75 // -------------------------------------------------------------------------- 76 const TString MPointingDevCalc::fgFileName="resources/starguider.txt"; 77 78 // -------------------------------------------------------------------------- 79 // 80 // Delete fPointing and set pointing to NULL 81 // 82 void MPointingDevCalc::Clear(Option_t *o) 83 { 84 if (fPointing) 85 delete fPointing; 86 87 fPointing = NULL; 88 } 89 90 // -------------------------------------------------------------------------- 91 // 92 // Clear the pointing model. If run-number >= 87751 read the new 93 // pointing model with fFileName 94 // 95 Bool_t MPointingDevCalc::ReadPointingModel(const MRawRunHeader &run) 96 { 97 if (run.GetRunNumber()<87751) 98 { 99 Clear(); 100 return kTRUE; 101 } 102 103 if (!fPointing) 104 fPointing = new MPointing; 105 106 if (fFileName==fPointing->GetName()) 107 { 108 *fLog << inf << fFileName << " already loaded." << endl; 109 return kTRUE; 110 } 111 112 return fPointing->Load(fFileName); 113 } 114 115 // -------------------------------------------------------------------------- 116 // 117 // Check the file/run type from the run-header and if it is a data file 118 // load starguider calibration. 76 119 // 77 120 Bool_t MPointingDevCalc::ReInit(MParList *plist) … … 95 138 if (!fReport) 96 139 *fLog << warn << "MReportStarguider not found... skipped." << endl; 97 return kTRUE;140 return ReadPointingModel(*run); 98 141 99 142 case MRawRunHeader::kRTMonteCarlo: … … 153 196 } 154 197 198 // -------------------------------------------------------------------------- 199 // 200 // Do a full starguider calibration using a pointing model for the starguider. 201 // 202 void MPointingDevCalc::DoCalibration(Double_t devzd, Double_t devaz) const 203 { 204 if (!fPointing) 205 { 206 // Do a simple starguider calibration using a simple offset in x and y 207 fDeviation->SetDevZdAz(devzd, devaz); 208 209 // Linear starguider calibration taken from April/May data 210 // For calibration add MDriveReport::GetErrorZd/Az ! 211 fDeviation->SetDevXY(fDx, fDy); // 1arcmin ~ 5mm 212 //devzd -= 2.686/60; 213 //devaz -= 2.840/60; 214 215 return; 216 } 217 218 // def?: 20.105, 773 219 // 0/0 : 20.119, 763 220 // -/- : 19.417 726 221 // +mis: 19.80, 756 222 223 // Get the nominal position the star is at the sky 224 // Unit: deg 225 ZdAz nom(fReport->GetNominalZd(), fReport->GetNominalAz()); 226 nom *= TMath::DegToRad(); 227 228 // Get the mispointing measured by the telescope. It is 229 // calculate as follows: 230 // 231 // Position at which the starguider camera is pointing in real: 232 // pointing position = nominal position - mis 233 ZdAz mis(devzd, devaz); 234 mis *= TMath::DegToRad(); 235 236 // The pointing mode is the conversion from the real pointing 237 // position of the telescope into the pointing position measured 238 // by the starguider. 239 // 240 // --> To get the real poiting position of the telescope we have 241 // to convert the measured position back; 242 // 243 244 // Position at which the starguider camera is pointing in real: 245 // pointing position = nominal position - dev 246 // 247 // The position measured as the starguider's pointing position 248 ZdAz pos(nom); // cpos = sao - dev 249 pos -= mis; 250 251 // Now we convert the starguider's pointing position into the 252 // telescope pointing position (the pointing model converts 253 // the telescope pointing position into the starguider pointing 254 // position) 255 ZdAz point = fPointing->CorrectBack(pos); 256 257 // MSrcPosCalc uses the following condition to calculate the 258 // source position in the camera: 259 // real pointing pos = nominal pointing pos - dev 260 // 261 // Therefor we calculate dev as follows: 262 ZdAz dev(nom); 263 dev -= point; 264 dev *= TMath::RadToDeg(); 265 266 // Set Measured mispointing and additional offset 267 fDeviation->SetDevZdAz(dev.Zd(), dev.Az()); 268 fDeviation->SetDevXY(0, 0); 269 } 270 155 271 Int_t MPointingDevCalc::ProcessStarguiderReport() 156 272 { 157 273 /************* CHECK STATUS!!! ******************/ 158 274 159 Double_t devzd = fReport->GetDevZd(); // [ deg]160 Double_t devaz = fReport->GetDevAz(); // [ deg]275 Double_t devzd = fReport->GetDevZd(); // [arcmin] 276 Double_t devaz = fReport->GetDevAz(); // [arcmin] 161 277 if (devzd==0 && devaz==0) 162 278 { … … 205 321 } 206 322 323 // >= 87751 (31.3.06 12:00) 324 207 325 // Calculate absolute deviation 208 326 const Double_t dev = MAstro::GetDevAbs(fReport->GetNominalZd(), devzd, devaz); … … 215 333 } 216 334 217 fDeviation->SetDevZdAz(devzd, devaz); 218 219 // Linear starguider calibration taken from April/May data 220 // For calibration add MDriveReport::GetErrorZd/Az ! 221 fDeviation->SetDevXY(fDx, fDy); 222 //devzd -= 2.686/60; // 1arcmin ~ 5mm 223 //devaz -= 2.840/60; 335 DoCalibration(devzd, devaz); 224 336 225 337 fSkip[0]++; -
trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.h
r8373 r8601 10 10 #endif 11 11 12 class MPointing; 12 13 class MPointingDev; 14 class MRawRunHeader; 13 15 class MReportStarguider; 14 16 … … 16 18 { 17 19 private: 20 static const TString fgFileName; //! default file name of pointing model 21 18 22 MReportStarguider *fReport; //! MReportStarguider to get mispointing 19 23 MPointingDev *fDeviation; //! Output container to store pointing deviation 24 MPointing *fPointing; //! MPointing, pointing model for the calibration 20 25 21 26 UShort_t fRunType; //! Run Type to decide where to get pointing position from … … 27 32 TArrayI fSkip; //! Counter for execution statistics 28 33 Double_t fLastMjd; //! Time of last processed report 34 35 TString fFileName; // File name of pointing model 29 36 30 37 UInt_t fNumMinStars; // Minimum number of identified stars … … 39 46 40 47 // MPointingDevCalc 48 void DoCalibration(Double_t devzd, Double_t devaz) const; 49 50 Bool_t ReadPointingModel(const MRawRunHeader &run); 51 41 52 Int_t ProcessStarguiderReport(); 42 53 void Skip(Int_t i); … … 52 63 53 64 public: 54 MPointingDevCalc() : fReport(0), fDeviation(0), fSkip(7), fNumMinStars(8), 55 fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15), fMaxAge(1), fDx(-7), fDy(16) 65 MPointingDevCalc() : fReport(0), fDeviation(0), fPointing(0), 66 fSkip(7), fFileName(fgFileName), fNumMinStars(8), 67 fNsbLevel(3), fNsbMin(30), fNsbMax(60), fMaxAbsDev(15), 68 fMaxAge(1), fDx(-7), fDy(16) 56 69 { 57 70 fName = "MPointingDevCalc"; … … 60 73 AddToBranchList("MReportStarguider.*"); 61 74 } 75 ~MPointingDevCalc() 76 { 77 Clear(); 78 } 79 80 void Clear(Option_t *o=""); 62 81 63 82 void SetNumMinStars(UInt_t n) { fNumMinStars=n; } -
trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc
r7287 r8601 375 375 pos0 *= conv; 376 376 377 TVector2 vx;377 //TVector2 vx; 378 378 if (fDeviation) 379 379 { 380 // Position at which the starguider camera is pointing in real: 381 // pointing position = nominal position - dev 382 // 380 383 //vx = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000; 381 384 pos0.SetZdAz(pos0.Theta()-fDeviation->GetDevZdRad(), -
trunk/MagicSoft/Mars/mreport/MReportStarguider.cc
r7731 r8601 38 38 // The sky brightness and the number of identified stars since 2005/03/17 39 39 // 40 // Position at which the starguider camera is pointing in real: 41 // pointing position = nominal position - dev 40 42 // 41 43 // Class Version 1:
Note:
See TracChangeset
for help on using the changeset viewer.