Skip to content

Conversation

@MarkRivers
Copy link
Member

Implements code changes described in #79

and the Stream2 interface is used.
Previously 3-D NDArrays were created, with the third dimension being the
threshold index.  This does not work when the driver does not decompress
the data, because the arrays are individually compressed but a 3-D array
must be compressed as a unit.
The driver now only creates 2-D NDArrays, and creates new NDAttributes,
ThresholdName and ThresholdEnergy to identify which threshold an NDArray
contains.
The driver sends all thresholds on asyn address 0, and threshold N on
asyn address N (N=1 to number of enabled thresholds).
@domitto
Copy link
Collaborator

domitto commented Jan 7, 2026

Small but important detail: addr 1 is already in use by the Monitor interface in the current driver (see eigerDetector.cpp:L1849 —

doCallbacksGenericPointer(pImage, NDArrayData, 1);

Reusing it for threshold callbacks would collide with existing monitor consumers. We probably need to keep addr 1 reserved and offset the threshold addresses, or move the monitor stream elsewhere.

@ericonr
Copy link
Member

ericonr commented Jan 8, 2026

Small but important detail: addr 1 is already in use by the Monitor interface in the current driver (see eigerDetector.cpp:L1849 —

doCallbacksGenericPointer(pImage, NDArrayData, 1);

Reusing it for threshold callbacks would collide with existing monitor consumers. We probably need to keep addr 1 reserved and offset the threshold addresses, or move the monitor stream elsewhere.

I think the property of 1st threshold in address 1 is simpler to think about than having to offset by 1 every time, so I would suggest moving the monitor interface to a large offset (something like addr=10?). That way, this offset range can also be used if any other kinds of streams are added (addr=11, ...).

@tguruswamy
Copy link
Contributor

I tested the functionality with an Eiger2 Si 500K, firmware version 2024.1. This model has 2 thresholds.

Basic operation works fine, I could see 2*NumImages frames on array address 0, and NumImages frames on array address 1 & 2.
Conceptually I think this is the right approach, as it more closely mirrors the structure of the source stream, which is basically interleaved frames.

The collision of address 1 with the existing Monitor interface (if both are enabled, frames from both sources are received on 1) is the only thing I see still to be resolved.

Note that in contrast, the FileWriter mode's new HDF format "v2024.2" is using a 4-D array, always -- I've opened #83 to track progress implementing support for reading that.

While testing I also found the other new feature StreamAsTSSource doesn't seem to behave correctly, but that appears unrelated to this PR (reopened #77).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants