Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tofof committed Apr 13, 2023
1 parent 31c26ce commit 78aede6
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PiedPiper 0.2-ALPHA
# PiedPiper 1.0 (23.04)

## Installation
Download the repository and, as necessary, update installed R packages from the dependency list below.
Expand Down Expand Up @@ -31,15 +31,10 @@ Be sure to update to at least the listed versions of the dependencies above.
For all later runs, **uncomment the load** so that it is executed, otherwise all prior data will be **lost**.

## Usage
Throughout each day, persons responsible for running the experimental boxes (probably undergraduates) will run `undergraduate.R` once per rat, selecting (when prompted) the corresponding .mat output file (generated by the matlab control program after that rat's run).
Throughout each day, persons responsible for running the experimental boxes (probably undergraduates) will run `app.R`, filling out the form for an individual rat's run and using the file picker (the Browse... button) to select the corresponding `.mat` file, then press Analyze. The user will be asked to examine two graphs (and possibly more, if there are any concerns raised by the initial two) to verify that the rat's weight and trial count trends are acceptable, that the data looks accurate and consistent with this rat's prior performance, etc. Once there is high confidence that the data is good and belongs to the named rat, the user will choose 'Save Run' at which point the results will be added to the arcives on disk.

At the end of the day, the person responsible for making the assingments to be used the next day will run `supervisor-summarize.R`. It will create and open a summary .xlsx (Excel) file that displays the data and statistics for each rat that are used in choosing assignments. The supervisor will use the drop-down menus and the filename entry field to specify the configuration files that each rat should next be run on. The supervisor can also leave a note on any rat that will remain until it is cleared, intended for e.g. planning ahead.

### Alternative usage
It is possible to run main.R directly and edit the section near the bottom to switch to processing entire directory trees of .mat files, instead of selecting one file at a time. This option necessarily omits recording rat weight data and is primarily intended for importing the data that was collected prior to the creation of PiedPiper.

Prior to running main.R in this mode, properly-annotated excel files need to be located and imported by `import_old_excel.R`. At a minimum, the correct experiment must be specified, otherwise trial data will end up stored in `NA_archive.Rdata`. The existence of this file always indicates a problem, and trial data should be moved out of this file and into an appropriate archive.

## Maintenance
### New Experiment
Adding a new experiment requires, at minimum, updating `experiment_details.csv` to add the new experiment and denote its corresponding phases. If the experiment uses existing phase types, no further work is required.
Expand All @@ -63,7 +58,7 @@ The `*_archive.Rdata` files contain the model, i.e. the storage of data. These i
The view is provided by `supervisor-summarize.R`. This script outputs a well-formatted .xlsx (Excel) file that allows the experimental supervisor to view summary data and statistics for the last several days for each rat, along with any warnings found when processing each day's files.

#### Controller
The primary controller is `main.R`, used through its frontend interface `undergraduate.R`. This file imports `.mat` files, which are the output from each run of the matlab control program. The data is converted into usable formats and the file is extensively checked for errors, especially mismatches between the expected or assigned parameters of that experimental run to the actual parameters used by the computer during the run. Data from the run's `.mat` file and input from `undergraduate.R` (such as the animal's current weight) is saved into the appropriate archives.
The primary controller is `main.R`, used through its frontend interface `app.R`. This file imports `.mat` files, which are the output from each run of the matlab control program. The data is converted into usable formats and the file is extensively checked for errors, especially mismatches between the expected or assigned parameters of that experimental run to the actual parameters used by the computer during the run. Data from the run's `.mat` file and input from `app.R` (such as the animal's current weight) is saved into the appropriate archives.

The `supervisor-assign.R` file, combined with the summary .xlsx file, also acts as a controller. This script transfers the future assignments (created by the supervisor using the summary sheet) to the model. This data is then checked against during `main.R`'s execution.

Expand Down

0 comments on commit 78aede6

Please sign in to comment.