Creating measurement lists - galizia-lab/pyview GitHub Wiki

A measurement list is a (Excel) table that lists, one row each, all measurements, and adds (one column each) information about the measurements, such as stimulus, concentration, timing, etc.

  1. Download the script "create_measurement_list_template.py" from here in to the directory "progs" of your project.
  2. Rename the file by removing "_template". You could rename the file further if you choose.
  3. Open the script in a Python editor like Spyder and read the script once thoroughly up to the line if __name__ == "__main__".
  4. Set the variables LE_loadExp, STG_MotherOfAllFolders, STG_Datapath and STG_OdorInfoPath values according to your project and folder structure.
  5. Set default values for flags in the block beginning with # ------- A dictionary containing default values for metadata.---. Uncomment lines to include additional flags.
  6. Save the script.
  7. Open a terminal/Powershell and activate the environment created for VIEW during Pre-Installation, for example using conda activate <environment name> or pipenv shell
  8. Run the script using python <path to the script>

Advanced Usage

The script mainly does the following:

  1. Raise a dialog asking the user to choose raw data files containing metadata.
  2. Load machine readable metadata from these files and parse them.
  3. Set entries not initialized in step 2 with default values.
  4. If a list file for the selected animal already exists, retain values from it for the columns specified in the variable overwrite_old_values of the script.
  5. Write the list file.

In addition the script can be configured to do the following:

Post-processing of lists

Initialize or rewrite column values based on other columns. This will be done between step 2 and 3. This can be done by injecting code into the function custom_func.

Exclude measurements (only for Till Vision setups)

Entries in log files can be excluded using the function measurement_filter of the script. By default, the criteria for exclusion are as follows:

  1. If the label of the entry contains "Snapshot" or "Delta"
  2. If the label contains no underscores (_).
  3. If the entry contains at least two frames, judged based on the line starting with timing [ms].