<commit_before># This configuration file defines a set of simulated devices that allow some 
# of ACQ4's acquisition capabilities to be tested on any machine. 
# 
# Also included are example configuration for every type of device supported
# by ACQ4, commented out. These may be used to construct a working 
# device configuration file.



# First, define the NI DAQ device we will use. For use with a real DAQ, simply
# remove the line 'mock: True'. The name 'DAQ', defined here, will appear
# many times throughout the config to refer to this device.
DAQ:
    driver: 'NiDAQ'
    config:
        mock: True
        
# A simple device connected to the DAQ that uses one AI channel and one AO 
# channel. As with all of the following device definitions, the name 
# 'DaqDevice' is arbitrary.
DaqDevice:
    driver: 'DAQGeneric'
    config:
        AIChan:
            device: 'DAQ'
            channel: '/Dev1/ai0'
            type: 'ai'
        AOChan:
            device: 'DAQ'
            channel: '/Dev1/ao0'
            type: 'ao'
    
# A simulated patch-clamp amplifier. It is connected to a Hodgkin-Huxley
# neuron model, allowing some of ACQ4's acquisition modules to be tested on
# a "real" system.
Clamp1:
    driver: 'MockClamp'
    config:
        simulator: 'builtin'  # Also supports 'neuron' if you have neuron+python
                              # installed. See lib/devices/MockClamp/neuronSim.py.
                              
        # Define two connections to the DAQ:
        Command:
            device: 'DAQ'
            channel: '/Dev1/ao0'
            type: 'ao'
        ScaledSignal:
            device: 'DAQ'
            channel: '/Dev1/ai5'
            mode: 'NRSE'
            type: 'ai'
            
        # Default holding values.
        icHolding: 0.0
        vcHolding: -50e-3


# A simulated motorized stage.    
Stage:
    driver: 'MockStage'
    config:
        transform:
            pos: (0, 0, 0)
            scale: (1, 1, 1)
            angle: 0

# A microscope device, providing a way to inform ACQ4 about the set of 
# objective lenses available and which is currently in use. 
Microscope:
    driver: 'Microscope'
    config:
        parentDevice: 'Stage'
        objectives:
            ## All scales in m/px
            0:
                63x0.9:
                    name: '63x 0.9na Achroplan'
                    scale: 0.205*um/px
                    offset: 70*um, 65*um
                63x0.95:
                    name: '63x 0.95na Achroplan'
                    scale: 0.205*um/px
                    offset: 70*um, 65*um
                40x:
                    name: '40x 0.75na Achroplan'
                    scale: 0.324*um/px
                    offset: -43*um, 9*um
            1:
                5x1.0:
                    name: '5x 0.25na FLUAR'
                    scale: 2.581*um/px


# A simulated camera. Generates noise and calcium-indicator-like signals.
Camera:
    driver: 'MockCamera'
    config:
        parentDevice: 'Microscope'
        transform:                          ## transform defines the relationship between the camera's
                                            ## sensor coordinate system (top-left is usually 0,0 and
                                            ## pixels are 1 unit wide) and the coordinate system of its
                                            ## scopeDevice
            position: (0, 0)
            scale: (1, 1)
            angle: 0

        exposeChannel:                                 ## Channel for recording expose signal
            device: 'DAQ'
            channel: '/Dev1/port0/line0'
            type: 'di'
        #triggerOutChannel: 'DAQ', '/Dev1/PFI5'        ## Channel the DAQ should trigger off of to sync with camera
        triggerInChannel:                              ## Channel the DAQ should raise to trigger the camera
            device: 'DAQ'
            channel: '/Dev1/port0/line1'
            type: 'do'

        #params:
        #    qprmSyncB: 'ExposureMask'

# A laser device. Simulating a shutter opening currently has no effect.
Laser-UV:
    driver: 'Laser'
    config:
        parentDevice: 'Microscope'
        pulseRate: 100*kHz                      ## Laser's pulse rate
        power: 100*mW
        shutter:
            device: 'DAQ'
            channel: '/Dev1/line30'           ## channel for triggering shutter
            type: 'do'
            delay: 10*ms                      ## how long it takes the shutter to fully open
        wavelength: 355*nm
        alignmentMode:
            shutter: True
        defaultPowerMeter: 'NewportMeter'

