catalight.equipment.heating.watlow.Heater
- class catalight.equipment.heating.watlow.Heater
Bases:
objectConnect with and controls Watlow Heater.
Allows ramping, reading set point and current temperature, and running test on heater, printing output
- __init__()
Connect to watlow, print current state.
Methods
__init__()Connect to watlow, print current state.
Run shut_down() and then close connection.
ramp(T2[, T1, temp_units, record])Ramp the heater from T1 to T2 at ramp rate defined by instance attr.
read_setpoint([temp_units])Read current controller setpoint in defined units (default = C).
read_temp([temp_units])Read current controller temp in defined units (default = C).
Set heater to 0 F.
test_heater_performance(savepath, rates, T_max)Loops through provided ramp rates, ramps heater, save outcomes.
Attributes
Max temp in C; 650C reduces lifetime 900C is real max.
Used to block access from other threads
C/min used for ramp method
- disconnect()
Run shut_down() and then close connection.
- is_busy
Used to block access from other threads
- max_temp = 650
Max temp in C; 650C reduces lifetime 900C is real max. To change, use Heater.max_temp = new_value
- ramp(T2, T1=None, temp_units='C', record=False)
Ramp the heater from T1 to T2 at ramp rate defined by instance attr.
If record=True, records the time, setpoint, and temp. Plots outcome.
- Parameters:
T2 (float) – Target setpoint
T1 (float) – Starting setpoint Uses the last setpoint if None. None is default.
temp_units (str) – C, K, or F. The default is ‘C’.
record (bool) – If True, will record setpoints during ramp, plot outcome, and return readout dataframe and plot. Mainly used for testing heater performance.
- Returns:
pandas.DataFrame, when record=True – pandas.DataFrame with columns [‘time’, ‘set point’, ‘temperature’] recorded during the experiment.
matplotlib.pyplot.figure, when record=True – figure handle for ramp rate plot
matplotlib.pyplot.axis, when record=True – axis handle for ramp rate plot
- ramp_rate
C/min used for ramp method
- read_setpoint(temp_units='C')
Read current controller setpoint in defined units (default = C).
- Parameters:
temp_units (str, optional) – (C, K, or F) units to return temp in. The default is ‘C’.
- Returns:
Current setpoint in requested units, rounded to 3 digits.
- Return type:
- read_temp(temp_units='C')
Read current controller temp in defined units (default = C).
- Parameters:
temp_units (str, optional) – (C, K, or F) units to return temp in. The default is ‘C’.
- Returns:
Current temperature in requested units.
- Return type:
- shut_down()
Set heater to 0 F.
- test_heater_performance(savepath, rates, T_max, T_min=30)
Loops through provided ramp rates, ramps heater, save outcomes.
Sets heater to 20C, gives 5 min to steady out. Loops through ramp rates while recording the outcome (Heater.ramp(record=True)). Saves results. Always lets heater cool to < 30C between runs.
- Parameters:
savepath (str) – Full path to directory in which to save data.
rates (list[int or float]) – (deg C/min) List of heater ramp rates to test e.g. [5, 10, 15, 20]
T_max (int or float) – (deg C) Maximum temperature setpoint to use for testing
T_min (int or float, optional) – (deg C) Starting setpoint to use for testing. The default is 30.
- Return type:
None