Closed Brow71189 closed 3 years ago
The new tests need nion-software/nionswift-usim#25 to work.
test_data_intensity_scale_is_correct_for_summed_frames
is failing intermittently. I pushed a fix similar to the one from a few days ago. Can you rebase this PR?
======================================================================
FAIL: test_data_intensity_scale_is_correct_for_summed_frames (MultiAcquire_test.TestMultiAcquire)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/nionswift-instrumentation-kit/nionswift-instrumentation-kit/nion/instrumentation/test/MultiAcquire_test.py", line 130, in test_data_intensity_scale_is_correct_for_summed_frames
self.assertAlmostEqual(val, calibrated_intensities[0], delta=100)
AssertionError: 97403560.0 != 97403660.0 within 100 delta (104.0 difference)
----------------------------------------------------------------------
test_data_intensity_scale_is_correct_for_summed_frames
is failing intermittently. I pushed a fix similar to the one from a few days ago. Can you rebase this PR?====================================================================== FAIL: test_data_intensity_scale_is_correct_for_summed_frames (MultiAcquire_test.TestMultiAcquire) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/runner/work/nionswift-instrumentation-kit/nionswift-instrumentation-kit/nion/instrumentation/test/MultiAcquire_test.py", line 130, in test_data_intensity_scale_is_correct_for_summed_frames self.assertAlmostEqual(val, calibrated_intensities[0], delta=100) AssertionError: 97403560.0 != 97403660.0 within 100 delta (104.0 difference) ----------------------------------------------------------------------
Done.
This adds support for 0D data being returned by cameras. If the camera settings have an attribute "masks", the UI assumes that the camera supports this mode and offers an additional option "Virtual Detectors" in the style dropdown menu in the SI panel.
The "Maks" class is also part of instrumentation-kit now but the mask builder UI is up to the camera to implement for now. The "masks" attribute in the camera settings is meant to hold all the masks that are available for this camera. I think saving the available masks with the camera makes sense because you want different masks for different cameras. The active masks are saved in the camera frame parameters. This is the point I'm a bit unhappy about, because it causes calling
dict(frame_parameters)
not to return a JSON-serializable dictionary anymore.CameraFrameParameters
implement a methodas_dict()
, which still returns a JSON-serializable dict so maybe it is fine.