imageio.plugins.spe

Read SPE files.

Backend: internal

This plugin supports reading files saved in the Princeton Instruments SPE file format.

Parameters for reading

char_encodingstr

Character encoding used to decode strings in the metadata. Defaults to “latin1”.

check_filesizebool

The number of frames in the file is stored in the file header. However, this number may be wrong for certain software. If this is True (default), derive the number of frames also from the file size and raise a warning if the two values do not match.

sdt_metabool

If set to True (default), check for special metadata written by the SDT-control software. Does not have an effect for files written by other software.

Metadata for reading

ROIslist of dict

Regions of interest used for recording images. Each dict has the “top_left” key containing x and y coordinates of the top left corner, the “bottom_right” key with x and y coordinates of the bottom right corner, and the “bin” key with number of binned pixels in x and y directions.

commentslist of str

The SPE format allows for 5 comment strings of 80 characters each.

controller_versionint

Hardware version

logic_outputint

Definition of output BNC

amp_hi_cap_low_noiseint

Amp switching mode

modeint

Timing mode

exp_secfloat

Alternative exposure in seconds

datestr

Date string

detector_tempfloat

Detector temperature

detector_typeint

CCD / diode array type

st_diodeint

Trigger diode

delay_timefloat

Used with async mode

shutter_controlint

Normal, disabled open, or disabled closed

absorb_livebool

on / off

absorb_modeint

Reference strip or file

can_do_virtual_chipbool

True or False whether chip can do virtual chip

threshold_min_livebool

on / off

threshold_min_valfloat

Threshold minimum value

threshold_max_livebool

on / off

threshold_max_valfloat

Threshold maximum value

time_localstr

Experiment local time

time_utcstr

Experiment UTC time

adc_offsetint

ADC offset

adc_rateint

ADC rate

adc_typeint

ADC type

adc_resolutionint

ADC resolution

adc_bit_adjustint

ADC bit adjust

gainint

gain

sw_versionstr

Version of software which created this file

spare_4bytes

Reserved space

readout_timefloat

Experiment readout time

typestr

Controller type

clockspeed_usfloat

Vertical clock speed in microseconds

readout_mode[“full frame”, “frame transfer”, “kinetics”, “”]

Readout mode. Empty string means that this was not set by the Software.

window_sizeint

Window size for Kinetics mode

file_header_verfloat

File header version

chip_size[int, int]

x and y dimensions of the camera chip

virt_chip_size[int, int]

Virtual chip x and y dimensions

pre_pixels[int, int]

Pre pixels in x and y dimensions

post_pixels[int, int],

Post pixels in x and y dimensions

geometriclist of {“rotate”, “reverse”, “flip”}

Geometric operations

sdt_major_versionint

(only for files created by SDT-control) Major version of SDT-control software

sdt_minor_versionint

(only for files created by SDT-control) Minor version of SDT-control software

sdt_controller_namestr

(only for files created by SDT-control) Controller name

exposure_timefloat

(only for files created by SDT-control) Exposure time in seconds

color_codestr

(only for files created by SDT-control) Color channels used

detection_channelsint

(only for files created by SDT-control) Number of channels

background_subtractionbool

(only for files created by SDT-control) Whether background subtraction war turned on

em_activebool

(only for files created by SDT-control) Whether EM was turned on

em_gainint

(only for files created by SDT-control) EM gain

modulation_activebool

(only for files created by SDT-control) Whether laser modulation (“attenuate”) was turned on

pixel_sizefloat

(only for files created by SDT-control) Camera pixel size

sequence_typestr

(only for files created by SDT-control) Type of sequnce (standard, TOCCSL, arbitrary, …)

gridfloat

(only for files created by SDT-control) Sequence time unit (“grid size”) in seconds

n_macroint

(only for files created by SDT-control) Number of macro loops

delay_macrofloat

(only for files created by SDT-control) Time between macro loops in seconds

n_miniint

(only for files created by SDT-control) Number of mini loops

delay_minifloat

(only for files created by SDT-control) Time between mini loops in seconds

n_microint (only for files created by SDT-control)

Number of micro loops

delay_microfloat (only for files created by SDT-control)

Time between micro loops in seconds

n_subpicsint

(only for files created by SDT-control) Number of sub-pictures

delay_shutterfloat

(only for files created by SDT-control) Camera shutter delay in seconds

delay_prebleachfloat

(only for files created by SDT-control) Pre-bleach delay in seconds

bleach_timefloat

(only for files created by SDT-control) Bleaching time in seconds

recovery_timefloat

(only for files created by SDT-control) Recovery time in seconds

commentstr

(only for files created by SDT-control) User-entered comment. This replaces the “comments” field.

datetimedatetime.datetime

(only for files created by SDT-control) Combines the “date” and “time_local” keys. The latter two plus “time_utc” are removed.

modulation_scriptstr

(only for files created by SDT-control) Laser modulation script. Replaces the “spare_4” key.