Skip to content

Controller Classes

Base Controller Tool

azcam.server.tools.controller.Controller

Bases: Tools, ObjectHeaderMethods

Base class for controller tool. Usually implemented as the "controller" tool.

__init__(tool_id='controller', description=None)

Parameters:

Name Type Description Default
tool_id str

tool name

'controller'
description str or None

description of this tool

None

flush(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

set_exposuretime(ExposureTime)

Write the exposure time (in seconds) to the controller.

set_roi()

XXXSets ROI parameters values in the controller based on focalplane parameters.

set_shutter(state, shutter_id=0)

Open or close controller shutter. Args: state: True to open shutter, False to close shutter shutter_id: shutter ID number

set_shutter_state(flag=0)

Sets the shutter state during an exposure. Args: flag: True open shutter during exposure, False close shutter during exposure

start_idle()

Start idle clocking.

stop_idle()

Stop idle clocking.

ARC Controller Tool

azcam.server.tools.arc.controller_arc.ControllerArc

Bases: Controller

The controller class for ARC Gen1, Gen2, and Gen3 controllers.

board_command(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.

clear_switches()

Clear ARC controller switches.

exposure_abort()

Abort an integration.

exposure_pause()

Pause an integration which is in progress.

exposure_resume()

Resume a paused integration.

flush(Cycles=1)

Flush or clear out the detector. Returns after clearing is finished which could take many seconds.

get_exposuretime()

Return the exposure time from the controller (in seconds).

get_pixels_remaining()

Return number of remaining pixels to be read (counts down).

initialize()

Initialize controller hardware, loading PCI code as needed.

ioctl(Command)

Issue a low-level ARC controller IO command on the controller server.

load_application(BoardNumber, ApplicationNumber)

Load an ARC controller DSP application. BoardNumber is controller board number. ApplicationNumber is application number to load.

load_file(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).

parshift(NumRows=1)

Shift CCD detector NumRows rows. NumRows is number of rows to shift, positive toward and negative away from amplifier or origin.

power_off()

Turn off ARC controller internal power.

power_on()

Turn on ARC controller internal power.

read_image()

Start readout of detector.

read_memory(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.

readout_abort()

Abort a readout in progress.

reset()

Reset controller using current attributes. May warn that the controller could not be reset.

reset_controller()

Issues the ResetController command to the controller.

select_video_outputs(video_select=-1)

Send command to utlity board to select output video channel. video_select is video select value.

set_bias_number(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.

set_bias_voltages()

Turns on all DC biases.

set_boards()

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)

set_dc_mode(Mode)

Sets DC mode. Mode is value to set.

set_exposuretime(ExposureTime)

Write the exposure time (in seconds) to the controller.

set_mux(BoardNumber, MUX1, MUX2)

Sets MUX values. BoardNumber is controller board number. MUX1 is MUX 1 value. MUX2 us MUX 2 value.

set_roi()

Sets the ROI parameters values in the controller based on focalplane parameters. Sends parameters to the controller.

set_shutter(state)

Open or close controller shutter.

set_shutter_state(flag=0)

Sets the shutter state during an exposure. Args: flag: open(True) or close(False) shutter during exposure

set_synthetic_data(flag='real')

Set controller to create synthetic image data. Flag is: 'real' -> normal, real data 'fake' or 'synthetic' -> create a synthetic image

set_video_gain(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.

set_video_offset(BoardNumber, DAC, DacValue)

Sets a video offset value. BoardNumber is the controller board number. DAC is DAC number. DacValue is DAC value to set.

set_video_speed(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.

start_exposure()

Start exposure (integration). Returns immediately, not waiting for exposure to finish.

start_idle()

Start idle clocking.

start_readout()

Start readout immediately. Returns imemdiately, does not wait for readout to finish.

stop_idle()

Stop idle clocking.

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.

update_exposuretime_remaining()

Return remaining exposure time (in seconds).

upload_dsp_file(BoardNumber, filename)

Sends DSP a file to a controllercontaining DSP code to the PCI, timing, or utility boards.

upload_file(filename)

Sends a local file to the controller server to be written to its file system. Returns uploaded filename on controller server.

write_control(Word)

Writes the Control Word. Word is the data to write.

write_memory(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.

Archon Controller Tool

azcam.server.tools.archon.controller_archon.ControllerArchon

Bases: Controller

The controller class for STA Archon controllers.

apply_all()

Send APPLYALL command to the Archon controller.

apply_cds()

Send APPLYCDS command to the controller. CSS/Deint values are updated.

archon_bin_command(command)

Send binary command to the Archon controller.

archon_command(Command)

Send a command to the Archon controller.

bias_poll(mode)

Send BIASPOLLON or BIASPOLLOFF command.

connect()

Connects Azcam to the controller.

disconnect()

Disconnets Azcam from the controller.

download_config()

Downloads config data from the Archon controller.

fastloadparam(parname, value)

Send FASTLOADPARAM command to controller.

get_archon_status()

Get Archon controller status: 0 = UNKNOWN, 1 = IDLE, 2 = EXPOSE, 3 = READY, 4 = FETCH, 5 = DONE.

get_cds()

Get TAPLINES values and stores them in the self.rcds array.

get_continuous_exposures()

Get Continuous Exposure value.

get_exposures()

Get number of exposures.

get_exposuretime()

Get exposure time from the controller.

get_frame()

Get and updates frame status value.

get_frame_number()

Get Frame number.

get_int_ms()

Get IntMS value. The value should be the same as the Archons IntMS.

get_no_int_ms()

Get NoIntMS value. The value should be the same as the Archons NoIntMS.

get_parameter(Param)

Get a parameter by name. Returns None if not found.

get_parameters()

Get parameters.

get_pixels_remaining()

Return number of remaining pixels to be read (counts down).

get_power_status()

Get power status: ON, OFF, NOT_CONFIGURED, UNKNOWN, INTERMEDIATE, STANDBY.

get_raw_channel()

Get RAWSEL value (raw channel selection).

get_raw_enable()

Get RAWENABLE value.

get_size()

Get pixels and lines.

get_status()

Get status value.

get_status_valid()

Get status_valid value. Last change: 21Dec2016 Zareba

initialize()

Initializes the Archon controller.

load_params()

Send LOADPARAMS command.

load_timing()

Send LOADTIMING command.

poll(mode)

Send POLLON or POLLOFF command.

power_off()

Turns power off.

power_on(wait=1)

Turns power on

read_config_file(filename)

Read Archon configuration file and parse data into dictionaries.

reboot()

Send REBOOT command.

reset()

Resets controller.

reset_controller()

Resets controller. Send REBOOT command + loads config file + sets Power ON.

resettiming()

Reset controller timing cores.

set_cds()

Sets TAPLINES values.

set_continuous_exposures(cont_exp)

Sets Continuous Exposure value.

set_exposures(Exp)

Sets number of exposures.

set_exposuretime(ExpTimeMS)

Set exposure time variable (millisecs). This is used for exposure count down.

set_int_ms(IntMS)

Set IntMS value.

set_no_int_ms(NoIntMS)

Set NoIntMS value.

set_parameter(Param, value)

Sets parameter.

set_pocket_pumping(flag)

Set Parallel pocket pumping flag.

set_raw_channel(RawChannel)

Sets RAWSEL value (raw channel selection). RAWSEL starts from 0.

set_raw_enable(RawEnable)

Set RAWENABLE value.

set_size(Pixels, Lines)

Sets pixels and lines.

start_exposure(wait=1)

Start exposure.

update_cds(ucds=None)

Updates TAPLINES values based on space-delimited string string.

update_config_data(mode=0)

Sets configuration data: if mode = 0 get config data from the Archon controller, populate dictionaries. if mode = 1 read configuration file and then send config data to the Archon controller, populate dictionaries.

update_exposuretime_remaining()

Returns exposure time remaining in seconds. Last change: 13Jan2017 Zareba

upload_config()

Uploads configuration data to the controller.

warmboot()

Send WARMBOOT command.

Mag Controller Tool

azcam.server.tools.mag.controller_mag.ControllerMag

Bases: Controller

The controller class for Magellan controllers.

exposure_abort()

Abort an integration.

exposure_pause()

Pause an integration which is in progress.

exposure_resume()

Resume a paused integration.

flush(Cycles=1)

Flush or clear out the detector 'Cycles' times. Returns after clearing is finished which could take many seconds.

get_exposuretime()

Return the exposure time from the controller (in seconds).

get_pixels_remaining()

Return number of remaining pixels to be read (counts down).

get_read_lock()

Returns the read lock value in the ControllerServer.

initialize()

Initialize the controller interface.

load_file(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.

magio(Command, Parameter)

Issue a low-level MAG controller IO on the controller server.

read_image()

Start readout of detector.

readout_abort()

Abort a readout in progress.

remove_read_lock()

Removes the read lock value in the ControllerServer. Should not be required.

reset()

Reset controller. May warn that the controller could not be reset.

set_configuration(Flag, Splits, numdet_x, numdet_y, amp_cfg)

Set detector configuration.

set_exposuretime(ExposureTime)

Write the exposure time (in seconds) to the controller.

set_read_lock(Flag=-1)

Set the read lock in the ControllerServer. If not specified then the default value is used.

set_roi()

Sets the ROI parameters values in the controller based on focalplane parameters. Sends parameters to the controller.

set_shutter(state)

Open or close controller shutter.

set_shutter_state(Flag=0)

Sets the shutter state during an exposure. Flag is: open -> close shutter during exposure close -> open shutter during exposure

start_exposure()

Start exposure (integration). Returns immediately, not waiting for exposure to finish.

start_readout()

Start readout immediately. Returns imemdiately, does not wait for readout to finish.

test(Loops=10)

Perform MAG controller tests. Loops is the number of times the test cycle is executed.

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.

update_exposuretime_remaining()

Return remaining exposure time (in seconds).

upload_dsp_file(BoardNumber, filename)

Sends DSP a file to a controllercontaining DSP code to the PCI, timing, or utility boards.

upload_file(filename)

Sends a local file to the controller server to be written to its file system. Returns uploaded filename on controller server.

write_image(flag, file)

Write image to local disk on controller server.

ASCOM Controller Tool

azcam.server.tools.ascom.controller_ascom.ControllerASCOM

Bases: Controller

The controller class for cameras using ASCOM.

get_pixels_remaining()

Return number of remaining pixels to be read (counts down).

initialize()

Initialize the controller interface.

is_imageready(wait=0)

Return True if image is ready.

reset()

Reset the controller.

set_exposuretime(exposure_time)

Write the exposure time (in seconds) to the controller.

set_shutter_state(state)

Open or close controller shutter.

start_exposure()

Start exposure (integration).

update_exposuretime_remaining()

Return remaining exposure time (in seconds).