Changeset 2568
- Timestamp:
- 11/25/03 18:25:49 (21 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r2518 r2568 1 1 -*-*- END -*-*- 2 2003/11/25 - Thomas Bretz (La Palma) 3 4 * slog: 5 - added this small script to analyze log-files 6 7 * bending_magic.txt: 8 - changed to new values comming from new fit 9 with the new algorithm 10 11 * cosy.cc: 12 - removed old style InitGUI stuff 13 - removed TROOT instance 14 - changed to support gcc 3.3 15 - added come log-output 16 - undeclared HAVE_CAMERA 17 18 * stars.txt: 19 - added some magnitudes 20 - removed Mars 21 22 * main/MBending.cc: 23 - exchanged order: moved NPAE and CA behind AN and AW 24 - replaced the approximation for AN/AW by the correct algorithm. 25 For Magic (1.5deg) the small angle approximation is wrong 26 - added some DEBUG option 27 28 * tpoint/gui.C: 29 - small changes 30 31 32 2 33 2003/11/17 - Thomas Bretz (La Palma) 3 34 -
trunk/MagicSoft/Cosy/bending_magic.txt
r2280 r2568 1 MAGIC1 2003/ 07/16 16:15:09.7830741 MAGIC1 2003/11/23 0:46:12.880585 2 2 S 00 000000 000000 0000000 3 IA 501.79683 -1 4 IE -9.0710418 -1 5 CA 0 -1 6 NPAE 0.14889374 -1 7 AN 0 -1 8 AW -1.5600339 -1 9 NRX 0 -1 10 NRY 0 -1 11 CRX 0 -1 12 CRY 0 -1 13 ECES 0 -1 14 ACES 0 -1 15 ECEC 0 -1 16 ACEC 0 -1 3 IA 501.6639 0.034618314 4 IE -9.0592286 0.020049537 5 FLOP 0 0 6 AN 0 0 7 AW -1.5593339 0.022280707 8 NPAE 0.073756927 0.039384952 9 CA 0 0 10 TF 0 0 11 TX 0 0 12 ECES 0 0 13 ACES 0 0 14 ECEC 0 0 15 ACEC 0 0 16 NRX 0 0 17 NRY 0 0 18 CRX 0 0 19 CRY 0 0 20 MAGIC1 0 0 21 MAGIC2 0 0 17 22 END -
trunk/MagicSoft/Cosy/cosy.cc
r2384 r2568 1 #include <io manip.h>2 #include < fstream.h>3 #include < iostream.h>1 #include <iostream> 2 #include <iomanip> 3 #include <fstream> 4 4 5 #include <TROOT.h>6 5 #include <TSystem.h> 7 6 #include <TApplication.h> … … 16 15 17 16 //#define EXPERT 18 #define HAVE_CAMERA17 //#define HAVE_CAMERA 19 18 20 19 #define clog(txt) \ … … 26 25 } 27 26 28 TROOT root("Cosy", "Magic Control System");29 30 27 /* ---------------------------------------------------------------------- */ 31 //extern void InitGui();32 //VoidFuncPtr_t initfuncs[] = { InitGui, 0 };33 34 28 int main(int argc, char **argv) 35 29 { … … 57 51 } 58 52 53 cout << "Open Logfile: " << name << endl; 54 59 55 MLog *l = new MLog(name, kTRUE); 60 56 MLog &lout = *l; 61 57 62 clog("Starting Cosy at " << time .GetTimeStr()<< " ...");58 clog("Starting Cosy at " << time << " ..."); 63 59 64 60 // … … 67 63 clog("- Initialising Root environment."); 68 64 69 TApplication* app = new TApplication("App", &argc, argv); 65 // FIXME: Fails deleteing something in TGClient::fWlist 66 TApplication *app=new TApplication("App", &argc, argv); 70 67 71 68 // … … 125 122 clog("- Stopping cosy."); 126 123 cosy->Stop(); 127 clog("- cosy stopped."); 124 125 time.Now(); 126 clog(time << ": MCosy stopped."); 128 127 129 128 delete cosy; 130 129 131 clog("- Terminating Program."); 130 time.Now(); 131 clog("Terminating cosy at " << time); 132 132 133 133 delete l; -
trunk/MagicSoft/Cosy/main/MBending.cc
r2518 r2568 61 61 #include <fstream.h> 62 62 #include <iomanip.h> 63 #include <TVector3.h> 63 64 64 65 #include <TMinuit.h> … … 69 70 70 71 #undef DEBUG 71 #define DEBUG(txt) txt72 //#define DEBUG(txt)72 //#define DEBUG(txt) txt 73 #define DEBUG(txt) 73 74 74 75 const Int_t MBending::fNumPar=19; … … 83 84 fCoeff[ 1] = &fIe; fName[ 1] = "IE"; 84 85 fCoeff[ 2] = &fFlop; fName[ 2] = "FLOP"; 85 fCoeff[ 3] = &f Npae; fName[ 3] = "NPAE";86 fCoeff[ 4] = &f Ca; fName[ 4] = "CA";87 fCoeff[ 5] = &f An; fName[ 5] = "AN";88 fCoeff[ 6] = &f Aw; fName[ 6] = "AW";86 fCoeff[ 3] = &fAn; fName[ 3] = "AN"; 87 fCoeff[ 4] = &fAw; fName[ 4] = "AW"; 88 fCoeff[ 5] = &fNpae; fName[ 5] = "NPAE"; 89 fCoeff[ 6] = &fCa; fName[ 6] = "CA"; 89 90 fCoeff[ 7] = &fTf; fName[ 7] = "TF"; 90 91 fCoeff[ 8] = &fTx; fName[ 8] = "TX"; … … 103 104 fDescr[ 1] = "Index Error Zenith Distance"; 104 105 fDescr[ 2] = "Vertical Sag"; 105 fDescr[ 3] = "Az -El Nonperpendicularity";106 fDescr[ 4] = " Left-Right Collimation Error";107 fDescr[ 5] = "Az imuth Axis Misalignment (N-S)";108 fDescr[ 6] = " Azimuth Axis Misalignment (E-W)";106 fDescr[ 3] = "Azimuth Axis Misalignment (N-S)"; 107 fDescr[ 4] = "Azimuth Axis Misalignment (E-W)"; 108 fDescr[ 5] = "Az-El Nonperpendicularity"; 109 fDescr[ 6] = "Left-Right Collimation Error"; 109 110 fDescr[ 7] = "Tube fluxture (sin)"; 110 111 fDescr[ 8] = "Tube fluxture (tan)"; … … 291 292 292 293 DEBUG(cout << setprecision(16)); 293 DEBUG(cout << "Bend 8: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);294 DEBUG(cout << "Bend7: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 294 295 295 296 const AltAz CRX(-fCrx*sin(p.Az()-p.Alt()), fCrx*cos(p.Az()-p.Alt())/cos(p.Alt())); … … 298 299 p += CRY; 299 300 300 DEBUG(cout << "Bend 7: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);301 DEBUG(cout << "Bend6: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 301 302 302 303 const AltAz NRX(fNrx*sin(p.Alt()), -fNrx); … … 305 306 p += NRY; 306 307 307 DEBUG(cout << "Bend 6: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);308 DEBUG(cout << "Bend5: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 308 309 309 310 const AltAz CES(-fEces*sin(p.Alt()), -fAces*sin(p.Az())); … … 312 313 p += CEC; 313 314 314 DEBUG(cout << "Bend 5: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);315 DEBUG(cout << "Bend4: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 315 316 316 317 const AltAz TX(Sign(fTx/tan(p.Alt()), p.Alt()), 0); … … 319 320 p += TF; 320 321 321 DEBUG(cout << "Bend4: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 322 322 323 DEBUG(cout << "Bend3: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 324 325 /* 326 //New Corrections for NPAE and CA: 327 TVector3 v(1.,1.,1.); // Vector in cartesian coordinates 328 329 //Set Azimuth and Elevation 330 v.SetPhi(p.Az()); 331 v.SetTheta(TMath::Pi()/2-p.Alt()); 332 //Rotation Vectors: 333 TVector3 vNpae( cos(p.Az()), sin(p.Az()), 0); 334 TVector3 vCa( -cos(p.Az())*cos(p.Alt()), -sin(p.Az())*cos(p.Alt()), sin(p.Alt())); 335 //Rotate around the vectors vNpae and vCa 336 v.Rotate(fNpae, vNpae); 337 v.Rotate(fCa, vCa); 338 339 p.Az(v.Phi()); 340 p.Alt(TMath::Pi()/2-v.Theta()); 341 */ 342 343 //Old correction terms for Npae and Ca: 344 const AltAz CA(0, -fCa/cos(p.Alt())); 345 p += CA; 346 347 const AltAz NPAE(0, -fNpae*tan(p.Alt())); 348 p += NPAE; 349 350 DEBUG(cout << "Bend2: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 351 352 // New Corrections for AW and AN: 353 TVector3 v2(1.,1.,1.); // Vector in cartesian coordinates 354 // Set Azimuth and Elevation 355 v2.SetPhi(p.Az()); 356 v2.SetTheta(TMath::Pi()/2-p.Alt()); 357 // Rotate around the x- and y-axis 358 v2.RotateX(fAw); 359 v2.RotateY(fAn); 360 // Get Azimuth and Elevation 361 p.Az(v2.Phi()); 362 p.Alt(TMath::Pi()/2-v2.Theta()); 363 364 /* 365 // Old correction terms for An and Aw: 323 366 cout << fAw << " " << cos(p.Az()) << " " << tan(p.Alt()) << endl; 324 367 cout << fAw* cos(p.Az())*tan(p.Alt())*180/3.1415 << endl; … … 328 371 p += AW; 329 372 p += AN; 330 331 DEBUG(cout << "Bend3: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 332 333 const AltAz CA(0, -fCa/cos(p.Alt())); 334 p += CA; 335 336 DEBUG(cout << "Bend2: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 337 338 const AltAz NPAE(0, -fNpae*tan(p.Alt())); 339 p += NPAE; 373 */ 374 375 376 340 377 341 378 DEBUG(cout << "Bend1: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); … … 381 418 DEBUG(cout << "Back1: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 382 419 420 /* 421 //Old correction terms for An and Aw: 422 const AltAz AN(-fAn*cos(p.Az()), -fAn*sin(p.Az())*tan(p.Alt())); 423 const AltAz AW( fAw*sin(p.Az()), -fAw*cos(p.Az())*tan(p.Alt())); 424 p -= AN; 425 p -= AW; 426 */ 427 428 // New Corrections for AN and AW: 429 TVector3 v(1.,1.,1.); // Vector in cartesian coordinates 430 // Set Azimuth and Elevation 431 v.SetPhi(p.Az()); 432 v.SetTheta(TMath::Pi()/2-p.Alt()); 433 // Rotate around the x- and y-axis 434 v.RotateY(-fAn); 435 v.RotateX(-fAw); 436 // Get Azimuth and Elevation 437 p.Az(v.Phi()); 438 p.Alt(TMath::Pi()/2-v.Theta()); 439 440 441 DEBUG(cout << "Back2: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 442 443 //Old Correction terms for Npae and Ca: 383 444 const AltAz NPAE(0, -fNpae*tan(p.Alt())); 384 445 p -= NPAE; 385 446 386 DEBUG(cout << "Back2: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);387 388 447 const AltAz CA(0, -fCa/cos(p.Alt())); 389 448 p -= CA; 390 449 450 /* 451 //New Correction term for Npae and Ca: 452 TVector3 v2(1.,1.,1.); // Vector in cartesian coordinates 453 //Set Azimuth and Elevation 454 v2.SetPhi(p.Az()); 455 v2.SetTheta(TMath::Pi()/2-p.Alt()); 456 //Rotation Vectors: 457 TVector3 vNpae( cos(p.Az()), sin(p.Az()), 0); 458 TVector3 vCa( -cos(p.Az())*cos(p.Alt()), -sin(p.Az())*cos(p.Alt()), sin(p.Alt())); 459 //Rotate around the vectors vCa and vNpae 460 v2.Rotate(-fCa, vCa); 461 v2.Rotate(-fNpae, vNpae); 462 463 p.Az(v2.Phi()); 464 p.Alt(TMath::Pi()/2-v2.Theta()); 465 */ 466 391 467 DEBUG(cout << "Back3: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 392 393 cout << fAw << " " << cos(p.Az()) << " " << tan(p.Alt()) << endl;394 cout << fAw* cos(p.Az())*tan(p.Alt())*180/3.1415 << endl;395 396 const AltAz AN(-fAn*cos(p.Az()), -fAn*sin(p.Az())*tan(p.Alt()));397 const AltAz AW( fAw*sin(p.Az()), -fAw*cos(p.Az())*tan(p.Alt()));398 p -= AN;399 p -= AW;400 401 DEBUG(cout << "Back4: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);402 468 403 469 const AltAz TF(Sign(fTf*cos(p.Alt()), p.Alt()), 0); … … 406 472 //p -= TX; 407 473 408 DEBUG(cout << "Back 5: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);474 DEBUG(cout << "Back4: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 409 475 410 476 const AltAz CEC(-fEcec*cos(p.Alt()), -fAcec*cos(p.Az())); … … 413 479 p -= CES; 414 480 415 DEBUG(cout << "Back 6: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);481 DEBUG(cout << "Back5: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 416 482 417 483 const AltAz NRY(fNry*cos(p.Alt()), -fNry*tan(p.Alt())); … … 420 486 p -= NRX; 421 487 422 DEBUG(cout << "Back 7: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);488 DEBUG(cout << "Back6: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 423 489 424 490 const AltAz CRY(-fCry*cos(p.Az()-p.Alt()), -fCry*sin(p.Az()-p.Alt())/cos(p.Alt())); … … 427 493 p -= CRX; 428 494 429 DEBUG(cout << "Back 8: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl);495 DEBUG(cout << "Back7: " << 90-p.Alt()*180/TMath::Pi() << " " << p.Az()*180/TMath::Pi() << endl); 430 496 431 497 return p; -
trunk/MagicSoft/Cosy/stars.txt
r2518 r2568 1 14 28 33 42 40 21 1ES1426+428 2 20 00 00 65 08 55 1ES1959+650 3 12 29 07 02 03 09 3C273 4 12 56 11 -05 47 22 3C279 1 14 28 33 42 40 21 1ES1426+428 (16.45) 2 20 00 00 65 08 55 1ES1959+650 (12.8) 3 12 29 07 02 03 09 3C273 (12.86) 4 12 56 11 -05 47 22 3C279 (17.75) 5 5 12 54 02 55 57 35 Alioth (1.77) 6 6 00 08 24 29 05 26 Alpheratz (2.06) … … 9 9 14 15 40 19 10 57 Arcturus (-0.04) 10 10 13 47 33 49 18 48 Benetnasch (1.86) 11 22 02 43 42 16 40 BL-Lac 11 22 02 43 42 16 40 BL-Lac (14.5) 12 12 00 09 11 59 08 59 Caph (2.27) 13 12 59 49 27 58 50 Coma Cluster 13 12 59 49 27 58 50 Coma Cluster (10.70) 14 14 05 34 32 22 00 52 Crab 15 20 32 26 40 57 28 Cygnus-X3 15 20 32 26 40 57 28 Cygnus-X3 16 16 21 45 41 31 43 09 Dark Patch 2 17 17 20 41 26 45 16 49 Deneb (1.25) … … 20 20 18 24 10 -34 23 05 Kaus Australis (1.85) 21 21 05 34 32 22 00 52 M1 (8.4) 22 22 22 08 -13 51 08 Mars23 22 13 23 56 54 55 31 Mizar A (2.23) 24 23 11 04 26 38 12 36 Markarian-421 -
trunk/MagicSoft/Cosy/tpoint/gui.C
r2407 r2568 647 647 const Int_t size = fOriginal.GetSize(); 648 648 649 ifstream fin(" ../tpoint_new.txt");649 ifstream fin("tpoint.txt"); 650 650 651 651 while (fin && fin.get()!='\n'); … … 654 654 if (!fin) 655 655 { 656 cout << "File not found!" << endl;656 cout << "File 'tpoint.txt' not found!" << endl; 657 657 return; 658 658 } -
trunk/MagicSoft/Mars/Changelog
r2567 r2568 4 4 5 5 -*-*- END OF LINE -*-*- 6 2003/11/25: Abelardo Moralejo 6 2003/11/25: Thomas Bretz 7 8 * mgeom/MGeomMirror.h: 9 - added Getter functions for Mirror Center and Mirror 10 Normal vector 11 12 13 14 2003/11/25: Abelardo Moralejo 7 15 8 16 * mimage/MStereoPar.[h,cc] … … 14 22 - Updated accordingly. 15 23 16 2003/11/23: Thomas Bretz 24 25 26 2003/11/23: Thomas Bretz 17 27 18 28 * star.cc: … … 87 97 88 98 89 99 2003/11/22: Thomas Bretz 90 100 91 101 * mreport/MReportCamera.cc: … … 189 199 190 200 191 201 2003/11/21: Thomas Bretz 192 202 193 203 * mraw/MRawEvtData.cc: … … 255 265 256 266 257 267 2003/11/20: Markus Gaug 258 268 259 269 * macros/calibration.C -
trunk/MagicSoft/Mars/mgeom/MGeomMirror.h
r2566 r2568 8 8 #ifndef ROOT_TArrayF 9 9 #include <TArrayF.h> 10 #endif 11 12 #ifndef ROOT_TVector3 13 #include <TVector3.h> 10 14 #endif 11 15 … … 46 50 void SetReflectivity(const TArrayF &wav, const TArrayF &ref); 47 51 48 void SetArraySize(Int_t dim) { fWavelength.Set(dim); fReflectivity.Set(dim); } 52 void SetArraySize(Int_t dim) { fWavelength.Set(dim); fReflectivity.Set(dim); } 53 54 TVector3 GetMirrorCenter() const { return TVector3(fX/100, fY/100, fZ/100); } 55 TVector3 GetMirrorNorm() const { return TVector3(fXN, fYN, fZN); } 49 56 50 57 ClassDef(MGeomMirror, 2) // geometry class describing one mirror
Note:
See TracChangeset
for help on using the changeset viewer.