From d5463951cf306ea66b3a15e50581f32bb3d25d81 Mon Sep 17 00:00:00 2001 From: "Michael Pilosov, PhD" Date: Fri, 23 Feb 2024 16:44:54 +0000 Subject: [PATCH] update compositing for redone images --- scripts/vips_composite.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/vips_composite.py b/scripts/vips_composite.py index 0aab6f8..71e8963 100644 --- a/scripts/vips_composite.py +++ b/scripts/vips_composite.py @@ -55,13 +55,19 @@ def create_grid_composite( # Save the composite image composite.write_to_file(output_file) x = pyvips.Image.thumbnail(output_file, 1080 * 4) - x.write_to_file("out_sm.png") + x.write_to_file(output_file.replace(".png", "_pre.png")) print(output_file) if __name__ == "__main__": # Example usage - directory = "/teamspace/studios/this_studio/out_sortcolors/umap/" # Change to your directory path + # experiment = "umap" + experiment = "supervised" + # directory = "/teamspace/studios/this_studio/out_sortcolors/{experiment}/" # Change to your directory path + directory = f"/teamspace/studios/this_studio/colors/colors-refactor-{experiment}/" # Change to your directory path k = 10 - spacing_inches = 1.5 - create_grid_composite(directory, k, spacing_inches) + spacing_inches = 2 + sp_str = str(spacing_inches).replace(".", "-") + # savefile = f"/teamspace/studios/this_studio/composites/{experiment}-{sp_str}.png" + savefile = f"/teamspace/studios/this_studio/composites/{experiment}-{sp_str}.png" + create_grid_composite(directory, k, spacing_inches, output_file=savefile)