Skip to content

Commit

Permalink
standardize "v_measure_point_facet"
Browse files Browse the repository at this point in the history
  • Loading branch information
bbean23 committed Mar 31, 2024
1 parent 92ddac2 commit 10a44c3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def downsample_measurement(file: str, n: int) -> Measurement:
mask_images = ddg.downsample_images(measurement_orig.mask_images, n)
fringe_images = ddg.downsample_images(measurement_orig.fringe_images, n)
dist_optic_screen_measure = osd.DistanceOpticScreen(
measurement_orig.measure_point, measurement_orig.dist_optic_screen
measurement_orig.v_measure_point_facet, measurement_orig.dist_optic_screen
)
return Measurement(
mask_images=mask_images,
Expand Down
6 changes: 3 additions & 3 deletions opencsp/app/sofast/lib/AbstractMeasurementSofast.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ def __repr__(self) -> str:
return cls_name + ': { ' + self.name + ' }'

@property
def measure_point(self):
"""Convenience method for accessing dist_optic_screen_measure.measure_point"""
return self.dist_optic_screen_measure.measure_point
def v_measure_point_facet(self):
"""Convenience method for accessing dist_optic_screen_measure.v_measure_point_facet"""
return self.dist_optic_screen_measure.v_measure_point_facet

@property
def dist_optic_screen(self):
Expand Down
7 changes: 4 additions & 3 deletions opencsp/app/sofast/lib/DistanceOpticScreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def load_from_hdf(cls, file: str, prefix: str):
# datasets = [prefix + '/measure_point', prefix + '/dist_optic_screen']
kwargs = h5.load_hdf5_datasets(datasets, file)

if 'v_measure_point_facet' in kwargs:
kwargs['measure_point'] = kwargs['v_measure_point_facet']
del kwargs['v_measure_point_facet']
# TODO update all existing HDF5 files to use consistent naming
if 'measure_point' in kwargs:
kwargs['v_measure_point_facet'] = kwargs['measure_point']
del kwargs['measure_point']
if 'optic_screen_dist' in kwargs:
kwargs['dist_optic_screen'] = kwargs['optic_screen_dist']
del kwargs['optic_screen_dist']
Expand Down
4 changes: 2 additions & 2 deletions opencsp/app/sofast/lib/ProcessSofastFringe.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _process_optic_singlefacet_geometry(self, facet_data: DefinitionFacet) -> No
) = po.process_singlefacet_geometry(
facet_data,
mask_raw,
self.measurement.measure_point,
self.measurement.v_measure_point_facet,
self.measurement.dist_optic_screen,
self.orientation,
self.camera,
Expand Down Expand Up @@ -424,7 +424,7 @@ def _process_optic_multifacet_geometry(
facet_data,
ensemble_data,
mask_raw,
self.measurement.measure_point,
self.measurement.v_measure_point_facet,
self.orientation,
self.camera,
self.measurement.dist_optic_screen,
Expand Down
2 changes: 1 addition & 1 deletion opencsp/app/sofast/test/test_spatial_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def test_refine_v_distance(self):

# Perform calculation
r_cam_optic = Rotation.from_rotvec(data['r_optic_cam_refine_1'])
v_meas_pt_optic_cam = measurement.measure_point.rotate(r_cam_optic)
v_meas_pt_optic_cam = measurement.v_measure_point_facet.rotate(r_cam_optic)
v_cam_optic_cam_refine_2 = sp.refine_v_distance(
Vxyz(data['v_cam_optic_cam_refine_1']),
measurement.dist_optic_screen,
Expand Down
2 changes: 1 addition & 1 deletion opencsp/common/lib/deflectometry/test/test_SlopeSolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def setUpClass(cls):
'u_measure_pixel_pointing_optic': Uxyz(data['u_cam_measure_point_facet']),
'v_screen_points_facet': Vxyz(data['v_screen_points_facet']),
'v_optic_screen_optic': ori.v_optic_screen_optic,
'v_align_point_optic': measurement.measure_point,
'v_align_point_optic': measurement.v_measure_point_facet,
'dist_optic_screen': measurement.dist_optic_screen,
'surface': surface,
}
Expand Down

0 comments on commit 10a44c3

Please sign in to comment.