mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
included subexptime in metadata for hdf5
This commit is contained in:
parent
ad3e3ce255
commit
c724756b5f
@ -102,11 +102,12 @@ class HDF5File : private virtual slsReceiverDefs, public File, public HDF5FileSt
|
||||
* @param nx number of pixels in x direction
|
||||
* @param ny number of pixels in y direction
|
||||
* @param at acquisition time
|
||||
* @param at sub exposure time
|
||||
* @param ap acquisition period
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
int CreateMasterFile(bool en, uint32_t size,
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t ap);
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t st, uint64_t ap);
|
||||
|
||||
/**
|
||||
* End of Acquisition
|
||||
|
@ -231,13 +231,14 @@ public:
|
||||
* @param ny number of pixels in y direction
|
||||
* @param nf number of images
|
||||
* @param acquisitionTime acquisition time
|
||||
* @param subexposuretime sub exposure time
|
||||
* @param acquisitionPeriod acquisition period
|
||||
* @param version version of software for hdf5 writing
|
||||
* @returns 0 for success and 1 for fail
|
||||
*/
|
||||
static int CreateMasterDataFile(H5File*& fd, string fname, bool owenable,
|
||||
uint32_t dr, bool tenE, uint32_t size, uint32_t nPixelsx, uint32_t nPixelsy, uint64_t nf,
|
||||
uint64_t acquisitionTime, uint64_t acquisitionPeriod, double version)
|
||||
uint64_t acquisitionTime, uint64_t subexposuretime, uint64_t acquisitionPeriod, double version)
|
||||
{
|
||||
try {
|
||||
Exception::dontPrint(); //to handle errors
|
||||
@ -306,6 +307,12 @@ public:
|
||||
attribute = dataset.createAttribute("unit",strdatatype, dataspace);
|
||||
attribute.write(strdatatype, string("ns"));
|
||||
|
||||
//SubExptime
|
||||
dataset = group5.createDataSet ( "sub exposure time", PredType::STD_U64LE, dataspace );
|
||||
dataset.write ( &subexposuretime, PredType::STD_U64LE);
|
||||
attribute = dataset.createAttribute("unit",strdatatype, dataspace);
|
||||
attribute.write(strdatatype, string("ns"));
|
||||
|
||||
//Period
|
||||
dataset = group5.createDataSet ( "acquisition period", PredType::STD_U64LE, dataspace );
|
||||
dataset.write ( &acquisitionPeriod, PredType::STD_U64LE);
|
||||
|
@ -181,7 +181,7 @@ int HDF5File::WriteToFile(char* buffer, int buffersize, uint64_t fnum, uint32_t
|
||||
|
||||
|
||||
int HDF5File::CreateMasterFile(bool en, uint32_t size,
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t ap) {
|
||||
uint32_t nx, uint32_t ny, uint64_t at, uint64_t st, uint64_t ap) {
|
||||
|
||||
//beginning of every acquisition
|
||||
numFramesInFile = 0;
|
||||
@ -193,7 +193,7 @@ int HDF5File::CreateMasterFile(bool en, uint32_t size,
|
||||
FILE_LOG(logINFO) << "Master File: " << masterFileName;
|
||||
pthread_mutex_lock(&Mutex);
|
||||
int ret = HDF5FileStatic::CreateMasterDataFile(masterfd, masterFileName, *overWriteEnable,
|
||||
*dynamicRange, en, size, nx, ny, *numImages, at, ap, HDF5_WRITER_VERSION);
|
||||
*dynamicRange, en, size, nx, ny, *numImages, at, st, ap, HDF5_WRITER_VERSION);
|
||||
pthread_mutex_unlock(&Mutex);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user