msl.equipment.resources.princeton_instruments.arc_instrument module

Wrapper around the ARC_Instrument.dll SDK from Princeton Instruments.

The wrapper was written using v2.0.3 of the SDK.

class msl.equipment.resources.princeton_instruments.arc_instrument.PrincetonInstruments(record)[source]

Bases: Connection

Wrapper around the ARC_Instrument.dll SDK from Princeton Instruments.

The properties for a ARCInstrument connection supports the following key-value pairs in the Connections Database:

'sdk_path': str, The path to the SDK [default: 'ARC_Instrument_x64.dll']
'open': bool, Whether to automatically open the connection [default: True]

Do not instantiate this class directly. Use the connect() method to connect to the equipment.

Parameters:

record (EquipmentRecord) – A record from an Equipment-Register Database.

disconnect()[source]

Close all open connections.

static close_enum(enum)[source]

Function to close an open enumeration.

Parameters:

enum (int) – A handle defined in ARC_Open_xxxx by which the instrument is to be addressed.

det_read(det_num)[source]

Readout a single detector.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

float – Reading value for the selected detector.

det_readall()[source]

Readout all detectors.

Returns:

tuple of float – The reading of each detector.

det_start_nonblock_read(det_num)[source]

Start to readout a single detector, but return immediately (non-blocking read).

Parameters:

det_num (int) – The detector to be addressed.

det_nonblock_read_done(det_num)[source]

Returns the detector value.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

float – The value of the detector.

filter_home()[source]

Homes the filter wheel.

mono_filter_home()[source]

Homes the filter wheel.

mono_grating_calc_gadjust(grating, wave, ref_wave)[source]

Calculate a new grating GAdjust.

Parameters:
  • grating (int) – The number of the grating that is to be addressed.

  • wave (float) – The wavelength, in nm, on which a peak is currently falling.

  • ref_wave (float) – The wavelength, in nm, on which the peak should fall.

Returns:

int – The calculated grating GAdjust. Note - this value is specific to a specific instrument-grating combination and not transferable between instruments.

mono_grating_calc_offset(grating, wave, ref_wave)[source]

Calculate a new grating offset.

Parameters:
  • grating (int) – The number of the grating that is to be addressed.

  • wave (float) – The wavelength, in nm, on which a peak is currently falling.

  • ref_wave (float) – The wavelength, in nm, on which the peak should fall.

Returns:

int – The calculated grating offset. Note - this value is specific to a specific instrument-grating combination and not transferable between instruments.

mono_grating_install(grating, density, blaze, nm_blaze, um_blaze, hol_blaze, mirror, reboot)[source]

Install a new grating.

Parameters:
  • grating (int) – The number of the grating that is to be addressed.

  • density (int) – The groove density in grooves per mm of the grating.

  • blaze (str) – The Blaze string.

  • nm_blaze (bool) – Whether the grating has a nm blaze.

  • um_blaze (bool) – Whether the grating has a um blaze.

  • hol_blaze (bool) – Whether the grating has a holographic blaze.

  • mirror (bool) – Whether the grating position is a mirror.

  • reboot (bool) – Whether to reboot the monochromator after installing.

mono_grating_uninstall(grating, reboot)[source]

Uninstall a grating.

Parameters:
  • grating (int) – The number of the grating that is to be uninstalled.

  • reboot (bool) – Whether to reboot the monochromator after uninstalling.

mono_move_steps(num_steps)[source]

Move the grating a set number of steps.

Parameters:

num_steps (int) – Number of steps to move the wavelength drive.

mono_reset()[source]

Reset the monochromator.

mono_restore_factory_settings()[source]

Restore the instrument factory settings.

mono_scan_done()[source]

Check if a scan has completed.

Returns:

  • bool – Whether the scan finished (the scan ended or the grating wavelength limit was reached).

  • float – The current wavelength, in nm, of the grating.

mono_slit_home(slit_num)[source]

Homes a motorized slit.

Parameters:

slit_num (int) –

The slit to be homed.

  • 1 - Side entrance slit.

  • 2 - Front entrance slit.

  • 3 - Front exit slit.

  • 4 - Side exit slit.

  • 5 - Side entrance slit on a double slave unit.

  • 6 - Front entrance slit on a double slave unit.

  • 7 - Front exit slit on a double slave unit.

  • 8 - Side exit slit on a double slave unit.

static mono_slit_name(slit_num)[source]

Returns a text description of a slit position.

Parameters:

slit_num (int) – The slit to be addressed.

Returns:

str – The description of the slit port location.

mono_start_jog(jog_max_rate, jog_forwards)[source]

Start jogging the wavelength of the monochromator.

Parameters:
  • jog_max_rate (bool) –

    Whether to jog at the max scan rate or at the current scan rate.

    • False - Current Scan Rate.

    • True - Max Scan Rate.

  • jog_forwards (bool) –

    Whether to jog forward (increasing nm) or backwards (decreasing nm).

    • False - Jog Backwards (decreasing nm).

    • True - Jog Forwards (increasing nm).

