* roi structure expanded to have ymin and ymax

* compile with 'detector roi'

* wip

* wip, rx_roi, rx_clearroi

* wip rxroi

* rxroi wip

* wip rxroi

* merge fix

* wip

* rx_roi works, impl wip, test

* tests in, impl left

* wip, rxroi impl

* wip, rxroi impl

* wip

* setrx_Roi works, getrx_roi, wip

* rx_roi impl done

* wip, rxroi

* wip, getrx_roi rxr ports

* fix ports

* wip

* wip

* fix positions on server side

* wip

* numports wip

* wip

* jungfrau top inner interface row increment

* x, y detpos, wip

* removed eiger row indices flipping in gui (bottom flipping maintained)

* wip

* wip, jungfrau numinterfaces2

* jungfrau virtual works

* eiger, jungfrau, g2 virtual server works

* eiger positions fix, wip

* binaries in

* minor printout

* binaries in

* merge fix

* merge fix

* removing getposition

* setrxroi wip

* set upto port

* get messed, wip

* roi multi to module works, wip

* wip

* roi dont return -1

* added rxroi metadata in master file

* added rxroifromshm, not yet in detector

* rx roi in gui with box, also for gap pixels (gappixels for jungfrau mess)

* fix for segfault in gui with detaching roi box in gui

* wip

* m3 gui: slave timing modes should be discarded when squashing

* fixed m3 virtual data, and fixed counters in gui asthetics

* m3 roi works

* wip, g2

* wip

* handling g225um boards, and showing roi for gainplot as well

* udpate python functions

* fix for 1d and a2d roi written

* fixed actual roi written to file

* no virtual hdf5 when handling rx roi

* test

* minor

* binarie in
This commit is contained in:
Dhanya Thattil
2022-05-16 12:35:06 +02:00
committed by GitHub
parent 9808376207
commit fcc7f7aef8
53 changed files with 1713 additions and 859 deletions

View File

