#include void DrawMarker(TVirtualPad *pad, Double_t r0, Double_t phi0, Double_t r1, Double_t phi1) { TView *view = pad->GetView(); if (!view) { cout << "No View!" << endl; return; } TMarker mark0; TMarker mark1; mark0.SetMarkerStyle(kStar); mark1.SetMarkerStyle(kStar); mark1.SetMarkerColor(kRed); r0 /= 90; r1 /= 90; phi0 *= TMath::DegToRad(); phi1 *= TMath::DegToRad(); Double_t x0[3] = { r0*cos(phi0), r0*sin(phi0), 0}; Double_t x1[3] = { r1*cos(phi1), r1*sin(phi1), 0}; mark0.DrawMarker(x0[0], x0[1]); mark1.DrawMarker(x1[0], x1[1]); return; Double_t y0[3], y1[3]; view->WCtoNDC(x0, y0); view->WCtoNDC(x1, y1); mark0.DrawMarker(y0[0], y0[1]); mark1.DrawMarker(y1[0], y1[1]); } int fill(const char *fname, TGraph *g, TH1 *h) { /* TH2F h2res1("Res2D1", " Dataset positions on the sky ", 32, 0, 360, 10, 0, 90); h2res1.SetBit(TH1::kNoStats); h2res1.DrawCopy("surf1pol"); gPad->Modified(); gPad->Update(); gPad->SetTheta(90); gPad->SetPhi(-90); DrawMarker(gPad, 45, 0, 0, 0); gPad->Modified(); gPad->Update(); return; */ ifstream fin(fname); cout << "Reading " << setw(23) << gSystem->BaseName(fname) << "..." << flush; while (1) { TString str; str.ReadLine(fin); if (!fin) break; if (str.Contains("#")) continue; Float_t alt, az, dalt, daz, mjd; sscanf(str.Data(), "%f %f %*f %*f %*f %*f %f %f %f", &az, &alt, &dalt, &daz, &mjd); if (dalt==0/* || GetResidual(alt, az, alt+dalt, az+daz)>0.1*/) continue; mjd -= 53140.097505; Double_t res = MAstro::GetDevAbs(90-(alt-dalt), -dalt, -daz); g[0].SetPoint(g[0].GetN(), g[0].GetN(), fabs(dalt)); g[1].SetPoint(g[1].GetN(), g[1].GetN(), fabs(daz)); g[2].SetPoint(g[2].GetN(), g[2].GetN(), res); h->Fill(res); } cout << "done (" << setw(3) << (Int_t)h->GetEntries() << "/"; cout << setw(4) << g[0].GetN() << ") " << flush; return g[0].GetN(); } struct Description_t { const char *fName; const char *fTitle; const char *fFile; }; const Int_t counts = 29+10+18+1+13+11+31-27+3+5+18; Description_t desc[counts] = { /* // 29. Apr. 2004 ~25800 // 5. Aug. 2004 ~32000 // 19. Aug. 2004 ~33530 // 7. Jun. 2005 ~57650 // 8. Jun. 2005 // 9. Jun. 2005 ~57860 // 12. Sep. 2005 ~68338 // 24. Nov. 2005 ~75562 // 17. Oct. 2006 ~103130 // 17. Jun. 2007 ~248193 */ // Culmination tests //{"0411", "TPoints Residuals 11/2004" , "tpoint/tpoint0411.txt"}, //{"+0412", "TPoints Residuals 12/2004" , "tpoint/tpoint0412.txt"}, // 1: Worse pointing due to realignment of the mirror {"0503", "TPoints Residuals 3/2005" , "tpoint/tpoint0503.txt"}, // New pointing model installed (29.4.2005) // MIRROR MISALIGNMENT (WHEN?) {"0504", "TPoints Residuals 4/2005" , "tpoint/tpoint0504.txt"}, {"+05051", "TPoints Residuals 5/2005-1" , "tpoint/tpoint0505-1.txt"}, // 2: Mirror alignment has been fixed {"05052", "TPoints Residuals 5/2005-2" , "tpoint/tpoint0505-2.txt"}, // Pointing model changed due to fixing a screw {"0506", "TPoints Residuals 6/2005" , "tpoint/tpoint0506.txt"}, // New pointing model applied (7.-9.6.2005) {"0508", "TPoints Residuals 8/2005" , "tpoint/tpoint0508.txt"}, // New pointing model applied (12.9.2005) {"0509", "TPoints Residuals 9/2005" , "tpoint/tpoint0509.txt"}, // Quick-and-dirty mirror alignment (only 4 TPoints) {"+0510", "TPoints Residuals 10/2005" , "tpoint/tpoint0510.txt"}, // 3: New mirror alignment after Tenerife meeting //{"05111", "TPoints Residuals 11/2005-1" , "tpoint/tpoint0511-1.txt"}, // New pointing model installed (24.11.2005) {"05112", "TPoints Residuals 11/2005-2" , "tpoint/tpoint0511-2.txt"}, {"+0512", "TPoints Residuals 12/2005" , "tpoint/tpoint0512.txt"}, {"+0601", "TPoints Residuals 1/2006" , "tpoint/tpoint0601.txt"}, {"+0603-1", "TPoints Residuals 3/2006-1" , "tpoint/tpoint0603-1.txt"}, // Changes to the mirror {"0603-2", "TPoints Residuals 3/2006-2" , "tpoint/tpoint0603-2.txt"}, {"+0604", "TPoints Residuals 4/2006" , "tpoint/tpoint0604.txt"}, {"+0607", "TPoints Residuals 7/2006" , "tpoint/tpoint0607.txt"}, {"+0608", "TPoints Residuals 8/2006" , "tpoint/tpoint0608.txt"}, {"+0609", "TPoints Residuals 9/2006" , "tpoint/tpoint0609.txt"}, {"+0610", "TPoints Residuals 10/2006" , "tpoint/tpoint0610.txt"}, // New pointing model: 6/10/17 {"0611", "TPoints Residuals 11/2006" , "tpoint/tpoint0611.txt"}, {"+0612", "TPoints Residuals 12/2006" , "tpoint/tpoint0612.txt"}, {"+0701", "TPoints Residuals 1/2007" , "tpoint/tpoint0701.txt"}, {"+0702", "TPoints Residuals 2/2007" , "tpoint/tpoint0702.txt"}, {"+0703", "TPoints Residuals 3/2007" , "tpoint/tpoint0703.txt"}, {"+0704", "TPoints Residuals 4/2007" , "tpoint/tpoint0704.txt"}, {"+0705", "TPoints Residuals 5/2007" , "tpoint/tpoint0705.txt"}, {"+0706", "TPoints Residuals 6/2007" , "tpoint/tpoint0706.txt"}, {"+07071", "TPoints Residuals 7/2007-1" , "tpoint/tpoint0707-1.txt"}, {"+07072", "TPoints Residuals 7/2007-2" , "tpoint/tpoint0707-2.txt"}, // New pointing model: 07/06/17 {"", "", ""}, // AMC adjust: 07/08/04 {"0708", "TPoints Residuals 7/8/23", "tpoint/m1/tpoints20070823.txt"}, // New pointing model: 07/10/18 {"", "", ""}, // New pointing model: 08/01/14 {"0801", "TPoints Residuals 7/8/23", "tpoint/m1/tpoints20080115.txt"}, // New pointing model 080611 {"0806", "TPoints Residuals 7/8/23", "tpoint/tpoint0806.txt"}, // New pointing model 080618 {"0807", "", "tpoint/tpoint0807.txt"}, {"+0807", "", "tpoint/tpoint0808.txt"}, {"+0807", "", "tpoint/tpoint0811.txt"}, {"+0807", "", "tpoint/tpoint0812.txt"}, {"+0901", "", "tpoint/tpoint0901.txt"}, // Drive upgrade started {"", "", ""}, // Drive Upgrade finished 090511 {"090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090511_220118.txt"}, {"+090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090511_221333.txt"}, {"+090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090511_222434.txt"}, {"+090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090511_223152.txt"}, {"+090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090511_223706.txt"}, {"+090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090511_224056.txt"}, {"+090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090511_231933.txt"}, {"+090512", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_12/tpoint_20090512_011131.txt"}, // First new pointing model 090512 {"090513", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_13/tpoint_20090512_210644.txt"}, {"+090513", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_13/tpoint_20090513_002757.txt"}, {"+090513", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_13/tpoint_20090513_025124.txt"}, {"+090513", "TPoints Residuals 7/8/23", "tpoint/m1/2009_05_13/tpoint_20090513_033505.txt"}, // Second new pointing model 090513 {"090514", "TPoints 09/05/14", "tpoint/m1/2009_05_14/tpoint_20090514_011903.txt"}, {"090517", "TPoints 09/05/17" ,"tpoint/m1/2009_05_17/tpoint_20090516_234825.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_05_17/tpoint_20090517_023340.txt"}, // New period {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_01/tpoint_20090531_215148.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_01/tpoint_20090531_222549.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_02/tpoint_20090601_223009.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_03/tpoint_20090602_213509.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_03/tpoint_20090603_011936.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_04/tpoint_20090603_215840.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_04/tpoint_20090603_230510.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_05/tpoint_20090604_215943.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_05/tpoint_20090604_232320.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_10/tpoint_20090609_231948.txt"}, {"+090517","TPoints 09/05/17", "tpoint/m1/2009_06_11/tpoint_20090611_011155.txt"}, // ------- Something happened (reason unknown) -------- {"090613","TPoints 09/05/17", "tpoint/m1/2009_06_11/tpoint_20090611_023625.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_06_13/tpoint_20090613_033838.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_06_14/tpoint_20090614_021257.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_06_18/tpoint_20090618_041433.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_02/tpoint_20090701_215304.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_02/tpoint_20090701_222059.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_02/tpoint_20090701_224051.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_02/tpoint_20090701_225615.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_02/tpoint_20090701_230946.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_03/tpoint_20090702_225940.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_04/tpoint_20090703_224721.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_05/tpoint_20090705_012638.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_12/tpoint_20090712_014300.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_12/tpoint_20090712_024710.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_13/tpoint_20090713_004241.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_13/tpoint_20090713_025934.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_14/tpoint_20090714_024729.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_15/tpoint_20090715_021320.txt"}, {"+090613","TPoints 09/05/17", "tpoint/m1/2009_07_15/tpoint_20090715_025237.txt"}, // ----- AMC adjust (23.7.) ----- {"090723","TPoints 09/05/17", "tpoint/m1/2009_07_24/tpoint_20090724_051142.txt"}, {"+090723", "TPoints 08/2009" , "tpoint/m1/2009_08_02/tpoint_20090801_223848.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_03/tpoint_20090802_224434.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_04/tpoint_20090803_230214.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_10/tpoint_20090809_233524.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_10/tpoint_20090810_014642.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_10/tpoint_20090810_020616.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_11/tpoint_20090810_232543.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_12/tpoint_20090812_001846.txt"}, {"+090723","TPoints 08/2009" , "tpoint/m1/2009_08_13/tpoint_20090813_030807.txt"}, // ------ 09/08/17 new pointing model ------- {"090817","TPoints", "tpoint/m1/2009_09_01/tpoint_20090831_233034.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_02/tpoint_20090901_231918.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_02/tpoint_20090902_005204.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_08/tpoint_20090907_213404.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_09/tpoint_20090908_225027.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_09/tpoint_20090908_231720.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_09/tpoint_20090909_010649.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_10/tpoint_20090909_235222.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_10/tpoint_20090910_025054.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_12/tpoint_20090912_004826.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_17/tpoint_20090917_015404.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_18/tpoint_20090917_202449.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_23/tpoint_20090922_223445.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_24/tpoint_20090923_204444.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_24/tpoint_20090924_041824.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_25/tpoint_20090924_225725.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_26/tpoint_20090925_212537.txt"}, {"+090817","TPoints", "tpoint/m1/2009_09_27/tpoint_20090926_212332.txt"}, }; void plot_m1() { TGraph g[3]; MBinning bins(100, 0, 0.2); TArrayI n(counts); TH1F hx[counts]; Int_t num = -1; for (int i=0; iSetBit(kCanDelete); obj[i]->Draw(i==0?"AP":"P"); } TLegend leg(0.905, 0.86, 0.99, 0.99); leg.AddEntry(obj[0], " \\Delta\\theta"); leg.AddEntry(obj[1], " \\Delta\\phi"); leg.AddEntry(obj[2], " \\Delta"); leg.DrawClone()->SetBit(kCanDelete); TLine l; l.SetLineColor(kBlue); for (int i=0; iSetBorderMode(0); gPad->SetFrameBorderMode(0); gPad->SetFillColor(kWhite); gPad->SetRightMargin(0.01); gPad->SetTopMargin(0.01); gPad->SetLeftMargin(0.06); gPad->SetGridy(); //Int_t col[] = { 12, 15, 17, 19 }; //Int_t col[] = { 12, 16, 18, 0 }; Int_t col[] = { 13, 16, 19, 0 }; TH1 *h = &histres[2];//result[3].GetHistogram(); h->SetXTitle(""); h->SetYTitle("Residual / arcmin"); h->SetBit(TH1::kNoStats); h->GetXaxis()->CenterTitle(); h->GetYaxis()->CenterTitle(); h->GetYaxis()->SetTitleOffset(0.75); // h->GetXaxis()->SetTimeFormat("%m/%y %F1995-01-01 00:00:00 GMT"); // h->GetXaxis()->SetTimeDisplay(1); h->GetXaxis()->SetLabelColor(kWhite); TLine line; for (int j=2; j>=0; j--) { histres[j].SetMinimum(0); histres[j].SetFillColor(col[j]);//12+2*j); histres[j].DrawCopy(j==2?"":"same"); /* //result[j].SetLineColor(kBlue); //result[j].SetLineWidth(2); //result[j].SetMarkerColor(kBlue); result[j].SetMinimum(0); //result2.SetMarkerStyle(kFullDotMedium); //result[j].SetMarkerStyle(23); result[j].SetFillColor(col[j]);//12+2*j); result[j].DrawClone(j==3 ? "ABX" : "B"); // E3 B */ } resultm.SetMarkerStyle(20); resultm.SetMarkerSize(0.8); resultm.DrawClone("P"); line.DrawLine(time[0], 0, time[0], histres[2].GetMaximum()); for (int i=0; i