mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-19 22:08:41 +01:00
didnt save properly
This commit is contained in:
@@ -17,7 +17,7 @@ NDArray<ssize_t, 2> GenerateMH02SingleCounterPixelMap();
|
|||||||
NDArray<ssize_t, 3> GenerateMH02FourCounterPixelMap();
|
NDArray<ssize_t, 3> GenerateMH02FourCounterPixelMap();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Generate pixel map for Matterhorn02 detector
|
* @brief Generate pixel map for Matterhorn10 detector
|
||||||
* @param dynamic_range Dynamic range of the detector (16, 8, or 4)
|
* @param dynamic_range Dynamic range of the detector (16, 8, or 4)
|
||||||
* @param n_counters Number of counters (1 to 4)
|
* @param n_counters Number of counters (1 to 4)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ class CtbRawFile(_aare.CtbRawFile):
|
|||||||
super().__init__(fname)
|
super().__init__(fname)
|
||||||
self._chunk_size = chunk_size
|
self._chunk_size = chunk_size
|
||||||
self._transform = transform
|
self._transform = transform
|
||||||
print("so far so good")
|
|
||||||
if self._transform:
|
if self._transform:
|
||||||
if hasattr(self._transform, "compatibility") and callable(getattr(self._transform, "compatibility")):
|
if hasattr(self._transform, "compatibility") and callable(getattr(self._transform, "compatibility")):
|
||||||
self._transform.compatibility(self.master.reading_mode)
|
self._transform.compatibility(self.master.reading_mode)
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ def test_read_rawfile_with_multiple_rois(test_data_path):
|
|||||||
assert frame[0].shape == (301, 101)
|
assert frame[0].shape == (301, 101)
|
||||||
assert f.tell() == 2
|
assert f.tell() == 2
|
||||||
|
|
||||||
|
assert headers.size == 10100
|
||||||
|
assert frames.shape == (10100, 256, 256)
|
||||||
|
|
||||||
@pytest.mark.withdata
|
@pytest.mark.withdata
|
||||||
def test_read_rawfile_quad_eiger_and_compare_to_numpy(test_data_path):
|
def test_read_rawfile_quad_eiger_and_compare_to_numpy(test_data_path):
|
||||||
|
|
||||||
@@ -68,7 +71,6 @@ def test_read_rawfile_quad_eiger_and_compare_to_numpy(test_data_path):
|
|||||||
|
|
||||||
assert (image == image1).all()
|
assert (image == image1).all()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.withdata
|
@pytest.mark.withdata
|
||||||
def test_read_rawfile_eiger_and_compare_to_numpy(test_data_path):
|
def test_read_rawfile_eiger_and_compare_to_numpy(test_data_path):
|
||||||
d0 = test_data_path/'raw/eiger/Lab6_20500eV_2deg_20240629_d0_f0_7.raw'
|
d0 = test_data_path/'raw/eiger/Lab6_20500eV_2deg_20240629_d0_f0_7.raw'
|
||||||
|
|||||||
@@ -168,6 +168,8 @@ NDArray<ssize_t, 3> GenerateMH02FourCounterPixelMap() {
|
|||||||
|
|
||||||
NDArray<ssize_t, 2> GenerateMatterhorn10PixelMap(const size_t dynamic_range,
|
NDArray<ssize_t, 2> GenerateMatterhorn10PixelMap(const size_t dynamic_range,
|
||||||
const size_t n_counters) {
|
const size_t n_counters) {
|
||||||
|
|
||||||
|
// Matterhorn10 uses transceiver samples (each transceiver sample has 1-4 channels storing 8 bytes each)
|
||||||
constexpr size_t n_cols = Matterhorn10::nCols;
|
constexpr size_t n_cols = Matterhorn10::nCols;
|
||||||
constexpr size_t n_rows = Matterhorn10::nRows;
|
constexpr size_t n_rows = Matterhorn10::nRows;
|
||||||
NDArray<ssize_t, 2> pixel_map(
|
NDArray<ssize_t, 2> pixel_map(
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ TEST_CASE("Expand 4 bit values packed into 8 bit to 8 bit values") {
|
|||||||
|
|
||||||
uint8_t expected_output[] = {
|
uint8_t expected_output[] = {
|
||||||
0x0, 0x0, 0x0, 0xF, 0xF, 0xF,
|
0x0, 0x0, 0x0, 0xF, 0xF, 0xF,
|
||||||
0x0, 0x0, 0x0, 0xF, 0xF, 0xF}; // is it first little or big endian?
|
0x0, 0x0, 0x0, 0xF, 0xF, 0xF}; // assuming little endian
|
||||||
|
|
||||||
for (size_t i = 0; i < 12; ++i) {
|
for (size_t i = 0; i < 12; ++i) {
|
||||||
CHECK(out(i) == expected_output[i]);
|
CHECK(out(i) == expected_output[i]);
|
||||||
|
|||||||
Reference in New Issue
Block a user