Changeset 6845


Ignore:
Timestamp:
03/17/05 12:04:06 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6840 r6845  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23 2005/03/17 Thomas Bretz
     24
     25   * callisto.cc:
     26     - added new option moon
     27     - use light condition from MSequence to determin light condition
     28       automatically
     29
     30   * mjobs/MJPedestal.h:
     31     - allow setting SetUseHists also to kFALSE
     32
     33   * mjobs/MSequence.[h,cc]:
     34     - added fLightCondition
     35
     36   * mcalib/MCalibrateData.cc:
     37     - undocumented change from Markus Gaug
     38
     39
     40
    2341 2005/03/16 Thomas Bretz
    2442
  • trunk/MagicSoft/Mars/callisto.cc

    r6838 r6845  
    8383    gLog << "   --use-test                Apply calibration constants to same calibration" << endl;
    8484    gLog << "                             file (for testing, calibration mode only)" << endl;
     85    gLog << "   --moon                    Force using pedestal fits instead of calculated RMS" << endl;
    8586    gLog << "   --config=callisto.rc      Resource file [default=callisto.rc]" << endl;
    8687    gLog << endl;
     
    166167    const Bool_t  kUseTest    = arg.HasOnlyAndRemove("--use-test");
    167168    const Bool_t  kDebugMem   = arg.HasOnlyAndRemove("--debug-mem");
     169          Bool_t  kMoon       = arg.HasOnlyAndRemove("--moon");
    168170    Int_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0;
    169171    kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv);
     
    287289    if (kPrintFound)
    288290        PrintFiles(seq, kInpathD, kDataType==MJCalib::kIsUseRawData, kTRUE);
    289 /*
     291
     292    if (seq.HasMoon())
     293        kMoon = kTRUE;
     294
     295
     296    /*
    290297    //
    291298    // Check for existance of all files
     
    346353        job1.SetPathData(kInpathD);
    347354        job1.SetDataType(kDataType);
     355        job1.SetUseHists(kMoon);
     356
    348357
    349358        job1.SetExtractionFundamental();
     
    375384        job2.SetPathData(kInpathD);
    376385        job2.SetDataType(kDataType);
     386        job2.SetUseHists(kMoon);
    377387        // job1.SetPathOut(kOutpathC); // not yet needed
    378388        // job1.SetPathIn(kInpathC);   // not yet needed
     
    480490        job1.SetUseData();
    481491        job1.SetExtractionFundamental();
     492        job1.SetUseHists(kMoon);
    482493
    483494        if (!job1.ProcessFile())
     
    515526        job2.SetPedestals(job1.GetPedestalCam());
    516527        job2.SetBadPixels(job1.GetBadPixels());
     528        job2.SetUseHists(kMoon);
    517529
    518530        if (!job2.ProcessFile())
     
    550562        job3.SetPedestals(job1.GetPedestalCam());
    551563        job3.SetBadPixels(job1.GetBadPixels());
     564        job3.SetUseHists(kMoon);
    552565
    553566        if (!job3.ProcessFile())
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r6820 r6845  
    672672                {
    673673                  signal    = sig.GetExtractedSignalHiGain()*1.5;
    674                   signalErr = sig.GetExtractedSignalHiGain()*2.;
     674                  signalErr = sig.GetExtractedSignalHiGain()*0.5;
    675675                }
    676676              else
    677677                {
    678                   signal    = sig.GetExtractedSignalLoGain()*fHiLoConv   [pixidx];
    679                   signalErr = sig.GetExtractedSignalLoGain()*fHiLoConvErr[pixidx];
     678                  const Float_t siglo = sig.GetExtractedSignalLoGain();
     679
     680                  if (siglo > 0.1) // low-gain signal has been extracted successfully
     681                    {
     682                      signal    = siglo*fHiLoConv   [pixidx];
     683                      signalErr = siglo*fHiLoConvErr[pixidx];
     684                    }
     685                  else  // low-gain signal has not been extracted successfully, get a rough estimate from the high-gain
     686                    {
     687                      signal    = sig.GetExtractedSignalHiGain()*1.5;
     688                      signalErr = sig.GetExtractedSignalHiGain()*0.5;
     689                    }
    680690                }
    681691            }
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r6768 r6845  
    112112    void SetExtractor(MExtractor* ext);
    113113    void SetUseData()                           { fExtractType = kUseData;   }
    114     void SetUseHists()                          { fIsUseHists = kTRUE;  }
     114    void SetUseHists( const Bool_t b=kTRUE)     { fIsUseHists = b;  }
    115115    void SetUsePedRun()                         { fExtractType = kUsePedRun; }
    116116    void SetDataCheckDisplay()                  { fDisplayType = kDisplayDataCheck; }
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r6604 r6845  
    248248}
    249249
     250LightCondition_t MSequence::ReadLightCondition(TEnv &env) const
     251{
     252    TString str = env.GetValue("LightCondition", "n/a");
     253    if (!str.CompareTo("n/a", TString::kIgnoreCase))
     254        return kNA;
     255    if (!str.CompareTo("NoMoon", TString::kIgnoreCase))
     256        return kNoMoon;
     257    if (!str.CompareTo("Twilight", TString::kIgnoreCase))
     258        return kTwilight;
     259    if (!str.CompareTo("Moon", TString::kIgnoreCase))
     260        return kMoon;
     261
     262    gLog << warn << "MSequence: LightCondition-tag not n/a, nomoon, twilight or moon." << endl;
     263    return kNA;
     264}
     265
    250266// --------------------------------------------------------------------------
    251267//
     
    269285    fNumEvents = env.GetValue("NumEvents", -1);
    270286    fPeriod    = env.GetValue("Period",    -1);
     287
     288    fLightCondition = ReadLightCondition(env);
    271289
    272290    str = env.GetValue("Start", "");
Note: See TracChangeset for help on using the changeset viewer.