Changeset 17241 for trunk/Mars/mcore/DrsCalib.h
- Timestamp:
- 10/17/13 16:47:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/DrsCalib.h
r16843 r17241 504 504 rc.avg /= rc.cnt; 505 505 rc.rms /= rc.cnt; 506 507 rc.rms = sqrt(rc.rms-rc.avg*rc.avg);506 rc.rms -= rc.avg*rc.avg; 507 rc.rms = rc.rms<0 ? 0 : sqrt(rc.rms); 508 508 509 509 return rc; … … 1377 1377 } 1378 1378 1379 std::string WriteFitsImp(const std::string &filename, const std::vector<float> &vec) const1379 std::string WriteFitsImp(const std::string &filename, uint32_t night, const std::vector<float> &vec) const 1380 1380 { 1381 1381 const size_t n = 1440*1024*4 + 1440*fRoi*2 + fNumTm*fRoi*2 + 3; … … 1406 1406 file.AddColumnFloat(fRoi*fNumTm, "TriggerOffsetTMRms", "mV"); 1407 1407 1408 #ifdef __MARS__ 1409 const MTime now(-1); 1410 file.SetStr( "TELESCOP", "FACT", "Telescope that acquired this data"); 1411 file.SetStr( "PACKAGE", "MARS", "Package name"); 1412 file.SetStr( "VERSION", "1.0", "Package description"); 1413 //file.SetStr( "CREATOR", "root", "Program that wrote this file"); 1414 file.SetFloat("EXTREL", 1.0, "Release Number"); 1415 file.SetStr( "COMPILED", __DATE__" "__TIME__, "Compile time"); 1416 //file.SetStr( "REVISION", REVISION, "SVN revision"); 1417 file.SetStr( "ORIGIN", "FACT", "Institution that wrote the file"); 1418 file.SetStr( "DATE", now.GetStringFmt("%Y-%m-%dT%H:%M:%S").Data(), "File creation date"); 1419 file.SetInt( "NIGHT", now.GetNightAsInt(), "Night as int"); 1420 file.SetStr( "TIMESYS", "UTC", "Time system"); 1421 file.SetStr( "TIMEUNIT", "d", "Time given in days w.r.t. to MJDREF"); 1422 file.SetInt( "MJDREF", 40587, "MJD to UNIX time (seconds since 1970/1/1)"); 1423 #else 1424 DataWriteFits2::WriteDefaultKeys(file); 1425 #endif 1408 file.SetDefaultKeys(); 1409 file.SetInt("NIGHT", night, "Night as int"); 1410 1426 1411 file.SetStr("DATE-OBS", fDateObs, "First event of whole DRS calibration"); 1427 1412 file.SetStr("DATE-END", fDateEnd, "Last event of whole DRS calibration");
Note:
See TracChangeset
for help on using the changeset viewer.