> For the complete documentation index, see [llms.txt](https://gitbook.bergelsonlab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.bergelsonlab.com/archive/seedlings/scatter.md).

# Moving files from Working Files back to Subject Files

Send 'em back

*The instructions in this section are written specifically for the moving of files that takes place after the completion of month 13's reliability checks, but they can be adapted to the moving back of files in other situations as well.*

*They can be moved back in batches. It is necessary to send the relevant files back before beginning that month's reliability checks.*

## 1. Collect Working Files

*Put all relevant files for the month you'll be running reliability on together in a folder within Working Files.*&#x20;

* Create a new folder in Working Files called e.g. `reliabilty_13/`
  * The script doesn't actually require this folder to be named anything in particular, but it should still be good practice to name it something along those lines
* Within `reliability_13/`, create two more new folders:
  * `reliability_13/audio/`
  * `reliability_13/video/`

## 2. Check Basic Levels

* Open each wordmerged.csv and [check that all of the basic levels are correct](/data-pipeline/basic-levels.md), respectively for audio and video

## 3. Send files back via Scatter

*To "scatter" the files back is to send them back from Working Files to Subject Files, renaming them as necessary. Instructions to use the scattering scripts are as follows.*

*The scripts are located in* [*the scatter github repo*](https://github.com/SeedlingsBabylab/scatter)*, and the files containing paths to groups of files are located in* [*the path\_files github repo*](https://github.com/SeedlingsBabylab/path_files)*. Both of these should be located within* Fas-Phyc-PEB-La&#x62;*/Seedlings/Scripts\_And\_Apps/Github/seedlings/*

*The files that need to be sent back are:*

* *Audio*
  * *.cha*
  * *wordmerged.csv (to be renamed to audio\_sparse\_code.csv)*
  * *audio coding issues*
* *Video*
  * *.opf*
  * *wordmerged.csv (to be renamed to video\_sparse\_code.csv)*
  * *video coding issues*

### Pull the most recent version of the scatter scripts

* cd to `/Volumes/Fas-Phyc-PEB-Lab/Seedlings/Scripts_and_Apps/Github/seedlings/scatter`
* git pull to get the most recent version of the scripts in this repo

### (a) To send back audio (.cha) and video (.opf) files:

#### *Audio*

* The script for scattering .cha files is `scatter/cha.py`
* The path\_files that cha.py takes as an argument is `path_files/cha_directories.txt`
* Use the `--audio` flag to indicate that it is processing audio
* We always use the `--rename` flag, which just makes sure that the files get named properly after being sent back
  * (e.g. an RA was asked to put their initials in the filename that they were working on in Working Files, but we don't need to keep their initials in the final version of the file that gets sent back to Subject Files)

`python cha.py [path/to/working/files/reliability_12/audio] [path/to/cha_directories.txt] --audio --rename`

#### *Video*

* The script for scattering videos is `scatter/opf.py`
* The path\_files that opf.py takes as an argument is `path_files/opf_paths.txt`
* Use the `--video` flag to indicate that it is processing video
* We always use the `--rename` flag, same reason as for audio above

`python opf.py [path/to/working/files/reliability_12/video] [path/to/opf_paths.txt] --video --rename`

### (b) To send back basic level (wordmerged.csv) files:

* The script for scattering both audio and video wordmerged.csv files is `scatter/scatterbl.py`&#x20;
* Use the `--audio` and `--video` flags to indicate that it is processing audio and video, respectively
* We always use the `--rename` flag

***Audio***

* For audio, the path\_files that scatter\_bl.py takes as an argument is `path_files/audiobl_directories.txt`

`python scatterbl.py [path/to/working/files/reliability_12/folder/to/send/back] [path/to/path_files/audiobl_directories.txt] --audio --rename`

***Video***

* For video, the path\_files that scatter\_bl.py takes as an argument is `path_files/vidiobl_directories.txt`

`python scatterbl.py [path/to/working/files/reliability_12/video/batch_wordmerge_output] [path/to/path_files/videobl_directories.txt] --video --rename`

### (c) To send back coding issues files:

* The script for scattering both audio and video coding issues files is `coding_issues.py`
* n.b. this script takes a long time to run so just let it run to completion by itself

`python coding_issues.py folder_with_all_codingissues_files path_to_subject_files [--audio] [--video] [--rename]`

## Once they're back to Subject Files

Incorporate the most recent changes to the files by running [All Basic Level](/data-pipeline/basic-levels/all-basic-level.md#generating-a-new-set-of-all_basiclevel-files) script

## Then you can generate reliability files for [audio](/data-pipeline/audio/audio-reliability.md) and [video](/data-pipeline/video/video-reliability-checks.md)&#x20;