# Galvanometric scan mirrors. Simulating motion of the mirrors currently has 
# no effect.
Scanner:
    driver: 'Scanner'
    config:
        parentDevice: 'Microscope'
        calibrationDir: 'config\\ScannerCalibration'
        XAxis:
            device: 'DAQ'
            channel: '/Dev1/ao2'
            type: 'ao'
        YAxis:
            device: 'DAQ'
            channel: '/Dev1/ao3'
            type: 'ao'
        defaultCamera: "Camera"
        defaultLaser: "Laser"
        commandLimits: -1.5, 1.5<commit_msg>Added example device configuration for all types of devices.<commit_after># This configuration file defines a set of simulated devices that allow some 
# of ACQ4's acquisition capabilities to be tested on any machine. 
# 
# Also included are example configuration for every type of device supported
# by ACQ4, commented out. These may be used to construct a working 
# device configuration file.



# First, define the NI DAQ device we will use. For use with a real DAQ, simply
# remove the line 'mock: True'. The name 'DAQ', defined here, will appear
# many times throughout the config to refer to this device.
DAQ:
    driver: 'NiDAQ'
    config:
        mock: True
        # Default mode for AI channels. Options are 'NRSE', 'RSE', and 'DIFF'
        # This may be overridden for individual channels.
        defaultAIMode: 'NRSE'
        
# A simple device connected to the DAQ that uses one AI channel and one AO 
# channel. As with all of the following device definitions, the name 
# 'DaqDevice' is arbitrary.
DaqDevice:
    driver: 'DAQGeneric'
    config:
        AIChan:
            device: 'DAQ'
            channel: '/Dev1/ai0'
            type: 'ai'
        AOChan:
            device: 'DAQ'
            channel: '/Dev1/ao0'
            type: 'ao'
    
# A simulated patch-clamp amplifier. It is connected to a Hodgkin-Huxley
# neuron model, allowing some of ACQ4's acquisition modules to be tested on
# a "real" system.
Clamp1:
    driver: 'MockClamp'
    config:
        simulator: 'builtin'  # Also supports 'neuron' if you have neuron+python
                              # installed. See lib/devices/MockClamp/neuronSim.py.
                              
        # Define two connections to the DAQ:
        Command:
            device: 'DAQ'
            channel: '/Dev1/ao0'
            type: 'ao'
        ScaledSignal:
            device: 'DAQ'
            channel: '/Dev1/ai5'
            mode: 'NRSE'
            type: 'ai'
            
        # Default holding values.
        icHolding: 0.0
        vcHolding: -50e-3


# A simulated motorized stage.    
Stage:
    driver: 'MockStage'
    config:
        transform:
            pos: (0, 0, 0)
            scale: (1, 1, 1)
            angle: 0

# A microscope device, providing a way to inform ACQ4 about the set of 
# objective lenses available and which is currently in use. 
Microscope:
    driver: 'Microscope'
    config:
        parentDevice: 'Stage'
        objectives:
            ## All scales in m/px
            0:
                63x0.9:
                    name: '63x 0.9na Achroplan'
                    scale: 0.205*um/px
                    offset: 70*um, 65*um
                63x0.95:
                    name: '63x 0.95na Achroplan'
                    scale: 0.205*um/px
                    offset: 70*um, 65*um
                40x:
                    name: '40x 0.75na Achroplan'
                    scale: 0.324*um/px
                    offset: -43*um, 9*um
            1:
                5x1.0:
                    name: '5x 0.25na FLUAR'
                    scale: 2.581*um/px


# A simulated camera. Generates noise and calcium-indicator-like signals.
Camera:
    driver: 'MockCamera'
    config:
        parentDevice: 'Microscope'
        transform:                          ## transform defines the relationship between the camera's
                                            ## sensor coordinate system (top-left is usually 0,0 and
                                            ## pixels are 1 unit wide) and the coordinate system of its
                                            ## scopeDevice
            position: (0, 0)
            scale: (1, 1)
            angle: 0

        exposeChannel:                                 ## Channel for recording expose signal
            device: 'DAQ'
            channel: '/Dev1/port0/line0'
            type: 'di'
        #triggerOutChannel: 'DAQ', '/Dev1/PFI5'        ## Channel the DAQ should trigger off of to sync with camera
        triggerInChannel:                              ## Channel the DAQ should raise to trigger the camera
            device: 'DAQ'
            channel: '/Dev1/port0/line1'
            type: 'do'

        #params:
        #    qprmSyncB: 'ExposureMask'

# A laser device. Simulating a shutter opening currently has no effect.
Laser-UV:
    driver: 'Laser'
    config:
        parentDevice: 'Microscope'
        pulseRate: 100*kHz                      ## Laser's pulse rate
        power: 100*mW
        shutter:
            device: 'DAQ'
            channel: '/Dev1/line30'           ## channel for triggering shutter
            type: 'do'
            delay: 10*ms                      ## how long it takes the shutter to fully open
        wavelength: 355*nm
        alignmentMode:
            shutter: True
        defaultPowerMeter: 'NewportMeter'

# Galvanometric scan mirrors. Simulating motion of the mirrors currently has 
# no effect.
Scanner:
    driver: 'Scanner'
    config:
        parentDevice: 'Microscope'
        calibrationDir: 'config\\ScannerCalibration'
        XAxis:
            device: 'DAQ'
            channel: '/Dev1/ao2'
            type: 'ao'
        YAxis:
            device: 'DAQ'
            channel: '/Dev1/ao3'
            type: 'ao'
        defaultCamera: "Camera"
        defaultLaser: "Laser"
        commandLimits: -1.5, 1.5



### Below are example configurations for real devices. Uncomment these and modify
### to your needs.

# Multiclamp 700A/B, single channel. 
# To use two channels, simply define a second device with the appropriate 
# device string. Note: if an incorrect device string is used, an error message
# will be pronted which lists the available device strings.
# 
# Clamp1:
#     driver: 'MultiClamp'
#     config:
#         channelID: 'model:MC700A,com:3,dev:0,chan:1'
#         commandChannel: 
#             device: 'DAQ'
#             channel: '/Dev1/ao0'
#             type: 'ao'
#         primaryChannel: 
#             device: 'DAQ'
#             channel: '/Dev1/ai10'
#             mode: 'NRSE'
#             type: 'ai'
#         secondaryChannel: 
#             device: 'DAQ'
#             channel: '/Dev1/ai9'
#             mode: 'NRSE'
#             type: 'ai'
#         vcHolding: -50e-3
#         icHolding: 0.0
#         settings:  # Default amplifier state. The amplifier will be 
#                    # reconfigured with these options every time ACQ4 is 
#                    # started. 
#             IC:
#                 HoldingEnable: False
#                 Holding: 0.0
#                 TestSignalEnable: False
#                 #SlowCurrentInjEnable: False
#                 NeutralizationEnable: True
#                 #OscKillerEnable: True
#                 PrimarySignalGain: 2
#                 PrimarySignalLPF: 20e3
#                 PrimarySignalHPF: 0
#                 OutputZeroEnable: False
#                 BridgeBalEnable: True
#                 BridgeBalResist: 15e6
#             VC:
#                 HoldingEnable: False
#                 Holding: 0.0
#                 TestSignalEnable: False
#                 #SlowCurrentInjEnable: False
#                 #NeutralizationEnable: False
#                 WholeCellCompEnable: False
#                 RsCompEnable: False
#                 #OscKillerEnable: True
#                 PrimarySignalGain: 2
#                 PrimarySignalLPF: 20e3
#                 PrimarySignalHPF: 0
#                 OutputZeroEnable: False
#                 LeakSubEnable: False

# Sutter MPC-200 stage and manipulator controllers. Each device represents one 
# drive on the controller; for more drives simply add a new device and set the
# drive number accordingly.
# SutterStage:
#     driver: 'SutterMPC200'
#     config:
#         port: "COM10"
#         drive: 1
#         scale: 1.0, 1.0, 1.0  ## If the MPC200 does not report its scale 
#                               ## correctly, then corrections may be applied
#                               ## here.

