Ignore:
Timestamp:
06/02/08 09:52:26 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mastro
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mastro/MAstro.cc

    r8765 r8907  
    4444
    4545ClassImp(MAstro);
     46
     47Double_t MAstro::RadToHor()
     48{
     49    return 24/TMath::TwoPi();
     50}
     51
     52Double_t MAstro::HorToRad()
     53{
     54    return TMath::TwoPi()/24;
     55}
    4656
    4757Double_t MAstro::Trunc(Double_t val)
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r8765 r8907  
    3131    static Double_t HorToDeg()        { return 1./15; }
    3232
    33     static Double_t RadToHor()        { return 24/TMath::TwoPi(); }
    34     static Double_t HorToRad()        { return TMath::TwoPi()/24; }
     33    static Double_t RadToHor(); // { return 24/TMath::TwoPi(); }
     34    static Double_t HorToRad(); // { return TMath::TwoPi()/24; }
    3535
    3636    // Angle/Time conversion functions
  • trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc

    r8725 r8907  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1.29 2007-09-02 13:53:55 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1.30 2008-06-02 08:46:39 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    2020!   Author(s): Thomas Bretz, 03/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    2121!
    22 !   Copyright: MAGIC Software Development, 2002-2005
     22!   Copyright: MAGIC Software Development, 2002-2008
    2323!
    2424!
     
    143143#include <TPaveText.h>  // TPaveText
    144144
    145 #include <TGraph.h>
     145#include <TH1.h>        // TH1F
     146#include <TGraph.h>     // TGraph
    146147
    147148#include "MLog.h"
     
    218219    }
    219220}
     221
     222// --------------------------------------------------------------------------
     223//
     224// Set Radius of FOV using the pixsize [arcsec/pix], width
     225// and height [pixel] of image
     226//
     227void MAstroCatalog::SetRadiusFOV(Double_t pixsize, Double_t w, Double_t h)
     228{
     229    // pixsize [arcsec/pixel]
     230    // w       [pixel]
     231    // h       [pixel]
     232    const Double_t scale = TMath::Hypot(w, h)/2;
     233    SetRadiusFOV(scale*pixsize/3600);
     234}
    220235
    221236// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mastro/MAstroCatalog.h

    r8066 r8907  
    108108    void SetObservatory(const MObservatory &obs);
    109109    void SetLimMag(Double_t mag) { fLimMag=mag; Update(); } // *MENU* *ARGS={mag=>fLimMag}
     110
     111    void SetRadiusFOV(Double_t pixsize, Double_t w, Double_t h);
    110112    void SetRadiusFOV(Double_t deg)
    111113    {
     
    121123        Update();
    122124    } // *MENU* *ARGS={deg=>fRadiusFOV}
    123     void SetRadiusFOV(Double_t pixsize, Double_t w, Double_t h)
    124     {
    125         // pixsize [arcsec/pixel]
    126         // w       [pixel]
    127         // h       [pixel]
    128         const Double_t scale = TMath::Hypot(w, h)/2;
    129         SetRadiusFOV(scale*pixsize/3600);
    130     } // Set Radius of FOV using the pixsize [arcsec/pix], width and height [pixel] of image
    131125
    132126    void     SetRaDec(Double_t ra, Double_t dec) { fRaDec.SetRaDec(ra, dec, 1); Update(); }
  • trunk/MagicSoft/Mars/mastro/MVector3.cc

    r4977 r8907  
    1818!   Author(s): Thomas Bretz, 03/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2002-2004
     20!   Copyright: MAGIC Software Development, 2002-2008
    2121!
    2222!
     
    3333#include <iostream>
    3434
     35#include <TMath.h>
     36
    3537#include "MLog.h"
    3638#include "MLogManip.h"
     
    3941
    4042using namespace std;
     43
     44void MVector3::SetThetaPhiMag(Double_t theta, Double_t phi, Double_t mag)
     45{
     46    SetMagThetaPhi(TMath::Power(10, -mag/2.5), theta, phi);
     47}
     48
     49Double_t MVector3::Magnitude() const
     50{
     51    return -2.5*TMath::Log10(Mag());
     52}
     53
     54void MVector3::SetRaDec(Double_t ra, Double_t dec, Double_t mag)
     55{
     56    fType = kIsRaDec;
     57    SetThetaPhiMag(TMath::Pi()/2-dec, ra, mag);
     58}
     59
     60void MVector3::SetAltAz(Double_t alt, Double_t az, Double_t mag)
     61{
     62    fType = kIsAltAz;
     63    SetThetaPhiMag(TMath::Pi()/2-alt, az, mag);
     64}
    4165
    4266void MVector3::WriteBinary(ostream &out) const
  • trunk/MagicSoft/Mars/mastro/MVector3.h

    r8725 r8907  
    2222    TString fName;
    2323
    24     void SetThetaPhiMag(Double_t theta, Double_t phi, Double_t mag)
    25     {
    26         SetMagThetaPhi(TMath::Power(10, -mag/2.5), theta, phi);
    27     }
     24    void SetThetaPhiMag(Double_t theta, Double_t phi, Double_t mag); // SetMagThetaPhi(TMath::Power(10, -mag/2.5), theta, phi);
    2825
    2926public:
     
    3532    }
    3633    MVector3(const TVector3 &v3) : TVector3(v3) { fType=kIsArbitrary; }
    37     Double_t Magnitude() const { return -2.5*TMath::Log10(Mag()); }
     34    Double_t Magnitude() const;// { return -2.5*TMath::Log10(Mag()); }
    3835
    3936    Bool_t IsValid() const { return fType!=kIsInvalid; }
    4037
    41     void SetRaDec(Double_t ra, Double_t dec, Double_t mag=0)
    42     {
    43         fType = kIsRaDec;
    44         SetThetaPhiMag(TMath::Pi()/2-dec, ra, mag);
    45     }
    46     void SetName(const TString &str) { fName = str.Strip(TString::kBoth); }
     38    void SetRaDec(Double_t ra, Double_t dec, Double_t mag=0); // SetThetaPhiMag(TMath::Pi()/2-dec, ra, mag);
     39    void SetAltAz(Double_t alt, Double_t az, Double_t mag=0); // SetThetaPhiMag(TMath::Pi()/2-alt, az, mag);
    4740    void SetZdAz(Double_t zd, Double_t az, Double_t mag=0)
    4841    {
     
    5043        SetThetaPhiMag(zd, az, mag);
    5144    }
    52     void SetAltAz(Double_t alt, Double_t az, Double_t mag=0)
    53     {
    54         fType = kIsAltAz;
    55         SetThetaPhiMag(TMath::Pi()/2-alt, az, mag);
    56     }
    5745
     46    void SetName(const TString &str) { fName = str.Strip(TString::kBoth); }
    5847    const char *GetName() const { return fName; }
    5948
Note: See TracChangeset for help on using the changeset viewer.