Commit Graph

21 Commits

Author SHA1 Message Date
Clemens Vonrhein 4cf18ceff4 Mechanism to read bitshuffle-compressed pixel-mask data - by
loading/using the normal bitshuffle source from

  https://github.com/kiyo-masui/bitshuffle

(see Makefile).
2024-12-16 15:05:38 +00:00
CV-GPhL ca2c0ee0e7 Merge pull request #1 from DiamondLightSource/master
Catching up 20240223
2024-02-23 12:55:55 +01:00
Graeme Winter 808f5fbd42 Do not depend on the strings being NULL terminated (#29)
Fixes #28

Instead make them NULL terminated by reading one longer into buffer
2023-08-09 09:42:16 +01:00
Clemens Vonrhein 77d2b84957 Better handling of (usually) unsigned data arrays when calling routine
to convert to (signed) int and apply pixel mask. The environment
variable DURIN_RESET_UNMASKED_PIXEL can now be used to set non-masked
saturated pixels in order to process them correctly with e.g. XDS.
2021-04-08 14:46:48 +01:00
Clemens Vonrhein 0f27832f78 Resolved merge conflicts 2021-04-06 12:33:21 +01:00
Graeme Winter 300a980551 Use blocks for imports to prevent reorder; finish clang-format 2020-10-27 09:55:39 +00:00
Graeme Winter b36870935a clang-format file.* 2020-10-27 09:55:39 +00:00
Clemens Vonrhein 9e7d609f42 allow for image offset via DURIN_IMAGE_NUMBER_OFFSET environment
variable
2020-06-12 15:57:14 +01:00
Tom Schoonjans 19b16ad2a1 Fix sprintf usage (#15) 2020-01-21 10:52:49 +00:00
Charles Mita ffebc60cdb Stop errors when no pixel mask is provided 2019-01-29 13:31:58 +00:00
Charles Mita 5c0b6e8366 Check if the bitshuffle filter was applied before decompressing 2018-08-17 18:00:14 +01:00
Charles Mita f6ba8eb2aa Use the dataset's datatype for H5Dread, convert manually later.
Hopefully this results in less work for the HDF5 library (which would
not be done in parallel) and ensures the conversion is consistent
across all data retrieval strategies.
2018-08-17 18:00:14 +01:00
Charles Mita d1b25e18b8 Refactor description structs 2018-08-17 18:00:14 +01:00
Charles Mita ace6a46717 Implement direct-chunk reading to read data when possible
The HDF5 library was made thread-safe via excessive locking, so does
not gain much from reads being parallelized.

By using the H5DOread_chunk function (introduced in HDF5 1.10.2)
we reduce the time spent the library, improving performance for
when XDS uses multiple threads to process data.

The decompression and type conversions have to be done manually
however, and this is only used in a limited case.
2018-08-17 18:00:14 +01:00
Charles Mita 0f4b3d00bd Remove spurious printf 2018-03-28 13:48:44 +01:00
Charles Mita dc94ad89ca Add range checks on frame retrieval 2018-03-28 13:38:40 +01:00
Charles Mita dc41a80525 Internally use zero-based indexing for selecting dataset frame
Convert the one-based index at the plugin level and use zero-based
indexing elsewhere.
2018-03-28 13:38:25 +01:00
Charles Mita 5f57e5329a Handle vlen strings for NX_class attributes 2018-03-28 13:12:33 +01:00
Charles Mita db16131db4 Add manual error tracing
Error messages and function names/line numbers are traced via
__func__ or __FUNCTION__, __LINE__, etc (or just "unknown" if
not available). A manual stack is kept onto which these values
are pushed which can then be dumped to stderr/stdout.

stderr is used to report this information since no other
facility appears to be provided.
2018-03-27 17:58:22 +01:00
Charles Mita af6c98765d Fix dataset rank (ndims) to three.
The get_frame code always assumed a dataset rank of three, so this
doesn't actually change much, but its one less dynamically allocated
buffer to keep track of.
2018-03-27 13:20:35 +01:00
Charles Mita 3c4b00f12f Initial code commit.
Little to no error reporting, still fairly brittle and not very well
tested.
2018-03-27 11:14:33 +01:00