Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions exptool/analysis/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ def __init__(self,**kwargs):
try:
# check to see if bar file has already been created
self.read_bar(kwargs['file'])
print('pattern.BarDetermine: BarInstance sucessfully read.')
print('pattern.BarDetermine: BarInstance successfully read.')

except:
except (FileNotFoundError, IOError, ValueError):
print('pattern.BarDetermine: no compatible bar file found.')


Expand Down Expand Up @@ -559,7 +559,7 @@ def read_bar(self,infile):
pos.append(q[1])
try:
deriv.append(q[2])
except:
except IndexError:
pass

self.time = np.array(time)
Expand Down Expand Up @@ -659,7 +659,7 @@ def find_barpattern(intime, BarInstance, smth_order=2):
# Get the derivative (bar pattern speed) at the closest time
barpattern[indx] = BarInstance.deriv[best_time]

except:
except TypeError:
# Handle the case where intime is a single value
best_time = abs(intime - BarInstance.time).argmin()

Expand Down