Skip to content

Commit

Permalink
Merge pull request #683 from mehta-lab/channel_seq_test
Browse files Browse the repository at this point in the history
add equal exposures to channel sequencing test
  • Loading branch information
henrypinkard authored Sep 6, 2023
2 parents 9c3311b + 07cc358 commit 0a5fd4e
Showing 1 changed file with 29 additions and 1 deletion.
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=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=['DAPI', 'FITC', 'Rhodamine', 'Cy5'])
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 0a5fd4e

Please sign in to comment.