Pecking Test Setup Experiment - theunissenlab/lab-documentation GitHub Wiki

Setting up a pecking test experiment

These are general instructions to prepare for an experiment in NAF 125 with the pecking test. These will have a little more detail than the operating instructions.

For day to day operation of a pecking test, go to Running the Pecking Tests. For troubleshooting go Troubleshooting the Pecking Test**

Table of Contents

  1. Preparing stimulus files

  2. Preparing the boxes

  3. Set up configuration, logging, and alerts

  4. Testing components

1 Preparing stimulus files

Prepare stimulus files using MATLAB

Do the following on your workstation (currently MATLAB is not installed in 125. TODO to prepare 125 with stim preparation tooling).

  1. Acquire MATLAB code in this github project. The file is Stim_CreaterFET.m. We'll update this to python... someday. (TODO: also, run apply_filt first?)

  2. Record and cut the audio into one call per wav file (make sure the wav file is 1 channel)

  3. Create two folders, one called XXXX_raw and one called XXXX_out (You can replace XXXX with whatever)

  4. In the XXXX_raw folder, add the wav files recorded, name them [BIRDNAME]_DC_0.wav

  5. In line 46, change the filename template to use DC or SO or whatever prefix you want.

  6. Edit the input directory to point to the XXXX_raw folder and the output directory to XXXX_out

  7. Edit how long you want the stim files to be and how many renditions to scatter throughout each one.

  8. Run.

  9. TODO: this is out of date for the new computer. Upload the files you made in XXXX_out to a new stimulus directory on pumpkin's google drive stimulus folder and chubbyninja's folder too. Make sure your new directory has a unique name! These will be synced automagically to those computers.

  10. For preference test stimuli (possibly unique per bird), you should create a folder with the subject name under /data/pecking_test/stimuli/preference/ containing the wav files you want to use for playbacks.

2 Preparing boxes

  • Make sure the operant boxes are clean, have water, and the box lights and fans work. Check that the perches in front of the pecking buttons are securely fastened.

  • Make sure that each box running the preference tests has a microphone plugged in and hooked up to the Behringer audio interface.

3 Set up configuration files, logging, and alerts

  • Open the yaml files /data/pecking_test/configs/Box*.yaml /home/fet/configs/Box*.yaml. The shortcut command to open the yaml files is pecking-test edit-config.

  • Set the experiment parameters. The important ones are "subject_name", and the stimuli paths. TODO: fill this in

4 Testing components

Test that the boxes work by running the diagnostics script: pecking-test diagnostics. This runs a check that the components are found and working. Part of the diganostics check that the sound is working, the button is working, and the microphones are working. These need to be verified manually but the diagnostics script should guide you. If there are any errors they should be resolved before starting the experiment.

Check webcams

We have USB webcams in each of the boxes that are automatically detected by serial num. and mapped to devices /dev/video$BOX. We are now using VLC for viewing the webcams.

Open a new terminal and run the command pecking-test webcam, or if you only want to open the webcam for a single box, use pecking-test webcam -b BOX. Box 3 is a slightly different brand webcam and you are most likely to have problems with that one. If you do, usually unplugging the webcam and plugging it back in will work after a while.

5 Preparing the subjects

Fasting the subjects

  • Acquire a yellow OLAC cage card for each cage that will need to be fasted.

  • Weigh and record the initial weights of the birds before fasting.

  • Remove the feeder(s) from the cage(s). Dump out any excess seed in the bottom tray of the cage(s).

  • Initial and date the back of the yellow card, and place it on the cage to notify OLAC that the cage should not receive food.

Shaping

See Pecking Test Shaping.

⚠️ **GitHub.com Fallback** ⚠️