Configuration ============= The testbench tool needs to be configured before use to set the IP address and network port for streaming data packets. By default, the program will look for a configuration file in the $HOME/.config/falcon/nlxtestbench.yaml folder and if this file does not exist, a new one will be created with default values. A configuration file can also be specified on the command line (see below). The configuration file is written in YAML format and generally has three sections (network, stream and sources) with configurable options. An example configuration file is shown below: .. code-block:: yaml network: ip: 127.0.0.1 port: 5000 stream: rate: 32000 npackets: 0 autostart: "" sources: - class: nlx options: file: /path/to/raw/data/file cycle: false - class: sine options: offset: 0. amplitude: 1. frequency: 1. sampling_rate: 32000 noise_stdev: 0 - class: square options: offset: 0. amplitude: 1. frequency: 1. duty_cycle: 0.5 sampling_rate: 32000 noise_stdev: 0 - class: noise options: mean: 0. stdev: 1. sampling_rate: 32000 - class: ripple options: ripple params: *: duration: 100 interval: 50 9: duration: 50 interval: 80 15: duration: 20 interval: 40 ripple frequency: 200 mean ripple amplitude: 100 sampling_rate: 3200 noise_stdev: 0 nchannels: 128 offset: 0 network options ............... The *ip* and *port* options specify the destination of the streamed data packets. By default, the IP address is 127.0.0.1 (i.e. local host) and port is 5000. stream options .............. The neuralynx testbench tool produces a stream of data packets that are identical to the packets generated by the Digilynx system. Each data packet contains a single data sample for a number of input channels. At the moment, the testbench only supports a fixed number of 128 channels. The *rate* option defines the desired rate at which data packets should be produced (in data packets per second). Note that data packets will be produced as close as possible to the desired rate, but the actual rate may be lower if the system cannot keep up. The *npackets* option defines how many data packets should be produced. A value of 0 means that all data packets in the signal source should be streamed out (which in many cases is an infinite data stream). The *autostart* option sets the signal source that should be streamed immediately when the testbench is started (i.e. without waiting for a keyboard command by the user to select the signal source). sources ....... The final section of the configuration file lists predefined signal sources. At present, five different signal sources are available: Neuralynx raw data file (*nlx*) or generation of a ripple signal (*ripple*), sine wave (*sine*), square wave (*square*) and white noise (*noise*). To configure a signal source, you need to specify the class of the source (i.e. nlx, sine, square or noise) and any additional options. If no sources are specified, then by default a white noise source is added.