Changeset 8324 for trunk


Ignore:
Timestamp:
02/16/07 09:21:13 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/starvisyear.C

    r8066 r8324  
    3636{
    3737    // Setup the observatory location (see MObservatory for details)
    38     MObservatory obs(MObservatory::kTuorla);;
     38    MObservatory obs(MObservatory::kMagic1);;
    3939
    4040    // Setup the start time of the year (365 days) to be displayed
     
    9898        }
    9999
    100         // If nautical twilight doesn#t take place skip the rest
     100        // If nautical twilight doesn't take place skip the rest
    101101        if (sunri[1]<0 || sunst[1]<0)
    102102            continue;
     
    126126            v *= conv;
    127127
    128             // check if moon is above or elow horizont
     128            // check if moon is above or below horizont
    129129            if (v.Theta()*TMath::RadToDeg()<90)
    130130                moon = 0;
  • trunk/MagicSoft/Mars/mastro/MAstro.cc

    r8066 r8324  
    446446}
    447447
     448// --------------------------------------------------------------------------
     449//
     450// Estimates the time at which a source culminates.
     451//
     452// ra: right ascension [rad]
     453// elong: observers longitude [rad]
     454// mjd: modified julian date (utc)
     455//
     456// return time in [-12;12]
     457//
     458Double_t MAstro::EstimateCulminationTime(Double_t mjd, Double_t elong, Double_t ra)
     459{
     460    // startime at 1.1.2000 for greenwich 0h
     461    const Double_t gmt0 = 6.664520;
     462
     463    // difference of startime for greenwich for two calendar days [h]
     464    const Double_t d0 = 0.06570982224;
     465
     466    // mjd of greenwich 1.1.2000 0h
     467    const Double_t mjd0 = 51544;
     468
     469    // mjd today
     470    const Double_t mjd1 = TMath::Floor(mjd);
     471
     472    // scale between star-time and sun-time
     473    const Double_t scale = 1;//1.00273790926;
     474
     475    const Double_t UT = (ra-elong)*RadToHor() - (gmt0 + d0 * (mjd1-mjd0))/scale;
     476
     477    return fmod(2412 + UT, 24) - 12;
     478}
    448479
    449480// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r8140 r8324  
    3131    static Double_t HorToDeg()        { return 1./15; }
    3232
    33     static Double_t RadToHor()        { return 15/TMath::TwoPi(); }
    34     static Double_t HorToRad()        { return TMath::TwoPi()/15; }
     33    static Double_t RadToHor()        { return 24/TMath::TwoPi(); }
     34    static Double_t HorToRad()        { return TMath::TwoPi()/24; }
    3535
    3636    // Angle/Time conversion functions
     
    8686    static Int_t    GetMagicPeriod(Double_t mjd);
    8787
     88    static Double_t EstimateCulminationTime(Double_t mjd, Double_t longit, Double_t ra);
     89
    8890    // Estimate some parameters around the sun
    8991    static Double_t GetSunRaDec(Double_t mjd, Double_t &ra, Double_t &dec);
  • trunk/MagicSoft/Mars/mastro/MObservatory.cc

    r8066 r8324  
    110110    *fLog << all;
    111111    *fLog << underline << fObservatoryName << ":" << endl;
    112     *fLog << "Latitude:  " << TMath::Abs(fLatitude*kRad2Deg)  << " deg " << (fLatitude  > 0 ? "W" : "E") << endl;
    113     *fLog << "Longitude: " << TMath::Abs(fLongitude*kRad2Deg) << " deg " << (fLongitude < 0 ? "N" : "S") << endl;
     112    *fLog << "Latitude:  " << TMath::Abs(fLatitude*kRad2Deg)  << " deg " << (fLatitude  > 0 ? "N" : "S") << endl;
     113    *fLog << "Longitude: " << TMath::Abs(fLongitude*kRad2Deg) << " deg " << (fLongitude < 0 ? "E" : "W") << endl;
    114114    *fLog << "Height:    " << fHeight << "m" << endl;
    115115}
  • trunk/MagicSoft/Mars/mbase/MMath.h

    r8178 r8324  
    1212namespace MMath
    1313{
    14     inline Double_t DegToHor() { return 1./15; }
    15     inline Double_t HorToDeg() { return 15;    }
    16 
    17     inline Double_t RadToHor() { return TMath::RadToDeg()/15; }
    18     inline Double_t HorToRad() { return 15/TMath::RadToDeg(); }
    19 
    2014    Double_t GaussProb(Double_t x, Double_t sigma=1, Double_t mean=0);
    2115
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r8282 r8324  
    225225        case kRawAll:
    226226            d += "rawfiles/";
    227             d += fNight.GetStringFmt("%Y/%m/%d");
     227            d += fNight.GetStringFmt("%Y/%m/%d/");
    228228            break;
    229229        case kRootDat:
     
    232232        case kRootAll:
    233233            d += "merpp/";
    234             d += fNight.GetStringFmt("%Y/%m/%d");
     234            d += fNight.GetStringFmt("%Y/%m/%d/");
    235235            break;
    236236        case kCalibrated:
Note: See TracChangeset for help on using the changeset viewer.