Changeset 17958 for trunk/FACT++/src
- Timestamp:
- 08/13/14 12:55:18 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/makeplots.cc
r17957 r17958 113 113 const RstTime sun_rise = GetSolarRst(time.JD()+0.5, -12); 114 114 115 const double jd = floor(time.Mjd())+2400001; 116 const double mjd = floor(time.Mjd())+49718+0.5; // root time 115 const double jd = floor(time.Mjd())+2400001; 117 116 118 117 cout << "Time: " << time << endl; … … 125 124 126 125 const string fDatabase = conf.Get<string>("source-database"); 127 128 // ------------------ Precalc coord ---------------------129 130 vector<SolarObjects> fCoordinates;131 132 for (double h=0; h<1; h+=1./(24*12))133 if (jd+h>sunset && jd+h<sunrise)134 fCoordinates.emplace_back(jd+h);135 126 136 127 // ------------- Get Sources from databasse --------------------- … … 254 245 255 246 // Loop over 24 hours 256 for ( auto it=fCoordinates.begin(); it!=fCoordinates.end(); it++)247 for (double h=0; h<1; h+=1./(24*12)) 257 248 { 249 const SolarObjects so(jd+h); 250 258 251 // get local position of source 259 const HrzPosn hrz = GetHrzFromEqu(pos, it->fJD);252 const HrzPosn hrz = GetHrzFromEqu(pos, so.fJD); 260 253 261 254 if (v==res.begin()) 262 cout << Time( it->fJD) <<" " << 90-it->fMoonHrz.alt << endl;263 264 const double cur = FACT::PredictI( *it, pos);255 cout << Time(so.fJD) <<" " << 90-so.fMoonHrz.alt << endl; 256 257 const double cur = FACT::PredictI(so, pos); 265 258 266 259 // Relative energy threshold prediction … … 268 261 269 262 // Add points to curve 270 const double axis = Time( it->fJD).Mjd()*24*3600;263 const double axis = Time(so.fJD).Mjd()*24*3600; 271 264 272 265 // If there is a gap of more than one bin, start a new curve … … 289 282 if (no_limits || (cur<max_current && 90-hrz.alt<max_zd)) 290 283 { 291 const double angle = GetAngularSeparation( it->fMoonEqu, pos);284 const double angle = GetAngularSeparation(so.fMoonEqu, pos); 292 285 g4.SetPoint(g4.GetN(), axis, angle); 293 286 } 294 287 295 288 if (cnt==0) 296 gm.SetPoint(gm.GetN(), axis, it->fMoonHrz.alt);289 gm.SetPoint(gm.GetN(), axis, so.fMoonHrz.alt); 297 290 } 298 291
Note:
See TracChangeset
for help on using the changeset viewer.