Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
burggraaff committed Dec 14, 2021
2 parents a0c9073 + 79427fb commit 99ff031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyspectacle
version = 3.1.0
version = 3.1.1
author = Olivier Burggraaff
author_email = [email protected]
description = SPECTACLE camera calibration module
Expand Down
3 changes: 2 additions & 1 deletion spectacle/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 99ff031

Please sign in to comment.