Skip to content
Snippets Groups Projects
Commit 8abef62d authored by Luise Odenthal's avatar Luise Odenthal
Browse files

stuff from todo list

parent 31d2f3cf
No related branches found
No related tags found
No related merge requests found
......@@ -149,8 +149,9 @@ It creates three sql table on initialisation.
self.db_cursor = self.db.cursor()
for tablename, _ in self.tablecolumns.items():
if not self.table_exist(tablename):
raise Exception('{} does not contain a table named {}'.format(
filename, tablename))
raise Exception('{} does not contain\
a table named {}'.format(
filename, tablename))
elif self.create():
# Create database
self.db = sqlite3.connect(
......@@ -365,8 +366,9 @@ database
if not len(image.shape) == 3:
raise Exception('image should be 3D array')
if not image.shape[2] == len(self.channels):
raise Exception('image does not have the required number of channels {}'.format(
len(self.channels)))
raise Exception('image does not have the\
required number of channels {}'.format(
len(self.channels)))
if not isinstance(cmaxminrange, pd.Series):
raise TypeError('cmaxminrange should be a pandas Series')
denormed_im = np.zeros(image.shape, dtype=np.float)
......@@ -382,7 +384,8 @@ database
cimage += cmin
denormed_im[:, :, chan_i] = cimage
if not np.max(cimage) == cmax:
raise Exception('denormalisation failed {}!={}'.format(np.max(cimage), cmax))
raise Exception('denormalisation failed\
{}!={}'.format(np.max(cimage), cmax))
return denormed_im
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment