catalight.equipment.gas_control.template.Gas_System

class catalight.equipment.gas_control.template.Gas_System

Bases: object

MFC control.

__init__()

Connect MFCs based on COM port and address. User needs to update.

The user needs to update the address and COM ports for each mfc based on their specific setup. This process can be assisted by using the “alicat_connection_tester.py” file

Methods

__init__()

Connect MFCs based on COM port and address.

check_comp_total(comp_list)

Takes in gas composition list, checks sum, returns as fractions.

disconnect()

Call Gas_System.shut_down then disconnect from MFCs.

print_details()

Run mfc.get() for each mfc, printing full status details.

print_flows()

Print mass flow rates and gas type for each MFC to console.

read_flows()

Return full details of each mfc condition arranged in a dict.

set_calibration_gas(mfc, calDF[, fill_gas])

Sets a custom gas mixture for the mfc of choice.

set_flows(comp_list, tot_flow)

Set flow rates based as fraction of tot_flow from comp_list.

set_gasE(comp_list)

Set gas E as a mixture of input gasses based on comp.

set_gasses(gas_list)

Update gas type to MFCs based on input list.

shut_down()

Set MFC with Ar or N2 running to 1 sccm and others to 0.

test_pressure(savepath, flows[, num_samples])

Ramp flow rate, measure pressure, plot results, save.

Attributes

factory_gasses

Factory gas list saved to Alicat MFCs

check_comp_total(comp_list)

Takes in gas composition list, checks sum, returns as fractions.

Parameters:

comp_list (list[float or int]) – Composition list in either percents or fractions.

Raises:

AttributeError – Composition list doesn’t sum to 1 or 100

Returns:

comp_list – Updated composition list as fractions

Return type:

list[float]

disconnect()

Call Gas_System.shut_down then disconnect from MFCs.

factory_gasses = ['C2H2', 'Air', 'Ar', 'i-C4H10', 'n-C4H10', 'CO2', 'CO', 'D2', 'C2H6', 'C2H4', 'He', 'H2', 'Kr', 'CH4', 'Ne', 'N2', 'N2O', 'O2', 'C3H8', 'SF6', 'Xe']

Factory gas list saved to Alicat MFCs

print_details()

Run mfc.get() for each mfc, printing full status details.

Return type:

None

print_flows()

Print mass flow rates and gas type for each MFC to console.

read_flows()

Return full details of each mfc condition arranged in a dict.

Returns:

flow_dict – {mfc: mfc.get()}

Return type:

dict of dict

set_calibration_gas(mfc, calDF, fill_gas='Ar')

Sets a custom gas mixture for the mfc of choice.

Typically for calibration gas. Creates a gas mixture based on the largest 5 components calgas. Sets new mixture to slot 237 as name ‘CalGas’. This function uses the standard calDF format utilized elsewhere in this code. Please consult the alicat gas composer website for the official list of possible gasses.

Parameters:
  • mfc (alicat.FlowController | alicat.FlowMeter) – Mass flow controller or meter to update with calgas

  • calDF (pandas.DataFrame) – Formatted DataFrame containing gc calibration data. Specific to control file used! Format [ChemID, slope, intercept, start, end]

  • fill_gas (str) – Inert gas dilutant for calibration gas tank. The default is ‘Ar’.

set_flows(comp_list, tot_flow)

Set flow rates based as fraction of tot_flow from comp_list.

Sets the flow rate of all mfc based on a desired total flow and the desired gas composition. Also call set_gasE TODO: add limit for tot_flow for each MFC

Parameters:
  • comp_list (list[float]) – list of gas fraction for mfc [a, b, c, d]. Must sum to 1 or 100

  • tot_flow (float) – Total flow to send.

Raises:

AttributeError – if gas comp doesn’t sum to 1 or 100

Return type:

None

set_gasE(comp_list)

Set gas E as a mixture of input gasses based on comp. and types.

Parameters:

comp_list (list[float]) – list of gas fraction for mfc [a, b, c, d]. Must sum to 1 or 100

Return type:

None

set_gasses(gas_list)

Update gas type to MFCs based on input list.

Parameters:

gas_list (list[str]) – [gasA, gasB, gasC, gasD] Each must be within factory gasses.

Return type:

None

shut_down()

Set MFC with Ar or N2 running to 1 sccm and others to 0.

test_pressure(savepath, flows, num_samples=5)

Ramp flow rate, measure pressure, plot results, save.

Ramp flow rate from 5-50 sccm in steps of 5, measure pressure every minute for num_samples times. Waits 1 min before first collection. Plots results on yyplot w/ time on x-axis, and pressure and flow on y.

Parameters:
  • savepath (str) – Path to folder to save the results in.

  • flows (list[int or float]) – Flow rate setpoints to sweep through when testing pressure build up

  • num_samples (int, optional) – Number of samples to collect at each flow rate. Default is 5.