Changeset 7616


Ignore:
Timestamp:
03/20/06 12:48:14 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7615 r7616  
    2424     - if the pixels to be swaped are both not found, assume they are
    2525       intentially not mapped. Changed the Error to a Warning
     26
     27   * mhflux/MHDisp.[h,cc]:
     28     - made the scale region a parameter which can be changed from
     29       within the display
     30     - allow the scale parameters to be setup from the resource-file
     31
     32   * ganymed.rc, ganymed_onoff.rc, ganymed_wobble.rc:
     33     - added example how to change the new scale parameters in MHDisp
    2634
    2735
     
    118126
    119127   * mhflux/MHPhi.[h,cc]:
    120      - many improvements to the algorithm, it now takes also inhomgeneities
    121        into account
     128     - many improvements to the algorithm, it now takes also
     129       inhomgeneities into account
    122130     - restructured the display, display more histograms
    123131     - increased class version to 2
     
    127135
    128136   * mpointing/MPointingDevCalc.[h,cc]:
    129      - allowed to set the starguider offset calibration from the resource file
     137     - allowed to set the starguider offset calibration from the
     138       resource file
    130139
    131140   * callisto_Dec04Jan05.rc:
    132      - replaced Calibration scale factor by usage of resources/calibration_spline.rc
     141     - replaced Calibration scale factor by usage of
     142       resources/calibration_spline.rc
    133143
    134144
     
    326336
    327337   * datacenter/db/dowebplots:
    328      - added option -p to the script, to be able to call the script for
    329        different programs independently
     338     - added option -p to the script, to be able to call the script
     339       for different programs independently
    330340     - fixed find
    331341
     
    367377
    368378   * mbase/MTaskList.[h,cc]:
    369      - implemented the usabe of MTask::fAccelerator to switch off resetting
    370        of all parameter containers which can be very time-consuming
     379     - implemented the usabe of MTask::fAccelerator to switch off
     380       resetting of all parameter containers which can be very
     381       time-consuming
    371382
    372383   * mimage/MImagePar.cc:
  • trunk/MagicSoft/Mars/NEWS

    r7615 r7616  
    3030     mode if no starguider information was available due to an incorrect
    3131     initialization of the starguider calibration
     32
     33   - ganymed: The scale region in the False Source Plot (MHDisp) can now
     34     be changed from within the plot. It can also be setup from the
     35     resource file using:
     36       + MHDisp.fScaleMin: 0.325
     37       + MHDisp.fScaleMax: 0.475
    3238
    3339
  • trunk/MagicSoft/Mars/ganymed.rc

    r7593 r7616  
    8484MHDisp.Smearing: 0.06
    8585#MHDisp.Wobble:   Yes
     86#MHDisp.ScaleMin: 0.325
     87#MHDisp.ScaleMax: 0.475
    8688
    8789# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/ganymed_onoff.rc

    r7593 r7616  
    8383
    8484MHDisp.Smearing: 0.06
     85#MHDisp.ScaleMin: 0.325
     86#MHDisp.ScaleMax: 0.475
    8587
    8688# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/ganymed_wobble.rc

    r7593 r7616  
    7777MJCut.NameHistFS: MHDisp
    7878
     79MHDisp.Wobble:   Yes
    7980MHDisp.Smearing: 0.06
    80 MHDisp.Wobble:   Yes
     81#MHDisp.ScaleMin: 0.325
     82#MHDisp.ScaleMax: 0.475
    8183
    8284# -------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhflux/MHDisp.cc

    r7287 r7616  
    3232// in the tasklist. Switching of the M3L cut in MFMagicCuts is recommended.
    3333//
     34// Class Version 3:
     35// ----------------
     36//  + Double_t fScaleMin;    // [deg] Minimum circle for integration of off-data for scaling
     37//  + Double_t fScaleMax;    // [deg] Maximum circle for integration of off-data for scaling
     38//
    3439//////////////////////////////////////////////////////////////////////////////
    3540#include "MHDisp.h"
     
    6570//
    6671MHDisp::MHDisp(const char *name, const char *title)
    67     : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE)
     72    : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE),
     73    fScaleMin(0.325), fScaleMax(0.475)
    6874{
    6975    //
     
    165171        if (!fHistOff)
    166172        {
    167             if (delta>165)
     173            if (delta>180-25)
    168174                return kTRUE;
    169175
     
    175181            // increased uncertainty
    176182            // FIXME: The delta stuff could be replaced by a 2*antitheta cut...
    177             w0 = delta>15 ? 1 : 2;
     183            w0 = delta>25 ? 1 : 2;
    178184        }
    179185
     
    331337}
    332338
     339// --------------------------------------------------------------------------
     340//
     341// Make sure that if the scale is changed by the context menu all subpads
     342// are redrawn.
     343//
     344void MHDisp::Update()
     345{
     346    TVirtualPad *pad = gPad;
     347    for (int i=1; i<=6; i++)
     348    {
     349        if (pad->GetPad(i))
     350            pad->GetPad(i)->Modified();
     351    }
     352}
    333353
    334354// --------------------------------------------------------------------------
     
    348368        {
    349369            const Double_t d = TMath::Hypot(axex.GetBinCenter(x+1), axey.GetBinCenter(y+1));
    350             if (d>0.325 && d<0.475)
     370            if (d>fScaleMin && d<fScaleMax)
    351371            {
    352372                sum += h.GetBinContent(x+1,y+1);
     
    354374            }
    355375        }
     376
    356377    return sum/cnt;
    357378}
     
    611632    // ----- Pad number 4 -----
    612633    TString name = Form("%s_4", pad->GetName());
    613     TPad *p = new TPad(name,name, 0.5025, 0.3355, 0.995, 0.995, col, 0, 0);
     634    TPad *p = new TPad(name,name, 0.525/*0.5025*/, 0.3355, 0.995, 0.995, col, 0, 0);
    614635    p->SetNumber(4);
    615636    p->Draw();
     
    631652    pad->cd();
    632653    name = Form("%s_1", pad->GetName());
    633     p = new TPad(name,name, 0.005, 0.3355, 0.4975, 0.995, col, 0, 0);
     654    p = new TPad(name,name, 0.005, 0.3355, 0.475/*0.4975*/, 0.995, col, 0, 0);
    634655    p->SetNumber(1);
    635656    p->Draw();
     
    733754        SetWobble(GetEnvValue(env, prefix, "Wobble", fWobble));
    734755    }
     756    if (IsEnvDefined(env, prefix, "ScaleMin", print))
     757    {
     758        rc = kTRUE;
     759        SetScaleMin(GetEnvValue(env, prefix, "ScaleMin", fScaleMin));
     760    }
     761    if (IsEnvDefined(env, prefix, "ScaleMax", print))
     762    {
     763        rc = kTRUE;
     764        SetScaleMax(GetEnvValue(env, prefix, "ScaleMax", fScaleMax));
     765    }
    735766
    736767    return rc;
  • trunk/MagicSoft/Mars/mhflux/MHDisp.h

    r7217 r7616  
    1717class MParameterD;
    1818class MPointingDev;
     19class MSrcPosCam;
    1920
    2021class MHDisp : public MHFalseSource
    2122{
    2223private:
    23     MParameterD  *fDisp;    //!
     24    MParameterD  *fDisp;      //!
    2425    MPointingDev *fDeviation; //!
     26    //MSrcPosCam   *fAxis;      //!
    2527
    2628    TH2D         fHistBg;
     
    3133    Bool_t       fHalf;
    3234
    33     Double_t     fSmearing;
    34     Bool_t       fWobble;
     35    Double_t     fSmearing;    // [deg] Width of Gaus to fold with the events
     36    Bool_t       fWobble;      // This is for Wobble-Mode observations
     37
     38    Double_t     fScaleMin;    // [deg] Minimum circle for integration of off-data for scaling
     39    Double_t     fScaleMax;    // [deg] Maximum circle for integration of off-data for scaling
    3540
    3641    // MHDisp
    3742    Double_t GetOffSignal(TH1 &h) const;
    3843    Double_t DeltaPhiSrc(const TVector2 &v) const;
     44
     45    void Update();
    3946
    4047    void Profile1D(const char *name, const TH2 &h) const;
     
    5158    void SetSmearing(Double_t s=-1) { fSmearing=s; }
    5259    void SetWobble(Bool_t w=kTRUE)  { fWobble=w;   }
     60
     61    void SetScaleMin(Double_t scale) { fScaleMin = scale; Update(); } //*MENU* *ARGS={scale=>fScaleMin}
     62    void SetScaleMax(Double_t scale) { fScaleMax = scale; Update(); } //*MENU* *ARGS={scale=>fScaleMax}
     63    void SetScale(Double_t min, Double_t max) { fScaleMin = min; fScaleMax = max; Update(); } //*MENU* *ARGS={min=>fScaleMin,max=>fScaleMax}
     64
     65    Double_t GetScaleMin() { return fScaleMin; }
     66    Double_t GetScaleMax() { return fScaleMax; }
    5367
    5468    // MHFalseSource (to be moved!)
     
    8296    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
    8397
    84     ClassDef(MHDisp, 2) //Class to provide a Disp map
     98    ClassDef(MHDisp, 3) //Class to provide a Disp map
    8599};
    86100
Note: See TracChangeset for help on using the changeset viewer.