# Sutter MP-285 stage and manipulator controllers. NOTE--The MP-285 has a design
# flaw: if you turn an attached ROE while the computer is communicating with the
# controller, then the controller will crash. This can be circumvented with 
# custom interfacing hardware (see lib/drivers/SutterMP285/mp285_hack).
# SutterStage:
#     driver: 'SutterMP285'
#     config:
#         port: "COM10"
#         baud: 19200
#         scale: 1.0, 1.0, 1.0  ## MP285 _should_ report its own scale correctly; 
#                               ## no need to adjust it here.



# Device that polls digital IO ports to determine state of hardware switches. 
# This is used to determine which objective is in use on 2-objective microscopes.
# Switch:    
#     driver: 'DIOSwitch'
#     config:
#         channels: 
#             objective:
#                 device: 'DAQ'
#                 channel: '/Dev1/line12'  ## indicates the state of the objective switch
#             PMT:
#                 device: 'DAQ'
#                 channel: '/Dev1/line6'   ## detects when PMT aperture is open
#         interval: 300e-3  ## poll for changes every 300ms



# Example microscope device which is rigidly-connected to a motorized 
# stage (defined above). It also uses the 'Switch' device to determine the
# objective lens currently in use.
# Microscope:
#     driver: 'Microscope'
#     config:
#         parentDevice: 'SutterStage'
#         objectiveSwitch: 'Switch', 'objective'  ## monitor the 'objective' channel from the 'Switch' device
#         objectives:  
#             ## All scales in m/px
#             0:
#                 63x0.9:                            ## unique identifier
#                     name: '63x 0.9na Achroplan'    ## descriptive name
#                     scale: 0.205*um/px
#                     offset: 70*um, 65*um
#                 63x0.95:
#                     name: '63x 0.95na Achroplan'
#                     scale: 0.205*um/px
#                     offset: 70*um, 65*um
#                 40x:
#                     name: '40x 0.75na Achroplan'
#                     scale: 0.324*um/px
#                     offset: -43*um, 9*um
#             1:
#                 5x0.25:
#                     name: '5x 0.25na FLUAR'
#                     scale: 2.581*um/px

# Complete example for Photometrics cameras, including TTL exposure and trigger 
# lines. This camera is rigidly connected to the 'Microscope', which is defined 
# above.
# 
# Camera:
#     driver: 'PVCam'
#     config:
#         serial: 'PM1394Cam'
#         parentDevice: 'Microscope'          ## tells us that the camera is rigidly connected to the scope, and
#                                             ##   thus will inherit its transformations.
#         transform:                          ## transform defines the relationship between the camera's
#                                             ##   sensor coordinate system (top-left is usually 0,0 and
#                                             ##   pixels are 1 unit wide) and the coordinate system of its
#                                             ##   parentDevice. This is where we would rotate/flip the camera if needed.
#             position: (0, 0)
#             scale: (1, -1)
#             angle: 0
#         exposeChannel:                      ## Channel for recording expose signal
#             device: 'DAQ'
#             channel: '/Dev1/port0/line8'
#             type: 'di'
#         triggerOutChannel:                  ## Channel the DAQ should trigger off of to sync with camera
#             device: 'DAQ'
#             channel: '/Dev1/PFI5'
#         triggerInChannel:                   ## Channel the DAQ should raise to trigger the camera
#             device: 'DAQ'
#             channel: '/Dev1/port0/line28'
#             type: 'do'
#             invert: True                    ## invert because Quantix57 triggers on TTL LOW
#         params:                             ## default parameters to apply to camera at startup
#             #TEMP_SETPOINT:  -2000
#             exposure: 10e-3    


# Simple example for QImaging cameras. No trigger/exposure lines are defined
# in this example. 
# 
# Camera:
#     driver: 'QCam'
#     config:
#         parentDevice: 'Microscope'          ## tells us that the camera is rigidly connected to the scope, and
#                                             ##   thus will inherit its transformations.
#         transform:                          ## transform defines the relationship between the camera's
#                                             ##   sensor coordinate system (top-left is usually 0,0 and
#                                             ##   pixels are 1 unit wide) and the coordinate system of its
#                                             ##   parentDevice. This is where we would rotate/flip the camera if needed.
#             position: (0, 0)
#             scale: (1, 1)
#             angle: 0