mono_start_scan_to_nm(wavelength_nm)[source]

Start a wavelength scan.

Parameters:

wavelength_nm (float) – Wavelength in nm we are to scan to. Note - the value should not be lower than the current wavelength and should not exceed the current grating wavelength limit.

mono_stop_jog()[source]

End a wavelength jog.

calc_mono_slit_bandpass(slit_num, width)[source]

Calculates the band pass for the provided slit width.

Parameters:
  • slit_num (int) –

    The slit number.

    • 1 - Side entrance slit.

    • 2 - Front entrance slit.

    • 3 - Front exit slit.

    • 4 - Side exit slit.

    • 5 - Side entrance slit on a double slave unit.

    • 6 - Front entrance slit on a double slave unit.

    • 7 - Front exit slit on a double slave unit.

    • 8 - Side exit slit on a double slave unit.

  • width (float) – The slit width that the band pass is being calculated for.

Returns:

float – The calculated band pass for the slit, in nm.

ncl_filter_home()[source]

Home the filter wheel.

open_filter(enum_num)[source]

Function to open a Filter Wheel.

Parameters:

enum_num (int) – Number in the enumeration list to open.

open_mono(enum_num)[source]

Function to open a Monochromator.

Parameters:

enum_num (int) – Number in the enumeration list to open.

open_mono_port(port)[source]

Function to open a Monochromator on a specific COM Port.

Parameters:

port (int or str) – The COM port (e.g., 5 or 'COM5').

open_mono_serial(serial)[source]

Function to open a Monochromator with a specific serial number.

Parameters:

serial (class:int or str) – The serial number of the Monochromator.

open_filter_port(port)[source]

Function to open a Filter Wheel on a specific COM Port.

Parameters:

port (int or str) – The COM port (e.g., 5 or 'COM5').

open_filter_serial(serial)[source]

Function to open a Filter Wheel with a specific serial number.

Parameters:

serial (class:int or str) – The serial number of the Filter Wheel.

open_readout(port_num)[source]

Function to open a Readout System (NCL/NCL-Lite).

Parameters:

port_num (int) – Number in the enumeration list to open.

Returns:

  • int – If a mono is attached to an NCL on port 1, then this is the enum by which to address the first mono.

  • int – If a mono is attached to an NCL on port 2, then this is the enum by which to address the second mono.

open_readout_port(port)[source]

Function to open a Readout System (NCL/NCL-Lite) on a specific COM Port.

Parameters:

port (class:int or str) – The COM port (e.g., 5 or 'COM5').

Returns:

  • int – If a mono is attached to an NCL on port 1, then this is the enum by which to address the first mono.

  • int – If a mono is attached to an NCL on port 2, then this is the enum by which to address the second mono.

static search_for_inst()[source]

Function used to search for all attached Acton Research Instruments.

Returns:

int – The number of Acton Research Instruments found and enumerated. Enumeration list starts with zero and ends with the “number found” minus one.

valid_det_num(det_num)[source]

Check if the detector number is valid on the Readout System.

Parameters:

det_num (int) – The detector number to check.

Returns:

bool – Whether the detector number is valid on the Readout System.

static valid_enum(enum)[source]

Check if an enumeration is valid and the instrument is open.

Parameters:

enum (int) – The enumeration to check.

Returns:

bool – Whether the enumeration is valid and the instrument is open.

static valid_mono_enum(mono_enum)[source]

Check if a monochromator enumeration is valid and the instrument is open.

All functions call this function to verify that the requested action is valid.

Parameters:

mono_enum (int) – The enumeration to check.

Returns:

bool – Whether the enumeration is valid and the instrument is open.

static valid_readout_enum(readout_enum)[source]

Check if a Readout System (NCL/NCL-Lite) enumeration is valid and the instrument is open.

Parameters:

readout_enum (int) – The enumeration to check.

Returns:

bool – Whether the enumeration is valid and the instrument is open.

static valid_filter_enum(filter_enum)[source]

Check if a Filter Wheel enumeration is valid and the instrument is open.

Parameters:

filter_enum (int) – The enumeration to check.

Returns:

bool – Whether the enumeration is valid and the instrument is open.

static ver()[source]

Get the DLL version number.

It is the only function that can be called at any time.

Returns:

  • int – The major version number.

  • int – The minor version number.

  • int – The build version number.

get_det_bipolar(det_num)[source]

Return if a detector takes bipolar (+/-) readings.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

boolTrue if the detector is bipolar (+/-).

get_det_bipolar_str(det_num)[source]

Return the description of the detector polarity.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

str – A description of whether the detector is uni-polar or bipolar.

get_det_hv_volts(det_num)[source]

Return the high voltage volts setting.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

int – High voltage volts that the detector is set to.

get_det_hv_on(det_num)[source]

Return if the high voltage for a detector is turned on.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

bool – Whether the high voltage is turned on.

get_det_num_avg_read()[source]

Return the number of readings that are averaged.

Returns:

