Skip to main content

Data Analysis Package for LInoSpad2

Project description

LinoSPAD2

Package for unpacking and analyzing the binary data from LinoSPAD2.

Tests Documentation

Introduction

This package was written for data analysis for LinoSPAD2, mainly for analysis of the timestamp output. The key functions are ones for unpacking the binary output of the detector that utilizes the numpy Python library for quick unpacking of .dat files to matrices, dictionaries, or data frames.

The "functions" folder holds all functions from unpacking to plotting numerous types of graphs (pixel population, histograms of timestamp differences, etc.)

The "params" folder holds masks (used to mask some of the noisiest pixels) and calibration data (compensating for TDC nonlinearities and offset) for LinoSPAD2 daughterboards "A5" and "NL11".

The "archive" folder is a collection of scripts for debugging, tests, older versions of functions, etc.

Full documentation, including examples and full documentation of modules and functions, can be found here.

Some functions (mainly the plotting ones) save plots as pictures in the .png format, creating a folder for the output in the same folder that holds the data. Others (such as delta_t.py for collecting timestamp differences in the given time window) save .csv files with the processed data for easier and faster plotting.

Additionally, a standalone repo with an application for online plotting of the sensor population can be found here.

Installation and usage

To start using the package, one can download the whole repo. The 'main.py' serves as the main hub for calling the functions. "requirements.txt" collects all packages required for this project to run. One can create an environment for this project either using conda or install the necessary packages using pip (for creating virtual environments using pip see this):

pip install virtualenv
py -m venv PATH/TO/ENVIRONMENT/ENVIRONMENT_NAME
PATH/TO/ENVIRONMENT/ENVIRONMENT_NAME/Scripts/activate
cd PATH/TO/GITHUB/CODES/LinoSPAD2
pip install -r requirements.txt

or (recommended)

conda create --name NEW_ENVIRONMENT_NAME --file /PATH/TO/requirements.txt -c conda-forge

To install the package, first, switch to the created environment:

conda activate NEW_ENVIRONMENT_NAME

or

PATH/TO/ENVIRONMENT/ENVIRONMENT_NAME/Scripts/activate

and run

pip install -e .

that will install the local package LinoSPAD2. After that, you can import all functions in your project:

from LinoSPAD2.functions import plot_tmsp, delta_t, fits

How to contribute

This repo consists of two branches: 'main' serves as the release version of the package, tested, proven to be functional, and ready to use, while the 'develop' branch serves as the main hub for testing new stuff. To contribute, the best way would be to fork the 'develop' branch and submit via pull requests. Everyone willing to contribute is kindly asked to follow the PEP 8 and PEP 257 conventions.

License and contact info

This package is available under the MIT license. See LICENSE for more information. If you'd like to contact me, the author, feel free to write at sergei.kulkov23@gmail.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

daplis-0.9.4.tar.gz (67.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

daplis-0.9.4-py3-none-any.whl (143.1 kB view details)

Uploaded Python 3

File details

Details for the file daplis-0.9.4.tar.gz.

File metadata

  • Download URL: daplis-0.9.4.tar.gz
  • Upload date:
  • Size: 67.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for daplis-0.9.4.tar.gz
Algorithm Hash digest
SHA256 4885ef1c5a4ebb7992dc34943f7f35623af5713a6e59cff45ad0680028e7aee7
MD5 8a645d7b758a9e26e489e89fbcbad38b
BLAKE2b-256 921c3524947bc8e92f0e2a50845413b05867e3aecd6c9adec8013a65f683d4ae

See more details on using hashes here.

File details

Details for the file daplis-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: daplis-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 143.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for daplis-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ae6b0e4458cfffdcfacfd330d910b6ce98c46a555a4a0d0d561f50457b6e72c2
MD5 ac01a3fe5b9d46c2bc2cd4b724004dae
BLAKE2b-256 0497f89333f121d92ca55abbb26b2ff4255c0d3dcdb9b6e3a461b7ca411a122f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page