catalight.equipment.gc_control.template.GC_Connector

class catalight.equipment.gc_control.template.GC_Connector

Bases: object

Interface with some type of GC device.

__init__()

Connect to GC and load control file.

Methods

__init__()

Connect to GC and load control file.

connect([max_tries])

Not technically needed.

disconnect([max_tries])

Disconnect from gc.

is_running([max_tries])

Request status of GC collection (running or not).

read_gc_settings()

For SRI GC, this method gets gc runtime and postrun time.

set_running()

Start data collection.

update_gc_settings()

This method needs to tell the gc where the data will be saved, and how many samples will be run when set_running() is called.

Attributes

min_sample_rate

(min) Minimum setpoint for sample_rate.

sample_rate

Time between setting collections in minutes.

sample_set_size

Number of GC collections for each time GC is started.

connect(max_tries=1)

Not technically needed.

Parameters:

max_tries (int, optional) – Number of attempts to make before aborting. The default is 1.

disconnect(max_tries=1)

Disconnect from gc.

Parameters:

max_tries (int, optional) – Number of attempts to make before aborting. The default is 1.

Return type:

None

is_running(max_tries=3)

Request status of GC collection (running or not).

Parameters:

max_tries (int, optional) – Number of attempts to make before aborting. The default is 3.

Raises:

Exception – Exception raised on calling IsRunning() are suppressed up until max_tries is reached.

Returns:

result – When successful, returns the status of GC collection (on/off)

Return type:

bool

property min_sample_rate

(min) Minimum setpoint for sample_rate. Definition of this value may depend on GC type.

Type:

float, read-only

read_gc_settings()

For SRI GC, this method gets gc runtime and postrun time.

Currently updates min_sample_rate property by pulling run time and postrun cycle time from control file. Updates sample_rate if it is faster than the new min_sample_rate.

property sample_rate

Time between setting collections in minutes.

The GC will collect data every sample_rate minutes when sample_set_size is set >1. If the min_sample_rate is less than the entered value, prints a warning and resets sample_rate to min_sample_rate.

sample_set_size

Number of GC collections for each time GC is started. This attr should probably exist for any brand GC.

Type:

int

set_running()

Start data collection.

Collection parameters should be updated w/ attributes and “update_gc_settings” method

If better for future gc brands, this methods could take parameter: filepath, num_runs,

update_gc_settings()

This method needs to tell the gc where the data will be saved, and how many samples will be run when set_running() is called.