Fix the failing tests

This commit is contained in:
Abe Levitan committed 2022-04-18 17:18:20 -07:00
1 parent f3cee949e0
commit 101e969eda
7 files changed
+35 -26

No files matched your search

+2 -1
View File
@@ -546,7 +546,8 @@ def calc_frc(im1, im2, basis, im_slice=None, nbins=None, snr=1., limit='side'):
weights=F2.detach().cpu().numpy())
n_pix, bins = np.histogram(Rs, bins=nbins, range=frc_range)
n_pix = n_pix / 4 # This is for an apodized image, apodized with a hann window
#n_pix = n_pix / 4 # This is for an apodized image, apodized with a hann window
frc = np.abs(numerator) / np.sqrt(denominator_F1*denominator_F2)
+4 -1
View File
@@ -63,7 +63,9 @@ def get_entry_info(cxi_file):
metadata_attrs = ['title',
'experiment_identifier',
'experiment_description',
'program_name']
'program_name',
'start_time',
'end_time']
metadata = {attr: str(e1[attr][()].decode()) for attr in metadata_attrs
if attr in e1}
@@ -481,6 +483,7 @@ def add_entry_info(cxi_file, metadata):
cxi_file['entry_1'].create_dataset(key, data=asnumpy)
def add_sample_info(cxi_file, metadata):
"""Adds a dictionary of entry metadata to the entry_1/sample_1 group of a cxi file object
+1 -1
View File
@@ -627,7 +627,7 @@ def RPI_interaction(probe, obj):
# Again, just an inverse FFT but with an fftshift
upsampled_obj = propagators.inverse_far_field(fftobj)
if obj.dim() == 3:
if obj.dim() >= 3:
return probe[None,...] * upsampled_obj
else:
return probe * upsampled_obj