int – Number of readings averaged into a single reading.

get_det_range(det_num)[source]

Return the detector range factor.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

int – The detector gain range.

  • Detector Range 0 - 1x

  • Detector Range 1 - 2x

  • Detector Range 2 - 4x

  • Detector Range 3 - 50x

  • Detector Range 4 - 200x

get_det_range_factor(det_num)[source]

Return the detector range multiplier.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

int – The detector range multiplier.

get_det_type(det_num)[source]

Return the detector readout type (Current, Voltage, Photon Counting).

Parameters:

det_num (int) – The detector to be addressed.

Returns:

int

The detector readout type.

  • Detector Type 1 - Current

  • Detector Type 2 - Voltage

  • Detector Type 3 - Photon Counting

get_det_type_str(det_num)[source]

Return a description of the detector readout type.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

str – The detector readout type (Current, Voltage, Photon Counting).

get_filter_max_pos()[source]

Returns the maximum filter position.

Returns:

int – Returns the maximum position possible with the filter wheel.

get_filter_min_pos()[source]

Returns the minimum filter position.

Returns:

int – Returns the minimum position possible with the filter wheel.

get_filter_model()[source]

Returns the model string from the instrument.

Returns:

str – The model string of the instrument.

get_filter_position()[source]

Returns the current filter position.

Returns:

int – The current filter wheel position.

get_filter_present()[source]

Returns if the instrument has a filter wheel.

Returns:

int – Whether an integrated filter wheel is present on the filter wheel.

get_filter_serial()[source]

Returns the serial number of the instrument.

Returns:

str – The serial number of the instrument.

static get_filter_preopen_model(filter_enum)[source]

Returns the model string of an instrument not yet opened.

Note, search_for_inst() needs to be called prior to this call. In the case of multiple Filter Wheel/Spectrographs attached, it allows the user to sort, which instruments are to be opened before opening them.

Parameters:

filter_enum (int) – A filter enumeration value.

Returns:

str – The model string of the unopened filter wheel.

static get_enum_preopen_model(enum)[source]

Returns the model number of an instrument not yet opened.

Note, search_for_inst() needs to be called prior to this call.

Parameters:

enum (int) – The enumeration for the unopened instrument.

Returns:

str – A Princeton Instruments model number.

static get_enum_preopen_serial(enum)[source]

Returns the serial number of an instrument not yet opened.

Note, search_for_inst() needs to be called prior to this call.

Parameters:

enum (int) – The enumeration for the unopened instrument.

Returns:

str – A Princeton Instruments serial number.

static get_enum_preopen_com(enum)[source]

Returns the COM port number of an instrument not yet opened.

Note, search_for_inst() needs to be called prior to this call.

Parameters:

enum (int) – The enumeration for the unopened instrument.

Returns:

int – The COM port number.

get_mono_backlash_steps()[source]

Returns the number of backlash steps used when reversing the wavelength drive.

Returns:

int – The number of steps the instrument backlash corrects. Not valid on older instruments.

get_mono_detector_angle()[source]

Returns the default detector angle of the instrument in radians.

Returns:

float – The default detector angle of the instrument in radians.

get_mono_diverter_pos(diverter_num)[source]

Returns the slit that the diverter mirror is pointing to.

Parameters:

diverter_num (int) –

The diverter to be queried.

  • Mirror Position 1 - motorized entrance diverter mirror.

  • Mirror Position 2 - motorized exit diverter mirror.

  • Mirror Position 3 - motorized entrance diverter on a double slave unit.

  • Mirror Position 4 - motorized exit diverter on a double slave unit.

Returns:

int

The slit port that the diverter mirror is currently pointing at.

  • Slit Port 1 - Side entrance slit.

  • Slit Port 2 - Front entrance slit.

  • Slit Port 3 - Front exit slit.

  • Slit Port 4 - Side exit slit.

  • Slit Port 5 - Side entrance slit on a double slave unit.

  • Slit Port 6 - Front entrance slit on a double slave unit.

  • Slit Port 7 - Front exit slit on a double slave unit.

  • Slit Port 8 - Side exit slit on a double slave unit.

get_mono_diverter_pos_str(diverter_num)[source]

Returns a string describing the port the mirror is pointing to.

Parameters:

diverter_num (int) –

The diverter to be queried.

  • Mirror Position 1 - motorized entrance diverter mirror.

  • Mirror Position 2 - motorized exit diverter mirror.

  • Mirror Position 3 - motorized entrance diverter on a double slave unit.

  • Mirror Position 4 - motorized exit diverter on a double slave unit.

Returns:

str – A string describing which port the diverter is pointing at.

get_mono_diverter_valid(diverter_num)[source]

Returns if a motorized diverter position is valid for an instrument.

Parameters:

diverter_num (int) –

The diverter to be queried.

  • Mirror Position 1 - motorized entrance diverter mirror.

  • Mirror Position 2 - motorized exit diverter mirror.

  • Mirror Position 3 - motorized entrance diverter on a double slave unit.

  • Mirror Position 4 - motorized exit diverter on a double slave unit.

