fixed regression tests, file was archived
This commit is contained in:
@@ -233,15 +233,13 @@ def perform_image_stack_sum(
|
||||
im_ROI = im[roi.rows, roi.cols]
|
||||
|
||||
summed = np.zeros(im_ROI[0].shape)
|
||||
|
||||
#for image_slice, slice2 in zip(Images.in_batches(batch_size), other.in_batches(batch_size)):
|
||||
|
||||
for image_slice in Images.in_batches(batch_size):
|
||||
|
||||
index_slice, im = image_slice
|
||||
|
||||
if roi is None:
|
||||
im_ROI = im[:]
|
||||
im_ROI = im
|
||||
else:
|
||||
im_ROI = im[:, roi.rows, roi.cols]
|
||||
|
||||
@@ -281,7 +279,8 @@ def perform_image_roi_crop(
|
||||
|
||||
Preview only applies calculation to first batch and returns.
|
||||
|
||||
Returns: an 1D array (along the pulses recorded without missing) of 2D images
|
||||
Returns: An 1D array (along the pulses recorded without missing) of 2D images
|
||||
Beware though: this can create a rather large array that exceeds available memory.
|
||||
|
||||
TODO: should we create a complete channel here instead of returning `raw` data?
|
||||
|
||||
@@ -305,7 +304,7 @@ def perform_image_roi_crop(
|
||||
index_slice, im = image_slice
|
||||
|
||||
if roi is None:
|
||||
im_ROI = im[:]
|
||||
im_ROI = im
|
||||
else:
|
||||
im_ROI = im[:, roi.rows, roi.cols]
|
||||
|
||||
|
||||
@@ -164,6 +164,8 @@ def plot_detector_image(image_data, title=None, comment=None, ax=None, rois=None
|
||||
- rois: draw a rectangular patch for the given roi(s)
|
||||
- norms: [min, max] values for colormap
|
||||
- log_colorscale: True for a logarithmic colormap
|
||||
- title: Title of the plot
|
||||
- show_legend: True if the legend box should be drawn
|
||||
"""
|
||||
|
||||
im = image_data
|
||||
@@ -196,12 +198,13 @@ def plot_detector_image(image_data, title=None, comment=None, ax=None, rois=None
|
||||
[roi.left, roi.bottom],
|
||||
roi.width,
|
||||
roi.height,
|
||||
linewidth=3,
|
||||
linewidth=2,
|
||||
edgecolor=f"C{i}",
|
||||
facecolor="none",
|
||||
label=roi.name,
|
||||
)
|
||||
ax.add_patch(rect)
|
||||
|
||||
if comment is not None:
|
||||
description = f"{comment}\nmean: {mean:.2e},\nstd: {std:.2e}"
|
||||
else:
|
||||
|
||||
@@ -9,8 +9,8 @@ import tracemalloc
|
||||
|
||||
@pytest.mark.regression
|
||||
def test_JU_memory():
|
||||
base_path = "/sf/cristallina/data/p19739/raw/"
|
||||
run_number = 49
|
||||
base_path = "/sf/cristallina/data/p19150/raw"
|
||||
run_number = 146
|
||||
averages = []
|
||||
|
||||
tracemalloc.start()
|
||||
|
||||
Reference in New Issue
Block a user