# Several 'DAQGeneric' devices follow. These simply provide an interface for 
# controlling specific ports on the DAQ.
# 
# PockelCell:
#     driver: 'DAQGeneric'
#     config:
#         Switch:
#             device: 'DAQ'
#             channel: '/Dev1/ao1'
#             type: 'ao'
#             holding: 0


# PMT:
#     driver: 'DAQGeneric'
#     config:
#         Input:
#             device: 'DAQ'
#             channel: '/Dev1/ai0'
#             type: 'ai'
#             
#         PlateVoltage:
#             device: 'DAQ'
#             channel: '/Dev1/ai1'
#             type: 'ai'


# Photodiode-UV:
#     driver: 'DAQGeneric'
#     config:
#         Photodiode:
#             device: 'DAQ'
#             channel: '/Dev1/ai7'
#             type: 'ai'
#             scale: 49.1*mW/V ## calibrated 2011.11.09
#             offset: 0.0*mV
#             units: 'W'
#             settlingTime: 2*ms
#             measurementTime: 50*ms


# Laser-Blue:
#     driver: 'Laser'
#     config: 
#         scope: 'Microscope'
#         power: 10*mW
#         wavelength: 465*nm
#         alignmentMode: None

# A basic laser device. This is for a Q-switched DPSS laser with a uniblitz
# shutter. 
#
# Laser-UV:
#     driver: 'Laser'
#     config: 
#         scope: 'Microscope'
#         pulseRate: 100*kHz                      ## Laser's pulse rate
#         powerIndicator: 
#             channel: 'Photodiode-UV', 'Photodiode'      ## photocell channel for immediate recalibration
#             rate: 1.2*MHz                     ## sample rate to use when measuring power
#         shutter:
#             device: 'DAQ'
#             channel: '/Dev1/line30'           ## channel for triggering shutter
#             type: 'do'
#             delay: 10*ms                      ## how long it takes the shutter to fully open
#         qSwitch:
#             device: 'DAQ'
#             channel: '/Dev1/line29'           ## channel for triggering q-switch
#             type: 'do'
#         wavelength: 355*nm
#         alignmentMode:
#             qSwitch: False                    ## For alignment, shutter is open but QS is off
#             shutter: True
#         defaultPowerMeter: 'NewportMeter'
#         #calibrationWarning: 'Filter in?'


# ## for low-level acces to shutter and q-switch
# Laser-UV Raw:
#     driver: 'DAQGeneric'
#     config:
#         shutter:
#             device: 'DAQ'
#             channel: '/Dev1/line30'
#             type: 'do'
#             holding: 0
#         qSwitch:
#             device: 'DAQ'
#             channel: '/Dev1/line29'
#             type: 'do'
#             holding: 0


# Example Coherent laser. This has been tested with a Chameleon Vision II.
#
# Laser-2P:
#     driver: 'CoherentLaser'
#     config: 
#         port: 9
#         baud: 19200
#         scope: 'Microscope'
#         pulseRate: 90*MHz                      ## Laser's pulse rate
#         pCell:
#             device: 'DAQ'
#             channel: '/Dev1/ao1'
#             type: 'ao'
#         shutter:
#             device: 'DAQ'
#             channel: '/Dev1/line31'           ## channel for triggering shutter
#             type: 'do'
#             delay: 30*ms                      ## how long it takes the shutter to fully open
#         defaultPowerMeter: 'NewportMeter'
#         calibrationWarning: 'Filter in?'
#         alignmentMode:
#             pCell: 100*mV
#         #pCell:
#             #channel: 'DAQ', 'Dev1/ao2'