Returns:

bool – Whether the diverter mirror is valid.

get_mono_double()[source]

Returns if the instrument is a double monochromator.

Returns:

bool – Whether the instrument is a double monochromator.

get_mono_double_subtractive()[source]

Returns if a double monochromator is subtractive instead of additive.

Returns:

bool – Whether the double monochromator is subtractive.

get_mono_double_intermediate_slit()[source]

If a monochromator is a double, return the intermediate slit position.

Returns:

slit_pos (int) – The intermediate slit of the double monochromator

  • Slit Port 1 - Side entrance slit.

  • Slit Port 2 - Front entrance slit.

  • Slit Port 3 - Front exit slit.

  • Slit Port 4 - Side exit slit.

  • Slit Port 5 - Side entrance slit on a double slave unit.

  • Slit Port 6 - Front entrance slit on a double slave unit.

  • Slit Port 7 - Front exit slit on a double slave unit.

  • Slit Port 8 - Side exit slit on a double slave unit.

get_mono_exit_slit()[source]

Return the exit slit position for a monochromator.

Function works with single and double monochromators.

Returns:

slit_pos (int) – The intermediate slit of the double monochromator

  • Slit Port 1 - Side entrance slit.

  • Slit Port 2 - Front entrance slit.

  • Slit Port 3 - Front exit slit.

  • Slit Port 4 - Side exit slit.

  • Slit Port 5 - Side entrance slit on a double slave unit.

  • Slit Port 6 - Front entrance slit on a double slave unit.

  • Slit Port 7 - Front exit slit on a double slave unit.

  • Slit Port 8 - Side exit slit on a double slave unit.

get_mono_filter_max_pos()[source]

Returns the maximum filter position.

Returns:

int – The maximum position possible with the filter wheel.

get_mono_filter_min_pos()[source]

Returns the minimum filter position.

Returns:

int – The minimum position possible with the filter wheel.

get_mono_filter_position()[source]

Returns the current filter position.

Returns:

int – The current filter wheel position.

get_mono_filter_present()[source]

Returns if the instrument has an integrated filter wheel.

Note, is a new option and not available on most instruments. All filter functions call this function before proceeding.

Returns:

bool – Wether an integrated filter wheel is present on the monochromator.

get_mono_focal_length()[source]

Returns the default focal length of the instrument.

Returns:

float – The focal length of the instrument in millimeters.

get_mono_gear_steps()[source]

Returns the number of steps in a set of sine drive gears.

Returns:

  • int – The number of steps per rev on the minor gear of a sine wavelength drive.

  • int – The number of steps per rev on the major gear of a sine wavelength drive.

get_mono_grating()[source]

Returns the current grating.

Returns:

int – The current grating. This assumes the correct turret has been inserted in the instrument.

get_mono_grating_blaze(grating)[source]

Returns the blaze of a given grating.

Parameters:

grating (int) – Which grating to request the information about. Validates the request by calling get_mono_grating_installed().

Returns:

str – The blaze of the grating.

get_mono_grating_density(grating)[source]

Returns the groove density (grooves per millimeter) of a given grating.

Parameters:

grating (int) – Which grating to request the information about. Validates the request by calling get_mono_grating_installed().

Returns:

int – The groove density of the grating in grooves per millimeter. For a mirror, this function will return 1200 grooves per MM.

get_mono_grating_gadjust(grating)[source]

Returns the GAdjust of a grating.

Parameters:

grating (int) – Which grating to request the information about.

Returns:

int – The grating GAdjust. Note, this value is specific to a specific instrument grating combination and not transferable between instruments.

get_mono_grating_installed(grating)[source]

Returns if a grating is installed.

Parameters:

grating (int) – Which grating we are requesting the information about.

Returns:

bool – Whether the grating requested is installed.

get_mono_grating_max()[source]

Get the maximum grating position installed.

This is usually the number of gratings installed.

Returns:

int – The number of gratings installed.

get_mono_grating_offset(grating)[source]

Returns the offset of a grating.

Parameters:

grating (int c_long) – The number of the grating that is to be addressed.

Returns:

int – The grating offset. Note, this value is specific to a specific instrument grating combination and not transferable between instruments.

get_mono_half_angle()[source]

Returns the default half angle of the instrument in radians.

:param float: The half angle of the instrument in radians.

get_mono_init_grating()[source]

Returns the initial grating (on instrument reboot).

Returns:

int – The power-up grating number.

get_mono_init_scan_rate_nm()[source]

Returns the initial wavelength scan rate (on instrument reboot).

Returns:

float – The power-up scan rate in nm / minute.

get_mono_init_wave_nm()[source]

Returns the initial wavelength (on instrument reboot).

Returns:

float – The power-up wavelength in nm.

get_mono_int_led_on()[source]

Checks if the interrupter LED is on.

Returns:

bool – Whether the interrupter LED is on.

get_mono_model()[source]

Returns the model number of the instrument.

Returns:

str – The model number of the instrument.

