#print("local_path") # Check whether the image is not present if fs.is_file(local_path): log.warning( "The '" + name + "' remotely cached image is still present locally. Keeping this file and throwing the remote file away." ) continue else: # Infomr log.info("Downloading the '" + name + "' file to [" + origin_path + "] ...") # Download remote.download_file_to(path, origin_path, remove=True) # Success log.success("Succesfully retrieved the '" + name + "' image ...") # Inform the user log.info("Clearing the remote data structure ...") # Clear the entire data structure now remote.clear_directory(remote_data_path) # ----------------------------------------------------------------- # Get the image paths paths, error_paths = get_data_image_and_error_paths(modeling_path)
if np.isclose(factor, config.factor, rtol=0.01): the_image_path = image_path break # Check if the_image_path is None: raise ValueError("Could not find the truncated " + filter_name + " image with a truncation factor of " + str(config.factor)) # ----------------------------------------------------------------- # Download the image to a temporary path filename = time.unique_name("truncated_" + filter_name + "_" + str(config.factor)) filepath = remote.download_file_to(the_image_path, pts_temp_dir, new_name=filename) # ----------------------------------------------------------------- # Open the image frame = Frame.from_file(filepath) # ----------------------------------------------------------------- # Plot the truncated image plotting.plot_box(frame) # -----------------------------------------------------------------