25 lines
653 B
Python
25 lines
653 B
Python
import pytest
|
|
import os
|
|
import numpy as np
|
|
from matplotlib import pyplot as plt
|
|
from sfdata import SFDataFiles
|
|
|
|
from cristallina.plot import plot_image_channel
|
|
|
|
__author__ = "Alexander Steppke"
|
|
|
|
def test_plot_image():
|
|
fig, ax = plt.subplots()
|
|
|
|
run_number = 283
|
|
|
|
with SFDataFiles(f"/sf/cristallina/data/p19739/raw/run{run_number:04d}/data/acq0001.*.h5") as data:
|
|
subset = data["JF16T03V01", ]
|
|
JF = subset["JF16T03V01"]
|
|
|
|
fig, ax = plt.subplots()
|
|
|
|
plot_image_channel(subset,"JF16T03V01", ax=ax)
|
|
|
|
im = ax.get_images()[0]
|
|
assert np.isclose(np.sum(im.get_array()), 1095710.4) |