get_mono_motor_int()[source]

Read the motor gear interrupter.

Returns:

bool – Whether the motor gear was interrupted.

get_mono_precision()[source]

Returns the nm-decimal precision of the wavelength drive.

Note, this is independent of the wavelength step resolution whose coarseness is defined by the grating being used.

Returns:

int – The number of digits after the decimal point the instrument uses. Note, the true precision is limited by the density of the grating and can be much less than the instruments wavelength precision.

get_mono_scan_rate_nm_min()[source]

Return the current wavelength scan rate.

Returns:

float – Scan rate in nm per minute.

get_mono_serial()[source]

Returns the serial number of the instrument.

Returns:

str – The serial number of the instrument as a string.

get_mono_shutter_open()[source]

Returns if the integrated shutter is open.

Returns:

bool – Whether the shutter is open.

get_mono_shutter_valid()[source]

Returns if the instrument has an integrated shutter.

Returns:

bool – Whether a shutter is present.

get_mono_sine_drive()[source]

Returns if the gearing system has sine instead of a linear drive system.

Returns:

bool – Whether the gearing is sine based verses linear gearing.

get_mono_slit_type(slit_pos)[source]

Returns the slit type for a given slit.

Parameters:

slit_pos (int) –

The slit to be addressed.

  • Slit Port 1 - Side entrance slit.

  • Slit Port 2 - Front entrance slit.

  • Slit Port 3 - Front exit slit.

  • Slit Port 4 - Side exit slit.

  • Slit Port 5 - Side entrance slit on a double slave unit.

  • Slit Port 6 - Front entrance slit on a double slave unit.

  • Slit Port 7 - Front exit slit on a double slave unit.

  • Slit Port 8 - Side exit slit on a double slave unit.

Returns:

int – The type of slit attached.

  • Slit Type 0 - No slit, older instruments that do will only return a slit type of zero.

  • Slit Type 1 - Manual Slit.

  • Slit Type 2 - Fixed Slit Width.

  • Slit Type 3 - Focal Plane adapter.

  • Slit Type 4 - Continuous Motor.

  • Slit Type 5 - Fiber Optic.

  • Slit Type 6 - Index able Slit.

get_mono_slit_type_str(slit_pos)[source]

Returns a string descriptor of a given slit.

Parameters:

slit_pos (int) –

The slit to be addressed.

  • Slit Port 1 - Side entrance slit.

  • Slit Port 2 - Front entrance slit.

  • Slit Port 3 - Front exit slit.

  • Slit Port 4 - Side exit slit.

  • Slit Port 5 - Side entrance slit on a double slave unit.

  • Slit Port 6 - Front entrance slit on a double slave unit.

  • Slit Port 7 - Front exit slit on a double slave unit.

  • Slit Port 8 - Side exit slit on a double slave unit.

Returns:

str – The description of the slit.

get_mono_slit_width(slit_pos)[source]

Returns the slit width of a motorized slit.

Parameters:

slit_pos (int) –

The slit to be addressed.

  • Slit Port 1 - Side entrance slit.

  • Slit Port 2 - Front entrance slit.

  • Slit Port 3 - Front exit slit.

  • Slit Port 4 - Side exit slit.

  • Slit Port 5 - Side entrance slit on a double slave unit.

  • Slit Port 6 - Front entrance slit on a double slave unit.

  • Slit Port 7 - Front exit slit on a double slave unit.

  • Slit Port 8 - Side exit slit on a double slave unit.

Returns:

int – The width of the slit, if the slit is motorized.

get_mono_slit_width_max(slit_pos)[source]

Returns the maximum width of a motorized slit.

Parameters:

slit_pos (int) –

The slit to be addressed.

  • Slit Port 1 - Side entrance slit.

  • Slit Port 2 - Front entrance slit.

  • Slit Port 3 - Front exit slit.

  • Slit Port 4 - Side exit slit.

  • Slit Port 5 - Side entrance slit on a double slave unit.

  • Slit Port 6 - Front entrance slit on a double slave unit.

  • Slit Port 7 - Front exit slit on a double slave unit.

  • Slit Port 8 - Side exit slit on a double slave unit.

Returns:

int – The maximum width of the slit, if the slit is motorized.

get_mono_turret()[source]

Returns the current grating turret number.

Returns:

int – The current turret number.

get_mono_turret_max()[source]

Returns the number of turrets installed.

Returns:

int – The number of turrets installed.

get_mono_turret_gratings()[source]

Returns the number of gratings per turret.

Returns:

int – The number of gratings that can be placed on a single turret. This number can be one, two or three depending on the monochromator model.

get_mono_wavelength_cutoff_nm()[source]

Returns, in nm, the max wavelength achievable by the instrument using the current grating.

Returns:

float – The maximum center wavelength in nanometers for the current grating. On SpectraPro’s this value equals 1400 nm * grating density / 1200 g/mm. On AM/VM products, this value is limited by the sine bar and will vary.

get_mono_wavelength_min_nm()[source]

