PicoHarp .PhD file importer
Project description
PicoHarp 300 TCSPC .phd file loader
This module was written to be able to read in .phd
photon time histograms from the PicoHarp software.
The layout of the file is as documented in the PicoHarp 300 manual in section 8.2.1 (pages 56-58).
Both of these are easy to modify, however the scope of this projec tis limited to our usage case.
The module also loads .txt
files which are the copy-pasted data from the PicoHarp software. This is primary way our research group has extracted data in the past, so it makes sense to keep the functionality alive.
Installation
pip install phdimporter
Usage
The module only uses one struct
import and contains one class of importance, TRF
.
from phd import TRF
trf = phd('path/to/file/.phd')
## or
trf = phd('path/to/file/.txt')
The most simple way to return the histogram data is to:
x = trf.x # bins in ns
y = trf.y # counts/bin
It is possible to pull raw data out from the .phd file since it's all stored in the TRF
object, however I'm not going to document this as the variables share the same names as in the PicoHarp manual, and are easily seen in phd.py.
Not Implemented
The importer has been written with a couple of limitations in mind that are based on our usage:
- Assumes only one histogram per file
- Assumes only one PicoHarp device on the machine
The only variable I haven't implemented is the acquisition time, as the computer that we use is not internet connected and the clock is always off, and I'm also not sure how to interpret the time_t
data type that the variable is stored in.
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
Hashes for phdimporter-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8260911ec7399a18e30604df4dd7439cde801033b6125df7e3285c1952a0fb3b |
|
MD5 | bb3ba72111b1aae0f7ab0664581d739f |
|
BLAKE2b-256 | 27e5f567fc4ee6ed6a6e18d95e8097c54050139983b2aa493a0f5062523d7ffa |