Changeset 11441
- Timestamp:
- 07/18/11 16:22:42 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Fits.cc
r11405 r11441 258 258 } 259 259 260 //As requested by Roland, the reference MjD is 0.0261 fRefMjD = 0;//* static_cast<double*>(fStandardPointers[0]);262 260 if (!updating) 263 261 return WriteHeaderKeys(); … … 293 291 bool Fits::WriteHeaderKeys() 294 292 { 295 if (!fTable) 296 return false; 297 298 string stringValue = Time().GetAsStr(); 299 stringValue[10]= 'T'; 300 301 if (!WriteSingleHeaderKey("EXTREL", 1.0f, "Release Number")) return false; 302 if (!WriteSingleHeaderKey("TELESCOP", "FACT", "Telescope that acquired this data")) return false; 303 if (!WriteSingleHeaderKey("ORIGIN", "ISDC", "Institution that wrote the file")) return false; 304 if (!WriteSingleHeaderKey("CREATOR", "FACT++ DataLogger", "Program that wrote this file")) return false; 305 if (!WriteSingleHeaderKey("DATE", stringValue, "File creation data")) return false; 306 if (!WriteSingleHeaderKey("TIMESYS", "TT", "Time frame system")) return false; 307 if (!WriteSingleHeaderKey("TIMEUNIT", "d", "Time unit")) return false; 308 if (!WriteSingleHeaderKey("TIMEREF", "UTC", "Time reference frame")) return false; 309 if (!WriteSingleHeaderKey("MJDREF", fRefMjD, "Modified Julian Date of origin")) return false; 310 if (!WriteSingleHeaderKey("TSTOP", fEndMjD, "Time of the last receied data")) return false; 293 if (!fTable) 294 return false; 295 296 const Time now; 297 if (!WriteSingleHeaderKey("EXTREL", 1.0f, "Release Number")) return false; 298 if (!WriteSingleHeaderKey("TELESCOP", "FACT", "Telescope that acquired this data")) return false; 299 if (!WriteSingleHeaderKey("ORIGIN", "ISDC", "Institution that wrote the file")) return false; 300 if (!WriteSingleHeaderKey("CREATOR", "fadctrl", "Program that wrote this file (FACT++ datalogger)")) return false; 301 if (!WriteSingleHeaderKey("PACKAGE", PACKAGE_NAME, "Package name")) return false; 302 if (!WriteSingleHeaderKey("VERSION", PACKAGE_VERSION, "Package description")) return false; 303 if (!WriteSingleHeaderKey("COMPILED", __DATE__" "__TIME__, "Compile time")) return false; 304 if (!WriteSingleHeaderKey("REVISION", REVISION, "SVN revision")) return false; 305 if (!WriteSingleHeaderKey("DATE", now.Iso(), "File creation date")) return false; 306 if (!WriteSingleHeaderKey("NIGHT", now.NightAsInt(), "Night as int")) return false; 307 if (!WriteSingleHeaderKey("TIMESYS", "UTC", "Time systen")) return false; 308 if (!WriteSingleHeaderKey("TSTART", "", "Time of the first receied data")) return false; 309 if (!WriteSingleHeaderKey("TSTOP", "", "Time of the last receied data")) return false; 311 310 return true; 312 311 } … … 360 359 { 361 360 const double doubleValue = *reinterpret_cast<double*>(fStandardPointers[0]); 362 WriteSingleHeaderKey("TSTART", doubleValue,361 WriteSingleHeaderKey("TSTART", Time(doubleValue).Iso(), 363 362 "Time of the first received data"); 364 363 } … … 393 392 // CCfits::FITS* backupFits = fFile; 394 393 // fFile = NULL; 395 WriteSingleHeaderKey("TSTOP", fEndMjD, "Time of the last receied data");394 WriteSingleHeaderKey("TSTOP", Time(fEndMjD).Iso(), "Time of the last receied data"); 396 395 delete fFile; 397 396 -
trunk/FACT++/src/Fits.h
r11405 r11441 47 47 ///to keep track of the time of the latest written entry (to update the header when closing the file) 48 48 double fEndMjD; 49 ///to keep track of the reference MjD50 double fRefMjD;51 49 ///Write the FITS header keys 52 50 bool WriteHeaderKeys(); … … 72 70 fTotalNumBytes(0), 73 71 fEndMjD(0.0), 74 fRefMjD(0.0),75 72 fFileName(""), 76 73 fNumOpenFitsFiles(NULL), -
trunk/FACT++/src/datalogger.cc
r11416 r11441 2153 2153 { 2154 2154 //Init the time columns of the file 2155 Description dateDesc(string("Time"), string("Modified Julian Date"), string("M jD"));2155 Description dateDesc(string("Time"), string("Modified Julian Date"), string("MJD")); 2156 2156 sub.nightlyFile.AddStandardColumn(dateDesc, "1D", &fMjD, sizeof(double)); 2157 2157 sub.runFile.AddStandardColumn(dateDesc, "1D", &fMjD, sizeof(double)); 2158 2158 2159 Description QoSDesc("Qo s", "Quality of service", "None");2159 Description QoSDesc("QoS", "Quality of service", ""); 2160 2160 sub.nightlyFile.AddStandardColumn(QoSDesc, "1J", &fQuality, sizeof(int)); 2161 2161 sub.runFile.AddStandardColumn(QoSDesc, "1J", &fQuality, sizeof(int));
Note:
See TracChangeset
for help on using the changeset viewer.