Returns, in nm, the min wavelength achievable by the instrument using the current grating.

Returns:

float – The minimum center wavelength in nanometers for the current grating. On SpectraPro’s it is usually -10 nm, on linear AM/VM instruments this value will vary.

get_mono_wavelength_abs_cm()[source]

Returns the current center wavelength of instrument in absolute wavenumber.

Returns:

float – The current wavelength of the instrument in absolute wavenumber.

get_mono_wavelength_ang()[source]

Returns the current center wavelength of instrument in Angstroms.

Returns:

float – The current wavelength of the instrument in Angstroms.

get_mono_wavelength_ev()[source]

Returns the current center wavelength of instrument in electron volts.

Returns:

float – The current wavelength of the instrument in electron volts.

get_mono_wavelength_micron()[source]

Returns the current center wavelength of instrument in microns.

Returns:

float – The current wavelength of the instrument in microns.

get_mono_wavelength_nm()[source]

Returns the current center wavelength of instrument in nm.

Returns:

float – The current wavelength of the instrument in nanometers.

get_mono_wavelength_rel_cm(center_nm)[source]

Returns the current center wavelength of instrument in relative wavenumber.

Parameters:

center_nm (int) – The wavelength in nanometers that 0 relative wavenumber is centered around.

Returns:

float – The current wavelength of the instrument in relative wavenumber.

get_mono_wheel_int()[source]

Read the wheel gear interrupter.

Returns:

bool – Whether the wheel gear was interrupted.

get_mono_nm_rev_ratio()[source]

Returns the number of stepper steps per rev of the wavelength drive motor.

Returns:

float – The ratio of nm per rev in a linear wavelength drive.

static get_mono_preopen_model(mono_enum)[source]

Returns the model of an instrument not yet opened.

Note, search_for_inst() needs to be called prior to this call. In the case of multiple Monochromator/Spectrographs attached, it allows the user to sort, which instruments are to be opened before opening them.

Parameters:

mono_enum (int) – A monochromator enumeration.

Returns:

str – The model of the unopened monochromator.

get_ncl_filter_max_pos()[source]

Returns the maximum filter position.

Returns:

int – The maximum filter position.

get_ncl_filter_min_pos()[source]

Returns the minimum filter position.

Returns:

int – The minimum filter position.

get_ncl_filter_position()[source]

Return the current filter position.

Returns:

int – The current filter position.

get_ncl_filter_present()[source]

Returns if the instrument has an integrated filter wheel setup.

Returns:

bool – Whether a NCL filter wheel is setup and present.

get_ncl_mono_enum(mono_num)[source]

Return the enumeration of the attached monochromator.

Parameters:

mono_num (int) – The readout system monochromator port being addressed.

Returns:

int – The enumeration of the monochromator. Check the value returned with valid_mono_enum().

get_ncl_mono_setup(mono_num)[source]

Return if the open NCL port has a Mmnochromator attached.

Parameters:

mono_num (int) – The readout system monochromator port being addressed.

Returns:

bool – Whether a monochromator is attached to the port and it is set up.

get_ncl_shutter_open(shutter_num)[source]

Return if a NCL Readout shutter is open.

Parameters:

shutter_num (int) – The shutter being addressed (1 or 2 on an NCL).

Returns:

bool – Whether the shutter is in the open position.

get_ncl_shutter_valid(shutter_num)[source]

Return if a NCL Readout shutter number is valid.

Parameters:

shutter_num (int) – The shutter being addressed (1 or 2 on an NCL).

Returns:

bool – Whether the shutter number is valid.

get_ncl_ttl_in(ttl_line)[source]

Return if an input TTL line is being pulled on by an outside connection.

Parameters:

ttl_line (int) – The TTL line number being addressed.

Returns:

bool – Whether ttl_line is being pulled to TTL high.

get_ncl_ttl_out(ttl_line)[source]

Return if an output TTL line is on.

Parameters:

ttl_line (int) – The TTL line number being addressed.

Returns:

bool – Whether the output ttl_line is set to TTL high.

get_ncl_ttl_valid(ttl_line)[source]

Return if a TTL line is a valid line.

Parameters:

ttl_line (int) – The TTL line number being addressed.

Returns:

bool – Whether ttl_line is a valid line number.

get_num_det()[source]

Return the number of single point detectors in the Readout System.

Returns:

int – Number of single point detectors the readout system supports. (1 NCL-Lite, 2,3 NCL).

static get_num_found_inst_ports()[source]

Returns the value last returned by search_for_inst().

Can be called multiple times.

Returns:

int – The number of instruments found.

get_readout_itime_ms()[source]

Return the integration time used for taking a reading.

Returns:

int – The integration time used for taking a reading, in milliseconds.

get_readout_model()[source]

Returns the model string from the instrument.

:param str: The model string of the instrument.

get_readout_serial()[source]

Returns the serial number from the instrument.

Returns:

str – The serial number of the instrument as a string.

static get_readout_preopen_model(enum)[source]

Returns the model string of an instrument not yet opened.