# ## for low-level access to shutter and pCell
# Laser-2P-Raw:
#     driver: 'DAQGeneric'
#     config: 
#         pCell:
#             device: 'DAQ'
#             channel: '/Dev1/ao1'
#             type: 'ao'
#         shutter:
#             device: 'DAQ'
#             channel: '/Dev1/line31'           ## channel for triggering shutter
#             type: 'do'
#             delay: 10*ms                      ## how long it takes the shutter to fully open


# Galvanometric scan mirrors.
# Scanner:
#     driver: 'Scanner'
#     config:
#         parentDevice: 'Microscope'       ## Scanner is rigidly connected to scope, inherits its transformations.
#         calibrationDir: 'config\\ScannerCalibration'
#         XAxis: 
#             device: 'DAQ'
#             channel: '/Dev1/ao2'
#             type: 'ao'
#         YAxis: 
#             device: 'DAQ'
#             channel: '/Dev1/ao3'
#             type: 'ao'
#         defaultCamera: "Camera"
#         defaultLaser: "Laser-UV"
#         commandLimits: -3, 3
#         #offVoltage: 0, -4    ## "off" position
#         shutterLasers: ['Laser-UV']  ## list of lasers for which we should simulate a shutter by default


# ## For raw access to the scan mirror voltages.
# Scanner-Raw:
#     driver: 'DAQGeneric'
#     config:
#         XAxis:
#             device: 'DAQ'
#             channel: '/Dev1/ao2'
#             type: 'ao'
#             holding: 0.0
#         YAxis:
#             device: 'DAQ'
#             channel: '/Dev1/ao3'
#             type: 'ao'
#             holding: 0.0


# Stimulation electrode
# Stim0:
#     driver: 'DAQGeneric'
#     config:
#         Command:
#             device: 'DAQ'
#             channel: '/Dev1/ao1'
#             type: 'ao'
#             units: u'A'
#             scale: 10*V / 10*mA
# #        Readout:
# #            channel: 'DAQ', '/Dev1/ai8'
# #            type: 'ai'
# #            units: u'A'
# #            scale: 1*V / 1*mA


# Analog temperature readout
# Temperature:
#     driver: 'DAQGeneric'
#     config:
#         BathTemp:
#             device: 'DAQ'
#             channel: '/Dev1/ai4'
#             type: 'ai'
#             units: 'C'
#             scale: 10*C/V


# TTL-activated puffer valve
# Puffer:
#     driver: 'DAQGeneric'
#     config:
#         Command:
#             device: 'DAQ'
#             channel: '/Dev1/port0/line26'
#             type: 'do'
#             holding: 0


# Foot switch used for triggering tasks.
# FootSwitch:
#     driver: 'Trigger'
#     config:
#         DAQ: '/Dev1/PFI5'


# LED-Blue:
#     driver: 'DAQGeneric'
#     config:
#         Command:
#             device: 'DAQ'
#             channel: '/Dev1/port0/line27'
#             type: 'do'
#             holding: 0


# Laser power meter used for calibrating laser attenuation
# NewportMeter:
#     driver: 'DAQGeneric'
#     config:
#         Power [100mW max]:
#             device: 'DAQ'
#             channel: '/Dev1/ai12'
#             type: 'ai'
#             scale: 100*mW/V   
#             offset: -5*mV
#             units: 'W'
#             settlingTime: 4*s
#         #Power [1W max]:
#             #device: 'DAQ'
#             #channel: '/Dev1/ai12'
#             #type: 'ai'
#             #scale: 1.0 / 1.0   # 1W/V
#             #units: 'W'
#             #settlingTime: 4*s


## Spare AI ports for general use as oscilloscope.
# Scope:
#     driver: 'DAQGeneric'
#     config:
#         AI14:
#             device: 'DAQ'
#             channel: '/Dev1/ai14'
#             type: 'ai'
#             units: 'V'
#         AI15:
#             device: 'DAQ'
#             channel: '/Dev1/ai15'
#             type: 'ai'
#             units: 'V'

{'fraction_non_alphanumeric': 0.0923571939302455, 'fraction_numerical': 0.02411217923254151, 'mean_word_length': 1.4093214661690114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 35, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '327599', 'n_tokens_mistral': 7516, 'n_tokens_neox': 6954, 'n_words': 2249}