From d0c0b3874c0148b5bf483985e1c746a5747ede7c Mon Sep 17 00:00:00 2001 From: Peter Steinbach <steinbach@scionics.de> Date: Thu, 28 May 2015 14:24:07 +0200 Subject: [PATCH] limited padding to start at 2 --- spim_registration/timelapse/timelaps_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spim_registration/timelapse/timelaps_utils.py b/spim_registration/timelapse/timelaps_utils.py index 353bd09..6a2bebe 100644 --- a/spim_registration/timelapse/timelaps_utils.py +++ b/spim_registration/timelapse/timelaps_utils.py @@ -25,4 +25,9 @@ def produce_string(_fstring, *args, **kwargs): return _fstring.format(**contents) def padding_of_file_id(_n_timepoints): - return math.ceil(math.log10(_n_timepoints)) + value = math.ceil(math.log10(_n_timepoints)) + + if value < 2: + return 2 + else: + return value -- GitLab