@@ -109,6 +109,17 @@ void MasterAttributes::GetCommonBinaryAttributes(
w->String(sls::ToString(scanParams).c_str());
w->Key("Total Frames");
w->Uint64(totalFrames);
w->Key("Receiver Roi");
w->StartObject();
w->Key("xmin");
w->Uint(receiverRoi.xmin);
w->Key("xmax");
w->Uint(receiverRoi.xmax);
w->Key("ymin");
w->Uint(receiverRoi.ymin);
w->Key("ymax");
w->Uint(receiverRoi.ymax);
w->EndObject();
}
void MasterAttributes::GetFinalBinaryAttributes(
@@ -274,6 +285,34 @@ void MasterAttributes::WriteCommonHDF5Attributes(H5File *fd, Group *group) {
PredType::STD_U64LE, dataspace);
dataset.write(&totalFrames, PredType::STD_U64LE);
}
// Receiver Roi xmin
{
DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset = group->createDataSet("receiver roi xmin",
PredType::NATIVE_INT, dataspace);
dataset.write(&receiverRoi.xmin, PredType::NATIVE_INT);
}
// Receiver Roi xmax
{
DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset = group->createDataSet("receiver roi xmax",
PredType::NATIVE_INT, dataspace);
dataset.write(&receiverRoi.xmax, PredType::NATIVE_INT);
}
// Receiver Roi ymin
{
DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset = group->createDataSet("receiver roi ymin",
PredType::NATIVE_INT, dataspace);
dataset.write(&receiverRoi.ymin, PredType::NATIVE_INT);
}
// Receiver Roi ymax
{
DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset = group->createDataSet("receiver roi ymax",
PredType::NATIVE_INT, dataspace);
dataset.write(&receiverRoi.ymax, PredType::NATIVE_INT);
}
}
void MasterAttributes::WriteFinalHDF5Attributes(H5File *fd, Group *group) {
@@ -343,14 +382,14 @@ void MasterAttributes::WriteHDF5ROI(H5File *fd, Group *group) {
DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset =
group->createDataSet("roi xmin", PredType::NATIVE_INT, dataspace);
dataset.write(&roi.xmin, PredType::NATIVE_INT);
dataset.write(&detectorRoi.xmin, PredType::NATIVE_INT);
}
// Roi xmax
{
DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset =
group->createDataSet("roi xmax", PredType::NATIVE_INT, dataspace);
dataset.write(&roi.xmax, PredType::NATIVE_INT);
dataset.write(&detectorRoi.xmax, PredType::NATIVE_INT);
}
}
@@ -369,7 +408,7 @@ void MasterAttributes::WriteHDF5ReadNRows(H5File *fd, Group *group) {
}
void MasterAttributes::WriteHDF5ThresholdEnergy(H5File *fd, Group *group) {
char c[1024]{};
char c[1024]{};
DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset = group->createDataSet("Threshold Energy",
PredType::NATIVE_INT, dataspace);
@@ -383,7 +422,7 @@ void MasterAttributes::WriteHDF5ThresholdEnergy(H5File *fd, Group *group) {
}
void MasterAttributes::WriteHDF5ThresholdEnergies(H5File *fd, Group *group) {
char c[1024]{};
char c[1024]{};
DataSpace dataspace = DataSpace(H5S_SCALAR);
StrType strdatatype(PredType::C_S1, 1024);
DataSet dataset =
@@ -393,7 +432,7 @@ void MasterAttributes::WriteHDF5ThresholdEnergies(H5File *fd, Group *group) {
}
void MasterAttributes::WriteHDF5SubExpTime(H5File *fd, Group *group) {
char c[1024]{};
char c[1024]{};
DataSpace dataspace = DataSpace(H5S_SCALAR);
StrType strdatatype(PredType::C_S1, 256);
DataSet dataset =
@@ -403,7 +442,7 @@ void MasterAttributes::WriteHDF5SubExpTime(H5File *fd, Group *group) {
}
void MasterAttributes::WriteHDF5SubPeriod(H5File *fd, Group *group) {
char c[1024]{};
char c[1024]{};
DataSpace dataspace = DataSpace(H5S_SCALAR);
StrType strdatatype(PredType::C_S1, 256);
DataSet dataset =
@@ -420,7 +459,7 @@ void MasterAttributes::WriteHDF5SubQuad(H5File *fd, Group *group) {
}
void MasterAttributes::WriteHDF5RateCorrections(H5File *fd, Group *group) {
char c[1024]{};
char c[1024]{};
DataSpace dataspace = DataSpace(H5S_SCALAR);
StrType strdatatype(PredType::C_S1, 1024);
DataSet dataset =
@@ -438,7 +477,7 @@ void MasterAttributes::WriteHDF5CounterMask(H5File *fd, Group *group) {
void MasterAttributes::WriteHDF5ExptimeArray(H5File *fd, Group *group) {
for (int i = 0; i != 3; ++i) {
char c[1024]{};
char c[1024]{};
DataSpace dataspace = DataSpace(H5S_SCALAR);
StrType strdatatype(PredType::C_S1, 256);
DataSet dataset =
@@ -450,7 +489,7 @@ void MasterAttributes::WriteHDF5ExptimeArray(H5File *fd, Group *group) {
void MasterAttributes::WriteHDF5GateDelayArray(H5File *fd, Group *group) {
for (int i = 0; i != 3; ++i) {
char c[1024]{};
char c[1024]{};
DataSpace dataspace = DataSpace(H5S_SCALAR);
StrType strdatatype(PredType::C_S1, 256);
DataSet dataset =
@@ -533,8 +572,13 @@ void MasterAttributes::GetGotthardBinaryAttributes(
w->String(sls::ToString(exptime).c_str());
w->Key("Period");
w->String(sls::ToString(period).c_str());
w->Key("Roi (xmin, xmax)");
w->String(sls::ToString(roi).c_str());
w->Key("Detector Roi");
w->StartObject();
w->Key("xmin");
w->Uint(detectorRoi.xmin);
w->Key("xmax");
w->Uint(detectorRoi.xmax);
w->EndObject();
};
#ifdef HDF5C