|
ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Inputs and outputs > Laser controllers > Setting up a laser controller > Specifying the effect of activating a laser controller Specifying the effect of activating a laser controller
In briefYou should use the options on the laser controller's settings page to specify the effect of activating a laser. You will probably want the laser to pulse with some frequency and duty cycle, but you can also just switch the laser on without pulsing it, or even specify any arbitrary sequence of pulses for the laser using an external 'pulse train file'.
Pulsing the laser on and offIn many situations, for example, optogenetics, you will want the laser to pulse on and off at some specific frequency whenever it is activated. This is achieved by selecting the option to Output a pulse train...
Figure 1. When set to 'Output a pulse train', the laser controller outputs a series of pulses whenever it is activated.
There are two settings you must make if you set a laser to output a pulse train when active: the frequency and the duty cycle of the pulses. The frequency is simply the frequency of the pulses - for example if you specify 10Hz, then there will be 10 pulses per second, so each one will last 100ms. The duty cycle specifies how long within each pulse's period the output will be high and (by implication) how long it will be low. For example, if you specify a duty cycle of 25% then, in the case where the pulse lasts 100ms, the pulse will be high for 25% of the time and low for 75%, so it will be high for 25ms and low for 75ms - see figure 2.
Figure 2. The frequency you specify defines the period of each pulse (Period = 1/Frequency). The duty cycle defines the proportion of the period that the output is high (H) and the proportion for which it is low (L). In the above figure the duty cycle is 25%, so H is 25% of the period and L is 75%.
The frequency you specify should be in Hertz, and can be any value from 0.01Hz to 10,000Hz. The duty cycle should be in %, and can be any value from 1% to 99%. (The shortest on or off pulse is therefore 1µs). As an alternative to specifying a frequency and duty cycle, you can just specify the time on and time off. For example, you could specify 40ms on and 10ms off. This would be identical to specifying a frequency of 20Hz and a duty cycle of 80%. Whether you specify a frequency and duty cycle, or a time on and time off, is just a matter of preference - it makes no functional difference to how the laser will behave. If you do define the pulses using time on and time off, then you can specify any value from 0.1ms to 100,000ms. This actually means that the pulses you can define are a little more limited than using the frequency and duty cycle technique; so, if you need an on or off period smaller than 0.1ms, you should define them by specifying the frequency and duty cycle instead. Setting a duration for the pulse trainAs well as specify the characteristics of the pulse train, you can also optionally specify how long it should be output for. For example, you might want your laser to output pulses at 20Hz with a 50% duty cycle, but just for 3 seconds. In this case, you can specify that the duration is 3s and the laser will automatically switch off 3 seconds after it is activated. If you don't specify a duration, then the laser will continue to output pulses after it has been activated, until it is explicitly deactivated by a procedure or the end of the test. If you do specify a duration, it can be any period from 0.1ms to 100s, and you can use any of the units: min (minutes), s (seconds) or ms (milliseconds). You can mix units and also specify decimal values. Turning the laser on (without pulsing it) for a specific durationIn some circumstances, you may want a laser to switch on without pulsing for some specific duration whenever it is activated. In this case, you should select the option Turn output on for the following duration and then enter the duration. For example, if you want the laser to come on for 500ms then you can simply select this option and enter '500ms' as the duration. Then, whenever the laser is activated, it will switch on (it won't pulse) and after 500ms it will automatically switch off. The duration can be any period from 0.1ms to 100s, and you can be use any of the units: min (minutes), s (seconds) or ms (milliseconds). You can mix units and also specify decimal values. Turning the laser on continuouslyThe final option is to turn the laser on continuously. Selecting this option will mean that whenever the laser is activated, it will turn on and stay on until it is explicitly switched off by a procedure or the end of the test. Using a pulse train file to output an arbitrary sequence of pulsesIf the sequence of pulses that you wish to use for the laser is more complex than just a simple frequency and duty cycle, then you can specify this sequence in an external text file. This file will be loaded into the ANY-maze Optogenetics interface just before the test starts, and can then be used at any point during the test. For more details on this, see Playing an arbitrary sequence of pulses using an external file. If this is what you want the laser to do, then you must specify the full path to the file containing the sequence of pulses. You can type the file path, or use the There are two options available to you when using an external pulse train file; the first will play the file just once, and then deactivate the laser; the second will continue to repeat the pulse sequence contained in the file until either the laser controller is deactivated, the laser's source is changed to a pulse train or continuous signal, or the test ends. Adjusting these setting during a testImagine you have some apparatus where you have two zones (A and B) and you would like your laser to output 20Hz pulses at 50% duty cycle for 2s, whenever the animal enters zone A, and 10Hz pulses, also at 50% duty cycle for 2s, whenever it enters zone B. But what should you specify as the laser characteristics here? And how will you change them based on the zone the animal has entered? The answer is that you should simply specify one of the sets of characteristics here, so perhaps 20Hz, 50% duty cycle, active for 2s and then use a procedure to adjust these when the animal enters a zone. For example, the procedure below could be used for the test I described above:
Figure 3. This procedure will alter the frequency of a laser controller's pulses depending on which zone the animal enters. Note that in this example, the duty cycle and duration are the same irrespective of the zone, but they could also have been adjusted based on the zone, if that was required.
All aspects of a laser controller can be adjusted by a procedure's Actions - you'll find a full list of the available actions here. If you're new to procedures, you can learn more about them in the Introduction to procedures.
© Copyright 2003-2026 Stoelting Co. All rights reserved ANY-maze help topic T0243 |