Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypinkard committed Sep 6, 2023
2 parents caacf8f + 0a5fd4e commit 6efafc7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ private void precomputeReconWeightings() {
* projection and recon arrays.
*/
public void initializeProjections() {
// Not quite sure why, but this is needed to be able to re-utilize this Resampler.
imageQueue_.clear();
int reconImageZShape = this.reconImageShape_[0];
int reconImageYShape = this.reconImageShape_[1];
int reconImageXShape = this.reconImageShape_[2];
Expand Down
30 changes: 29 additions & 1 deletion pycromanager/test/test_acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,39 @@ def test_channel_seq_acq(launch_mm_headless, setup_data_folder):
Test that channels can be sequenced
"""
channels = ['DAPI', 'FITC', 'Rhodamine', 'Cy5']

mmc = Core()
mmc.set_property('LED', 'Sequence', 'On')

events = multi_d_acquisition_events(channel_group='Channel-Multiband',
channels=['DAPI', 'FITC', 'Rhodamine', 'Cy5'])
channels=channels)

def hook_fn(_events):
assert check_acq_sequenced(_events, len(events)), 'Sequenced acquisition is not built correctly'
return None # no need to actually acquire the data

with Acquisition(setup_data_folder, 'acq', show_display=False,
pre_hardware_hook_fn=hook_fn) as acq:
acq.acquire(events)


def test_channel_exp_seq_acq(launch_mm_headless, setup_data_folder):
"""
Test that channels can be sequenced when equal exposure times for each
channel are provided
"""
channels = ['DAPI', 'FITC', 'Rhodamine', 'Cy5']
channel_exposures_ms = [10] * len(channels) # exposure times may be provided, but must be all equal

mmc = Core()
mmc.set_exposure(2)
mmc.set_property('LED', 'Sequence', 'On')

events = multi_d_acquisition_events(channel_group='Channel-Multiband',
channels=channels,
channel_exposures_ms=channel_exposures_ms)

def hook_fn(_events):
assert check_acq_sequenced(_events, len(events)), 'Sequenced acquisition is not built correctly'
Expand Down

0 comments on commit 6efafc7

Please sign in to comment.