这是本节的多页打印视图。 点击此处打印.

返回本页常规视图.

常用硬件驱动模块

如何通过Quatm控制您的硬件。

已添加的硬件驱动

1 - Adwin驱动

如何通过Quatm控制Adwin。

quatm.drivers.adwin package

Submodules

quatm.drivers.adwin.adwin module

Class:

  • quatm.drivers.adwin.adwin.ADwinDummy

    class quatm.drivers.adwin.adwin.ADwinDummy(object): def Boot(self, s): pass def Data_Length(self, j): pass def Free_Mem(self, i): pass def Get_Par(self, j): pass def Load_Process(self, i): pass def Processor_Type(self): pass def SetData_Long(self, ArrayLong, i, j, l): pass def Set_Par(self, i, j): pass def Start_Process(self, i): pass def Test_Version(self): pass def Workload(self): pass
  • quatm.drivers.adwin.adwin.AdWinDriver(simulating=None)

    class quatm.drivers.adwin.adwin.AdWinDriver(object): def adwinStatus(self): pass def running(self): pass def setDAC(self, channel, value): pass def setTTL(self, channel, high): pass def set_allTTL(self, bitmask): pass def start(self, repetitions=1): pass def stop(self): pass def timetableMaxlength(self): pass def toBinary(self, dict_list): pass def uploadCommands(self, commands, binary=False, wait=True): pass

Exception:

  • quatm.drivers.adwin.adwin.AdWinDriverError(message)

    class quatm.drivers.adwin.adwin.AdWinDriverError(Exception): pass

quatm.drivers.adwin.client module

Class:

  • quatm.drivers.adwin.client.AdWinClient(experiment, simulating=None)

    class quatm.drivers.adwin.client.AdWinClient(object): def filter_cmdlist(self, combinetime=1e-08): pass def push(self, time, command, value, combinetime=1e-09): pass def start_realtime(self, processortime=0, repetitions=1): pass def stop(self): pass

quatm.drivers.adwin.units module

2 - blackfly驱动

如何通过Quatm控制blackfly。

quatm.drivers.blackfly package

Submodules

quatm.drivers.blackfly.bfly module

Class:

  • quatm.drivers.blackfly.bfly.Blackfly(serial)

    class quatm.drivers.blackfly.bfly.Blackfly(object): def __init__(self, serial): pass def getProps(self): pass def get_image(self): pass def setProps(self, props): pass def start(self, callback=None): pass def stop(self): pass
    • getProps(): Get all current properties (entries that can be configured) from the camera.

      • Returns: dict - Properties of the camera.
    • get_image(): Read image from camera.

      • Returns: Blackfly image. None in case of error.
    • setProps(props): Configure camera.

      • Args: props (dict) - Dictionary containing the properties. Keys correspond to functions called, the entries correspond to arguments.
      • Returns: props (dict) - The properties that have been set. May differ from the input in case of properties incompatible with the camera.
    • start(callback=None): Start capturing images.

    • stop(): Stop capturing images.

  • quatm.drivers.blackfly.bfly.Camserver(name, serial)

    class quatm.drivers.blackfly.bfly.Camserver(object): def __init__(self, name, serial): pass def generateImageIndex(self): pass def run(self): pass def sendimage(self, im): pass def updateBusInfo(self): pass
    • generateImageIndex(): In the current measurement, count the images. If the next run has started (either task, repetition or run changes), reset the counter (imgindex).

    • run(): Run loop running forever. Sends images from the camera to the imagestream and initiates reconfiguration of the camera in case properties have changed.

    • sendimage(im): Send Blackfly camera image via the imagestream. The image is converted to numpy array, additional information like binning, timestamp, etc., is added to a dictionary and both are sent to the imagestream.

      • Args: im - Blackfly image object.
      • Returns: None
    • updateBusInfo(): Detect cameras on the bus and update info in properties if new camera has been found.

  • quatm.drivers.blackfly.bfly.pc2

    class quatm.drivers.blackfly.bfly.pc2(object): pass
    • Dummy class in case driver is not installed.

Function:

  • quatm.drivers.blackfly.bfly.run(name)

    def quatm.drivers.blackfly.bfly.run(name): pass
    • Initialize a Camserver and run it.

3 - valon驱动

如何通过Quatm控制valon。

quatm.drivers.valon package

Submodules

[quatm.drivers.valon.VSerialPort3 module]

class quatm.drivers.valon.VSerialPort3.VSerialPort

Bases: serial.serialposix.Serial

  • lineGet()

  • Attributes:

    • portLineCount = 0
    • portLineIndex = 0
    • portLines = []
    • readAll()
    • writeline(text)

[quatm.drivers.valon.valon_quatm module]

class quatm.drivers.valon.valon_quatm.Valon_Driver

Bases: object

  • Attributes:
    • cwPanel = None
    • menuBar = None
    • sp = None
    • sendCommand(source, command, value)
      • Send command to valon
    • sendRaw(cmd)
    • set_frequency(freq=500, source=1)
      • Source: 1 or 2
      • Freq: Frequency in Hz

[quatm.drivers.valon.valon_prog module]

A separately running driver for the Valon, allows the (slow) Valon to receive commands without delaying the rest.

class quatm.drivers.valon.valon_prog.Valon_Standalone(name='Valon')

Bases: object

  • Standalone driver for the Valon frequency generator. Commands can be sent via the Commandhub and are processed in parallel to the experiment, thereby the experiment is not delayed by the Valon.

    • run()
  • function quatm.drivers.valon.valon_prog.run()