Changeset 4521
- Timestamp:
- 08/06/04 10:13:59 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4520 r4521 21 21 22 22 23 2004/08/05: Thomas Bretz 24 25 * mastro/MAstroCatalog.[h,cc]: 26 - changed return type of AddObject to Bool_t 27 - changed Reading member function to use AddObject 28 29 30 23 31 2004/08/05: Robert Wagner 24 32 … … 26 34 - Added MAstroCatalog::AddObject, functionality to insert single 27 35 objects manually; needed for mtemp/mmpi/MSourceDirections 36 28 37 29 38 -
trunk/MagicSoft/Mars/Makefile.conf.general
r4020 r4521 18 18 # export MARSLIBS="-lX11 -lXpm -L/usr/X11R6/lib" 19 19 # 20 DEFINES = -DMARSVER=\" \<cvs\>\" -D__MARS__ -DROOTVER=\"$(ROOTVER)\" $(ARCHDEF) $(MARSDEFINES)20 DEFINES = -DMARSVER=\"0.8.5\" -D__MARS__ -DROOTVER=\"$(ROOTVER)\" $(ARCHDEF) $(MARSDEFINES) 21 21 22 22 CXXFLAGS = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG) $(DEFINES) -
trunk/MagicSoft/Mars/NEWS
r4516 r4521 6 6 7 7 8 *** Version <cvs>8 *** Version 0.8.5 (2004/08/06) 9 9 10 10 - new Signal Extractors: MExtractFixedWindowSpline … … 33 33 34 34 - Added mean values to MPedPhotCam 35 36 - Added Makefile for Darwin (this OS is NOT officially supported!) 35 37 36 38 -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
r4517 r4521 287 287 Int_t MAstroCatalog::ReadXephem(TString catalog) 288 288 { 289 SetBit(kHasChanged);290 291 289 gLog << inf << "Reading Xephem catalog: " << catalog << endl; 292 290 … … 354 352 dec0 *= TMath::Pi()/180; 355 353 356 MVector3 *star=new MVector3; 357 star->SetRaDec(ra0, dec0, mag); 358 star->SetName(name); 359 360 if (star->Angle(fRaDec)*TMath::RadToDeg()>fRadiusFOV) 361 { 362 delete star; 363 continue; 364 } 365 366 fList.Add(star); 367 add++; 354 if (AddObject(ra0, dec0, mag, name)) 355 add++; 368 356 } 369 357 gLog << inf << "Read " << add << " out of " << cnt << " (Total max mag=" << maxmag << ")" << endl; … … 380 368 Int_t MAstroCatalog::ReadNGC2000(TString catalog) 381 369 { 382 SetBit(kHasChanged);383 384 370 gLog << inf << "Reading NGC2000 catalog: " << catalog << endl; 385 371 … … 429 415 const Double_t dec = MAstro::Dms2Rad(decd, decm, 0, decs); 430 416 431 MVector3 *star=new MVector3; 432 star->SetRaDec(ra, dec, mag); 433 star->SetName(row(0, 8)); 434 if (star->Angle(fRaDec)*TMath::RadToDeg()>fRadiusFOV) 435 { 436 delete star; 437 continue; 438 } 439 440 fList.Add(star); 441 add++; 417 if (AddObject(ra, dec, mag, row(0,8))) 418 add++; 442 419 } 443 420 … … 455 432 Int_t MAstroCatalog::ReadBSC(TString catalog) 456 433 { 457 SetBit(kHasChanged);458 459 434 gLog << inf << "Reading Bright Star Catalog (BSC5) catalog: " << catalog << endl; 460 435 … … 506 481 const Double_t dec = MAstro::Dms2Rad(decd, decm, decs, decsgn); 507 482 508 MVector3 *star=new MVector3; 509 star->SetRaDec(ra, dec, mag); 510 star->SetName(row(4,9)); 511 if (star->Angle(fRaDec)*TMath::RadToDeg()>fRadiusFOV) 512 { 513 delete star; 514 continue; 515 } 516 517 fList.Add(star); 518 add++; 483 if (AddObject(ra, dec, mag, row(4,9))) 484 add++; 519 485 } 520 486 … … 538 504 Int_t MAstroCatalog::ReadHeasarcPPM(TString catalog, TString outname) 539 505 { 540 SetBit(kHasChanged);541 542 506 gLog << inf << "Reading Heasarc PPM catalog: " << catalog << endl; 543 507 … … 620 584 const Double_t de0 = MAstro::Dms2Rad(d, m, s, sgn); 621 585 622 MVector3 *star=new MVector3; 623 star->SetRaDec(ra0, de0, mag); 624 star->SetName(name); 625 if (star->Angle(fRaDec)*TMath::RadToDeg()>fRadiusFOV) 626 { 627 delete star; 628 continue; 629 } 630 631 fList.Add(star); 586 if (!AddObject(ra0, de0, mag, name)) 587 continue; 588 632 589 add++; 633 590 634 591 if (fout) 635 star->WriteBinary(*fout);592 ((MVector3*)fList.Last())->WriteBinary(*fout); 636 593 } 637 594 … … 698 655 // -------------------------------------------------------------------------- 699 656 // 700 // Add an object to the star catalog manually. 701 // 702 Int_t MAstroCatalog::AddObject(Float_t ra, Float_t dec, Float_t mag, TString name) 703 { 704 SetBit(kHasChanged); 705 706 MVector3 *star = new MVector3(); 657 // Add an object to the star catalog manually. Return true if the object 658 // was added and false otherwise (criteria is the FOV) 659 // 660 Bool_t MAstroCatalog::AddObject(Float_t ra, Float_t dec, Float_t mag, TString name) 661 { 662 MVector3 *star = new MVector3; 707 663 star->SetRaDec(ra, dec, mag); 708 664 star->SetName(name); 709 665 710 if (star->Angle(fRaDec)*TMath::RadToDeg()<=fRadiusFOV) { 711 fList.Add(star); 712 } else { 713 delete(star); 714 } 715 666 if (star->Angle(fRaDec)*TMath::RadToDeg()>fRadiusFOV) 667 { 668 delete star; 669 return 0; 670 } 671 672 SetBit(kHasChanged); 673 fList.AddLast(star); 716 674 return 1; 717 675 } -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
r4518 r4521 175 175 Int_t ReadHeasarcPPM(TString catalog = "heasarc_ppm.tdat", TString fout=""); 176 176 Int_t ReadCompressed(TString catalog); 177 Int_t AddObject(Float_t ra, Float_t dec, Float_t mag, TString name="");177 Bool_t AddObject(Float_t ra, Float_t dec, Float_t mag, TString name=""); 178 178 179 179 void Print(Option_t *o="") const { fList.Print(); } // Print all stars
Note:
See TracChangeset
for help on using the changeset viewer.