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
Metadata
Release files for oknpatch 5.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oknpatch-5.0.2.tar.gz | 25.2 kB | Without provenance | Details for oknpatch-5.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oknpatch-5.0.2-py3-none-any.whl | Python 3 | none | any | Details for oknpatch-5.0.2-py3-none-any.whl |
Total release size: 49.9 kB
Release files / oknpatch-5.0.2.tar.gz
| Download URL | oknpatch-5.0.2.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f7a8af65d175f81a6cd0e1531a2126dba662da654e5ddbb7b9e7cd6d299a2df
|
|
BLAKE2b-256 checksum How to use checksums |
397e5f9cc5164c7505ef182542323c809b706ee58cd43ce5b41aaac8eb086eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.7
|
Release files / oknpatch-5.0.2-py3-none-any.whl
| Download URL | oknpatch-5.0.2-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f381026959bb71a0137bcef80aae88d653781d0e1552962a4f5cdfb46e8c927
|
|
BLAKE2b-256 checksum How to use checksums |
6976c9be2684f9710f2cce82dade7dde4ac238b54e780c8d622aca9104404295
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.7
|
Security for oknpatch 5.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.