From 1b93a852535596b4ff2a9ad98debbded89abb8ef Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 2 Apr 2026 11:36:19 -0700 Subject: [PATCH 1/2] add sample py script --- .../phys180e/sample_phys180e_axial_bdot.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/notebooks/phys180e/sample_phys180e_axial_bdot.py diff --git a/docs/notebooks/phys180e/sample_phys180e_axial_bdot.py b/docs/notebooks/phys180e/sample_phys180e_axial_bdot.py new file mode 100644 index 00000000..279b4ae8 --- /dev/null +++ b/docs/notebooks/phys180e/sample_phys180e_axial_bdot.py @@ -0,0 +1,35 @@ +import numpy as np +from pathlib import Path + +from bapsflib import phys180E + +# set the baord and channel you want +BOARD = 0 +CHANNEL = 1 + +# define the relative path to your HDF5 file +_HERE = Path.cwd() +_FILENAME = "sample_phys180e_axial_bdot.hdf5" +_FILE = (_HERE / _FILENAME).resolve() + +# open your HDF5 file +f = phys180E.File(_FILE) + +# read out your data +# - data be a numpy array three fields +# data["shotnum"] -> your shot number array +# data["signal"] -> your digitized signal array +# data["xyz"] -> your probe position array +data = f.read_data( + BOARD, + CHANNEL, + add_controls=["180E_positions"], + silent=True, +) +time = f.get_time_array(data) + +# do you analysis and plotting +... + +# close the HDF5 file +f.close() From 34e32b877e0be8e680ac04e920a9c492bd46379f Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 2 Apr 2026 11:43:51 -0700 Subject: [PATCH 2/2] appease grumpy black --- docs/notebooks/phys180e/sample_phys180e_axial_bdot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/notebooks/phys180e/sample_phys180e_axial_bdot.py b/docs/notebooks/phys180e/sample_phys180e_axial_bdot.py index 279b4ae8..ff0c97e8 100644 --- a/docs/notebooks/phys180e/sample_phys180e_axial_bdot.py +++ b/docs/notebooks/phys180e/sample_phys180e_axial_bdot.py @@ -1,4 +1,5 @@ import numpy as np + from pathlib import Path from bapsflib import phys180E