Note, “meth:.search_for_inst needs to be called prior to this call. In the case of multiple Readout Systems attached, it allows the user to sort, which instruments are to be opened before opening them.

Parameters:

enum (int) – The instrument enumeration.

Returns:

str – The model string of the unopened instrument.

set_det_bipolar(det_num)[source]

Set the detector readout to bipolar (+/-).

Parameters:

det_num (int) – The detector to be addressed.

set_det_current(det_num)[source]

Set the detector readout type to Current.

Parameters:

det_num (int) – The detector to be addressed.

set_det_hv_volts(det_num, hv_volts)[source]

Set the voltage value of the high voltage.

Parameters:
  • det_num (int) – The detector to be addressed.

  • hv_volts (int) – The voltage value.

set_det_hv_off(det_num)[source]

Set the detector high voltage to off.

Parameters:

det_num (int c_long) – The detector to be addressed.

Returns:

bool – Whether the high voltage has been turned off.

set_det_hv_on(det_num)[source]

Set the detector high voltage to on.

Parameters:

det_num (int) – The detector to be addressed.

Returns:

bool – Whether the high voltage has been turned on.

set_det_num_avg_read(num_reads_avg)[source]

Set the number of readings to average.

Parameters:

num_reads_avg (int) – The number reads that will be required to acquire a single read.

set_det_photon(det_num)[source]

Set the detector readout type to Photon Counter.

Parameters:

det_num (int) – The detector to be addressed.

set_det_range(det_num, gain_range)[source]

Set the detector gain-range factor.

Parameters:
  • det_num (int) – The detector to be addressed.

  • gain_range (int) –

    The detector gain range.

    • Detector Range 0 - 1x

    • Detector Range 1 - 2x

    • Detector Range 2 - 4x

    • Detector Range 3 - 50x

    • Detector Range 4 - 200x

set_det_type(det_num, det_type)[source]

Set the detector readout type.

Parameters:
  • det_num (int) – The detector to be addressed.

  • det_type (int) –

    The detector readout type.

    • Detector Type 1 - Current

    • Detector Type 2 - Voltage

    • Detector Type 3 - Photon Counting

set_det_unipolar(det_num)[source]

Set the detector readout to unipolar (-).

Parameters:

det_num (int) – The detector to be addressed.

set_det_voltage(det_num)[source]

Set the detector readout type to voltage.

Parameters:

det_num (int) – The detector to be addressed.

set_filter_position(position)[source]

Sets the current filter position.

Parameters:

position (int) – Position the filter is to be set to.

set_mono_diverter_pos(diverter_num, diverter_pos)[source]

Sets the port that the unit is to point to.

Parameters:
  • diverter_num (int) –

    The diverter to be modified.

    • Mirror Position 1 - motorized entrance diverter mirror.

    • Mirror Position 2 - motorized exit diverter mirror.

    • Mirror Position 3 - motorized entrance diverter on a double slave unit.

    • Mirror Position 4 - motorized exit diverter on a double slave unit.

  • diverter_pos (int) –

    The slit port that the diverter mirror is to be set to. Not all ports are valid for all diverters.

    • Slit Port 1 - Side entrance slit.

    • Slit Port 2 - Front entrance slit. Slit Port 3 - Front exit slit.

    • Slit Port 4 - Side exit slit.

    • Slit Port 5 - Side entrance slit on a double slave unit.

    • Slit Port 6 - Front entrance slit on a double slave unit.

    • Slit Port 7 - Front exit slit on a double slave unit.

    • Slit Port 8 - Side exit slit on a double slave unit.

set_mono_filter_position(position)[source]

Sets the current filter position.

Parameters:

position (int) – Position the filter is to be set to.

set_mono_grating(grating)[source]

Sets the current grating.

Parameters:

grating (int) – Set the current grating. This assumes the correct turret is inserted in the instrument and grating selected is a valid grating. This function will change to current turret in the firmware, but needs user interaction to install the correct turret.

set_mono_grating_gadjust(grating, gadjust)[source]

Sets the grating GAdjust.

Parameters:
  • grating (int) – The number of the grating that is to be addressed.

  • gadjust (int) – The grating GAdjust. Note, this value is specific to a specific instrument-grating combination and not transferable between instruments.

set_mono_grating_offset(grating, offset)[source]

Sets the grating offset.

Parameters:
  • grating (int) – The number of the grating that is to be addressed.

  • offset (int) – The grating offset. Note, this value is specific to a specific instrument-grating combination and not transferable between instruments.

set_mono_init_grating(init_grating)[source]

Sets the initial grating (on instrument reboot).

Parameters:

init_grating (int) – The power-up grating number.

set_mono_init_scan_rate_nm(init_scan_rate)[source]

Sets the initial wavelength scan rate (on instrument reboot).

Parameters:

init_scan_rate (float) – The power-up scan rate in nm / minute.

set_mono_init_wave_nm(init_wave)[source]

Sets the initial wavelength (on instrument reboot).

Parameters:

