Command line program to fix okn and system manager related issues.
Project description
OKNPATCH PYTHON PACKAGE LIBRARY MANUAL
Description
This program will fix or rerun the web experiment related functions.
There are 3 types of oknpatch which are:
- trial_data_lost to fix the data lost of trial csv by referencing the gaze.csv.
- update to rerun the given trial csv by the updater function of the oknserver.
- change_direction_rerun_trial to change direction of the trial csv and rerun the updater and okn detection.
- rerun_recording to rerun all trials with or without pupil detector.
- show to check built-in config or default.
Installation requirements and guide
Anaconda
To install this program, Anaconda python distributing program and Anaconda Powershell Prompt are needed.
If you do not have Anaconda, please use the following links to download and install:
Download link: https://www.anaconda.com/products/distribution
Installation guide link: https://docs.anaconda.com/anaconda/install/
PIP install
To install oknpatch, you have to use Anaconda Powershell Prompt.
After that, you can use the oknpatch from any command prompt.
In Anaconda Powershell Prompt:
pip install oknpatch
Usage guide
The usage will be depend on the type of oknpatch.
There is a example folder under development folder.
If you want to test this program, you can clone this repository, install oknpatch and run the following command:
For trial_data_lost oknpatch type
oknpatch -t trial_data_lost -i development/example/trial-2_disk-condition-1-1.csv -gi development/example/gaze.csv
For update oknpatch type
oknpatch -t update -i development/example/trial-2_disk-condition-1-1.csv
That will rerun the updater function of oknserver and produce updated_trial-2_disk-condition-1-1.csv.
Since there is only input (-i) in the command line, it will use default extra_string which is "updated_" to give the output csv name and built-in config to update the given csv.
If you want to give your custom extra_string, use (-es):
If you want to use your own config to update, use (-uc):
oknpatch -t update -i development/example/trial-2_disk-condition-1-1.csv -es "(custom extra string)" -uc "(directory to your custom config)"
For change_direction_rerun_trial oknpatch type
oknpatch -t change_direction_rerun_trial -i development/example/trial-2_disk-condition-1-1.csv -di 1 -okndl (okn_detector_location)
That will change the direction column value of the given csv and rerun the updater function of oknserver and produce updated_trial-2_disk-condition-1-1.csv and result folder which contains signal.csv.
Since there is no input for custom extra string, config to update and config for okn detection in the command line, it will use default extra_string which is "updated_" to give the output csv name, built-in updater config and built-in okn detector config.
If you want to give your custom extra_string, use (-es):
If you want to use your own config to update, use (-uc):
If you want to use your own config for okn detection, use (-okndc):
oknpatch -t change_direction_rerun_trial -i development/example/trial-2_disk-condition-1-1.csv -es "(custom extra string)" -uc "(directory to your custom config)" -okndc "(directory to your custom okn detector config)" -di 1 -okndl (okn_detector_location)
For rerun_recording oknpatch type
oknpatch -t rerun_recording -d recording_folder_directory_to_be_rerun -okndl okn_detector_location
Flag indicators -t, -d and -okndl are mandatory.
Optional flag indicators are as follows:
- -ow = overwritten the trial csv data or not. Default is not overwritten. If you wanna overwrite the original data, you can add -ow yes in the commandline.
- -pd = using pupil detector or not. Default is pupil detector off. If you wanna switch on the pupil detector while rerunning, you can add -pd on in the commandline.
- -bl = tiny full buffer length to be used with pupil detector. Default is 7. If you wanna change it, -bl (buffer_length_integer) in the commandline.
- -es = extra string to name the updated csv. Default is "updated_".
- -uc = updater config location. Default is built-in. If you wanna change the updater config, you can add -uc directory_of_updater_config in the commandline.
- -di = director input to change all the direction in the rerunning.
- -okndc = okn detector config. Default is built-in. If you wanna change the okn detector config, you can add -okndc directory_of_okn_detector_config in the commandline.
- -opmdc = ehdg pupil/opm detector config. Default is built-in. If you wanna change the ehdg pupil/opm detector config, you can add -opmdc directory_of_ehdg_detector_config in the commandline.
- -pi = plot info. Default is built-in. If you wanna change the plot info, you can add -pi directory_of_plot_info_config in the commandline.
- -ri = rule info. Default is built-in. If you wanna change the rule info, you can add -ri directory_of_rule_info_config in the commandline.
For show oknpatch type
This type is to check default/built-in config information and defaults.
Example usage:
oknpatch -t show=uc
This will show you updater config information.
Available show commands are as follows:
- show=uc
- show=okndc
- show=opmdc
- show=pi
- show=ri
- show=es
- show=bl
- show=ow
- show=pd
To upgrade version
In Anaconda Powershell Prompt,
pip install -U oknpatch
or
pip install --upgrade oknpatch
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oknpatch-5.0.2.tar.gz.
File metadata
- Download URL: oknpatch-5.0.2.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f7a8af65d175f81a6cd0e1531a2126dba662da654e5ddbb7b9e7cd6d299a2df
|
|
| MD5 |
ece97b8ece4deaad201ec4dc2c40b068
|
|
| BLAKE2b-256 |
397e5f9cc5164c7505ef182542323c809b706ee58cd43ce5b41aaac8eb086eb1
|
File details
Details for the file oknpatch-5.0.2-py3-none-any.whl.
File metadata
- Download URL: oknpatch-5.0.2-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f381026959bb71a0137bcef80aae88d653781d0e1552962a4f5cdfb46e8c927
|
|
| MD5 |
bd4a08209c90f388b2403010c1d5339c
|
|
| BLAKE2b-256 |
6976c9be2684f9710f2cce82dade7dde4ac238b54e780c8d622aca9104404295
|