@@ -140,7 +140,7 @@ def img_convert(credlog, tiff_path=None, pets_path='PETS', mrc_path='RED', smv_p
140
140
print ('# TVIPS header' )
141
141
print (f'Camera: { camera } ' )
142
142
print (f'Acquisition time: { acquisition_time :.3f} s' )
143
- print (f'Exposure time: { exposure_time / 1000 :.3f} s' )
143
+ print (f'Exposure time: { exposure_time / 1000 :.3f} s' )
144
144
print (f'Overhead time: { overhead :.3f} s' )
145
145
print (f'Binning (X/Y): { binning_x } { binning_y } px/bin' )
146
146
print (f'Image resolution (X/Y): { image_res_x_tvips } { image_res_y_tvips } pixels' )
@@ -150,15 +150,15 @@ def img_convert(credlog, tiff_path=None, pets_path='PETS', mrc_path='RED', smv_p
150
150
print (
151
151
f'Physical pixelsize (X/Y): { physical_pixelsize_x_tvips } { physical_pixelsize_y_tvips } μm'
152
152
)
153
- print (f'High tension: { high_tension / 1000 } kV' )
153
+ print (f'High tension: { high_tension / 1000 } kV' )
154
154
print (f'Wavelength: { wavelength_tvips } Ångstrom' )
155
155
print (f'Camera length: { camera_length_tvips } mm' )
156
156
157
157
# implement this later if it turns out to be necessary
158
158
assert pixelsize_x_tvips == pixelsize_y_tvips , 'Pixelsize is different in X / Y direction'
159
- assert (
160
- physical_pixelsize_x_tvips == physical_pixelsize_y_tvips
161
- ), 'Physical pixelsize is different in X / Y direction'
159
+ assert physical_pixelsize_x_tvips == physical_pixelsize_y_tvips , (
160
+ 'Physical pixelsize is different in X / Y direction'
161
+ )
162
162
163
163
buffer = []
164
164
@@ -176,9 +176,9 @@ def img_convert(credlog, tiff_path=None, pets_path='PETS', mrc_path='RED', smv_p
176
176
if img .min () >= 0 and img .max () < 2 ** 16 :
177
177
img = img .astype (np .uint16 )
178
178
179
- assert (
180
- img . dtype . type is np .uint16
181
- ), f'Image (# { i } : { fn . stem } ) dtype is { img . dtype } (must be np.uint16)'
179
+ assert img . dtype . type is np . uint16 , (
180
+ f'Image (# { i } : { fn . stem } ) dtype is { img . dtype } (must be np.uint16)'
181
+ )
182
182
183
183
h = {'ImageGetTime' : timestamp , 'ImageExposureTime' : exposure_time }
184
184
0 commit comments