From d2e844a6e6f93222fcab4320bae5a4d9f6d7c6b0 Mon Sep 17 00:00:00 2001 From: Braden Date: Tue, 10 Dec 2024 12:14:43 -0700 Subject: [PATCH 01/20] Updated warning given in ProcessSofastFringe for undefined screen points. --- opencsp/app/sofast/lib/ProcessSofastFringe.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opencsp/app/sofast/lib/ProcessSofastFringe.py b/opencsp/app/sofast/lib/ProcessSofastFringe.py index 163d0e331..ef4065974 100644 --- a/opencsp/app/sofast/lib/ProcessSofastFringe.py +++ b/opencsp/app/sofast/lib/ProcessSofastFringe.py @@ -442,8 +442,9 @@ def _process_display(self) -> None: mask_bad_pixels = np.zeros(mask_processed.shape, dtype=bool) if np.any(nan_mask): lt.warn( - f'{nan_mask.sum():d} / {nan_mask.size:d} points are NANs in calculated ' - 'screen points for facet {idx_facet:d}. These data points will be removed.' + 'ProcessSofastFringe._process_display(): ' + f'{nan_mask.sum():d} / {nan_mask.size:d} screen points are undefined ' + f'for facet {idx_facet:d}. These data points will be removed.' ) # Make mask of NANs mask_bad_pixels[mask_processed] = nan_mask From 174f905899c0d39d55db1689b40ae80f54c1f551 Mon Sep 17 00:00:00 2001 From: Braden Date: Tue, 10 Dec 2024 12:29:51 -0700 Subject: [PATCH 02/20] Added documentation to DebugOpticsGeometry parameters --- opencsp/app/sofast/lib/DebugOpticsGeometry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencsp/app/sofast/lib/DebugOpticsGeometry.py b/opencsp/app/sofast/lib/DebugOpticsGeometry.py index 857eb58da..94eb71085 100644 --- a/opencsp/app/sofast/lib/DebugOpticsGeometry.py +++ b/opencsp/app/sofast/lib/DebugOpticsGeometry.py @@ -6,4 +6,6 @@ class DebugOpticsGeometry: def __init__(self): self.debug_active: bool = False + """To activate geometry debugging. Default False""" self.figures: list = [] + """List to hold figure objects once created.""" From cb8464074b146a967a053652739077f3ecc9a2f8 Mon Sep 17 00:00:00 2001 From: Braden Date: Tue, 10 Dec 2024 12:30:08 -0700 Subject: [PATCH 03/20] Added documentation to ParamsMaskCalculation parameters --- opencsp/app/sofast/lib/ParamsMaskCalculation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opencsp/app/sofast/lib/ParamsMaskCalculation.py b/opencsp/app/sofast/lib/ParamsMaskCalculation.py index 9155ec9e3..410111fbf 100644 --- a/opencsp/app/sofast/lib/ParamsMaskCalculation.py +++ b/opencsp/app/sofast/lib/ParamsMaskCalculation.py @@ -11,15 +11,15 @@ class ParamsMaskCalculation(hdf5_tools.HDF5_IO_Abstract): """Defines threshold to use when calculating optic mask. Uses a histogram of pixel values of the mask difference image (light image - dark image). This is the fraction of the way from the first histogram peak (most common dark pixel value) to the the last histogram peak - (most common light pixel value).""" + (most common light pixel value). Default 0.5""" filt_width: int = 9 - """Side length of square kernel used to filter mask image""" + """Side length of square kernel used to filter mask image. Default 9""" filt_thresh: int = 4 - """Threshold (minimum number of active pixels) to use when removing small active mask areas.""" + """Threshold (minimum number of active pixels) to use when removing small active mask areas. Default 4""" thresh_active_pixels: float = 0.05 - """If number of active mask pixels is below this fraction of total image pixels, thow error.""" + """If number of active mask pixels is below this fraction of total image pixels, thow error. Default 0.05""" keep_largest_area: bool = False - """Flag to apply processing step that keeps only the largest mask area""" + """Flag to apply processing step that keeps only the largest mask area. Default True""" def save_to_hdf(self, file: str, prefix: str = ''): """Saves data to given HDF5 file. Data is stored in PREFIX + ParamsMaskCalculation/... From 6c19b51cf95cacbcb8bd0365bdec14548de8e6f6 Mon Sep 17 00:00:00 2001 From: Braden Date: Tue, 10 Dec 2024 12:30:20 -0700 Subject: [PATCH 04/20] Added documentation to SlopeSolverDataDebug parameters --- .../lib/deflectometry/SlopeSolverDataDebug.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py index 3aba255e3..ac003f65d 100644 --- a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py +++ b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py @@ -8,9 +8,22 @@ class SlopeSolverDataDebug: def __init__(self): self.debug_active: bool = False + """To activate slope solver debugging. Default False""" self.optic_data: Any = None + """Representation of optic (Facet/Mirror) being solved for. + The geometry data in this object is used to create visualization plots. + This information is updated automatically during SOFAST execution and will + overwrite any previously user-given values. Default None""" self.slope_solver_figures: list = [] + """List to hold figure objects once created.""" self.slope_solver_camera_rays_length: float = 0.0 + """The length (meters) of camera rays to draw when plotting the 3d slope solving scenario plot. Default 0.0""" self.slope_solver_plot_camera_screen_points: bool = False + """To include scatter plot of xyz screen point locations seen by camera in slope solving scenario plot. Default False""" self.slope_solver_point_downsample: int = 50 + """The downsample factor (to save computing resources) to apply to screen points + Only applicable if plotting screen points is enabled with the + `SlopeSolverDataDebug.slope_solver_plot_camera_screen_points` flag). Default 50""" self.slope_solver_single_plot: bool = False + """Flag to plot all iterations of the slope solving algorithm on one plot (True) or create a separate + plot for each iteration (False). Default False (new plot for each iteration)""" From 25873a03bad04a5fcf1f404be2436ce70f0bc69b Mon Sep 17 00:00:00 2001 From: Braden Date: Fri, 13 Dec 2024 13:49:12 -0700 Subject: [PATCH 05/20] keep largest area is now used for multifacet if desired. It is applied to each individual facet instead of the enrire heliostat. --- opencsp/app/sofast/lib/ProcessSofastFixed.py | 14 +++---- opencsp/app/sofast/lib/ProcessSofastFringe.py | 40 +++++++++++++++---- .../app/sofast/lib/process_optics_geometry.py | 25 ++++++++---- 3 files changed, 56 insertions(+), 23 deletions(-) diff --git a/opencsp/app/sofast/lib/ProcessSofastFixed.py b/opencsp/app/sofast/lib/ProcessSofastFixed.py index 061b957b7..4f8152260 100644 --- a/opencsp/app/sofast/lib/ProcessSofastFixed.py +++ b/opencsp/app/sofast/lib/ProcessSofastFixed.py @@ -105,15 +105,6 @@ def _calculate_mask(self) -> ndarray: ] mask = ip.calc_mask_raw(images, *params) - if (self.optic_type == 'multi') and self.params.mask.keep_largest_area: - lt.warn( - '"keep_largest_area" mask processing option cannot be used ' - 'for multifacet ensembles. This will be turned off.' - ) - self.params.mask.keep_largest_area = False - elif self.params.mask.keep_largest_area: - mask = ip.keep_largest_mask_area(mask) - return mask def load_measurement_data(self, measurement: MeasurementSofastFixed) -> None: @@ -266,6 +257,10 @@ def process_single_facet_optic( # Calculate mask mask_raw = self._calculate_mask() + # If enabled, fill in holes in mask area + if self.params.mask.keep_largest_area: + mask_raw = ip.keep_largest_mask_area(mask_raw) + # Process optic geometry (find mask corners, etc.) ( self.data_geometry_general, @@ -357,6 +352,7 @@ def process_multi_facet_optic( self.camera, self.measurement.dist_optic_screen, self.params.geometry, + self.params.mask, self.params.debug_geometry, ) diff --git a/opencsp/app/sofast/lib/ProcessSofastFringe.py b/opencsp/app/sofast/lib/ProcessSofastFringe.py index ef4065974..81cbe32c6 100644 --- a/opencsp/app/sofast/lib/ProcessSofastFringe.py +++ b/opencsp/app/sofast/lib/ProcessSofastFringe.py @@ -2,6 +2,8 @@ to calculate surface slopes. """ +import matplotlib.pyplot as plt +from matplotlib import colormaps import numpy as np from opencsp.app.sofast.lib.DefinitionEnsemble import DefinitionEnsemble @@ -377,13 +379,6 @@ def _process_optic_multifacet_geometry( ] mask_raw = ip.calc_mask_raw(self.measurement.mask_images, *params) - if self.params.mask.keep_largest_area: - lt.warn( - '"keep_largest_area" mask processing option cannot be used ' - 'for multifacet ensembles. This will be turned off.' - ) - self.params.mask.keep_largest_area = False - ( self.data_geometry_general, self.data_image_processing_general, @@ -399,6 +394,7 @@ def _process_optic_multifacet_geometry( self.camera, self.measurement.dist_optic_screen, self.params.geometry, + self.params.mask, self.params.debug_geometry, ) @@ -417,6 +413,17 @@ def _process_display(self) -> None: x_periods = self.measurement.fringe_periods_x y_periods = self.measurement.fringe_periods_y + # Prepare for plotting unwrapped phase images + if self.params.debug_geometry.debug_active: + # X phase RGB image + im_phase_x = self.measurement.mask_images[..., 1].copy() + im_phase_x = np.stack((im_phase_x,) * 3, 2) + im_phase_x = im_phase_x / im_phase_x.max() + # Y phase RGB image + im_phase_y = self.measurement.mask_images[..., 1].copy() + im_phase_y = np.stack((im_phase_y,) * 3, 2) + im_phase_y = im_phase_y / im_phase_y.max() + for idx_facet in range(self.num_facets): # Get current processed mask layer mask_processed = self.data_image_processing_facet[idx_facet].mask_processed @@ -431,6 +438,25 @@ def _process_display(self) -> None: v_screen_points_fractional_screens = Vxy((screen_xs, screen_ys)) self.data_geometry_facet[idx_facet].v_screen_points_fractional_screens = v_screen_points_fractional_screens + # Create plot of unwrapped phase (if enabled) + if self.params.debug_geometry.debug_active: + # Add active pixels as colored pixels + cm = colormaps.get_cmap('jet') + vals_x_jet = cm(screen_xs)[:, :3] # remove alpha channel + im_phase_x[mask_processed, :] = vals_x_jet + vals_y_jet = cm(screen_ys)[:, :3] # remove alpha channel + im_phase_y[mask_processed, :] = vals_y_jet + # Plot x image + fig = plt.figure(f'ProcessSofastFringe_unwrapped_phase_x_facet_{idx_facet:d}') + plt.imshow(im_phase_x) + plt.title(f'Unwrapped X Phase Facet {idx_facet:d}') + self.params.debug_geometry.figures.append(fig) + # Plot y image + fig = plt.figure(f'ProcessSofastFringe_unwrapped_phase_y_facet_{idx_facet:d}') + plt.imshow(im_phase_y) + plt.title(f'Unwrapped Y Phase Facet {idx_facet:d}') + self.params.debug_geometry.figures.append(fig) + # Undistort screen points (display coordinates) v_screen_points_screen = self.display.interp_func( v_screen_points_fractional_screens diff --git a/opencsp/app/sofast/lib/process_optics_geometry.py b/opencsp/app/sofast/lib/process_optics_geometry.py index fd5fc085a..a22c7cad1 100644 --- a/opencsp/app/sofast/lib/process_optics_geometry.py +++ b/opencsp/app/sofast/lib/process_optics_geometry.py @@ -12,6 +12,7 @@ from opencsp.app.sofast.lib.DefinitionEnsemble import DefinitionEnsemble from opencsp.app.sofast.lib.DefinitionFacet import DefinitionFacet from opencsp.app.sofast.lib.ParamsOpticGeometry import ParamsOpticGeometry +from opencsp.app.sofast.lib.ParamsMaskCalculation import ParamsMaskCalculation from opencsp.app.sofast.lib.DebugOpticsGeometry import DebugOpticsGeometry import opencsp.app.sofast.lib.image_processing as ip from opencsp.app.sofast.lib.SpatialOrientation import SpatialOrientation @@ -366,7 +367,8 @@ def process_multifacet_geometry( orientation: SpatialOrientation, camera: Camera, dist_optic_screen: float, - params: ParamsOpticGeometry = ParamsOpticGeometry(), + params_geometry: ParamsOpticGeometry = ParamsOpticGeometry(), + params_mask: ParamsMaskCalculation = ParamsMaskCalculation(), debug: DebugOpticsGeometry = DebugOpticsGeometry(), ) -> tuple[ cdc.CalculationDataGeometryGeneral, @@ -393,8 +395,10 @@ def process_multifacet_geometry( Camera object dist_optic_screen : float Optic to screen distance, meters - params : ParamsOpticGeometry, optional + params_geometry : ParamsOpticGeometry, optional ParamsOpticGeometry object, by default ParamsOpticGeometry() + params_mask : ParamsMaskCalculation, optional + ParamsMaskCalculation object, by default ParamsMaskCalculation() debug : DebugOpticsGeometry, optional DebugOpticsGeometry object, by default DebugOpticsGeometry() @@ -512,7 +516,10 @@ def process_multifacet_geometry( plt.title('Expected Perimeter Points') # Refine perimeter points - args = [params.perimeter_refine_axial_search_dist, params.perimeter_refine_perpendicular_search_dist] + args = [ + params_geometry.perimeter_refine_axial_search_dist, + params_geometry.perimeter_refine_perpendicular_search_dist, + ] loop_ensemble_image_refine = ip.refine_mask_perimeter(loop_ensemble_exp, v_edges_image, *args) data_image_processing_general.loop_optic_image_refine = loop_ensemble_image_refine @@ -545,9 +552,9 @@ def process_multifacet_geometry( # Refine facet corners args = [ - params.facet_corns_refine_step_length, - params.facet_corns_refine_perpendicular_search_dist, - params.facet_corns_refine_frac_keep, + params_geometry.facet_corns_refine_step_length, + params_geometry.facet_corns_refine_perpendicular_search_dist, + params_geometry.facet_corns_refine_frac_keep, ] loops_facets_refined: list[LoopXY] = [] for idx in range(num_facets): @@ -583,7 +590,11 @@ def process_multifacet_geometry( mask_processed *= mask_raw[..., np.newaxis] mask_processed = np.logical_and(mask_processed, mask_fitted) for idx in range(num_facets): - data_image_processing_facet[idx].mask_processed = mask_processed[..., idx] + mask = mask_processed[..., idx] + # If enabled, keep largest mask area (fill holes) for each individual facet + if params_mask.keep_largest_area: + mask = ip.keep_largest_mask_area(mask) + data_image_processing_facet[idx].mask_processed = mask # Refine R/T with all refined facet corners r_ensemble_cam_refine_2, v_cam_ensemble_cam_refine_2 = sp.calc_rt_from_img_pts( From 69d2bcd2bfd2d2ef3f47861f16f0b3f06b57e8fd Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:20:18 -0700 Subject: [PATCH 06/20] Update opencsp/app/sofast/lib/ParamsMaskCalculation.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsMaskCalculation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsMaskCalculation.py b/opencsp/app/sofast/lib/ParamsMaskCalculation.py index 410111fbf..cc49d95b6 100644 --- a/opencsp/app/sofast/lib/ParamsMaskCalculation.py +++ b/opencsp/app/sofast/lib/ParamsMaskCalculation.py @@ -11,7 +11,7 @@ class ParamsMaskCalculation(hdf5_tools.HDF5_IO_Abstract): """Defines threshold to use when calculating optic mask. Uses a histogram of pixel values of the mask difference image (light image - dark image). This is the fraction of the way from the first histogram peak (most common dark pixel value) to the the last histogram peak - (most common light pixel value). Default 0.5""" + (most common light pixel value). (Default 0.5)""" filt_width: int = 9 """Side length of square kernel used to filter mask image. Default 9""" filt_thresh: int = 4 From 0521828b4f95b7b46398acb99f4447eb529ab557 Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:20:29 -0700 Subject: [PATCH 07/20] Update opencsp/app/sofast/lib/ParamsMaskCalculation.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsMaskCalculation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsMaskCalculation.py b/opencsp/app/sofast/lib/ParamsMaskCalculation.py index cc49d95b6..e84c2481f 100644 --- a/opencsp/app/sofast/lib/ParamsMaskCalculation.py +++ b/opencsp/app/sofast/lib/ParamsMaskCalculation.py @@ -13,7 +13,7 @@ class ParamsMaskCalculation(hdf5_tools.HDF5_IO_Abstract): from the first histogram peak (most common dark pixel value) to the the last histogram peak (most common light pixel value). (Default 0.5)""" filt_width: int = 9 - """Side length of square kernel used to filter mask image. Default 9""" + """Side length of square kernel used to filter mask image. (Default 9)""" filt_thresh: int = 4 """Threshold (minimum number of active pixels) to use when removing small active mask areas. Default 4""" thresh_active_pixels: float = 0.05 From e5b9f1587aceea9226ad0948273e184311fc55b5 Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:20:36 -0700 Subject: [PATCH 08/20] Update opencsp/app/sofast/lib/ParamsMaskCalculation.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsMaskCalculation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsMaskCalculation.py b/opencsp/app/sofast/lib/ParamsMaskCalculation.py index e84c2481f..0ed2d0e95 100644 --- a/opencsp/app/sofast/lib/ParamsMaskCalculation.py +++ b/opencsp/app/sofast/lib/ParamsMaskCalculation.py @@ -15,7 +15,7 @@ class ParamsMaskCalculation(hdf5_tools.HDF5_IO_Abstract): filt_width: int = 9 """Side length of square kernel used to filter mask image. (Default 9)""" filt_thresh: int = 4 - """Threshold (minimum number of active pixels) to use when removing small active mask areas. Default 4""" + """Threshold (minimum number of active pixels) to use when removing small active mask areas. (Default 4)""" thresh_active_pixels: float = 0.05 """If number of active mask pixels is below this fraction of total image pixels, thow error. Default 0.05""" keep_largest_area: bool = False From 601c4bab0222ec622f79ff187fc2ff759b2bb15e Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:20:41 -0700 Subject: [PATCH 09/20] Update opencsp/app/sofast/lib/ParamsMaskCalculation.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsMaskCalculation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsMaskCalculation.py b/opencsp/app/sofast/lib/ParamsMaskCalculation.py index 0ed2d0e95..c5611b54f 100644 --- a/opencsp/app/sofast/lib/ParamsMaskCalculation.py +++ b/opencsp/app/sofast/lib/ParamsMaskCalculation.py @@ -17,7 +17,7 @@ class ParamsMaskCalculation(hdf5_tools.HDF5_IO_Abstract): filt_thresh: int = 4 """Threshold (minimum number of active pixels) to use when removing small active mask areas. (Default 4)""" thresh_active_pixels: float = 0.05 - """If number of active mask pixels is below this fraction of total image pixels, thow error. Default 0.05""" + """If number of active mask pixels is below this fraction of total image pixels, throw error. (Default 0.05)""" keep_largest_area: bool = False """Flag to apply processing step that keeps only the largest mask area. Default True""" From 04337088e73bc40f3970c3cc4dd9ded579fa0224 Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:20:47 -0700 Subject: [PATCH 10/20] Update opencsp/app/sofast/lib/ParamsMaskCalculation.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsMaskCalculation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsMaskCalculation.py b/opencsp/app/sofast/lib/ParamsMaskCalculation.py index c5611b54f..e1f53de12 100644 --- a/opencsp/app/sofast/lib/ParamsMaskCalculation.py +++ b/opencsp/app/sofast/lib/ParamsMaskCalculation.py @@ -19,7 +19,7 @@ class ParamsMaskCalculation(hdf5_tools.HDF5_IO_Abstract): thresh_active_pixels: float = 0.05 """If number of active mask pixels is below this fraction of total image pixels, throw error. (Default 0.05)""" keep_largest_area: bool = False - """Flag to apply processing step that keeps only the largest mask area. Default True""" + """Flag to apply processing step that keeps only the largest mask area. (Default True)""" def save_to_hdf(self, file: str, prefix: str = ''): """Saves data to given HDF5 file. Data is stored in PREFIX + ParamsMaskCalculation/... From 2f5064cb198e8d6a80c37dd0233cd91667e96163 Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:20:56 -0700 Subject: [PATCH 11/20] Update opencsp/app/sofast/lib/ParamsOpticGeometry.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsOpticGeometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsOpticGeometry.py b/opencsp/app/sofast/lib/ParamsOpticGeometry.py index 953ab00fa..cb432956f 100644 --- a/opencsp/app/sofast/lib/ParamsOpticGeometry.py +++ b/opencsp/app/sofast/lib/ParamsOpticGeometry.py @@ -9,7 +9,7 @@ class ParamsOpticGeometry(hdf5_tools.HDF5_IO_Abstract): perimeter_refine_axial_search_dist: float = 50.0 """The length of the search box (along the search direction) to use when finding optic - perimeter. Units pixels. Default 50.0""" + perimeter. Units pixels. (Default 50.0)""" perimeter_refine_perpendicular_search_dist: float = 50.0 """The half-width of the search box (perpendicular to the search direction) to use when finding optic perimeter. Units pixels. Default 50.0""" From 86635bd80b86df7f18433dee691662b8c1954a1d Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:03 -0700 Subject: [PATCH 12/20] Update opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py index ac003f65d..4d3719859 100644 --- a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py +++ b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py @@ -8,7 +8,7 @@ class SlopeSolverDataDebug: def __init__(self): self.debug_active: bool = False - """To activate slope solver debugging. Default False""" + """To activate slope solver debugging. (Default False)""" self.optic_data: Any = None """Representation of optic (Facet/Mirror) being solved for. The geometry data in this object is used to create visualization plots. From 97a04a24256a88d4b3634f0c92561f7a4fc26ed6 Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:12 -0700 Subject: [PATCH 13/20] Update opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py index 4d3719859..25420ad0e 100644 --- a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py +++ b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py @@ -13,7 +13,7 @@ def __init__(self): """Representation of optic (Facet/Mirror) being solved for. The geometry data in this object is used to create visualization plots. This information is updated automatically during SOFAST execution and will - overwrite any previously user-given values. Default None""" + overwrite any previously user-given values. (Default None)""" self.slope_solver_figures: list = [] """List to hold figure objects once created.""" self.slope_solver_camera_rays_length: float = 0.0 From 3980d36ed69b3d413b713dde22ac56b3f276615a Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:18 -0700 Subject: [PATCH 14/20] Update opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py index 25420ad0e..4a55eb459 100644 --- a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py +++ b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py @@ -17,7 +17,7 @@ def __init__(self): self.slope_solver_figures: list = [] """List to hold figure objects once created.""" self.slope_solver_camera_rays_length: float = 0.0 - """The length (meters) of camera rays to draw when plotting the 3d slope solving scenario plot. Default 0.0""" + """The length (meters) of camera rays to draw when plotting the 3d slope solving scenario plot. (Default 0.0)""" self.slope_solver_plot_camera_screen_points: bool = False """To include scatter plot of xyz screen point locations seen by camera in slope solving scenario plot. Default False""" self.slope_solver_point_downsample: int = 50 From 16895087103747c28d67cdc6f9e4a53b87c7cb45 Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:24 -0700 Subject: [PATCH 15/20] Update opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py index 4a55eb459..441d88af3 100644 --- a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py +++ b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py @@ -19,7 +19,7 @@ def __init__(self): self.slope_solver_camera_rays_length: float = 0.0 """The length (meters) of camera rays to draw when plotting the 3d slope solving scenario plot. (Default 0.0)""" self.slope_solver_plot_camera_screen_points: bool = False - """To include scatter plot of xyz screen point locations seen by camera in slope solving scenario plot. Default False""" + """To include scatter plot of xyz screen point locations seen by camera in slope solving scenario plot. (Default False)""" self.slope_solver_point_downsample: int = 50 """The downsample factor (to save computing resources) to apply to screen points Only applicable if plotting screen points is enabled with the From 7c647483ac4319cee614e1bd4ad93cf573311932 Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:29 -0700 Subject: [PATCH 16/20] Update opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py index 441d88af3..718612d93 100644 --- a/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py +++ b/opencsp/common/lib/deflectometry/SlopeSolverDataDebug.py @@ -23,7 +23,7 @@ def __init__(self): self.slope_solver_point_downsample: int = 50 """The downsample factor (to save computing resources) to apply to screen points Only applicable if plotting screen points is enabled with the - `SlopeSolverDataDebug.slope_solver_plot_camera_screen_points` flag). Default 50""" + `SlopeSolverDataDebug.slope_solver_plot_camera_screen_points` flag). (Default 50)""" self.slope_solver_single_plot: bool = False """Flag to plot all iterations of the slope solving algorithm on one plot (True) or create a separate plot for each iteration (False). Default False (new plot for each iteration)""" From 03e942846cc3dc9d6befc218a1e454240564b76a Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:41 -0700 Subject: [PATCH 17/20] Update opencsp/app/sofast/lib/ParamsOpticGeometry.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsOpticGeometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsOpticGeometry.py b/opencsp/app/sofast/lib/ParamsOpticGeometry.py index cb432956f..025d63f25 100644 --- a/opencsp/app/sofast/lib/ParamsOpticGeometry.py +++ b/opencsp/app/sofast/lib/ParamsOpticGeometry.py @@ -12,7 +12,7 @@ class ParamsOpticGeometry(hdf5_tools.HDF5_IO_Abstract): perimeter. Units pixels. (Default 50.0)""" perimeter_refine_perpendicular_search_dist: float = 50.0 """The half-width of the search box (perpendicular to the search direction) to use when finding - optic perimeter. Units pixels. Default 50.0""" + optic perimeter. Units pixels. (Default 50.0)""" facet_corns_refine_step_length: float = 10.0 """The length of the search box (along the search direction) to use when refining facet corner locations (when processing a facet ensemble). Units pixels. Default 10.0""" From e21917fea0e79bd2bca40a48cef795872f5644ad Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:49 -0700 Subject: [PATCH 18/20] Update opencsp/app/sofast/lib/ParamsOpticGeometry.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsOpticGeometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsOpticGeometry.py b/opencsp/app/sofast/lib/ParamsOpticGeometry.py index 025d63f25..224d8c8f5 100644 --- a/opencsp/app/sofast/lib/ParamsOpticGeometry.py +++ b/opencsp/app/sofast/lib/ParamsOpticGeometry.py @@ -15,7 +15,7 @@ class ParamsOpticGeometry(hdf5_tools.HDF5_IO_Abstract): optic perimeter. Units pixels. (Default 50.0)""" facet_corns_refine_step_length: float = 10.0 """The length of the search box (along the search direction) to use when refining facet corner - locations (when processing a facet ensemble). Units pixels. Default 10.0""" + locations (when processing a facet ensemble). Units pixels. (Default 10.0)""" facet_corns_refine_perpendicular_search_dist: float = 10.0 """The half-width of the search box (perpendicular to the search direction) to use when refining facet corner locations (when processing a facet ensemble). Units pixels. Default 10.0""" From 050b083de4ad0740d8bd528345f3b383c47128ed Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:21:56 -0700 Subject: [PATCH 19/20] Update opencsp/app/sofast/lib/ParamsOpticGeometry.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsOpticGeometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsOpticGeometry.py b/opencsp/app/sofast/lib/ParamsOpticGeometry.py index 224d8c8f5..3e9fdb0ba 100644 --- a/opencsp/app/sofast/lib/ParamsOpticGeometry.py +++ b/opencsp/app/sofast/lib/ParamsOpticGeometry.py @@ -18,7 +18,7 @@ class ParamsOpticGeometry(hdf5_tools.HDF5_IO_Abstract): locations (when processing a facet ensemble). Units pixels. (Default 10.0)""" facet_corns_refine_perpendicular_search_dist: float = 10.0 """The half-width of the search box (perpendicular to the search direction) to use when - refining facet corner locations (when processing a facet ensemble). Units pixels. Default 10.0""" + refining facet corner locations (when processing a facet ensemble). Units pixels. (Default 10.0)""" facet_corns_refine_frac_keep: float = 0.5 """The fraction of pixels to consider within search box when finding optic edges. Default 0.5""" From cf1ff0831b39d2c2ef0ae65b9994df4ffe8b0c8d Mon Sep 17 00:00:00 2001 From: Braden Smith <156462071+braden6521@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:22:05 -0700 Subject: [PATCH 20/20] Update opencsp/app/sofast/lib/ParamsOpticGeometry.py Co-authored-by: Evan Harvey <57234914+e10harvey@users.noreply.github.com> --- opencsp/app/sofast/lib/ParamsOpticGeometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencsp/app/sofast/lib/ParamsOpticGeometry.py b/opencsp/app/sofast/lib/ParamsOpticGeometry.py index 3e9fdb0ba..8f3e5ba99 100644 --- a/opencsp/app/sofast/lib/ParamsOpticGeometry.py +++ b/opencsp/app/sofast/lib/ParamsOpticGeometry.py @@ -20,7 +20,7 @@ class ParamsOpticGeometry(hdf5_tools.HDF5_IO_Abstract): """The half-width of the search box (perpendicular to the search direction) to use when refining facet corner locations (when processing a facet ensemble). Units pixels. (Default 10.0)""" facet_corns_refine_frac_keep: float = 0.5 - """The fraction of pixels to consider within search box when finding optic edges. Default 0.5""" + """The fraction of pixels to consider within search box when finding optic edges. (Default 0.5)""" def save_to_hdf(self, file: str, prefix: str = ''): """Saves data to given HDF5 file. Data is stored in PREFIX + ParamsOpticGeometry/...