Skip to content

Commit

Permalink
Correct time assignment when not useFileTime
Browse files Browse the repository at this point in the history
  • Loading branch information
snail123815 committed Jun 29, 2022
1 parent bc90be6 commit 637565b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions funcs/measureImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def getTime(f):
else:
times = [getTime(f) for f in filePaths[:2]]
firstInterval = times[1] - times[0]
if firstInterval < 300:
if firstInterval < 3:
useFileTime = False

# Measurement: produce an array of times and an array of measured values
Expand All @@ -92,7 +92,8 @@ def getTime(f):
time = getTime(filePath)/3600 # convert to hours
else:
file = os.path.split(filePath)[1]
n = int(re.findall(r'[0-9]+', file)[-1])
fileBaseName = '_'.join(file.split('_')[:-1])
n = int(re.findall(r'[0-9]+', fileBaseName)[-1])
time = n * fileNumberTimeInterval
im = imread(filePath, as_gray=True)
if measureType == 'centreDisk':
Expand Down

0 comments on commit 637565b

Please sign in to comment.