multiScope module
- class multiScope.multiScopeModel
Bases:
object
The main model class of the multi-scale microscope. Here all hardware components are initialized, started/controlled.
- __init__()
Initialize the multiScopeModel.
- acquire_stack_highres(current_startposition, current_laserline, filepath, modality)
Starts a custody thread to run a high-resolution stack acquisition (SPIM or ASLM). Also updates the buffer used.
- Parameters:
current_startposition – start position for the stack acquisition
current_laserline – which wavelength is acquired.
filepath – filepath to save acquired low-resolution image stack.
modality – ASLM or SPIM?
- acquire_stack_lowres(current_startposition, current_laserline, filepath)
Starts a custody thread to run a low-resolution stack acquisition. Also updates the buffer used.
- Parameters:
current_startposition – start position for the stack acquisition
current_laserline – which wavelength is acquired.
filepath – filepath to save acquired low-resolution image stack.
- calculate_ASLMparameters(desired_exposuretime)
Calculate and set the parameters for an ASLM acquisition.
- Parameters:
desired_exposuretime – the exposure time that is desired for the whole acquisition
- changeHRtoLR()
Change the microscope from a high-resolution to a low-resolution acquisition configuration (flip mirror)
- changeLRtoHR()
Change the microscope from a low-resolution to a high-resolution acquisition configuration (flip mirror)
- check_movementboundaries(array)
Define here the movement boundaries of your stage system.
- Parameters:
array – [axialPosition, lateralPosition, updownPosition, anglePosition], a list of position the stages moves to.
- Returns:
an array which has no out of range positions
- close()
Close all opened channels, tasks, camera, NI board, stages and display.
- move_to_position(positionlist)
Move to specified position according to positionlist
- Parameters:
positionlist – list of positions in format, e.g. [44280000, -2000000000, -2587870000]
- prepare_acquisition(current_startposition, laser)
Prepare acquisition by moving filter wheel and stage system to the correct position, and updating buffer sizes.
- Parameters:
current_startposition – position to move the stage to for starting a stack.
laser – wavelength to image.
- preview_highres_ASLM()
Starts a custody thread to run a high-resolution ASLM preview.
- preview_highres_static()
Starts a custody thread to run a high-resolution SPIM preview.
- preview_lowres()
Starts a custody thread to run a low-resolution preview.
- save_currentpositionToFile(filepath, current_startposition)
Saves current position to file/append it, called by stack_acquisition_master.
- Parameters:
filepath – filepath to save current position.
current_startposition – position to save to file.
- set_laserpower(powersettings)
Update the laser intensity by setting the corresponding NI board voltage sent to the laser.
- Parameters:
powersettings – np.array with 4 entries for 4 lasers
- smooth_sawtooth(array, window_len=101)
Smooth an array with a defined window length.
- Parameters:
array – Array to smooth
window_len – Window length over which to average values.
- Returns:
smoothened array.
- stack_acquisition_master(current_folder, current_position, whichlaser, resolutionmode)
Start stack acquisitions of different channels and resolution modes, including setting laser powers, saving of start position to file, generation of filepaths, and decides which stack acquisition method to call.
- Parameters:
current_folder – folder to save the acquired data
current_position – start position for the stack streaming
whichlaser – which channels to image
resolutionmode – which scale, options: low, highASLM, highSPIM
- update_bufferSize()
This handles the size of the buffers during acquisitions. For example, if there is a change in plane number or ROI, updates the buffers accordingly.