# SPE SPE file format

Extensions: `.spe`

Some CCD camera software produces images in the Princeton Instruments SPE file format. This plugin supports reading such files.

## 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.

## 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