This python package pycalib contains the executable pycalib to produce images from
data acquired using the ACERTARA (Longmont, Colorado, USA) water tank equipment. It uses
custom made code to interact with files of type waveform (*.wfm), raster scan (*.rst),
zscan (*.fzs), cross-axis (*.xcn), and even oscilloscope csv output file (*.csv).
The quickest way to start using pycalib is by installing uv, a fast Python
package and project manager (https://github.com/astral-sh/uv). Check for the install
commands here.
Once you have uv, from the repository path, you can run uv run pycalib to install
the package.
To check the help section one can run uv run pycalib --help:
$ uv run pycalib
Usage: pycalib [-h] [--xlim XLIM] [--process] [--export-pdf] [--save-png] files [files ...]
Process output files from ACERTARA Water Tank.If --save-png or --export-pdf are off, then a python figure will pop
up.Otherwise, an specific .png or .pdf file will be save at the same locationof the parent file.
Positional Arguments:
files File(s) or glob pattern to process
Options:
-h, --help show this help message and exit
--xlim XLIM Change the x-axis limits. Default is `None`, another option is `auto`. (For raster .rst and x-axis
.xcn have no effect)
--process process the Raster file (.rst), default is ``False``.
--export-pdf Export all the plots as PDF file.
--save-png Export independent plots as .png files.If working as developer on the project to create and implement new functions for your own work, then 3 different jupyter notebooks are provided to see how this packages was intended to be use.
-
Tutorial_pycalib.ipynb: This jupyter notebook contains quick examples of how to read and plot the different output file formats. -
FocalSpot_Calib_SonoGen23032025.ipynb: This jupyter notebook contains an example of a calibration of a focal spot. It is the first implementation of acquisition of a focal spot from a stack of rasterscan that could or not be modulated in depth with a zscan. -
Stimulation_Calib_SonoGen23032025.ipynb: This jupyter notebook contains an example of a calibration of waveforms and stimulation (long time acquisition waveforms from the oscilloscope outputfile). It is the first implementation of acquisition and analysis of an stimulation signal of 40ms (10M samplepoints) acquired from the oscilloscope and its coupling of the waveform acquired with the Acertara software of just the first 50us.
To run these jupyter notebooks, the .venv environment of the project must be used as kernel. To do so, from the repository path, you can run.
uv run -m ipykernel install --user --name=.venv --display-name "PyCalib (.venv)"
This will create a jupyter kernel named 'PyCalib (.venv)', that one can then select as kernel on the notebook.
- Esteban Rivera deyver818@gmail.com