mahos.inst.tdc.MCS#

class mahos.inst.tdc.MCS(name, conf, prefix=None)#

Wrapper Class of DMCSX.dll for Fast ComTec MCS6 / MCS8 Series.

Parameters:
  • base_configs (dict[str, str]) – Mapping from base config name to actual file name. Used in configure_base_range_bin() etc. See load_config() for details.

  • ext_ref_clock (bool) – use external reference clock source.

  • mcs_dir (str) – (default: “C:mcs8x64”) The directory containing mcs8 software.

  • raw_events_dir (str) – (default: mcs_dir) The directory to save RawEvents data.

  • remove_lst (bool) – (default: True) Remove .lst file after loading it.

  • lst_channels (list[int]) – (default: [8, 9]) Collected channels for lst file. Under a setting, default value [8, 9] corresponds to STOP1 and STOP2. As correspondence is unclear after reading the manual (maybe dependent on the setting), it is recommended to inspect the output lst file first.

  • dll_mod – (default: True) Set True if modified DLL below is installed. Set False if DLL is the original version.

DLL Modifications#

We’ve made some modification on DMCSX.dll itself.

RunCmd#

In original code, return type was void. Fixed this function to return int. Return 0 on success and some negative values on error.

__init__(name, conf, prefix=None)#

Methods

__init__(name, conf[, prefix])

clear()

Clear all spectra data.

configure(params[, label])

Configure the instrument settings.

configure_histogram(base_config, trange, tbin)

Load base config and set range and timebin in sec.

configure_range_bin(trange, tbin)

Set range and timebin in sec.

configure_raw_events(base_config, trange, ...)

Load base config, set range and timebin in sec, and save file name.

convert_raw_events(format_info, data)

get(key[, args, label])

Get an instrument setting or measurement data.

get_binwidth()

get_bitshift()

get_count(nDisplay)

get_data(nDisplay)

Get whole spectrum at <nDisplay>.

get_data_point(i, nDisplay)

Get intensity of one point in spectrum.

get_data_roi(nDisplay, roi)

get_data_setting()

get_mcssetting()

get_range()

get_range_bin()

Get range and time bin (in sec).

get_raw_events()

get_setting(nDisplay)

get_status(nDisplay)

get_timebin()

Get time bin (in sec).

load_config(fn)

Load configuration file for MCS.

load_lst_file(file_name)

Load the lst file to get data.

remove_saved_file(name)

resume([label])

Resume acqusition.

run_command(cmd)

Run a command in MCS Server.

set(key[, value, label])

Set an instrument setting or commanding value.

set_bitshift(value)

set_data_setting(setting)

set_mcssetting(setting)

set_range(value)

set_reference_clock(external)

set_save_file_name(name)

set_setting(nDisplay, setting)

set_sweep_preset(preset, enable)

set sweep preset.

start([label])

Clear data and start a new acquisition.

stop([label])

Stop acqusition if running.

Attributes

EOS_DEADTIME

MAXCNT

nDev