From af768ca8c22624bcfcd2a4a0248985f64b468d2b Mon Sep 17 00:00:00 2001 From: Olivier Burggraaff Date: Tue, 14 Dec 2021 17:38:26 +0100 Subject: [PATCH 1/2] Remove all ascii letters and _; this also removes units --- spectacle/io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spectacle/io.py b/spectacle/io.py index 05c099f..2bf0340 100644 --- a/spectacle/io.py +++ b/spectacle/io.py @@ -2,6 +2,7 @@ import exifread import numpy as np import os +from string import ascii_letters from pathlib import Path from matplotlib import pyplot as plt from .camera import load_camera, find_root_folder, load_json, write_json @@ -196,7 +197,7 @@ def split_exposure_time(path): For a filename `x.z`, the returned value is `float(x)`. For a filename `x_y.z`, the returned value is `float(x/y)`. """ - without_letters = path.stem.strip("t_jmeansd") # strip underscores, leading t, trailing "mean"/"stds" + without_letters = path.stem.strip(ascii_letters+"_") # strip underscores, leading t, trailing "mean"/"stds" if "_" in without_letters: numerator, denominator = without_letters.split("_") time = float(numerator)/float(denominator) From 79427fbf2d035ee56470c980c3678c73ebcb3f80 Mon Sep 17 00:00:00 2001 From: Olivier Burggraaff Date: Tue, 14 Dec 2021 17:40:12 +0100 Subject: [PATCH 2/2] Version 3.1.1 - Minor improvements to linearity characterisation --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 837b79f..7744687 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pyspectacle -version = 3.1.0 +version = 3.1.1 author = Olivier Burggraaff author_email = burggraaff@strw.leidenuniv.nl description = SPECTACLE camera calibration module