mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-19 17:18:43 +01:00
implemented matterhorn transformer for 4 bit dynamic range
This commit is contained in:
@@ -6,12 +6,11 @@
|
||||
#include <vector>
|
||||
namespace aare {
|
||||
|
||||
|
||||
uint16_t adc_sar_05_06_07_08decode64to16(uint64_t input);
|
||||
uint16_t adc_sar_05_decode64to16(uint64_t input);
|
||||
uint16_t adc_sar_04_decode64to16(uint64_t input);
|
||||
void adc_sar_05_06_07_08decode64to16(NDView<uint64_t, 2> input,
|
||||
NDView<uint16_t, 2> output);
|
||||
NDView<uint16_t, 2> output);
|
||||
void adc_sar_05_decode64to16(NDView<uint64_t, 2> input,
|
||||
NDView<uint16_t, 2> output);
|
||||
void adc_sar_04_decode64to16(NDView<uint64_t, 2> input,
|
||||
@@ -22,19 +21,29 @@ void adc_sar_04_decode64to16(NDView<uint64_t, 2> input,
|
||||
* and then return the lower 24 bits as an 32 bit integer
|
||||
* @param input 32-ibt input value
|
||||
* @param offset (should be in range 0-7 to allow for full 24 bits)
|
||||
* @return uint32_t
|
||||
* @return uint32_t
|
||||
*/
|
||||
uint32_t mask32to24bits(uint32_t input, BitOffset offset={});
|
||||
uint32_t mask32to24bits(uint32_t input, BitOffset offset = {});
|
||||
|
||||
/**
|
||||
* @brief Expand 24 bit values in a 8bit buffer to 32bit unsigned integers
|
||||
* Used for detectors with 24bit counters in combination with CTB
|
||||
*
|
||||
* @param input View of the 24 bit data as uint8_t (no 24bit native data type exists)
|
||||
* @param output Destination of the expanded data (32bit, unsigned)
|
||||
* @param offset Offset within the first byte to where the data starts (0-7 bits)
|
||||
*
|
||||
* @param input View of the 24 bit data as uint8_t (no 24bit native data type
|
||||
* exists)
|
||||
* @param output Destination of the expanded data (32bit, unsigned)
|
||||
* @param offset Offset within the first byte to where the data starts (0-7
|
||||
* bits)
|
||||
*/
|
||||
void expand24to32bit(NDView<uint8_t,1> input, NDView<uint32_t,1> output, BitOffset offset={});
|
||||
void expand24to32bit(NDView<uint8_t, 1> input, NDView<uint32_t, 1> output,
|
||||
BitOffset offset = {});
|
||||
|
||||
/**
|
||||
* @brief expands the two 4 bit values of an 8 bit buffer into two 8 bit values
|
||||
* @param input input buffer with 4 bit values packed into 8 bit
|
||||
* @param output output buffer with 8 bit values
|
||||
*/
|
||||
void expand4to8bit(NDView<uint8_t, 1> input, NDView<uint8_t, 1> output);
|
||||
|
||||
/**
|
||||
* @brief Apply custom weights to a 16-bit input value. Will sum up
|
||||
|
||||
Reference in New Issue
Block a user