Module azcam.tools.controller
Contains the base Controller and DetPars classes.
Classes
class Controller (tool_id: str = 'controller', description: str = None)
-
Base class for controller tool. Usually implemented as the "controller" tool.
Args
tool_id
- tool name
description
- description of this tool
Ancestors
Subclasses
Instance variables
var description
-
Inherited from:
Tools
.description
descriptive tool name
var enabled
-
1 when tool is enabled
var exposure_time
-
exposure time (secs)
var initialized
-
Inherited from:
Tools
.initialized
1 when tool has been initialized
var interface_type
-
interface type (0 = demo, 4 = PCIe)
var is_reset
-
Inherited from:
Tools
.is_reset
1 when tool has been reset
var reset_flag
-
True if the controller 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 define_keywords(self)
-
Inherited from:
ObjectHeaderMethods
.define_keywords
Defines and resets keywords.
def delete_keyword(self, keyword: str)
-
Inherited from:
ObjectHeaderMethods
.delete_keyword
Delete a keyword.
Args
keyword
- keyword
def flush(self, cycles=1)
-
Flush or clear out the sensor. Returns after clearing is finished, which could take many seconds.
Args
cycles
- number of times to flush sensor
def get_keyword(self, keyword: str) ‑> list
-
Inherited from:
ObjectHeaderMethods
.get_keyword
Return a keyword value, its comment string, and type. Comment always returned in double quotes, even if empty.
Args
keyword
- name of keyword
…
def get_keywords(self) ‑> list
-
Inherited from:
ObjectHeaderMethods
.get_keywords
Return a list of all keyword names.
Returns
keywords
- list of all keywords
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 the tool.
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 set_roi(self)
-
Sets ROI parameters values in the controller based on focalplane parameters.
def set_shutter(self, state: bool, shutter_id: int = 0)
-
Open or close controller shutter.
Args
state
- True to open shutter, False to close shutter
shutter_id
- shutter ID number
def set_shutter_state(self, flag: bool = 0)
-
Sets the shutter state during an exposure.
Args
flag
- True open shutter during exposure, False close shutter during exposure
def start_idle(self)
-
Start idle clocking.
def stop_idle(self)
-
Stop idle clocking.
def update_header(self)
-
Inherited from:
ObjectHeaderMethods
.update_header
Update the header, reading current data. Deletes all keywords if the object is not enabled.
class DetPars
-
Defines detector parameters for controller shifting, image size, etc. These are updated by exposure.set_format, .set_focalplane, and .set_roi.
Attributes
self.numpix_image (int): self.numcols_image (int): self.numrows_image (int):
self.ns_total (int): self.ns_predark (int): self.ns_underscan (int): self.ns_overscan (int): self.np_total (int): self.np_predark (int): self.np_underscan (int): self.np_overscan (int): self.np_frametransfer (int):
self.first_col (int): self.last_col (int): self.first_row (int): self.last_row (int): self.col_bin (int): self.row_bin (int):
self.framet (int): self.xdata (int): self.xflush (int): self.xpreskip (int): self.xunderscan (int): self.xskip (int): self.xpostskip (int): self.xoverscan (int): self.ydata (int): self.yflush (int): self.ypreskip (int): self.yunderscan (int): self.yskip (int): self.ypostskip (int): self.yoverscan (int):
self.coltotal (int): self.colusct (int): self.coluscw (int): self.coluscm (int): self.coloscw (int): self.coloscm (int): self.rowtotal (int): self.rowusct (int): self.rowuscw (int): self.rowuscm (int): self.rowoscw (int): self.rowoscm (int): Create detpars database.