Module azcam.tools.arc.controller_arc
Contains the ControllerArc class.
Classes
class ControllerArc (tool_id='controller', description=None)
-
The controller class for ARC Gen1, Gen2, and Gen3 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 board_command(self, Command, BoardNumber, Arg1=-1, Arg2=-1, Arg3=-1, Arg4=-1)
-
Send a specific command to an ARC controller board. The reply from the board is often 'DON' but could be data. Command is the board command to send. BoardNumber is controller board number. ArgN are arguments for command.
def clear_switches(self)
-
Clear ARC controller switches.
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. 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 initialize(self)
-
Initialize controller hardware, loading PCI code as needed.
def ioctl(self, Command)
-
Issue a low-level ARC controller IO command on the controller server.
def load_application(self, BoardNumber, ApplicationNumber)
-
Load an ARC controller DSP application. BoardNumber is controller board number. ApplicationNumber is application number to load.
def load_file(self, BoardNumber, filename)
-
Write a file containing DSP code to the PCI, timing, or utility boards. The file must be on the ControllerServer file system. BoardNumber is controller board number. filename is file to load (.lod type).
def parshift(self, NumRows=1)
-
Shift CCD detector NumRows rows. NumRows is number of rows to shift, positive toward and negative away from amplifier or origin.
def power_off(self)
-
Turn off ARC controller internal power.
def power_on(self)
-
Turn on ARC controller internal power.
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 read_memory(self, Type, BoardNumber, Address)
-
Read from DSP memory. Type is P, X, Y, or R memory space. BoardNumber is controller board number. Address is memory address to read.
def readout_abort(self)
-
Abort a readout in progress.
def reset(self)
-
Reset controller using current attributes. May warn that the controller could not be reset.
def reset_controller(self)
-
Issues the ResetController command to the controller.
def select_video_outputs(self, video_select=-1)
-
Send command to utlity board to select output video channel. video_select is video select value.
def set_bias_number(self, BoardNumber, DAC, Type, DacValue)
-
Sets a bias value. BoardNumber is the controller board number. DAC is DAC number. Type is 'VID' or 'CLK'. DacValue is DAC value for voltage.
def set_bias_voltages(self)
-
Turns on all DC biases.
def set_boards(self)
-
Sets the boards installed in an ARC controller. If boards are not specified in this call then controller.timing_board, .clock_boards, .video_boards, and .utility_board values are used.
Timing boards: 'gen1','gen2','arc22' Clock boards: 'gen1','gen2','arc32' (gen1 -> analog combo board) Video boards: 'gen1','gen2','arc45','arc48' (gen1 -> analog combo board) Utility boards: 'gen1','gen2','gen3' (same board but different programming)
def set_dc_mode(self, Mode)
-
Sets DC mode. Mode is value to set.
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_mux(self, BoardNumber, MUX1, MUX2)
-
Sets MUX values. BoardNumber is controller board number. MUX1 is MUX 1 value. MUX2 us MUX 2 value.
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.
Args
flag
- open(True) or close(False) shutter during exposure
def set_synthetic_data(self, flag='real')
-
Set controller to create synthetic image data. Flag is: 'real' -> normal, real data 'fake' or 'synthetic' -> create a synthetic image
def set_video_gain(self, Gain)
-
Set video processor gain. For gen2 and ARC45 boards: Allowed valid gains are 1,2,5,10 Also resets video speed to its current value For gen1: Gain=1 is LOW and Gain=2 is HIGH. Gain is video gain value.
def set_video_offset(self, BoardNumber, DAC, DacValue)
-
Sets a video offset value. BoardNumber is the controller board number. DAC is DAC number. DacValue is DAC value to set.
def set_video_speed(self, Speed)
-
Sets video processor speed for gen2 and arc45 video boards. Ignored for other boards. This command also resets video gain to current value. Speed is video speed value (1 slow, 2 fast). Speed 0 means no change.
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_datalink(self, board_number=0, value='counter', loops=10)
-
Test comminications to one or more controller boards. BoardNumber is the board number (0=all boards, 1=PCI, 2=Timing, 3=Utility). value is an integer. 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_control(self, Word)
-
Writes the Control Word. Word is the data to write.
def write_memory(self, Type, BoardNumber, Address, value)
-
Write a word to a DSP memory location. Type is P, X, Y, or R memory space. BoardNumber is controller board number. Address is memory address to write. value is data to write.