init_wave (float) – The power-up wavelength in nm.

set_mono_int_led(led_state)[source]

Turns on and off the interrupter LED.

Parameters:

led_state (bool) – Indicates whether the LED should be on or off.

set_mono_scan_rate_nm_min(scan_rate)[source]

Set the wavelength scan rate.

Parameters:

scan_rate (float) – The rate to scan the wavelength in nm/minute.

set_mono_shutter_closed()[source]

Sets the integrated shutter position to closed.

Returns:

bool – Whether the shutter has been closed.

set_mono_shutter_open()[source]

Sets the integrated shutter position to open.

Returns:

bool – Whether the shutter has been opened.

set_mono_slit_width(slit_pos, slit_width)[source]

Sets the slit width of a motorized slit (Types 4, 6 and 9).

Parameters:
  • slit_pos (int) –

    The slit to be addressed.

    • Slit Port 1 - Side entrance slit.

    • Slit Port 2 - Front entrance slit.

    • Slit Port 3 - Front exit slit.

    • Slit Port 4 - Side exit slit.

    • Slit Port 5 - Side entrance slit on a double slave unit.

    • Slit Port 6 - Front entrance slit on a double slave unit.

    • Slit Port 7 - Front exit slit on a double slave unit.

    • Slit Port 8 - Side exit slit on a double slave unit.

  • slit_width (int) – The width to which the slit is to be set to. Note valid ranges are 10 to 3000 microns in one-micron increments for normal continuous motor slits (type 4 and 9), 10 to 12000 microns in five-micron increments for large continuous motor slits (type 4) and 25, 50, 100, 250, 500, 1000 microns for indexable slits (Type 6).

set_mono_turret(turret)[source]

Sets the current grating turret.

Parameters:

turret (int) – Set the current turret. This will change the grating to Turret number minus one times gratings per turret plus the one plus the current grating number minus one mod gratings per turret. The user must insert the correct turret into the instrument when using this function.

set_mono_wavelength_abs_cm(wavelength)[source]

Sets the center wavelength of the instrument in absolute wavenumbers.

Parameters:

wavelength (float) – The wavelength in absolute wavenumber that the instrument is to be moved to.

set_mono_wavelength_ang(wavelength)[source]

Sets the center wavelength of the instrument in angstroms.

Parameters:

wavelength (float) – The wavelength in Angstroms that the instrument is to be moved to.

set_mono_wavelength_ev(wavelength)[source]

Sets the center wavelength of the instrument in Electron Volts.

Parameters:

wavelength (float) – The wavelength in Electron Volts that the instrument is to be moved to.

set_mono_wavelength_micron(wavelength)[source]

Sets the center wavelength of the instrument in microns.

Parameters:

wavelength (float) – The wavelength in microns that the instrument is to be moved to.

set_mono_wavelength_nm(wavelength)[source]

Sets the center wavelength of the instrument in nm.

Parameters:

wavelength (float) – The wavelength in nm that the instrument is to be moved to.

set_mono_wavelength_rel_cm(center_nm, wavelength)[source]

Sets the center wavelength of the instrument in relative Wavenumbers.

Parameters:
  • center_nm (float) – The wavelength in nanometers that 0 relative Wavenumber is centered around.

  • wavelength (float) – The wavelength in relative Wavenumber that the instrument is to be moved to.

set_ncl_filter_position(position)[source]

Set the current filter position.

Parameters:

position (int) – The current filter position.

set_ncl_filter_present(min_filter, max_filter)[source]

Set the instrument filter wheel to active (NCL only).

Parameters:
  • min_filter (int) – Min Filter Position (on an NCL with the standard filter wheel 1).

  • max_filter (int) – Max Filter Position (on an NCL with the standard filter wheel 6).

set_ncl_shutter_closed(shutter_num)[source]

Set a NCL Readout shutter to a closed state.

Parameters:

shutter_num (int) – The shutter being addressed (1 or 2 on an NCL).

set_ncl_shutter_open(shutter_num)[source]

Set a NCL Readout shutter to a closed state.

Parameters:

shutter_num (int) – The shutter being addressed (1 or 2 on an NCL).

set_ncl_ttl_out_off(ttl_line)[source]

Turn a TTL line off.

Parameters:

ttl_line (int) – The TTL line number being addressed.

set_ncl_ttl_out_on(ttl_line)[source]

Turn a TTL line on.

Parameters:

ttl_line (int) – The TTL line number being addressed.

set_readout_itime_ms(itime_ms)[source]

Set the integration time used for taking a reading.

Parameters:

itime_ms (int) – The integration time in milliseconds to be used when reading out a detector.

static init(path='ARC_Instrument_x64.dll')[source]

Initialize the SDK.

Parameters:

path (str) – The path to the SDK.

static is_inited()[source]

Check if the init() method was called.

Returns:

bool – Whether the init() method was called.

static error_to_english(error_code)[source]

Convert an error code into a message.

Parameters:

error_code (int) – The error code.

Returns:

str – The error message.