Changeset 14722


Ignore:
Timestamp:
12/04/12 10:10:03 (12 years ago)
Author:
tbretz
Message:
Added date on x-axis, fixed a problem with summer/winter time (hopefully)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/makeplots.cc

    r14716 r14722  
    8989        "the plots will refer to the night 1974-09-09/1974-09-10.\n"
    9090        "The advantage is that specification of the date as in\n"
    91         "1974-09-09 is enough.\n"
     91        "1974-09-09 is enough. Time axis starts and ends at nautical\n"
     92        "twilight which is 12deg below horizon.\n"
    9293        "\n"
    9394        "Usage: makeplots sql-datetime [--ra={ra} --dec={dec}]\n";
     
    129130    const double no_limits   = conf.Get<bool>("no-limits");
    130131
    131     // -12: astronomical twilight
     132    // -12: nautical
    132133    ln_rst_time sun_set;   // Sun set with the same date than th provided date
    133134    ln_rst_time sun_rise;  // Sun rise on the following day
     
    138139    const double mjd = floor(time.Mjd())+49718+0.5;
    139140
    140     cout << "Time: " << time << endl;
     141    cout << "Time: " << time     << endl;
     142    cout << "Base: " << Time(jd-0.5) << endl;
    141143    cout << "Set:  " << Time(sun_set.set)   << endl;
    142144    cout << "Rise: " << Time(sun_rise.rise) << endl;
     
    170172    TH1S hframe("", "", 1, (mjd+jd0)*24*3600, (mjd+jd1)*24*3600);
    171173    hframe.SetStats(kFALSE);
    172     hframe.GetXaxis()->SetTimeFormat("%Hh%M'");
    173     hframe.GetXaxis()->SetTitle("Time [UTC]");
     174    hframe.GetXaxis()->SetTimeFormat("%Hh%M%F1995-01-01 00:00:00 GMT");
     175    hframe.GetXaxis()->SetTitle((Time(jd).GetAsStr("%d/%m/%Y")+"  -  "+Time(jd+1).GetAsStr("%d/%m/%Y")+"  [UTC]").c_str());
    174176    hframe.GetXaxis()->CenterTitle();
    175177    hframe.GetYaxis()->CenterTitle();
     
    240242
    241243        // Create graphs
    242         TGraph g1, g2, g3, g4, gm;
     244        TGraph g1, g2, g3, g4, gr, gm;
    243245        g1.SetName(name.data());
    244246        g2.SetName(name.data());
Note: See TracChangeset for help on using the changeset viewer.