diff --git a/example/scene_reconstruction/example_scene_reconstruction_README.md b/example/scene_reconstruction/example_scene_reconstruction_README.md index 905bdee8b..bf4af3b02 100644 --- a/example/scene_reconstruction/example_scene_reconstruction_README.md +++ b/example/scene_reconstruction/example_scene_reconstruction_README.md @@ -32,19 +32,12 @@ To run this on the published OpenCSP full-size example input: --> SceneReconstruction --> SceneReconstructionData_v1.1.zip - 2. Unzip and place the enclosed directory within the directory: + 2. Unzip and place the enclosed "scene_reconstruction" directory within the + "OpenCSP_example" directory, producing: - C:\ctemp\OpenCSP_example_data\enclosed_energy\ + C:\ctemp\OpenCSP_example_data\scene_reconstruction\ - 3. This will produce a directory structure: - - C:\ctemp\OpenCSP_example_data\enclosed_energy\EnclosedEnergyData_v1.1\ - - 4. Then rename "EnclosedEnergyData_v1.1" to "input", producing: - - C:\ctemp\OpenCSP_example_data\enclosed_energy\input\ - - 5. After this, the "example_scene_reconstruction.py" script should run without modification, + 3. After this, the "example_scene_reconstruction.py" script should run without modification, by executing the following: 5.1. Start a powershell. 5.2. Ensure the OpenCSP virtual environment is activated. diff --git a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini similarity index 72% rename from example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini rename to example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini index 33184d29f..2efddeb80 100644 --- a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +++ b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini @@ -9,75 +9,75 @@ # # To use this file, copy it to a new filename and update the values below to point at your data source. # Original file: -# /example/sofast_fringe/example_process_single_facet_Q.ini +# /example/sofast_fringe/example_process_single_facet_ctemp.ini # # To run the standard example using the values within this file, create a directory heirarchy: # # Directory containing mirror measurement results -# Q:\Mirrors\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\ # # Results for Sandia Tower Heliostat Facets -# Q:\Mirrors\SNLTF\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\ # # Results for Sandia Tower Heliostat Facet "A" -# Q:\Mirrors\SNLTF\SNLTF-A\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\SNLTF-A\ # # Measurement of facet "A" with the Optics Lab SOFAST Landscape setup, measuring in fringe mode, square image projection, white screen -# Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\ # # Directory containing SOFAST calibration files, constant and applicable to all measurement modes. -# Q:\Instruments\OLSL_OpticsLabSofastLandscape\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\ # Contains: # camera_sofast_optics_lab_landscape_2025_02.h5 # Camera lens calibration # spatial_orientation_optics_lab_landscape.h5 # Relative positions of camera and screen # # Directory containing SOFAST calibration files, constant and used by the fringe measurement mode, square projection, white screen. -# Q:\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\ # Contains: # display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 # Screen 3-d shape (waves, ripples,...) # # Directory containing files defining the mirror to measure. -# Q:\Mirrors\SNLTF\0_Common\Facet_NSTTF.json +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\0_Common\Facet_NSTTF.json # Contains: # Facet_NSTTF.json # Facet design (x,y,z) corners, centroid # # Files resulting from a specific measurement at a specific time. -# Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\ # Contains: # A_Collect\ # Data collection results # B_Post_p001_default\ # Post-processing results, assumption set #1 -# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini # Control file for producing B_Post_p001_default\ # Note that "p001_default" is the post_process_id linking the control file and results. # ... # # # Files resulting from a specific measurement at a specific time. -# Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\ # Contains: # A1_intensity_response\ # Results of light-response check # A2_collection_result\ # Results of fringe data capture # # Files resulting from a specific measurement at a specific time. -# Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A1_intensity_response\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A1_intensity_response\ # Contains: # image_calibration_scaling_20250818_163358.h5 # Projector-to-camera response curve # # Files resulting from a specific measurement at a specific time. -# Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A2_collection_result\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A2_collection_result\ # Contains: # 20250818_163443_measurement_fringe.h5 # Captured fringe images, plus distance-to-mirror, etc. # 20250818_163443_slope_magnitude_fringe_xy.png # (optional) Slope magnitude plot quickly generated at data capture time. # # Directory containing measurement postprocessing results -# Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post_p001_default\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\B_Post_p001_default\ # Contains: -# This file "20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini" +# This file "20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini" # # # Then navigate to the directory containing the file "example_process_single_facet,py" and execute: # -# python example_process_single_facet.py --verbose -s Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post_p001_default\20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +# python example_process_single_facet.py --verbose -s C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\B_Post_p001_default\20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini # # # You can modify the parameters to accomplish different purposes. For example, suppose you want a version @@ -87,10 +87,10 @@ # 1. Create a new postprocess id, for example "p002_fast". # # 2. Create a new directory for the postprocessing results -# Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post_p002_fast\ +# C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\B_Post_p002_fast\ # # 3. Copy this file into the new directory, with a new name: -# 20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_Q.ini +# 20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_ctemp.ini # Note it contains the new "p002_fast" postprocess id. # # 4. Edit the new file: @@ -105,7 +105,7 @@ # # 6. Execute, pointing to the new .ini file: # -# python example_process_single_facet.py --verbose -s Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post_p002_fast\20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_Q.ini +# python example_process_single_facet.py --verbose -s C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_ctemp.ini # # You can use a similar approach to develop post-processing commands for producing higher resolution # slope maps, ray-tracing from different light source positions, different ray-tracing resolution, etc. @@ -121,20 +121,20 @@ verbose = True # Strings to denote this computation. Must be contiguous, with no space, tabs or line feeds. -measurement_id = 20250818_163443_SLTF-A_OLSLrsqw +measurement_id = 20250818_163443_SNLTF-A_OLSLrsqw post_process_id = p001_default # Input -file_camera = Q:\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 -file_orientation = Q:\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 -file_display = Q:\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 -file_facet = Q:\Mirrors\SNLTF\0_Common\Facet_NSTTF.json -file_calibration = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 -file_measurement = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 +file_camera = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 +file_orientation = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 +file_display = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 +file_facet = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\0_Common\Facet_NSTTF.json +file_calibration = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 +file_measurement = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 # Directory to write output files. # (The post_process_id below will be added as a suffix.) -dir_save_root = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post +dir_save_root = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\output\Results\OLSL\20250818_163443\B_Post # Analysis control parameters # Distance values are meters. diff --git a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_Q.ini b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_ctemp.ini similarity index 78% rename from example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_Q.ini rename to example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_ctemp.ini index c50f9d16e..62e1aaf01 100644 --- a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_Q.ini +++ b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_ctemp.ini @@ -5,7 +5,7 @@ # and under multiple settings of analysis parameters and output control. # # For detailed instructions on the context, see the default processing file: -# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini # # This version is modified to run more quickly by skipping ray tracing and some of the plots. # @@ -15,20 +15,20 @@ verbose = True # Strings to denote this computation. Must be contiguous, with no space, tabs or line feeds. -measurement_id = 20250818_163443_SLTF-A_OLSLrsqw +measurement_id = 20250818_163443_SNLTF-A_OLSLrsqw post_process_id = p002_fast # Input -file_camera = Q:\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 -file_orientation = Q:\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 -file_display = Q:\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 -file_facet = Q:\Mirrors\SNLTF\0_Common\Facet_NSTTF.json -file_calibration = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 -file_measurement = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 +file_camera = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 +file_orientation = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 +file_display = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 +file_facet = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\0_Common\Facet_NSTTF.json +file_calibration = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 +file_measurement = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 # Directory to write output files. # (The post_process_id below will be added as a suffix.) -dir_save_root = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post +dir_save_root = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\output\Results\OLSL\20250818_163443\B_Post # Analysis control parameters # Distance values are meters. diff --git a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p003_refx25m_refy25m_process_single_facet_settings_Q.ini b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p003_rx25m_ry25m_process_single_facet_settings_ctemp.ini similarity index 78% rename from example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p003_refx25m_refy25m_process_single_facet_settings_Q.ini rename to example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p003_rx25m_ry25m_process_single_facet_settings_ctemp.ini index d74c5716b..4bedb4014 100644 --- a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p003_refx25m_refy25m_process_single_facet_settings_Q.ini +++ b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p003_rx25m_ry25m_process_single_facet_settings_ctemp.ini @@ -5,7 +5,7 @@ # and under multiple settings of analysis parameters and output control. # # For detailed instructions on the context, see the default processing file: -# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini # # This version is modified to compare against a reference mirror with a 25 m focal length. # @@ -15,20 +15,20 @@ verbose = True # Strings to denote this computation. Must be contiguous, with no space, tabs or line feeds. -measurement_id = 20250818_163443_SLTF-A_OLSLrsqw -post_process_id = p003_refx25m_refy25m +measurement_id = 20250818_163443_SNLTF-A_OLSLrsqw +post_process_id = p003_rx25m_ry25m # Input -file_camera = Q:\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 -file_orientation = Q:\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 -file_display = Q:\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 -file_facet = Q:\Mirrors\SNLTF\0_Common\Facet_NSTTF.json -file_calibration = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 -file_measurement = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 +file_camera = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 +file_orientation = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 +file_display = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 +file_facet = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\0_Common\Facet_NSTTF.json +file_calibration = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 +file_measurement = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 # Directory to write output files. # (The post_process_id below will be added as a suffix.) -dir_save_root = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post +dir_save_root = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\output\Results\OLSL\20250818_163443\B_Post # Analysis control parameters # Distance values are meters. diff --git a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p004_ref_plano_process_single_facet_settings_Q.ini b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p004_rplano_process_single_facet_settings_ctemp.ini similarity index 78% rename from example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p004_ref_plano_process_single_facet_settings_Q.ini rename to example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p004_rplano_process_single_facet_settings_ctemp.ini index 51f089f46..88579a396 100644 --- a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p004_ref_plano_process_single_facet_settings_Q.ini +++ b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p004_rplano_process_single_facet_settings_ctemp.ini @@ -5,7 +5,7 @@ # and under multiple settings of analysis parameters and output control. # # For detailed instructions on the context, see the default processing file: -# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini # # This version is modified to compare against a plano reference mirror. # @@ -15,20 +15,20 @@ verbose = True # Strings to denote this computation. Must be contiguous, with no space, tabs or line feeds. -measurement_id = 20250818_163443_SLTF-A_OLSLrsqw -post_process_id = p004_ref_plano +measurement_id = 20250818_163443_SNLTF-A_OLSLrsqw +post_process_id = p004_rplano # Input -file_camera = Q:\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 -file_orientation = Q:\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 -file_display = Q:\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 -file_facet = Q:\Mirrors\SNLTF\0_Common\Facet_NSTTF.json -file_calibration = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 -file_measurement = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 +file_camera = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 +file_orientation = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 +file_display = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 +file_facet = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\0_Common\Facet_NSTTF.json +file_calibration = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 +file_measurement = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 # Directory to write output files. # (The post_process_id below will be added as a suffix.) -dir_save_root = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post +dir_save_root = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\output\Results\OLSL\20250818_163443\B_Post # Analysis control parameters # Distance values are meters. diff --git a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p005_refx100m_refy400m_process_single_facet_settings_Q.ini b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p005_rx100m_ry400m_process_single_facet_settings_ctemp.ini similarity index 77% rename from example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p005_refx100m_refy400m_process_single_facet_settings_Q.ini rename to example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p005_rx100m_ry400m_process_single_facet_settings_ctemp.ini index 63eb459c6..d304658a7 100644 --- a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p005_refx100m_refy400m_process_single_facet_settings_Q.ini +++ b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p005_rx100m_ry400m_process_single_facet_settings_ctemp.ini @@ -5,7 +5,7 @@ # and under multiple settings of analysis parameters and output control. # # For detailed instructions on the context, see the default processing file: -# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini # # This version is modified to compare against a reference mirror with a 25 m focal length. # @@ -15,20 +15,20 @@ verbose = True # Strings to denote this computation. Must be contiguous, with no space, tabs or line feeds. -measurement_id = 20250818_163443_SLTF-A_OLSLrsqw -post_process_id = p005_refx100m_refy400m +measurement_id = 20250818_163443_SNLTF-A_OLSLrsqw +post_process_id = p005_rx100m_ry400m # Input -file_camera = Q:\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 -file_orientation = Q:\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 -file_display = Q:\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 -file_facet = Q:\Mirrors\SNLTF\0_Common\Facet_NSTTF.json -file_calibration = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 -file_measurement = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 +file_camera = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 +file_orientation = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 +file_display = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 +file_facet = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\0_Common\Facet_NSTTF.json +file_calibration = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 +file_measurement = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 # Directory to write output files. # (The post_process_id below will be added as a suffix.) -dir_save_root = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post +dir_save_root = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\output\Results\OLSL\20250818_163443\B_Post # Analysis control parameters # Distance values are meters. diff --git a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p006_bilinear_process_single_facet_settings_Q.ini b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p006_bilinear_process_single_facet_settings_ctemp.ini similarity index 78% rename from example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p006_bilinear_process_single_facet_settings_Q.ini rename to example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p006_bilinear_process_single_facet_settings_ctemp.ini index be1235973..f36d7f666 100644 --- a/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p006_bilinear_process_single_facet_settings_Q.ini +++ b/example/sofast_fringe/single_facet/20250818_163443_SNLTF-A_OLSLrsqw_p006_bilinear_process_single_facet_settings_ctemp.ini @@ -5,7 +5,7 @@ # and under multiple settings of analysis parameters and output control. # # For detailed instructions on the context, see the default processing file: -# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini +# 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini # # This version is modified to bilinear interpolation of measured points in output plots. # @@ -16,20 +16,20 @@ verbose = True # Strings to denote this computation. Must be contiguous, with no space, tabs or line feeds. -measurement_id = 20250818_163443_SLTF-A_OLSLrsqw +measurement_id = 20250818_163443_SNLTF-A_OLSLrsqw post_process_id = p006_bilinear # Input -file_camera = Q:\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 -file_orientation = Q:\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 -file_display = Q:\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 -file_facet = Q:\Mirrors\SNLTF\0_Common\Facet_NSTTF.json -file_calibration = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 -file_measurement = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 +file_camera = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\camera_sofast_optics_lab_landscape_2025_02.h5 +file_orientation = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\spatial_orientation_optics_lab_landscape.h5 +file_display = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Instruments\OLSL_OpticsLabSofastLandscape\OLSLrsqw_OpticsLabSofastLandscapeFringeSquareWhite\display_shape_optics_lab_landscape_square_distorted_3d_100x100.h5 +file_facet = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Mirrors\SNLTF\0_Common\Facet_NSTTF.json +file_calibration = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A1_intensity_response\image_calibration_scaling_20250818_163358.h5 +file_measurement = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\A_Collect\A2_collection_result\20250818_163443_measurement_fringe.h5 # Directory to write output files. # (The post_process_id below will be added as a suffix.) -dir_save_root = Q:\Mirrors\SNLTF\SNLTF-A\20250818_163443_OLSLrsqw\B_Post +dir_save_root = C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\output\Results\OLSL\20250818_163443\B_Post # Analysis control parameters # Distance values are meters. diff --git a/example/sofast_fringe/single_facet/example_process_single_facet.py b/example/sofast_fringe/single_facet/example_process_single_facet.py index 15787fa9e..d4c97079e 100644 --- a/example/sofast_fringe/single_facet/example_process_single_facet.py +++ b/example/sofast_fringe/single_facet/example_process_single_facet.py @@ -18,11 +18,10 @@ This will perform the processing steps and save the results to the `data/output/single_facet` directory with the following subfolders: -1. **1_images_fringes_projected** - The patterns sent to the display during the SOFAST measurement of the optic. -2. **2_images_captured** - The captured images of the displayed patterns as seen by the SOFAST camera. -3. **3_processed_data** - The processed data from SOFAST. -4. **4_processed_output_figures** - The output figure suite from a SOFAST characterization. - + B1_projected_fringes - The patterns sent to the display during the SOFAST measurement of the optic. + B2_captured_fringes - The captured images of the displayed patterns as seen by the SOFAST camera. + B3_analysis - The processed data from SOFAST. + B4_plots - The output figure suite from a SOFAST characterization. """ @@ -151,7 +150,7 @@ def process_single_facet( # 4. Processes data with Sofast and save processed data to HDF5 # ============================================================= - dir_save_cur = join(dir_save, "B3_output_analysis") + dir_save_cur = join(dir_save, "B3_analysis") ft.create_directories_if_necessary(dir_save_cur) # Define surface definition (parabolic surface), this is the mirror @@ -195,7 +194,7 @@ def process_single_facet( # 5. Generate plot suite and save images files # ============================================ - dir_save_cur = join(dir_save, "B4_output_figures") + dir_save_cur = join(dir_save, "B4_plots") ft.create_directories_if_necessary(dir_save_cur) # Get measured and reference optics diff --git a/example/sofast_fringe/single_facet/example_process_single_facet_README.md b/example/sofast_fringe/single_facet/example_process_single_facet_README.md index 5899b8e62..d65f0689b 100644 --- a/example/sofast_fringe/single_facet/example_process_single_facet_README.md +++ b/example/sofast_fringe/single_facet/example_process_single_facet_README.md @@ -31,14 +31,51 @@ This runs the code on data that is built into the repository. To avoid bloating the repository, this input data has been downsampled to reduce its size. -Run on Other Data ------------------ +Run on Published OpenCSP Example Data +------------------------------------- The built-in data described above enables automatic testing to verify code execution, but the data is heavily downsampled and thus not representative of realistic output. Also the built-in input and output files are in obscure locations that don't correspond to how one would organize data when using SOFAST in practice. +OpenCSP provides full-size example data which can be used for both of these scenarios, +enabling you to learn how the code should run and what its output should look like. +This experience will give you familiarity with the process when you run the code on +your own measurement data. The full-size example data shows how to run this example, +generating realistic output. It also clarifies input vs. output files. + +To run this on the published OpenCSP full-size example input: + 1. Copy the released OpenCSP data from: + + https://opencsp.sandia.gov + --> How to Participate + --> Access OpenCSP + --> shared box.com link + --> OpenCSP_Data + --> OpenCSP_SampleData + --> SofastFringe + --> SingleFacet + --> SofastFringeSingleFacetData_v1.0.zip + + 2. Unzip and place the resulting enclosed "single_facet" directory within the + "sofast_fringe" directory, producing: + + C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\ + + 3. After this, the "example_process_single_facet.py" script should run without modification, + by executing the following: + 5.1. Start a powershell. + 5.2. Ensure the OpenCSP virtual environment is activated. + 5.3. Navigate to the directory containing example_process_single_facet.py. + 5.4. Execute the following command: + python example_process_single_facet.py --verbose -s C:\ctemp\OpenCSP_example_data\sofast_fringe\single_facet\input\Results\OLSL\20250818_163443\20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini + The script should write to an "output" subdirectory placed next to the input directory. + + +Run on Other Data +----------------- + The example_process_single_facet.py file provides a -s option that points to a settings control file. This text file is easy to edit, and enables you to point to your preferred location of input data, and also direct output to your preferred location. You can also @@ -54,30 +91,13 @@ To see example settings files, see: \example\sofast_fringe\single_facet\ There are several files there with a ".ini" extension, which execute the code in -different scenarios. These scenarios include information exploration on your local -computer, or more organized measurement campaigns either on your local computer -or in a network server environment. +different scenarios. These scenarios include default analysis, fast abbreviated +analysis, comparison again alternative baseline mirrors, etc. OpenCSP provides full-size example data which can be used for both of these scenarios, enabling you to learn how the code should run and what its output should look like. This experience will give you familiarity with the process when you run the code on -your own measurement data. Below we explain how to use these settings and example -data files for both informal exploration and a more structured measurement campaign. - - -Local Exploration ------------------ - -For an example settings file designed for exploration, see: - - - - dir: \example\sofast_fringe\single_facet\ - file: ????_Ctemp.ini - -Note this files has a "ctemp" suffix, indicating that they assume a local directory "C:\ctemp\" -which contains the test data published on OpenCSP. This enables you to execute exploratory runs -on your local computer, without any modifications to the script. +your own measurement data. Analyzing Data with an Archival Directory Scheme @@ -87,7 +107,7 @@ To run the single-facet SOFAST processing on a directory structure designed for and archival of results, see the file: dir: \example\sofast_fringe\single_facet\ - file: 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini + file: 20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini This file contains instructions explaining how to configure the directories and data files, and then how to execute the example_process_single_facet.py file on that scenario. @@ -96,61 +116,33 @@ For variations of the default scenario that run faster, against different refere see the variation files: dir: \example\sofast_fringe\single_facet\ - file: 20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_Q.ini - file: 20250818_163443_SNLTF-A_OLSLrsqw_p003_ref_25m_process_single_facet_settings_Q.ini - file: 20250818_163443_SNLTF-A_OLSLrsqw_p004_ref_plano_process_single_facet_settings_Q.ini + file: 20250818_163443_SNLTF-A_OLSLrsqw_p002_fast_process_single_facet_settings_ctemp.ini + file: 20250818_163443_SNLTF-A_OLSLrsqw_p003_ref_25m_process_single_facet_settings_ctemp.ini + file: 20250818_163443_SNLTF-A_OLSLrsqw_p004_ref_plano_process_single_facet_settings_ctemp.ini Note that these files each have a different "_p00x_xx_" substring, which is the "post_process_id" denoting a particular set of processing and output settings. This provides a means for running the code under different settings, and then comparing the results. -Also note that the files have a "Q" suffix, indicating that they assume a mapped drive "Q:". -This enables you to put the input and output data in your preferred location, map the Q: drive -letter to that location, and then execute the example script without modification. +Also note that the files have a "ctemp" suffix, indicating that they are designed to work with data placed in "C:\ctemp\OpenCSP_example_data\". See the OpenCSP data README file for further inrformation. Analyzing Your New Data ----------------------- - - - -We recommend copying this file and placing it alongside the data you wish to run. -For example, to run the full-size OpenCSP example:' - 1. Create a directory "C:\ctemp\OpenCSP_ctemp\example_data_large" for holding example data. - 2. Create subdirectory "process_single_facet" - 3. Create subsubdirectory "input", and fill it with the required input files: - "alignment_points.csv" - "camera.h5" - "known_point_locations.csv" - "point_pair_distances.csv" - Subdirectory "aruco_marker_images" containing images of scene with Aruco markers. - 4. Copy the file "example_process_single_facet_settings_ctemp.ini" into the subdirectory - "process_single_facet" made in step 2.' - 5. Launch a PowerShell and ensure the OpenCSP virtual environment is activated. - 6. cd to the directory containing the script "example_process_single_facet.py". - 7. Run the script, providing the -s option and pointing to the .ini file: - python example_process_single_facet.py --verbose -s "C:\ctemp\OpenCSP_ctemp\example_data_large\process_single_facet\example_process_single_facet_settings_ctemp.ini" - 8. The "--verbose" option generates additional status and calculation output. - 9. The output will be written to an "example_process_single_facet_output" subdirectory - created alongside the input directory. - (This is to distinguish it from output from other examples within the directory.) +The -s option and settings.ini file enable you to put input data in your preferred location, and +write output data to your preferred location, without the need to modify the script source code. +(Please avoid modifying the script for your individual problem.) For an example settings file designed for measuring and logging results over time, see: - \example\sofast_fringe\single_facet\20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_Q.ini - -To run this calculation on your own data: - A. Create a directory holding your input data. - B. Copy the "example_process_single_facet_settings_ctemp.ini" file to a new name, such as - "My_Data_process_single_facet_settings.ini" and edit it to point to your data location. - C. For the sake of example, suppose you place your data in "C:\ctemp\OpenCSP_ctemp\MyData", - and also suppose you place your new "My_Data_process_single_facet_settings.ini" file - in this directory. - Then you can run the same calculation on your data by: - a. cd to the directory containing the script "example_process_single_facet.py". - b. Run the script, providing the -s option and pointing to your .ini file: - python example_process_single_facet.py --verbose -s "C:\ctemp\OpenCSP_ctemp\MyData\My_Data_process_single_facet_settings_ctemp.ini" - D. The output will be written to the output subdirectory you specify in your .ini file.' + + \example\sofast_fringe\single_facet\20250818_163443_SNLTF-A_OLSLrsqw_p001_default_process_single_facet_settings_ctemp.ini + +If you replace "C:\ctemp\OpenCS_example_data\" with the path to your data, or a suitable mapped +drive letter, then you should be able to run the example_process_sigle_facet.py script to analyze +your data. Note that the configuration file includes various parametres for comntrolling the +analysis process, selecting desired output figures, setting ray tracing scenario parameters, etc. + For a detailed description of the algorithm and its input and output, see: B. J. Smith, R. C. Brost, and B. G. Bean. diff --git a/opencsp/common/lib/csp/StandardPlotOutput.py b/opencsp/common/lib/csp/StandardPlotOutput.py index e467ef02c..3c05f4559 100644 --- a/opencsp/common/lib/csp/StandardPlotOutput.py +++ b/opencsp/common/lib/csp/StandardPlotOutput.py @@ -43,20 +43,20 @@ class _OptionsSlopeVis: resolution: float = 0.01 """Plot x/y sample resolution (meters) (default 0.01)""" clim: float | tuple[float, float, float] = 5 - """Sets colorbar limits (mrad). Plot limits set to [-clim, clim] for x or y slope plots and [0, clim] for slope magnitude plots. - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + """Sets colorbar limits (mrad). Plot limits set to [-clim, clim] for x or y slope plots and [0, clim] for slope xy plots. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 5)""" quiver_density: float | tuple[float, float, float] = 0.1 """The density of the quiver arrows (meters). - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 0.1)""" quiver_scale: float | tuple[float, float, float] = 25 """The scale of the quiver arrows. - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 25)""" quiver_color: str | tuple[str, str, str] = 'white' """The color of the quiver arrows. - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 'white')""" to_plot: bool = True """Flag to produce plots or not. (default True)""" @@ -67,20 +67,20 @@ class _OptionsSlopeDeviationVis: resolution: float = 0.01 """Plot x/y sample resolution (meters) (default 0.01)""" clim: float | tuple[float, float, float] = 5 - """Sets colorbar limits (mrad). Plot limits set to [-clim, clim] for x or y slope plots and [0, clim] for slope magnitude plots. - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + """Sets colorbar limits (mrad). Plot limits set to [-clim, clim] for x or y slope plots and [0, clim] for slope xy plots. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 5)""" quiver_density: float | tuple[float, float, float] = 0.1 """The density of the quiver arrows (meters). - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 0.1)""" quiver_scale: float | tuple[float, float, float] = 25 """The scale of the quiver arrows. - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 25)""" quiver_color: str | tuple[str, str, str] = 'white' """The color of the quiver arrows. - Can be single value of tuple of three values to map to [x, y, magnitude] plots individually. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 'white')""" to_plot: bool = True """Flag to produce plots or not. (default True)""" @@ -92,14 +92,14 @@ class _OptionsCurvatureVis: """Plot x/y sample resolution (meters) (default 0.01)""" clim: float | tuple[float, float, float] = 50 """Sets colorbar limits (mrad/meter). Plot limits set to [-clim, clim]. - Can be single value of tuple of three values to map to [x, y, combined] plots individually. (default 50)""" + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 50)""" processing: list[str] | tuple[list[str], list[str], list[str]] = field(default_factory=list) """Processing string to apply when in MirrorAbstract.plot_orthorectified_curvature(). - Can be single value or tuple of three values to map to [x, y, combined] plots individually. + Can be single value or tuple of three values to map to [x, y, xy] plots individually. (default [])""" smooth_kernel_width: float | tuple[float, float, float] = 1 """Width of square smoothing kernel (pixels) to apply to curvature images in MirrorAbstract.plot_orthorectified_curvature(). - Can be single value of tuple of three values to map to [x, y, combined] plots individually. + Can be single value of tuple of three values to map to [x, y, xy] plots individually. (default 1)""" to_plot: bool = True """Flag to produce plots or not. (default True)""" @@ -399,28 +399,28 @@ def plot(self): def _plot_slope_measured_optic(self): # Plots optic slope for measured optic if self._has_measured_optic: - self._plot_slope(self.optic_measured, 'measured') + self._plot_slope(self.optic_measured, 'Meas') else: lt.info('No measured optic; skipping measured optic slope plots.') def _plot_curvature_measured_optic(self): # Plots optic curvature for measured optic if self._has_measured_optic: - self._plot_curvature(self.optic_measured, 'measured') + self._plot_curvature(self.optic_measured, 'Meas') else: lt.info('No measured optic; skipping measured optic curvature plots.') def _plot_slope_reference_optic(self): # Plots optic slope for reference optic if self._has_reference_optic: - self._plot_slope(self.optic_reference, 'reference') + self._plot_slope(self.optic_reference, 'Ref') else: lt.info('No reference optic; skipping reference optic slope plots.') def _plot_curvature_reference_optic(self): # Plots optic curvature for reference optic if self._has_reference_optic: - self._plot_curvature(self.optic_reference, 'reference') + self._plot_curvature(self.optic_reference, 'Ref') else: lt.info('No reference optic; skipping reference optic curvature plots.') @@ -447,17 +447,17 @@ def _plot_slope_deviation(self): quiver_scales = self._process_plot_options(self.options_slope_vis.quiver_scale) quiver_colors = self._process_plot_options(self.options_slope_vis.quiver_color) - # Slope magnitude + # Slope deviation magnitude fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + "Slope Deviation Magnitude", + name=self.options_file_output.file_prefix + "Slope Deviation XY", number_in_name=self.options_file_output.number_in_name, ) self.optic_measured.plot_orthorectified_slope_error( self.optic_reference, self.options_slope_vis.resolution, - type_='magnitude', + type_='xy', quiver_density=quiver_densities[0], quiver_scale=quiver_scales[0], quiver_color=quiver_colors[0], @@ -470,6 +470,7 @@ def _plot_slope_deviation(self): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) # Slope x @@ -495,6 +496,7 @@ def _plot_slope_deviation(self): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) # Slope Y @@ -520,6 +522,7 @@ def _plot_slope_deviation(self): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) else: lt.info('Do not have both measured and reference optic; skipping slope deviation plots.') @@ -527,14 +530,14 @@ def _plot_slope_deviation(self): def _plot_ray_trace_image_measured_optic(self): # Plot ray trace image for measured optic if self._has_measured_ray_trace: - self._plot_ray_trace_image(self._ray_trace_output_measured, 'measured') + self._plot_ray_trace_image(self._ray_trace_output_measured, 'Meas') else: lt.info('No measured ray trace data; skipping measured ray trace image.') def _plot_ray_trace_image_reference_optic(self): # Plot ray trace image for reference optic if self._has_reference_ray_trace: - self._plot_ray_trace_image(self._ray_trace_output_reference, 'reference') + self._plot_ray_trace_image(self._ray_trace_output_reference, 'Ref') else: lt.info('No reference ray trace data; skipping reference ray trace image.') @@ -602,23 +605,24 @@ def _plot_enclosed_energy(self): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) - def _plot_curvature(self, optic: MirrorAbstract, suffix: str): + def _plot_curvature(self, optic: MirrorAbstract, which_data: str): # Separate outputs processings = self._process_plot_options(self.options_curvature_vis.processing) widths = self._process_plot_options(self.options_curvature_vis.smooth_kernel_width) - # Curvature combined + # Curvature XY fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + 'Curvature Combined ' + suffix, + name=self.options_file_output.file_prefix + which_data + ' Curvature XY', number_in_name=self.options_file_output.number_in_name, ) optic.plot_orthorectified_curvature( res=self.options_curvature_vis.resolution, - type_='combined', + type_='xy', clim=self.options_curvature_vis.clim, axis=fig_rec.axis, processing=processings[0], @@ -630,13 +634,14 @@ def _plot_curvature(self, optic: MirrorAbstract, suffix: str): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) # Curvature X fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + 'Curvature X ' + suffix, + name=self.options_file_output.file_prefix + which_data + ' Curvature X', number_in_name=self.options_file_output.number_in_name, ) optic.plot_orthorectified_curvature( @@ -653,13 +658,14 @@ def _plot_curvature(self, optic: MirrorAbstract, suffix: str): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) # Curvature Y fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + 'Curvature Y ' + suffix, + name=self.options_file_output.file_prefix + which_data + ' Curvature Y', number_in_name=self.options_file_output.number_in_name, ) optic.plot_orthorectified_curvature( @@ -676,9 +682,10 @@ def _plot_curvature(self, optic: MirrorAbstract, suffix: str): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) - def _plot_slope(self, optic: MirrorAbstract, suffix: str): + def _plot_slope(self, optic: MirrorAbstract, which_data: str): # Separate outputs quiver_densities = self._process_plot_options(self.options_slope_vis.quiver_density) quiver_scales = self._process_plot_options(self.options_slope_vis.quiver_scale) @@ -688,12 +695,12 @@ def _plot_slope(self, optic: MirrorAbstract, suffix: str): fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + "Slope Magnitude " + suffix, + name=self.options_file_output.file_prefix + which_data + ' Slope XY', number_in_name=self.options_file_output.number_in_name, ) optic.plot_orthorectified_slope( self.options_slope_vis.resolution, - type_='magnitude', + type_='xy', quiver_density=quiver_densities[0], quiver_scale=quiver_scales[0], quiver_color=quiver_colors[0], @@ -706,13 +713,14 @@ def _plot_slope(self, optic: MirrorAbstract, suffix: str): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) # X Slope fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + "Slope X " + suffix, + name=self.options_file_output.file_prefix + which_data + ' Slope X', number_in_name=self.options_file_output.number_in_name, ) optic.plot_orthorectified_slope( @@ -730,13 +738,14 @@ def _plot_slope(self, optic: MirrorAbstract, suffix: str): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) # Y Slope fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + "Slope Y " + suffix, + name=self.options_file_output.file_prefix + which_data + ' Slope Y', number_in_name=self.options_file_output.number_in_name, ) optic.plot_orthorectified_slope( @@ -754,14 +763,15 @@ def _plot_slope(self, optic: MirrorAbstract, suffix: str): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) - def _plot_ray_trace_image(self, ray_trace_data: _RayTraceOutput, suffix: str): + def _plot_ray_trace_image(self, ray_trace_data: _RayTraceOutput, which_data: str): # Draw sun image on target fig_rec = fm.setup_figure( self.fig_control, self.axis_control, - name=self.options_file_output.file_prefix + 'Ray Trace Image ' + suffix, + name=self.options_file_output.file_prefix + which_data + ' Ray Trace Image', number_in_name=self.options_file_output.number_in_name, ) fig_rec.axis.imshow( @@ -780,6 +790,7 @@ def _plot_ray_trace_image(self, ray_trace_data: _RayTraceOutput, suffix: str): dpi=self.options_file_output.save_dpi, format='png', close_after_save=self.options_file_output.close_after_save, + include_view_suffix=False, ) def _perform_ray_trace_optic_measured(self): diff --git a/opencsp/common/lib/csp/VisualizeOrthorectifiedSlopeAbstract.py b/opencsp/common/lib/csp/VisualizeOrthorectifiedSlopeAbstract.py index 38d3cc19e..8b911ed2d 100644 --- a/opencsp/common/lib/csp/VisualizeOrthorectifiedSlopeAbstract.py +++ b/opencsp/common/lib/csp/VisualizeOrthorectifiedSlopeAbstract.py @@ -71,7 +71,7 @@ def plot_orthorectified_slope_error( self, reference: "VisualizeOrthorectifiedSlopeAbstract", res: float = 0.1, - type_: Literal["x", "y", "magnitude"] = "magnitude", + type_: Literal["x", "y", "xy"] = "xy", clim: float | None = None, axis: plt.Axes | None = None, quiver_density: float | None = None, @@ -88,10 +88,10 @@ def plot_orthorectified_slope_error( res : float, optional The xy resolution of the plot, meters, by default 0.1 type_ : str - Type of slope image to generate - 'x', 'y', 'magnitude' + Type of slope image to generate - 'x', 'y', 'xy' clim : float | None Colorbar limit. Converts to [-clim, clim] for type 'x' and 'y' - and [0, clim] for type 'magnitude.' Units in mrad. None to use default. + and [0, clim] for type 'xy.' Units in mrad. None to use default. axis : plt.Axes | None Axes to plot on. Default is None. If None, uses plt.gca(). quiver_density : bool | None @@ -102,7 +102,7 @@ def plot_orthorectified_slope_error( Color of quiver arrows. """ # Check inputs - if type_ not in ["x", "y", "magnitude"]: + if type_ not in ["x", "y", "xy"]: raise ValueError(f"Given type_ {type_} not supported.") if (quiver_density is not None) and (res > quiver_density): raise ValueError("Quiver density cannot be less than image resolution.") @@ -134,7 +134,7 @@ def plot_orthorectified_slope_error( clims = [-clim, clim] else: clims = clim - title = "X Slope Error" + title = "Slope Error X" cmap = "seismic" elif type_ == "y": image = slopes_diff[1] * 1000 # mrad @@ -144,9 +144,9 @@ def plot_orthorectified_slope_error( clims = [-clim, clim] else: clims = clim - title = "Y Slope Error" + title = "Slope Error X" cmap = "seismic" - elif type_ == "magnitude": + elif type_ == "xy": x_image = slopes_diff[0] * 1000 # mrad y_image = slopes_diff[1] * 1000 # mrad image = np.sqrt((x_image**2 + y_image**2) / 2) # mrad @@ -154,7 +154,7 @@ def plot_orthorectified_slope_error( clims = [0, clim] else: clims = clim - title = "Slope Error Magnitude" + title = "Slope Error XY" cmap = "jet" # Plot image on axis @@ -171,7 +171,7 @@ def plot_orthorectified_slope_error( def plot_orthorectified_slope( self, res: float = 0.1, - type_: Literal["x", "y", "magnitude"] = "magnitude", + type_: Literal["x", "y", "xy"] = "xy", clim: float | None = None, axis: plt.Axes | None = None, quiver_density: float | None = None, @@ -185,10 +185,10 @@ def plot_orthorectified_slope( res : float, optional The xy resolution of the plot, meters, by default 0.1 type_ : str - Type of slope image to generate - 'x', 'y', 'magnitude' + Type of slope image to generate - 'x', 'y', 'xy' clim : float | None Colorbar limit. Converts to [-clim, clim] for type 'x' and 'y' - and [0, clim] for type 'magnitude.' Units in mrad. None to use default. + and [0, clim] for type 'xy.' Units in mrad. None to use default. axis : plt.Axes | None Axes to plot on. Default is None. If None, uses plt.gca(). quiver_density : bool | None @@ -199,7 +199,7 @@ def plot_orthorectified_slope( Color of quiver arrows. """ # Check inputs - if type_ not in ["x", "y", "magnitude"]: + if type_ not in ["x", "y", "xy"]: raise ValueError(f"Given type_ {type_} not supported.") if (quiver_density is not None) and (res > quiver_density): raise ValueError("Quiver density cannot be less than image resolution.") @@ -220,7 +220,7 @@ def plot_orthorectified_slope( clims = [-clim, clim] else: clims = clim - title = "X Slope" + title = "Slope X" elif type_ == "y": image = slopes[1] * 1000 # mrad y_image = image @@ -229,8 +229,8 @@ def plot_orthorectified_slope( clims = [-clim, clim] else: clims = clim - title = "Y Slope" - elif type_ == "magnitude": + title = "Slope Y" + elif type_ == "xy": x_image = slopes[0] * 1000 # mrad y_image = slopes[1] * 1000 # mrad image = np.sqrt(x_image**2 + y_image**2) # mrad @@ -238,7 +238,7 @@ def plot_orthorectified_slope( clims = [0, clim] else: clims = clim - title = "Slope Magnitude" + title = "Slope XY" # Plot image on axes left, right, bottom, top = self.axis_aligned_bounding_box @@ -255,7 +255,7 @@ def plot_orthorectified_slope( def plot_orthorectified_curvature( self, res: float = 0.1, - type_: Literal["x", "y", "combined"] = "combined", + type_: Literal["x", "y", "xy"] = "xy", clim: float | None = None, axis: plt.Axes | None = None, processing: list[Literal["log", "smooth"]] = None, @@ -269,10 +269,10 @@ def plot_orthorectified_curvature( res : float, optional The xy resolution of the plot, meters, by default 0.1 type_ : str - Type of slope image to generate - 'x', 'y', 'combined' + Type of slope image to generate - 'x', 'y', 'xy' clim : float | None Colorbar limit. Converts to [-clim, clim] for type 'x' and 'y' - and [0, clim] for type 'combined.' Units in mrad. None to use default. + and [0, clim] for type 'xy.' Units in mrad. None to use default. axis : plt.Axes | None Axes to plot on. Default is None. If None, uses plt.gca(). processing : list[str] @@ -284,7 +284,7 @@ def plot_orthorectified_curvature( By default, 1. """ # Check inputs - if type_ not in ["x", "y", "combined"]: + if type_ not in ["x", "y", "xy"]: raise ValueError(f"Given type_ {type_} not supported.") if processing is None: processing = [] @@ -315,23 +315,23 @@ def plot_orthorectified_curvature( clims = clim # Calculate slope image - if type_ in ["x", "combined"]: + if type_ in ["x", "xy"]: image_x = np.diff(slopes[0] * 1000, axis=1) # mrad / sample image_x /= x_del_vec[None, :] # mrad / meter image = image_x - title = "X Curvature" + title = "Curvature X" extent = (left, right, bottom - res / 2, top + res / 2) - if type_ in ["y", "combined"]: + if type_ in ["y", "xy"]: image_y = np.diff(slopes[1] * 1000, axis=0) # mrad / sample image_y /= y_del_vec[:, None] # mrad / meter image = image_y - title = "Y Curvature" + title = "Curvature Y" extent = (left - res / 2, right + res / 2, bottom, top) - if type_ == "combined": + if type_ == "xy": image = (image_x[1:, :] + image_y[:, 1:]) / 2 # mrad / meter - title = "Combined Curvature" + title = "Curvature XY" extent = (left, right, bottom, top) # Apply processing steps diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Combined_measured_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Combined_measured_xy.png deleted file mode 100644 index d044176b5..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Combined_measured_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Combined_reference_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Combined_reference_xy.png deleted file mode 100644 index c837a6c19..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Combined_reference_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_X_measured_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_X_measured_xy.png deleted file mode 100644 index 5ba428e57..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_X_measured_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_X_reference_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_X_reference_xy.png deleted file mode 100644 index cdd674f29..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_X_reference_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Y_measured_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Y_measured_xy.png deleted file mode 100644 index 496747ac1..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Y_measured_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Y_reference_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Y_reference_xy.png deleted file mode 100644 index a2ef66908..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Curvature_Y_reference_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy.png new file mode 100644 index 000000000..21bf9dac3 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy.txt new file mode 100644 index 000000000..5a2491bcb --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 20 +Name: Ensquared Energy +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy_xy.png deleted file mode 100644 index 927f98ab4..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ensquared_Energy_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_X.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_X.png new file mode 100644 index 000000000..1eca505f9 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_X.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_X.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_X.txt new file mode 100644 index 000000000..520a7b911 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_X.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 10 +Name: Meas Curvature X +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_XY.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_XY.png new file mode 100644 index 000000000..25dd19fc3 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_XY.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_XY.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_XY.txt new file mode 100644 index 000000000..80af69ed5 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_XY.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 9 +Name: Meas Curvature XY +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_Y.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_Y.png new file mode 100644 index 000000000..f35e6e9df Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_Y.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_Y.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_Y.txt new file mode 100644 index 000000000..ad6a9b4f5 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Curvature_Y.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 11 +Name: Meas Curvature Y +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Ray_Trace_Image.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Ray_Trace_Image.png new file mode 100644 index 000000000..a372c4d22 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Ray_Trace_Image.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Ray_Trace_Image.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Ray_Trace_Image.txt new file mode 100644 index 000000000..0888084de --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Ray_Trace_Image.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 18 +Name: Meas Ray Trace Image +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_X.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_X.png new file mode 100644 index 000000000..d533f6766 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_X.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_X.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_X.txt new file mode 100644 index 000000000..bfd82a320 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_X.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 4 +Name: Meas Slope X +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_XY.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_XY.png new file mode 100644 index 000000000..b874c587f Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_XY.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_XY.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_XY.txt new file mode 100644 index 000000000..2cf2ec0a4 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_XY.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 3 +Name: Meas Slope XY +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_Y.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_Y.png new file mode 100644 index 000000000..df1d9676e Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_Y.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_Y.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_Y.txt new file mode 100644 index 000000000..a809b37f1 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Meas_Slope_Y.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 5 +Name: Meas Slope Y +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ray_Trace_Image_measured_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ray_Trace_Image_measured_xy.png deleted file mode 100644 index d1aa08628..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ray_Trace_Image_measured_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ray_Trace_Image_reference_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ray_Trace_Image_reference_xy.png deleted file mode 100644 index a76089e5d..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ray_Trace_Image_reference_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_X.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_X.png new file mode 100644 index 000000000..fce3258b5 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_X.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_X.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_X.txt new file mode 100644 index 000000000..dc1656875 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_X.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 13 +Name: Ref Curvature X +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_XY.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_XY.png new file mode 100644 index 000000000..7cc123142 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_XY.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_XY.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_XY.txt new file mode 100644 index 000000000..a74450f61 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_XY.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 12 +Name: Ref Curvature XY +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_Y.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_Y.png new file mode 100644 index 000000000..9b5d1018d Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_Y.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_Y.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_Y.txt new file mode 100644 index 000000000..b7766e860 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Curvature_Y.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 14 +Name: Ref Curvature Y +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Ray_Trace_Image.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Ray_Trace_Image.png new file mode 100644 index 000000000..56c19e8bc Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Ray_Trace_Image.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Ray_Trace_Image.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Ray_Trace_Image.txt new file mode 100644 index 000000000..059d714eb --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Ray_Trace_Image.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 19 +Name: Ref Ray Trace Image +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_X.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_X.png new file mode 100644 index 000000000..2653b437d Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_X.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_X.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_X.txt new file mode 100644 index 000000000..68a5f5d51 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_X.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 7 +Name: Ref Slope X +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_XY.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_XY.png new file mode 100644 index 000000000..38fe6e179 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_XY.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_XY.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_XY.txt new file mode 100644 index 000000000..d2bce869a --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_XY.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 6 +Name: Ref Slope XY +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_Y.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_Y.png new file mode 100644 index 000000000..afab01b39 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_Y.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_Y.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_Y.txt new file mode 100644 index 000000000..9519d20cb --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Ref_Slope_Y.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 8 +Name: Ref Slope Y +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Magnitude_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Magnitude_xy.png deleted file mode 100644 index 13f529e87..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Magnitude_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X.png new file mode 100644 index 000000000..c7046a4f4 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X.txt new file mode 100644 index 000000000..e6e69c70d --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 16 +Name: Slope Deviation X +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_XY.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_XY.png new file mode 100644 index 000000000..32b04dad0 Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_XY.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_XY.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_XY.txt new file mode 100644 index 000000000..d1cc3c0ff --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_XY.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 15 +Name: Slope Deviation XY +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X_xy.png deleted file mode 100644 index 52c9645f5..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_X_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y.png new file mode 100644 index 000000000..f440ce0da Binary files /dev/null and b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y.png differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y.txt b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y.txt new file mode 100644 index 000000000..fd19a59e5 --- /dev/null +++ b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y.txt @@ -0,0 +1,7 @@ +Metadata: +Figure number: 17 +Name: Slope Deviation Y +Title: None +Code tag: None +View spec: xy + diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y_xy.png deleted file mode 100644 index 890884bbe..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Deviation_Y_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Magnitude_measured_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Magnitude_measured_xy.png deleted file mode 100644 index 229592c74..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Magnitude_measured_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Magnitude_reference_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Magnitude_reference_xy.png deleted file mode 100644 index 4116a91b0..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Magnitude_reference_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_X_measured_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_X_measured_xy.png deleted file mode 100644 index 8b7c3b6b1..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_X_measured_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_X_reference_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_X_reference_xy.png deleted file mode 100644 index 5043210b6..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_X_reference_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Y_measured_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Y_measured_xy.png deleted file mode 100644 index d588869d9..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Y_measured_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Y_reference_xy.png b/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Y_reference_xy.png deleted file mode 100644 index 7fb9be642..000000000 Binary files a/opencsp/common/lib/csp/test/data/input/StandardPlotOutput/facet/Slope_Y_reference_xy.png and /dev/null differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear.png index 467a2314a..469521f91 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear.png differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth.png index ca3e8b903..15cffce27 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth.png differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth_log.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth_log.png index c5324dc56..0f3d06a13 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth_log.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_linear_smooth_log.png differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_nearest.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_nearest.png index f8fbf8212..70f9cd8fe 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_nearest.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/curvature_nearest.png differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_linear.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_linear.png index 9f7ec6b54..139e8a11c 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_linear.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_linear.png differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_nearest.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_nearest.png index 9109ea0f4..ec02ab594 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_nearest.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_error_nearest.png differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_linear.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_linear.png index 81270df5e..f702b15e5 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_linear.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_linear.png differ diff --git a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_nearest.png b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_nearest.png index f587ba099..ea48268fe 100644 Binary files a/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_nearest.png and b/opencsp/common/lib/csp/test/data/input/VisualizeOrthorectifiedSlopeAbstract/slope_nearest.png differ diff --git a/opencsp/common/lib/csp/test/test_StandardPlotOutput.py b/opencsp/common/lib/csp/test/test_StandardPlotOutput.py index 30f5153c5..ca8715955 100644 --- a/opencsp/common/lib/csp/test/test_StandardPlotOutput.py +++ b/opencsp/common/lib/csp/test/test_StandardPlotOutput.py @@ -126,24 +126,24 @@ def test_facet(self): # Test all plots match files = [ - "Slope_Magnitude_measured_xy.png", - "Slope_X_measured_xy.png", - "Slope_Y_measured_xy.png", - "Curvature_Combined_measured_xy.png", - "Curvature_X_measured_xy.png", - "Curvature_Y_measured_xy.png", - "Slope_Magnitude_reference_xy.png", - "Slope_X_reference_xy.png", - "Slope_Y_reference_xy.png", - "Curvature_Combined_reference_xy.png", - "Curvature_X_reference_xy.png", - "Curvature_Y_reference_xy.png", - "Slope_Deviation_Magnitude_xy.png", - "Slope_Deviation_X_xy.png", - "Slope_Deviation_Y_xy.png", - "Ray_Trace_Image_measured_xy.png", - "Ray_Trace_Image_reference_xy.png", - "Ensquared_Energy_xy.png", + "Meas_Slope_XY.png", + "Meas_Slope_X.png", + "Meas_Slope_Y.png", + "Meas_Curvature_XY.png", + "Meas_Curvature_X.png", + "Meas_Curvature_Y.png", + "Ref_Slope_XY.png", + "Ref_Slope_X.png", + "Ref_Slope_Y.png", + "Ref_Curvature_XY.png", + "Ref_Curvature_X.png", + "Ref_Curvature_Y.png", + "Slope_Deviation_XY.png", + "Slope_Deviation_X.png", + "Slope_Deviation_Y.png", + "Meas_Ray_Trace_Image.png", + "Ref_Ray_Trace_Image.png", + "Ensquared_Energy.png", ] for idx, file in enumerate(files): with self.subTest(i=idx): diff --git a/opencsp/common/lib/csp/test/test_VisualizeOrthorectifiedImage.py b/opencsp/common/lib/csp/test/test_VisualizeOrthorectifiedImage.py index 1d095e5bb..e8737b820 100644 --- a/opencsp/common/lib/csp/test/test_VisualizeOrthorectifiedImage.py +++ b/opencsp/common/lib/csp/test/test_VisualizeOrthorectifiedImage.py @@ -67,7 +67,7 @@ def test_plot_slope_error_magnitude_linear(self): # Create image fig, ax = self._get_axes() self.test_mirror_bilinear.plot_orthorectified_slope_error( - self.reference, 0.005, "magnitude", 100, ax, 0.1, 1000, "black" + self.reference, 0.005, "xy", 100, ax, 0.1, 1000, "black" ) fig.savefig(file_out, dpi=300) plt.close(fig) @@ -81,7 +81,7 @@ def test_plot_slope_error_magnitude_nearest(self): # Create image fig, ax = self._get_axes() self.test_mirror_nearest.plot_orthorectified_slope_error( - self.reference, 0.005, "magnitude", 100, ax, 0.1, 1000, "black" + self.reference, 0.005, "xy", 100, ax, 0.1, 1000, "black" ) fig.savefig(file_out, dpi=300) plt.close(fig) @@ -94,7 +94,7 @@ def test_plot_slope_magnitude_linear(self): file_in = join(self.dir_input, "slope_linear.png") # Create image fig, ax = self._get_axes() - self.test_mirror_bilinear.plot_orthorectified_slope(0.005, "magnitude", 100, ax, 0.1, 1000, "black") + self.test_mirror_bilinear.plot_orthorectified_slope(0.005, "xy", 100, ax, 0.1, 1000, "black") fig.savefig(file_out, dpi=300) plt.close(fig) # Test @@ -106,7 +106,7 @@ def test_plot_slope_magnitude_nearest(self): file_in = join(self.dir_input, "slope_nearest.png") # Create image fig, ax = self._get_axes() - self.test_mirror_nearest.plot_orthorectified_slope(0.005, "magnitude", 100, ax, 0.1, 1000, "black") + self.test_mirror_nearest.plot_orthorectified_slope(0.005, "xy", 100, ax, 0.1, 1000, "black") fig.savefig(file_out, dpi=300) plt.close(fig) # Test @@ -118,7 +118,7 @@ def test_plot_curvature_magnitude_linear(self): file_in = join(self.dir_input, "curvature_linear.png") # Create image fig, ax = self._get_axes() - self.test_mirror_bilinear.plot_orthorectified_curvature(0.005, "combined", 100, ax) + self.test_mirror_bilinear.plot_orthorectified_curvature(0.005, "xy", 100, ax) fig.savefig(file_out, dpi=300) plt.close(fig) # Test @@ -130,7 +130,7 @@ def test_plot_curvature_magnitude_nearest(self): file_in = join(self.dir_input, "curvature_nearest.png") # Create image fig, ax = self._get_axes() - self.test_mirror_nearest.plot_orthorectified_curvature(0.005, "combined", 100, ax) + self.test_mirror_nearest.plot_orthorectified_curvature(0.005, "xy", 100, ax) fig.savefig(file_out, dpi=300) plt.close(fig) # Test @@ -143,7 +143,7 @@ def test_plot_curvature_magnitude_linear_processing_smooth(self): # Create image fig, ax = self._get_axes() self.test_mirror_bilinear.plot_orthorectified_curvature( - 0.005, "combined", 100, ax, processing=["smooth"], smooth_kernel_width=5 + 0.005, "xy", 100, ax, processing=["smooth"], smooth_kernel_width=5 ) fig.savefig(file_out, dpi=300) plt.close(fig) @@ -157,7 +157,7 @@ def test_plot_curvature_magnitude_linear_processing_smooth_log(self): # Create image fig, ax = self._get_axes() self.test_mirror_bilinear.plot_orthorectified_curvature( - 0.005, "combined", 100, ax, processing=["smooth", "log"], smooth_kernel_width=5 + 0.005, "xy", 100, ax, processing=["smooth", "log"], smooth_kernel_width=5 ) fig.savefig(file_out, dpi=300) plt.close(fig) diff --git a/opencsp/common/lib/render/View3d.py b/opencsp/common/lib/render/View3d.py index ec83cc348..e5c7504c6 100644 --- a/opencsp/common/lib/render/View3d.py +++ b/opencsp/common/lib/render/View3d.py @@ -409,7 +409,7 @@ def show_and_save( # Save all figures, including this one. self.save(output_dir, output_figure_body, format=format, dpi=dpi) - def save(self, output_dir, output_figure_body, format="png", dpi=300) -> str: + def save(self, output_dir, output_figure_body, format="png", dpi=300, include_view_suffix=True) -> str: """ Saves this view to an image file. @@ -433,7 +433,8 @@ def save(self, output_dir, output_figure_body, format="png", dpi=300) -> str: if not (os.path.exists(output_dir)): os.makedirs(output_dir) # Add the projection choice. - output_figure_body += "_" + self.view_spec["type"] + if include_view_suffix: + output_figure_body += "_" + self.view_spec["type"] # Add axis limit suffix. output_figure_body += self.limit_suffix() # Join with output directory. diff --git a/opencsp/common/lib/render_control/RenderControlFigureRecord.py b/opencsp/common/lib/render_control/RenderControlFigureRecord.py index 65441e3be..aa22ca4f2 100644 --- a/opencsp/common/lib/render_control/RenderControlFigureRecord.py +++ b/opencsp/common/lib/render_control/RenderControlFigureRecord.py @@ -239,7 +239,15 @@ def figure_to_array(figure: Figure): # Convert the buffer to a numpy array return np.asarray(figure.canvas.buffer_rgba()) - def save(self, output_dir: str, output_file_body: str = None, format: str = None, dpi=600, close_after_save=True): + def save( + self, + output_dir: str, + output_file_body: str = None, + format: str = None, + dpi=600, + close_after_save=True, + include_view_suffix=True, + ): """ Saves this figure record to an image file. @@ -287,7 +295,9 @@ def save(self, output_dir: str, output_file_body: str = None, format: str = None # If this is a 3-d plot, add the projection choice. if self.view != None: - output_figure_dir_body_ext = self.view.save(output_dir, output_figure_body, format=format, dpi=dpi) + output_figure_dir_body_ext = self.view.save( + output_dir, output_figure_body, format=format, dpi=dpi, include_view_suffix=include_view_suffix + ) else: # Make the figure current. plt.figure(self.name)