Checkpoint

This commit is contained in:
Emanuele Bezzi
2021-12-06 14:57:10 -05:00
parent b1ff638879
commit b048bbfd0c
4 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -420,7 +420,7 @@ def spatial_image_get(request, data_adaptor):
return abort_and_log(HTTPStatus.BAD_REQUEST, f"spatial information does not contain requested resolution '{resolution}'")
response_image = io.BytesIO()
img = np.flipud(spatial[library_id]["images"][resolution])
img = spatial[library_id]["images"][resolution]
matplotlib.pyplot.imsave(response_image, img)
response_image.seek(0)
+4 -1
View File
@@ -363,7 +363,10 @@ class DataAdaptor(metaclass=ABCMeta):
print(f"scale {scale}, translate {translate}")
normalized_layout = normalized_layout.astype(dtype=np.float32)
A = embedding * 0.17011142
A = np.column_stack([A[:, 0] / 1921, A[:, 1] / 2000])
normalized_layout = A.astype(dtype=np.float32)
return normalized_layout
def layout_to_fbs_matrix(self, fields):