Ignore:
Timestamp:
07/22/05 18:47:21 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpointing
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpointing/MPointing.h

    r4966 r7214  
    1616// ---------------------------------------------------
    1717// FIXME: Replace coord.h completely with this!
    18 #ifndef __MARS__
    19 #include "coord.h"
    20 #else
     18//#ifndef __MARS__
     19//#include "coord.h"
     20//#else
    2121#include <TVector2.h>
    2222class AltAz : public TVector2
     
    2626    {
    2727    }
     28    AltAz(const AltAz &aa) : TVector2(aa) { }
    2829    Double_t Alt() const { return fX; }
    2930    Double_t Az() const  { return fY; }
     
    3738    {
    3839    }
     40    ZdAz(const ZdAz &aa) : TVector2(aa) { }
    3941    Double_t Zd() const { return fX; }
    4042    Double_t Az() const { return fY; }
    4143    ClassDef(ZdAz, 1)
    4244};
    43 #endif
     45//#endif
    4446// ---------------------------------------------------
    4547
  • trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc

    r7207 r7214  
    9292    switch (fRunType)
    9393    {
    94 /***/    case MRawRunHeader::kRTData:
    95         /*
     94    case MRawRunHeader::kRTData:
    9695        if (!fReport)
    97         {
    98             *fLog << err << "MReportStarguider not found... aborting." << endl;
    99             return kFALSE;
    100         }*/
    101 /***/        return kTRUE;
     96            *fLog << warn << "MReportStarguider not found... skipped." << endl;
     97        return kTRUE;
    10298
    10399    case MRawRunHeader::kRTMonteCarlo:
     
    182178    // Linear starguider calibration taken from April/May data
    183179    // For calibration add MDriveReport::GetErrorZd/Az !
    184     devzd -= 2.686/60;
     180    devzd -= 2.686/60;   // 1arcmin ~ 5mm
    185181    devaz -= 2.840/60;
    186182
     
    195191    }
    196192
     193    fDeviation->SetDevZdAz(devzd, devaz);
    197194    fSkip[0]++;
    198     //fDeviation->SetDevZdAz(devzd, devaz);
    199     fDeviation->SetDevZdAz(0, 0);
    200 
    201     cout << "SETTING: " << devzd << " " << devaz << endl;
    202195
    203196    return kTRUE;
     
    214207    case MRawRunHeader::kRTNone:
    215208    case MRawRunHeader::kRTData:
    216 /***/        return fReport ? ProcessStarguiderReport() : kTRUE;
     209        return fReport ? ProcessStarguiderReport() : kTRUE;
    217210
    218211    case MRawRunHeader::kRTMonteCarlo:
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc

    r7181 r7214  
    7575#include "MObservatory.h"
    7676#include "MPointingPos.h"
     77#include "MPointingDev.h"
    7778#include "MSrcPosCam.h"
    7879#include "MRawRunHeader.h"
     
    9293//
    9394MSrcPosCalc::MSrcPosCalc(const char *name, const char *title)
    94     : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fSrcPosCam(NULL),
    95     fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault)
     95    : fObservatory(NULL), fPointPos(NULL), fSourcePos(NULL), fDeviation(NULL),
     96    fSrcPosCam(NULL), fSrcPosAnti(NULL), fGeom(NULL), fTime(NULL), fMode(kDefault)
    9697{
    9798    fName  = name  ? name  : "MSrcPosCalc";
     
    189190        return kFALSE;
    190191    }
     192
     193    fDeviation = (MPointingDev*)pList->FindObject("MPointingDev");
    191194
    192195    *fLog << inf;
     
    313316     */
    314317
    315     /* --- NEW --- */
     318    /* --- NEW ---  Same as MSrcPosCorrect::CalcXYinCamera */
    316319    const Double_t XC0 = TMath::Sin(theta)*TMath::Sin(phi-phi0);
    317320    const Double_t XC1 = TMath::Cos(theta0)*TMath::Cos(theta);
     
    365368    pos0 *= conv;
    366369
     370    TVector2 vx;
     371    if (fDeviation)
     372    {
     373        vx = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000;
     374        pos0.SetZdAz(pos0.Theta()-fDeviation->GetDevZdRad(),
     375                     pos0.Phi()  -fDeviation->GetDevAzRad());
     376    }
     377
    367378    // Calculate source position in camera, and convert to mm:
    368379    TVector2 v = CalcXYinCamera(pos0, pos)*fGeom->GetCameraDist()*1000;
    369380    SetSrcPos(v);
     381
     382    if (fDeviation)
     383        cout << fPointPos->GetZd() << ":  " << vx.X() << "/" <<v.X() << "  " << vx.Y() << "/" <<v.Y() << endl;
    370384
    371385    return kTRUE;
     
    391405    if (str.First(':')<0)
    392406    {
    393         ret = atof(str);
     407        ret = str.Atof();
    394408        return kTRUE;
    395409    }
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h

    r7181 r7214  
    1212class MObservatory;
    1313class MPointingPos;
     14class MPointingDev;
    1415class MSrcPosCam;
    1516class MGeomCam;
     
    3334    MPointingPos *fPointPos;
    3435    MPointingPos *fSourcePos;
     36    MPointingDev *fDeviation;
    3537    MSrcPosCam   *fSrcPosCam;
    3638    MSrcPosCam   *fSrcPosAnti;
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc

    r7200 r7214  
    3939#include "MLogManip.h"
    4040
     41#include "MGeomCam.h"
    4142#include "MSrcPosCam.h"
    4243#include "MRawRunHeader.h"
     44#include "MReportStarguider.h"
    4345
    4446ClassImp(MSrcPosCorrect);
     
    4951//
    5052MSrcPosCorrect::MSrcPosCorrect(const char *name, const char *title)
    51     : fSrcPosCam(NULL), fSrcPosAnti(NULL), fAxis(NULL)
     53    : fSrcPosCam(NULL), fSrcPosAnti(NULL), fAxis(NULL), fGeom(NULL)
    5254{
    5355    fName  = name  ? name  : "MSrcPosCorrect";
     
    139141//    Good night
    140142//
     143// Believing the Database the following data is affected:
     144//   1ES1426+428           Off1ES1426-1
     145//   1ES1959+650           Off1ES1959-1
     146//   2E-1415+2557          Off2E1415-1
     147//   Arp-220               OffArp-220-1
     148//   GC-W1                 OffHB1553-1
     149//   HB89-1553+11          OffM87-1
     150//   M87                   OffW-Comae-1
     151//   W-Comae
     152//
    141153Int_t MSrcPosCorrect::Process()
    142154{
     
    144156        return kTRUE;
    145157
    146     // FIXME: Implement Culmination correction
    147 
     158    TVector2 d;
    148159    if (fRunNumber<56161 && fRunNumber>53832)
    149160    {
    150161        // dx=-0.048deg, dy=0.034deg, d=0.059deg
    151162        static const TVector2 dxy(-14.24, -9.495);
    152         fAxis->SetXY(dxy);
    153         fSrcPosCam->Add(dxy);
    154         if (fSrcPosAnti)
    155             fSrcPosAnti->Add(dxy);
     163
     164        d -= dxy;
     165    }
     166
     167    fAxis->SetXY(d);
     168    fSrcPosCam->Add(d);
     169    if (fSrcPosAnti)
     170    {
     171        d *= -1; // Anti-Source position should always be symetric
     172        fSrcPosAnti->Add(d);
    156173    }
    157174
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.h

    r7199 r7214  
    66#endif
    77
     8class MGeomCam;
     9class TVector2;
    810class MSrcPosCam;
     11class MReportStarguider;
    912
    1013class MSrcPosCorrect : public MTask
    1114{
    1215private:
    13     MSrcPosCam   *fSrcPosCam;
    14     MSrcPosCam   *fSrcPosAnti;
    15     MSrcPosCam   *fAxis;
     16    MSrcPosCam *fSrcPosCam;   //!
     17    MSrcPosCam *fSrcPosAnti;  //!
     18    MSrcPosCam *fAxis;        //!
    1619
    17     UShort_t fRunType;            //! Run Type to decide where to get pointing position from
     20    MGeomCam   *fGeom;        //!
     21
     22    UShort_t fRunType;        //! Run Type to decide where to get pointing position from
    1823    UInt_t   fRunNumber;
    1924
Note: See TracChangeset for help on using the changeset viewer.