Changeset 3909 for trunk/MagicSoft
- Timestamp:
- 04/30/04 15:30:29 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3908 r3909 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2004/04/30: Daniela Dorner 22 23 * macros/pointing.C 24 - implemented plot: Control Deviation vs Time 25 - rearranged plots 26 27 28 20 29 2004/04/30: Markus Gaug 21 30 … … 34 43 number of photons instead of number of photons, otherwise 35 44 NaN's are obtained 45 36 46 37 47 -
trunk/MagicSoft/Mars/macros/pointing.C
r2841 r3909 83 83 MReadReports read; 84 84 read.AddTree("Drive"); 85 read.AddFile(" ccdata.root");85 read.AddFile("data/2004_01_26_report.root"); 86 86 read.AddToBranchList("MReportDrive.*"); 87 87 … … 89 89 90 90 // Create a task which fills one histogram with the data 91 MHVsTime h0("MReportDrive.fMjd");91 //MHVsTime h0("MReportDrive.fMjd"); 92 92 MHVsTime h1("MReportDrive.fNominalZd"); 93 93 MHVsTime h2("MReportDrive.fNominalAz"); 94 94 MHVsTime h3("MReportDrive.fState"); 95 h0.SetName("Mjd"); 95 MHVsTime h7("MReportDrive.GetAbsError*60"); 96 //h0.SetName("Mjd"); 96 97 h1.SetName("Zd"); 97 98 h2.SetName("Az"); 98 99 h3.SetName("State"); 100 h7.SetName("ControlDeviation"); 99 101 100 102 MH3 h4("MReportDrive.GetAbsError*60"); … … 116 118 plist.AddToList(&bins3); 117 119 118 MFillH fill0(&h0, "MTimeDrive");120 //MFillH fill0(&h0, "MTimeDrive"); 119 121 MFillH fill1(&h1, "MTimeDrive"); 120 122 MFillH fill2(&h2, "MTimeDrive"); 121 123 MFillH fill3(&h3, "MTimeDrive"); 124 MFillH fill7(&h7, "MTimeDrive"); 122 125 MFillH fill4(&h4); 123 126 MFillH fill5(&h5); 124 127 125 fill0.SetBit(MFillH::kDoNotDisplay);128 //fill0.SetBit(MFillH::kDoNotDisplay); 126 129 fill1.SetBit(MFillH::kDoNotDisplay); 127 130 fill2.SetBit(MFillH::kDoNotDisplay); … … 129 132 fill4.SetBit(MFillH::kDoNotDisplay); 130 133 fill5.SetBit(MFillH::kDoNotDisplay); 134 fill7.SetBit(MFillH::kDoNotDisplay); 131 135 132 136 // ----------------------------------------------- … … 138 142 tlist.AddToList(&fill3); 139 143 tlist.AddToList(&tracking); 140 tlist.AddToList(&fill0);144 //tlist.AddToList(&fill0); 141 145 tlist.AddToList(&fill1); 142 146 tlist.AddToList(&fill2); 143 147 tlist.AddToList(&fill4); 144 148 tlist.AddToList(&fill5); 149 tlist.AddToList(&fill7); 145 150 146 151 gStyle->SetOptStat(0); … … 161 166 tlist.PrintStatistics(); 162 167 168 163 169 TGraph *g1 = h1.GetGraph(); 164 170 TGraph *g2 = h2.GetGraph(); 165 171 166 172 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); 171 177 p->Draw(); 172 178 p->cd(); … … 190 196 } 191 197 192 //TGraph gr;193 194 198 Double_t *zd=g1->GetY(); 195 199 Double_t *az=g2->GetY(); … … 223 227 224 228 c.cd(); 229 230 225 231 /* 232 //MJD 226 233 p = new TPad("", "", 0.6, 0.66, 1, 1); 227 234 p->Draw(); … … 237 244 c.cd(); 238 245 */ 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"); 245 257 246 258 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); 247 266 248 267 mh3->GetHist()->SetXTitle("\\Delta [arcmin]"); … … 251 270 mh3->GetHist()->SetStats(1); 252 271 272 //insert lines for 0.5, 1 and 2 SE 253 273 TLine ln; 254 274 ln.SetLineColor(kGreen); … … 261 281 c.cd(); 262 282 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(); 266 290 267 291 hvt = (MHVsTime*)h3.DrawClone("nonew"); … … 290 314 c.cd(); 291 315 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); 296 389 gStyle->SetOptStat(1110); 297 390 gStyle->SetStatFormat(".2g"); … … 299 392 mh3 = (MH3*)h5.DrawClone("nonew"); 300 393 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]"); 303 405 mh3->GetHist()->SetTitle("Control deviation of the motors"); 304 406 mh3->GetHist()->SetStats(1); 305 407 mh3->GetHist()->Draw("box"); 306 408 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 343 418 344 419 //d.SaveAsPS(2, "rep_files/CC_2003_11_27_22_31_59-new.ps");
Note:
See TracChangeset
for help on using the changeset viewer.