Ignore:
Timestamp:
04/30/04 15:30:29 (20 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/pointing.C

    r2841 r3909  
    8383    MReadReports read;
    8484    read.AddTree("Drive");
    85     read.AddFile("ccdata.root");
     85    read.AddFile("data/2004_01_26_report.root");
    8686    read.AddToBranchList("MReportDrive.*");
    8787
     
    8989
    9090    // Create a task which fills one histogram with the data
    91     MHVsTime h0("MReportDrive.fMjd");
     91    //MHVsTime h0("MReportDrive.fMjd");
    9292    MHVsTime h1("MReportDrive.fNominalZd");
    9393    MHVsTime h2("MReportDrive.fNominalAz");
    9494    MHVsTime h3("MReportDrive.fState");
    95     h0.SetName("Mjd");
     95    MHVsTime h7("MReportDrive.GetAbsError*60");
     96    //h0.SetName("Mjd");
    9697    h1.SetName("Zd");
    9798    h2.SetName("Az");
    9899    h3.SetName("State");
     100    h7.SetName("ControlDeviation");
    99101
    100102    MH3 h4("MReportDrive.GetAbsError*60");
     
    116118    plist.AddToList(&bins3);
    117119
    118     MFillH fill0(&h0, "MTimeDrive");
     120    //MFillH fill0(&h0, "MTimeDrive");
    119121    MFillH fill1(&h1, "MTimeDrive");
    120122    MFillH fill2(&h2, "MTimeDrive");
    121123    MFillH fill3(&h3, "MTimeDrive");
     124    MFillH fill7(&h7, "MTimeDrive");
    122125    MFillH fill4(&h4);
    123126    MFillH fill5(&h5);
    124127
    125     fill0.SetBit(MFillH::kDoNotDisplay);
     128    //fill0.SetBit(MFillH::kDoNotDisplay);
    126129    fill1.SetBit(MFillH::kDoNotDisplay);
    127130    fill2.SetBit(MFillH::kDoNotDisplay);
     
    129132    fill4.SetBit(MFillH::kDoNotDisplay);
    130133    fill5.SetBit(MFillH::kDoNotDisplay);
     134    fill7.SetBit(MFillH::kDoNotDisplay);
    131135
    132136    // -----------------------------------------------
     
    138142    tlist.AddToList(&fill3);
    139143    tlist.AddToList(&tracking);
    140     tlist.AddToList(&fill0);
     144    //tlist.AddToList(&fill0);
    141145    tlist.AddToList(&fill1);
    142146    tlist.AddToList(&fill2);
    143147    tlist.AddToList(&fill4);
    144148    tlist.AddToList(&fill5);
     149    tlist.AddToList(&fill7);
    145150
    146151    gStyle->SetOptStat(0);
     
    161166    tlist.PrintStatistics();
    162167
     168
    163169    TGraph *g1 = h1.GetGraph();
    164170    TGraph *g2 = h2.GetGraph();
    165171
    166172    TCanvas &c = d->AddTab("Sky");
    167 
    168     c->cd();
    169 
    170     TPad *p = new TPad("", "",0,0.05,0.6,0.95);
     173    c.cd();
     174
     175    //Skyplot
     176    TPad *p = new TPad("", "",0,0.32,0.5,1);
    171177    p->Draw();
    172178    p->cd();
     
    190196    }
    191197
    192     //TGraph gr;
    193 
    194198    Double_t *zd=g1->GetY();
    195199    Double_t *az=g2->GetY();
     
    223227
    224228    c.cd();
     229
     230
    225231/*
     232    //MJD
    226233    p = new TPad("", "", 0.6, 0.66, 1, 1);
    227234    p->Draw();
     
    237244    c.cd();
    238245*/
    239     p = new TPad("", "", 0.6, 0, 1, 0.29);
    240     p->Draw();
    241     p->cd();
    242 
    243     gStyle->SetOptStat(1110);
    244     gStyle->SetStatFormat(".2g");
     246
     247
     248    //Histogram of Control Deviation
     249    p = new TPad("", "", 0, 0, 0.5, 0.32);
     250    p->Draw();
     251    p->cd();
     252
     253    gPad->SetBorderMode(0);
     254    //number of entries, mean, rms and number of overflows in the statusbox
     255    gStyle->SetOptStat("emro");
     256    //gStyle->SetStatFormat(".2g");
    245257
    246258    MH3 *mh3 = (MH3*)h4.DrawClone("nonew");
     259
     260    TAxis *axey = mh3->GetHist()->GetYaxis();
     261    TAxis *axex = mh3->GetHist()->GetXaxis();
     262    axey->SetLabelSize(0.05);
     263    axex->SetLabelSize(0.05);
     264    axex->SetTitleSize(0.05);
     265    axex->SetTitleOffset(0.85);
    247266
    248267    mh3->GetHist()->SetXTitle("\\Delta [arcmin]");
     
    251270    mh3->GetHist()->SetStats(1);
    252271
     272    //insert lines for 0.5, 1 and 2 SE
    253273    TLine ln;
    254274    ln.SetLineColor(kGreen);
     
    261281    c.cd();
    262282
    263     p = new TPad("", "", 0.6, 0.29, 1, 0.42);
    264     p->Draw();
    265     p->cd();
     283
     284    //Status of the Drive System vs Time
     285    p = new TPad("", "", 0.5, 0.86, 1, 1);
     286    p->Draw();
     287    p->cd();
     288    gPad->SetBorderMode(0);
     289    p->SetGridx();
    266290
    267291    hvt = (MHVsTime*)h3.DrawClone("nonew");
     
    290314    c.cd();
    291315
    292     p = new TPad("", "", 0.6, 0.71, 1, 1);
    293     p->Draw();
    294     p->cd();
    295 
     316
     317    //Zd vs Time
     318    p = new TPad("", "", 0.5, 0.59, 1, 0.86);
     319    p->Draw();
     320    p->cd();
     321    gPad->SetBorderMode(0);
     322    p->SetGridx();
     323
     324    hvt = (MHVsTime*)h1.DrawClone("nonew");
     325    hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
     326
     327    TH1 *hist = hvt->GetGraph()->GetHistogram();
     328    if (hvt->GetGraph()->GetN())
     329    {
     330        hist->SetXTitle("Time");
     331        hist->SetYTitle("Zd [\\circ]");
     332        hist->SetTitle("Zd vs. Time");
     333        hist->SetStats(0);
     334    }
     335
     336    TAxis *axey = hist->GetYaxis();
     337    TAxis *axex = hist->GetXaxis();
     338    axey->SetLabelSize(0.05);
     339    axey->SetTitleSize(0.06);
     340    axey->SetTitleOffset(0.6);
     341    axex->SetLabelSize(0.05);
     342    axex->SetTitleSize(0.06);
     343    axex->SetTitleOffset(0.85);
     344
     345    c.cd();
     346
     347
     348    //Controll Deviation vs Time
     349    p = new TPad("", "", 0.5, 0.32, 1, 0.59);
     350    p->Draw();
     351    p->cd();
     352    gPad->SetBorderMode(0);
     353    p->SetGridx();
     354
     355    hvt = (MHVsTime*)h7.DrawClone("nonew L");
     356    TH1 *hist = hvt->GetGraph()->GetHistogram();
     357    hist->SetAxisRange(-0.5, 10.5, "Y");
     358    hist->SetXTitle("Time");
     359    hist->SetYTitle("\\Delta [arcmin]");
     360    hist->SetTitle("Control Deviation vs. Time");
     361
     362    TAxis *axey = hist->GetYaxis();
     363    TAxis *axex = hist->GetXaxis();
     364    axey->SetLabelSize(0.05);
     365    axey->SetTitleSize(0.06);
     366    axey->SetTitleOffset(0.5);
     367    axex->SetLabelSize(0.05);
     368    axex->SetTitleSize(0.06);
     369    axex->SetTitleOffset(0.8);
     370
     371    //insert lines for 0.5, 1 and 2 SE
     372    TLine ln;
     373    ln.SetLineColor(kGreen);
     374    ln.DrawLine(hist->GetXaxis()->GetXmin(), 0.5*360*60/16384., hist->GetXaxis()->GetXmax(), 0.5*360*60/16384.);
     375    ln.SetLineColor(kYellow);
     376    ln.DrawLine(hist->GetXaxis()->GetXmin(), 1.0*360*60/16384., hist->GetXaxis()->GetXmax(), 1.0*360*60/16384.);
     377    ln.SetLineColor(kRed);
     378    ln.DrawLine(hist->GetXaxis()->GetXmin(), 2.0*360*60/16384., hist->GetXaxis()->GetXmax(), 2.0*360*60/16384.);
     379
     380    c.cd();
     381
     382
     383    //Controll Deviation vs Zd
     384    p = new TPad("", "", 0.5, 0, 1, 0.32);
     385    p->Draw();
     386    p->cd();
     387
     388    gPad->SetBorderMode(0);
    296389    gStyle->SetOptStat(1110);
    297390    gStyle->SetStatFormat(".2g");
     
    299392    mh3 = (MH3*)h5.DrawClone("nonew");
    300393
    301     mh3->GetHist()->SetXTitle("Zd [\\circ]");
    302     mh3->GetHist()->SetYTitle("\\Delta [arcmin]");
     394    TAxis *axey = mh3->GetHist()->GetYaxis();
     395    TAxis *axex = mh3->GetHist()->GetXaxis();
     396    axey->SetLabelSize(0.05);
     397    axey->SetTitleSize(0.05);
     398    axey->SetTitleOffset(0.7);
     399    axex->SetLabelSize(0.05);
     400    axex->SetTitleSize(0.05);
     401    axex->SetTitleOffset(0.85);
     402
     403    mh3->GetHist()->SetYTitle("Zd [\\circ]");
     404    mh3->GetHist()->SetXTitle("\\Delta [arcmin]");
    303405    mh3->GetHist()->SetTitle("Control deviation of the motors");
    304406    mh3->GetHist()->SetStats(1);
    305407    mh3->GetHist()->Draw("box");
    306408
    307     c.cd();
    308 
    309     p = new TPad("", "", 0.6, 0.42, 1, 0.71);
    310     p->Draw();
    311     p->cd();
    312 
    313     gPad->SetBorderMode(0);
    314 
    315     hvt = (MHVsTime*)h1.DrawClone("nonew");
    316 
    317     hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
    318     if (hvt->GetGraph()->GetN())
    319     {
    320         hvt->GetGraph()->GetHistogram()->SetXTitle("Time");
    321         hvt->GetGraph()->GetHistogram()->SetYTitle("Zd [\\circ]");
    322         hvt->GetGraph()->GetHistogram()->SetTitle("Zd vs. Time");
    323         hvt->GetGraph()->GetHistogram()->SetStats(0);
    324     }
    325 
    326     /*
    327     TCanvas &c = d->AddTab("Sky3");
    328 
    329     c.cd();
    330 
    331     p = new TPad("", "", 0, 0, 1, 1);
    332     p->Draw();
    333     p->cd();
    334 
    335     hvt = (MHVsTime*)h1.DrawClone("nonew");
    336     hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
    337     hvt->GetGraph()->GetHistogram()->SetXTitle("Time");
    338     hvt->GetGraph()->GetHistogram()->SetYTitle("Zd [\\circ]");
    339     hvt->GetGraph()->GetHistogram()->SetTitle("Zd vs. Time");
    340     hvt->GetGraph()->GetHistogram()->SetStats(0);
    341 
    342     */
     409    //insert lines for 0.5, 1 and 2 SE
     410    TLine ln;
     411    ln.SetLineColor(kGreen);
     412    ln.DrawLine(0, 0.5*360*60/16384., 90, 0.5*360*60/16384.);
     413    ln.SetLineColor(kYellow);
     414    ln.DrawLine(0, 1.0*360*60/16384., 90, 1.0*360*60/16384.);
     415    ln.SetLineColor(kRed);
     416    ln.DrawLine(0, 2.0*360*60/16384., 90, 2.0*360*60/16384.);
     417
    343418
    344419    //d.SaveAsPS(2, "rep_files/CC_2003_11_27_22_31_59-new.ps");
Note: See TracChangeset for help on using the changeset viewer.