Module azcam.tools.tempcon
Contains the base TempCon class.
Classes
class TempCon (tool_id: str = 'tempcon', description: str = None)
-
The base temperature control tool. Usually implemented as the "tempcon" tool.
Creates the tool.
Args
tool_id
- Name of tool
description
- Description of tool, defaults to tool_id.
Ancestors
Subclasses
Instance variables
var description
-
Inherited from:
Tools
.description
descriptive tool name
var enabled
-
1 when tool is enabled
var initialized
-
Inherited from:
Tools
.initialized
1 when tool has been initialized
var is_reset
-
Inherited from:
Tools
.is_reset
1 when tool has been reset
var tool_id
-
name used to reference the tool ("controller", "display", …)
var verbosity
-
Inherited from:
Tools
.verbosity
verbosity for debug, >0 is more verbose
Methods
def apply_corrections(self, temperature: float, temperature_id: int = 0) ‑> None
-
Correct the temperatures for offset and scale is temperature correction is enabled.
Args
temperature
- temperatures to be corrected
temperature_id
- temperature ID number
Returns
corrected_temperature
- temperature after correction has been appied
def define_keywords(self)
-
Defines and resets instrument keywords.
def delete_keyword(self, keyword: str)
-
Inherited from:
ObjectHeaderMethods
.delete_keyword
Delete a keyword.
Args
keyword
- keyword
def exposure_finish(self) ‑> None
-
Custom commands after exposure finishes.
def exposure_start(self) ‑> None
-
Custom commands before exposure starts.
def get_control_temperature(self, temperature_id: int = 0) ‑> float
-
Get the control temperature (set point).
Args
temperature_id
- temperature sensor identifier
Returns
control_temperature
- control temperature
def get_keyword(self, keyword: str) ‑> List
-
Read a temperature keyword value and returns it as [value, comment, type string]
Args
keyword
- name of keyword
Returns
list of [keyword, comment, type]
def get_keywords(self) ‑> list
-
Inherited from:
ObjectHeaderMethods
.get_keywords
Return a list of all keyword names.
Returns
keywords
- list of all keywords
def get_temperature(self, temperature_id: int = 0) ‑> float
-
Returns a system temperature.
Args
temperature_id
- temperature sensor identifier
Returns
temperature
- temperature read
def get_temperatures(self) ‑> List[float]
-
Return all system temperatures.
Returns
temperatures
- list of temperatures read
def initialize(self) ‑> None
-
Inherited from:
Tools
.initialize
Initialize the tool.
def read_header(self) ‑> list
-
Inherited from:
ObjectHeaderMethods
.read_header
Reads and returns current header data.
Returns
list
ofheader lines
- [Header[]]: Each element Header[i] contains the sublist (keyword, value, …
def reset(self) ‑> None
-
Reset tempcon tool.
def set_calibrations(self, cals: List[int]) ‑> None
-
Set calibration curves for temperature sensors. The values of these flags are from the list below which define the calibration curves to use for each sensor's temperature conversion.
- 0 => DT670 diode
- 1 => AD590 sensor
- 2 => 1N4148 diode
- 3 => 1N914 diode
Args
cals
- list of flags defining each temperature sensor type
def set_control_temperature(self, temperature: float = None, temperature_id: int = 0) ‑> None
-
Set the control temperature (set point).
Args
temperature
- control temperature in Celsius. If not specified, use saved value
temperature_id
- temperature sensor identifier
def set_corrections(self, temperature_offsets: List[float] = None, temperature_scales: List[float] = None) ‑> None
-
Set temperature correction values and enable correction. If both parameters are None then correction is disabled.
Args
temperature_offsets
- list of offsets for each temperature
temperature_scales
- list of scale factors for each temperature
def set_keyword(self, keyword: str, value: Any, comment: str = 'none', typestring: str = 'none')
-
Inherited from:
ObjectHeaderMethods
.set_keyword
Set a keyword value, comment, and type.
Args
keyword
- keyword
value
- value of keyword
comment
- comment string
typestring
- one of …
def update_header(self)
-
Inherited from:
ObjectHeaderMethods
.update_header
Update the header, reading current data. Deletes all keywords if the object is not enabled.