Module azcam.tools.mag.controller_mag
Contains the ControllerMag class.
Classes
class ControllerMag (tool_id='controller', description=None)
-
The controller class for Magellan controllers.
Args
tool_id
- tool name
description
- description of this tool
Ancestors
Instance variables
var description
-
Inherited from:
Controller
.description
descriptive tool name
var enabled
-
Inherited from:
Controller
.enabled
1 when tool is enabled
var exposure_time
-
Inherited from:
Controller
.exposure_time
exposure time (secs)
var initialized
-
Inherited from:
Controller
.initialized
1 when tool has been initialized
var interface_type
-
Inherited from:
Controller
.interface_type
interface type (0 = demo, 4 = PCIe)
var is_reset
-
Inherited from:
Controller
.is_reset
1 when tool has been reset
var reset_flag
-
Inherited from:
Controller
.reset_flag
True if the controller has been reset
var tool_id
-
Inherited from:
Controller
.tool_id
name used to reference the tool ("controller", "display", …)
var verbosity
-
Inherited from:
Controller
.verbosity
verbosity for debug, >0 is more verbose
Methods
def define_keywords(self)
-
Inherited from:
Controller
.define_keywords
Defines and resets keywords.
def delete_keyword(self, keyword: str)
-
Inherited from:
Controller
.delete_keyword
Delete a keyword.
Args
keyword
- keyword
def exposure_abort(self)
-
Abort an integration.
def exposure_pause(self)
-
Pause an integration which is in progress.
def exposure_resume(self)
-
Resume a paused integration.
def flush(self, Cycles=1)
-
Flush or clear out the detector 'Cycles' times. Returns after clearing is finished which could take many seconds.
def get_exposuretime(self)
-
Return the exposure time from the controller (in seconds).
def get_keyword(self, keyword: str) ‑> list
-
Inherited from:
Controller
.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:
Controller
.get_keywords
Return a list of all keyword names.
Returns
keywords
- list of all keywords
def get_pixels_remaining(self)
-
Return number of remaining pixels to be read (counts down).
def get_read_lock(self)
-
Returns the read lock value in the ControllerServer.
def initialize(self)
-
Initialize the controller interface.
def load_file(self, BoardNumber, filename)
-
Write a file containing DSP code to the controller board. BoardNumber - board number - ignored! filename - filename on server of DSP code. S-record.
def magio(self, Command, Parameter)
-
Issue a low-level MAG controller IO on the controller server.
def read_header(self) ‑> list
-
Inherited from:
Controller
.read_header
Reads and returns current header data.
Returns
list
ofheader lines
- [Header[]]: Each element Header[i] contains the sublist (keyword, value, …
def read_image(self)
-
Start readout of detector.
def readout_abort(self)
-
Abort a readout in progress.
def remove_read_lock(self)
-
Removes the read lock value in the ControllerServer. Should not be required.
def reset(self)
-
Reset controller. May warn that the controller could not be reset.
def set_configuration(self, Flag, Splits, numdet_x, numdet_y, amp_config)
-
Set detector configuration.
def set_exposuretime(self, ExposureTime)
-
Write the exposure time (in seconds) to the controller.
def set_keyword(self, keyword: str, value: Any, comment: str = 'none', typestring: str = 'none')
-
Inherited from:
Controller
.set_keyword
Set a keyword value, comment, and type.
Args
keyword
- keyword
value
- value of keyword
comment
- comment string
typestring
- one of …
def set_read_lock(self, Flag=-1)
-
Set the read lock in the ControllerServer. If not specified then the default value is used.
def set_roi(self)
-
Sets the ROI parameters values in the controller based on focalplane parameters. Sends parameters to the controller.
def set_shutter(self, state)
-
Open or close controller shutter.
def set_shutter_state(self, Flag: bool = 0)
-
Sets the shutter state during an exposure. Flag is: open -> close shutter during exposure close -> open shutter during exposure
def start_exposure(self)
-
Start exposure (integration). Returns immediately, not waiting for exposure to finish.
def start_idle(self)
-
Inherited from:
Controller
.start_idle
Start idle clocking.
def start_readout(self)
-
Start readout immediately. Returns imemdiately, does not wait for readout to finish.
def stop_idle(self)
-
Inherited from:
Controller
.stop_idle
Stop idle clocking.
def test(self, Loops=10)
-
Perform MAG controller tests. Loops is the number of times the test cycle is executed.
def test_datalink(self, BoardNumber=2, value=999, Loops=1)
-
Test communications to controller. BoardNumber - board number to test - ignored! value - integer number to send to board. Loops is the number of times to repeat command.
def update_exposuretime_remaining(self)
-
Return remaining exposure time (in seconds).
def update_header(self)
-
Inherited from:
Controller
.update_header
Update the header, reading current data. Deletes all keywords if the object is not enabled.
def upload_dsp_file(self, BoardNumber, filename)
-
Sends DSP a file to a controllercontaining DSP code to the PCI, timing, or utility boards.
def upload_file(self, filename)
-
Sends a local file to the controller server to be written to its file system. Returns uploaded filename on controller server.
def write_image(self, flag, file)
-
Write image to local disk on controller server.