Skip to main content

OKN TOOL PYTHON PACKAGE LIBRARY MANUAL

Description

This program will draw the graph image in the ABI eye research group web experience recording folder according to config file information and plot type input. Moreover, it can also produce va table csv and html files for both individual and summary data folder.

There are 8 types of okn tool which are:

  1. Trial plot which represents sensor timestamp vs pupil displacement/movement graph for each trial.
  2. Summary plot which is the combination of all trial plots with the same x and y axis scales.
  3. Staircase/progress plot which is the graph image to visualize whether there is okn or not and the visual acuity etdrs calculation steps.
  4. Tidy plot, the special plot for all trial protocol in which borders and boundaries are drawn in tidest format.
  5. Simpler plot, the special plot for face detection and eye tracker related OKNs.
  6. indi_va_table which will create indi_va_table.csv and indi_va_table.html depand on whether there is okn or not in each trials.
  7. sum_va_table which will create sum_va_table.csv and sum_va_table.html by using indi_va_table.csv of each folder which is produced by indi_va_table okn tool type.
  8. pnm_video_splitter which will split pnm_eye_video.mp4 into pnm_left_eye_video and pnm_right_eye_video.
  9. overlay_pupil_detection which will overlay pupil detection on eye videos of opm and plm manager recording.

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 okntool, you have to use Anaconda Powershell Prompt.
After that, you can use the okntool from any command prompt.
In Anaconda Powershell Prompt:

pip install okntool

Usage guide

Example usage

okntool -t "(plot_type)" -d "(directory to the folder)" -c "(directory to config file)" -r "(referenced csv)"

plot_type: "trial", "summary" or "staircase"
If you are using "trial" plot type, please -d "(directory to trial folder)".
If you are using "summary" or "staircase" plot type, please -d "(directory to pim_recorded_folder/trials)".
-r is only for "simpler" plot type.

There is a example folder under development folder.
If you want to test this program, you can clone this repository, install okntool and run the following command:
For trial plot

okntool -t "trial" -d "development/example/trials/trials/trial-1-1_disk-condition-1-1"

For summary plot

okntool -t "summary" -d "development/example/trials/trials"

For staircase/progress plot

okntool -t "staircase" -d "development/example/trials/trials"

or

okntool -t "progress" -d "development/example/trials/trials"

For tidy plot

okntool -t "tidy" -d "development/example/trials/trials"

For simpler plot

okntool -t "simpler" -d "(folders which clip folders)"

or

okntool -t "simpler" -d "(folders which clip folders)" -c (simpler plot configuration) -r (referenced csv)

The -c and -r arguments are optional. The okntool has its own built-in config and default referenced csv location which is two folder back of input folder directory. i.e. If the input folder diectory is "(example/result/okn)", the default referenced csv location is "(example/protocol.simpler.csv)".

For indi_va_table

okntool -t "indi_va_table" -d "(folder which contains clip folders each contains decider.json)"

or

okntool -t "indi_va_table" -d "(folder which contains clip folders each contains decider.json)" -p "(template html file)" -n "(decider file name)" -r "(referenced csv)" -o "(output location)"

The -p, -n, -r and -o arguments are optional. The okntool has its own built-in template html, default decider file name and default referenced csv location which is two folder back of input folder directory. i.e. If the input folder diectory is "(example/result/okn)", the default referenced csv location is "(example/protocol.simpler.csv)".

For sum_va_table

okntool -t "sum_va_table" -d "(folder which contains folders each contains indi_va_table.csv)"

or

okntool -t "sum_va_table" -d "(folder which contains folders each contains indi_va_table.csv)" -p "(template html file)" -o "(output location)"

The -p and -o arguments are optional. The okntool has its own built-in template html.

For pnm_video_splitter

okntool -t "pnm_video_splitter" -d "(location of pnm_eye_video.mp4)"

For split_video

okntool -t "split_video" -d "(recording folder directory)"

(or)

okntool -t "sv" -d "(recording folder directory)"

For overlay_pupil_detection

okntool -t "overlay_pupil_detection" -d "(recording folder directory)"

(or)

okntool -t "opd" -d "(recording folder directory)"

If you wanna use okn_detector_summary.csv outside of the recording folder,

okntool -t "overlay_pupil_detection" -d "(recording folder directory)" -sc "(directory to summary csv)"

(or)

okntool -t "opd" -d "(recording folder directory)" -sc "(directory to summary csv)"

oknserver_graph_plot_config.json

This is a built-in config file which contains the information how trial plot, summary plot and progress plot will be drawn.
Please read more details about them in TRIAL_PLOT_README.md, SUMMARY_PLOT_README.md, PROGRESS_PLOT_README.md and TIDY_PLOT_README.md. If you wanna change the parameters of config file, copy and paste the built-in config file into a different directory. After that modify the config file and run the okntool with optional argument -c (directory to new config file).

okntool -t "(plot_type)" -d "(directory to the folder)" -c "(directory to new config file)"

simpler_plot_config.json

This is a built-in config file which contains the information how simpler plot will be drawn.
Please read more details in SIMLER_PLOT_README.md. If you wanna change the parameters of config file, copy and paste the built-in config file into a different directory.

To upgrade version

In Anaconda Powershell Prompt,

pip install -U okntool

or

pip install --upgrade okntool

Metadata

Release files for okntool 8.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for okntool 8.4.3
File Size Uploaded Provenance Actions
okntool-8.4.3.tar.gz 24.2 kB Without provenance Details for okntool-8.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for okntool 8.4.3
File Interpreter ABI Platform Actions
okntool-8.4.3-py3-none-any.whl Python 3 none any Details for okntool-8.4.3-py3-none-any.whl

Total release size: 47.4 kB

Release files / okntool-8.4.3.tar.gz

Download URL okntool-8.4.3.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4fad49cf5b02d5e0d11ef03b94d589e266a12c2a9e5d8db1c5421d1e28f6fb83
BLAKE2b-256 checksum
How to use checksums
f91af915de174095911cd92fbc5f4f2e00199933afed579a710668669105a08a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.7

Release files / okntool-8.4.3-py3-none-any.whl

Download URL okntool-8.4.3-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b7bc5e4bef8ec59d8f75679695fc851c5c97d1ce7f5addfd2157cc14171d0cd
BLAKE2b-256 checksum
How to use checksums
9e2b78878a0a49791f6cdbbf9f9640d381f8706613ea89dc41d29970d5b8d42c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.7

Security for okntool 8.4.3

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.

Release history Release notifications | RSS feed

This release

8.4.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page