From 943ffdc24d743c4abe78f66923cfa4df37e977ab Mon Sep 17 00:00:00 2001 From: Eva Schiffer <evas@ssec.wisc.edu> Date: Thu, 7 Oct 2021 13:25:00 -0500 Subject: [PATCH] removing need for small version of images in reports --- pyglance/glance/compare.py | 3 --- pyglance/glance/lonlat_util.py | 8 ++++---- pyglance/glance/plot.py | 2 +- pyglance/glance/report-main.txt | 4 ++-- pyglance/glance/report-variable.txt | 6 +++--- pyglance/glance/report.py | 2 -- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/pyglance/glance/compare.py b/pyglance/glance/compare.py index 3fbdeb0..64c58e8 100644 --- a/pyglance/glance/compare.py +++ b/pyglance/glance/compare.py @@ -431,7 +431,6 @@ def reportGen_raw_data_simple_call (aData, bData, variableDisplayName, epsilon, missingValue, lonLatDataDict=None, - makeSmall=True, doFork=False, shouldClearMemoryWithThreads=useThreads, shouldUseSharedRangeForOriginal=True) @@ -682,7 +681,6 @@ def inspect_library_call (a_path, var_list=None, dataRanges = varRunInfo[DISPLAY_RANGES_KEY] if DISPLAY_RANGES_KEY in varRunInfo else None, dataRangeNames = varRunInfo[DISPLAY_RANGE_NAMES_KEY] if DISPLAY_RANGE_NAMES_KEY in varRunInfo else None, dataColors = varRunInfo[DISPLAY_RANGE_COLORS_KEY] if DISPLAY_RANGE_COLORS_KEY in varRunInfo else None, - makeSmall=True, doFork=runInfo[DO_MAKE_FORKS_KEY], shouldClearMemoryWithThreads=runInfo[DO_CLEAR_MEM_THREADED_KEY], shouldUseSharedRangeForOriginal=runInfo[USE_SHARED_ORIG_RANGE_KEY], @@ -1042,7 +1040,6 @@ def reportGen_library_call (a_path, b_path, var_list=None, dataRanges = varRunInfo[DISPLAY_RANGES_KEY] if DISPLAY_RANGES_KEY in varRunInfo else None, dataRangeNames = varRunInfo[DISPLAY_RANGE_NAMES_KEY] if DISPLAY_RANGE_NAMES_KEY in varRunInfo else None, dataColors = varRunInfo[DISPLAY_RANGE_COLORS_KEY] if DISPLAY_RANGE_COLORS_KEY in varRunInfo else None, - makeSmall=True, doFork=runInfo[DO_MAKE_FORKS_KEY], shouldClearMemoryWithThreads=runInfo[DO_CLEAR_MEM_THREADED_KEY], shouldUseSharedRangeForOriginal=runInfo[USE_SHARED_ORIG_RANGE_KEY], diff --git a/pyglance/glance/lonlat_util.py b/pyglance/glance/lonlat_util.py index 8014249..40b9dab 100644 --- a/pyglance/glance/lonlat_util.py +++ b/pyglance/glance/lonlat_util.py @@ -62,7 +62,7 @@ def check_lon_lat_equality(longitudeADataObject, latitudeADataObject, "A", "Lon./Lat. Points Mismatched between A and B\n" + "(Shown in A)", "LonLatMismatch", - outputPath, True, + outputPath, fullDPI=fullDPI, thumbDPI=thumbDPI, units="degrees") if ((len(longitudeBDataObject.data[~longitudeBDataObject.masks.ignore_mask]) > 0) and @@ -72,7 +72,7 @@ def check_lon_lat_equality(longitudeADataObject, latitudeADataObject, "B", "Lon./Lat. Points Mismatched between A and B\n" + "(Shown in B)", "LonLatMismatch", - outputPath, True, + outputPath, fullDPI=fullDPI, thumbDPI=thumbDPI, units="degrees") # setup our return data @@ -130,7 +130,7 @@ def compare_spatial_invalidity(longitude_a_object, longitude_b_object, valid_only_in_mask_a, "A", "Points only valid in\nFile A\'s longitude & latitude", "SpatialMismatch", - output_path, True, + output_path, fullDPI=fullDPI, thumbDPI=thumbDPI, units="degrees") if ((spatial_info[B_FILE_TITLE_KEY][NUMBER_INVALID_PTS_KEY] > 0) and (do_include_images) and (len(longitude_b_object.data[~invalid_in_b_mask]) > 0) and @@ -140,7 +140,7 @@ def compare_spatial_invalidity(longitude_a_object, longitude_b_object, valid_only_in_mask_b, "B", "Points only valid in\nFile B\'s longitude & latitude", "SpatialMismatch", - output_path, True, + output_path, fullDPI=fullDPI, thumbDPI=thumbDPI, units="degrees") return invalid_in_common_mask, spatial_info, longitude_common, latitude_common diff --git a/pyglance/glance/plot.py b/pyglance/glance/plot.py index d4bdec5..40bba5e 100644 --- a/pyglance/glance/plot.py +++ b/pyglance/glance/plot.py @@ -81,7 +81,7 @@ def _handle_fig_creation_task(child_figure_function, log_message, def _log_spawn_and_wait_if_needed (imageDescription, childPids, taskFunction, taskOutputPath, taskFigName, - doMakeThumb=True, doFork=False, shouldClearMemoryWithThreads=False, + doMakeThumb=False, doFork=False, shouldClearMemoryWithThreads=False, fullDPI=fullSizeDPI, thumbDPI=thumbSizeDPI) : """ create a figure generation task, spawning a process as needed diff --git a/pyglance/glance/report-main.txt b/pyglance/glance/report-main.txt index f7e2c9a..a72b7dc 100644 --- a/pyglance/glance/report-main.txt +++ b/pyglance/glance/report-main.txt @@ -26,7 +26,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved. %> <p> % if runInfo[constants.DO_MAKE_IMAGES_KEY] : - <a href="./SpatialMismatch.A.png"><img src="./SpatialMismatch.A.small.png"></a><br> + <a href="./SpatialMismatch.A.png"><img src="./SpatialMismatch.A.png" width="350"></a><br> % endif File A has ${fileAInfo[constants.NUMBER_INVALID_PTS_KEY]} valid data points not present in File B.<br> File A has a total of ${report.make_formatted_display_string(fileAInfo[constants.PERCENT_INVALID_PTS_KEY])}% invalid longitude/latitude data. <br> @@ -39,7 +39,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved. %> <p> % if runInfo[constants.DO_MAKE_IMAGES_KEY] : - <a href="./SpatialMismatch.B.png"><img src="./SpatialMismatch.B.small.png"></a><br> + <a href="./SpatialMismatch.B.png"><img src="./SpatialMismatch.B.png" width="350"></a><br> % endif File B has ${fileBInfo[constants.NUMBER_INVALID_PTS_KEY]} valid data points not present in File A.<br> File B has a total of ${report.make_formatted_display_string(fileBInfo[constants.PERCENT_INVALID_PTS_KEY])}% longitude/latitude invalid data. <br> diff --git a/pyglance/glance/report-variable.txt b/pyglance/glance/report-variable.txt index e71ee0c..0f56145 100644 --- a/pyglance/glance/report-variable.txt +++ b/pyglance/glance/report-variable.txt @@ -61,7 +61,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved. <h3>Original Data</h3> <p> % for image in sorted(imageNames[constants.ORIGINAL_IMAGES_KEY]): - <a href="./${image}"><img src="small.${image}"></a> + <a href="./${image}"><img src="${image}" width="350"></a> % endfor </p> % endif @@ -169,7 +169,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved. <hr> <% inSubSet = False %> % endif - <a href="./${image}"><img src="./small.${image}"></a> + <a href="./${image}"><img src="./${image}" width="350"></a> ## if we have a subset of images, separate it from the rest % elif (type(image) is list) : @@ -177,7 +177,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved. <hr> <blockquote> % for subImage in image : - <a href="./${subImage}"><img src="./small.${subImage}"></a> + <a href="./${subImage}"><img src="./${subImage}" width="350"></a> % endfor </blockquote> % endif diff --git a/pyglance/glance/report.py b/pyglance/glance/report.py index 244830c..d3cea10 100644 --- a/pyglance/glance/report.py +++ b/pyglance/glance/report.py @@ -434,8 +434,6 @@ def generate_and_save_variable_report(files, ORIGINAL_IMAGES_KEY : [list, of, file-names, of, original, images], COMPARED_IMAGES_KEY : [list, of, file-names, of, compared, images] } - note: the assumption will be made that smaller versions of these images exist - in the form small.filename any of the first level of keys in spatial are optional, although it is assumed that if you include an entry for A_FILE_TITLE_KEY or -- GitLab