Skip to content

Commit

Permalink
now works for different grid sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
akdel committed Mar 5, 2021
1 parent 3f12e44 commit f0e86a5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/construct_grid_image
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ class Parameters:
def save_clusters(image_data: mapi.ImageDataCollection, parameters: Parameters):
images: ty.List[mapi.ImageData] = list()
for image in image_data.images:
if image.instrument_metadata.thumbnail != "T":
if not image.instrument_metadata.thumbnail:
if (parameters.sol is None
and parameters.camera is None):
images.append(image)
elif (
parameters.sol is None
and image.camera_type.instrument == parameters.camera
parameters.sol is None
and image.camera_type.instrument == parameters.camera
):
images.append(image)
elif (
parameters.camera is None
and image.sol == parameters.sol
parameters.camera is None
and image.sol == parameters.sol
):
images.append(image)
image_clusters = imp.get_image_clusters(images, cluster_length=parameters.grid_size)
Expand Down Expand Up @@ -60,7 +60,7 @@ def main_gui():
pg.Print("Loading data from internets..")
image_data: mapi.ImageDataCollection = mapi.ImageDataCollection.fetch_all_mars2020_imagedata()
sols = ["all"] + list({x.sol for x in image_data.images})
grid_size = [str(x**2) for x in range(1, 5)]
grid_size = [str(x ** 2) for x in range(1, 5)]
cameras = ["all"] + list({x.camera_type.instrument for x in image_data.images})
params = Parameters()
layers = [[pg.Text("Choose output folder"), pg.FolderBrowse(button_text="Browse", key="output_path")],
Expand Down

0 comments on commit f0e86a5

Please sign in to comment.