Ignore:
Timestamp:
07/21/05 17:45:25 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpointing
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.cc

    r7203 r7205  
    2727// MPointingDevCalc
    2828//
     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//
    2952// Input Container:
    3053//   MReportStarguider
     
    129152    if (nsb>0)
    130153    {
    131         if (nsb>30 && nsb<60)
     154        if (nsb>fNsbMin && nsb<fNsbMax)
    132155        {
    133156            fNsbSum += nsb;
     
    141164            const Double_t sq  = fNsbSq /fNsbCount;
    142165
    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)
    146169            {
    147170                fSkip[2]++;
     
    150173        }
    151174
    152         if (fReport->GetNumIdentifiedStars()<8)
     175        if (fReport->GetNumIdentifiedStars()<fNumMinStars)
    153176        {
    154177            fSkip[3]++;
     
    166189
    167190    // Sanity check... larger deviation are strange and ignored
    168     if (dev>0.25)
     191    if (dev*60>fMaxAbsDev)
    169192    {
    170193        fSkip[4]++;
     
    213236    *fLog << GetDescriptor() << " execution statistics:" << endl;
    214237    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));
    218241    *fLog << " " << (int)fSkip[0] << " (" << Form("%5.1f", 100.*fSkip[0]/GetNumExecutions()) << "%) Evts survived calculation!" << endl;
    219242    *fLog << endl;
     
    221244    return kTRUE;
    222245}
     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//
     255Int_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  
    2727    TArrayI  fSkip;                //! Counter for execution statistics
    2828
     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
    2935    // MPointingDevCalc
    3036    Int_t ProcessStarguiderReport();
     37
     38    // MParContainer
    3139
    3240    // MTask
     
    3745
    3846public:
    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)
    4049    {
    4150        fName  = "MPointingDevCalc";
     
    4352    }
    4453
     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
    4560    ClassDef(MPointingDevCalc, 0) //Task calculating the pointing deviation
    4661};
  • trunk/MagicSoft/Mars/mpointing/MPointingPos.h

    r7178 r7205  
    66#endif
    77
    8 // FIXME: Should not be here...
     8// FIXME: Should not be here... (ZdAz)
    99#ifndef MARS_MPointing
    1010#include "MPointing.h"
  • trunk/MagicSoft/Mars/mpointing/MPointingPosCalc.h

    r5935 r7205  
    1 #ifndef MARS_MPointingPositionCalc
    2 #define MARS_MPointingPositionCalc
     1#ifndef MARS_MPointingPosCalc
     2#define MARS_MPointingPosCalc
    33
    44#ifndef MARS_MTask
Note: See TracChangeset for help on using the changeset viewer.