Skip to content

Repository files navigation

NPET Data Processing (NPET_DP)

CI Coverage Python UV Ruff ty


This program facilitates the processing of data gathered from NPET (New Pico Event Timer) devices developed at CTU FNSPE. Use this project with the NPET communication FW to gather and process data from NPET.

This program uses CLI. To run the program, Install it and execute npet-dp or uv tool run NPET_DP or python -m NPET_DP (depending on the installation method) in your terminal, then follow the on-screen instructions. More information on program functionality in Program Guide.


Program Guide

The program has a CLI main menu, which is navigated by selecting a number belonging to one of the options shown. The main functions are

  • Process PPS Plot the PPS (Pulse Per Second) data. This plot shows the stability of the connected PPS signal. In general, PPS should be stable with STD in low single digits of picoseconds.
  • Process Single Epoch - Visualizes epochs gathered from a singular clock.
  • Process Dual Epochs - Compare epochs from two clocks to determine the time offset and stability between the clocks.
  • Settings - Change program settings, such as data path or plotting options.
  • Open Outputs - Open file explorer window to the directory where the processed data is saved.

Some processing requires additional information. The user is prompted for that information when needed. This information is stored in the application settings. Application settings do NOT persist when the app is terminated. To change the settings, access them via the main menu.

The program will ONLY access .out files stored in the directory where it was launched. The path to the source directory is printed when the program is launched. The source directory can be adjusted using the --data-path / -dp argument or in settings. The stored data HAS to be formatted in two columns integer_second fraction_remainder! The files generated by the NPET communication FW are already in the correct format and have the correct suffix.

Exit codes:

  • 10 - The specified data-path doest not exist

Installation Guide

How to install via uv (recommended)

Requirements:

  • uv >= 0.11 (Install from this link)

To install the program on your machine, run:

uv tool install [path to the installation file]

or directly from the GitHub repository, run:

uv tool install git+https://github.com/MattStav/NPET-data-processing.git

All other dependencies are automatically installed using internet connection into an isolated environment. Afterward the program can be launched from terminal using the command npet-dp.

How to install via Python / pip

Requirements:

  • Python >= 3.13 (Enable add to PATH during installation)
  • Pip (usually comes with Python)

To install the program on your machine, run:

pip install [path to the installation file]

The path can also be replaced with git+[url to the GitHub repository]. All other dependencies are installed automatically using internet connection. Afterward the program can be launched from terminal using the command python -m NPET_DP.

How to install via pipx

Requirements:

  • Python >= 3.13 (Enable add to PATH during installation)
  • Pip (usually comes with Python)

First, install pipx using pip:

pip install pipx

Then install the program using pipx:

pipx install [path to the installation file]

All other dependencies are automatically installed using internet connection into an isolated environment. Afterward the program can be launched from terminal using command npet-dp.

How to get the installation file

The installation file can be built from this project using the command:

python -m build --wheel

The installation file will be created in the dist folder, within the project.

About

Python package for processing NPET data

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages