Skip to content

Commit

Permalink
Changed set_facet_canting to set_facet_cantings
Browse files Browse the repository at this point in the history
  • Loading branch information
braden6521 authored and bbean23 committed Nov 19, 2024
1 parent 52195c8 commit 350131e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example/csp/example_optics_and_ray_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def define_mirror_array(focal_length: float) -> FacetEnsemble:
# Build facet ensemble
facet_ensemble = FacetEnsemble(facets)
facet_ensemble.set_facet_positions(facet_locations)
facet_ensemble.set_facet_canting(facet_canting)
facet_ensemble.set_facet_cantings(facet_canting)

return facet_ensemble # FacetEnsemble.generate_rotation_defined(facets)

Expand Down
2 changes: 1 addition & 1 deletion example/mirror/example_MirrorOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def setUp(self):
tilt_left * tilt_down,
tilt_right * tilt_down,
]
fe2x2.set_facet_canting(fe_2x2_canting_rotations)
fe2x2.set_facet_cantings(fe_2x2_canting_rotations)

self.h2x2 = HeliostatAzEl(fe2x2, name='Simple 2x2 Heliostat')
self.h2x2_title = 'Heliostat with Parametrically Defined Facets'
Expand Down
2 changes: 1 addition & 1 deletion example/raytrace/example_RayTraceOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def setUp(self):
self.fe2x2 = FacetEnsemble(self.h2x2_facets)
fe2x2_positions = Pxyz([[-1.1, 1.1, -1.1, 1.1], [1.6, 1.6, -1.6, -1.6], [0, 0, 0, 0]])
self.fe2x2.set_facet_positions(fe2x2_positions)
self.fe2x2.set_facet_canting(self.h2x2_canting)
self.fe2x2.set_facet_cantings(self.h2x2_canting)
self.h2x2 = HeliostatAzEl(self.fe2x2, 'Simple 2x2 Heliostat')
self.h2x2.pivot = 0
self.h2x2_title = 'Heliostat with Parametrically Defined Facets'
Expand Down
4 changes: 2 additions & 2 deletions opencsp/common/lib/csp/FacetEnsemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def draw(

def set_facet_transform_list(self, transformations: list[TransformXYZ]):
"""
Combines the `set_facet_positions` and `set_facet_canting` functions into a single action.
Combines the `set_facet_positions` and `set_facet_cantings` functions into a single action.
"""
for transformation, facet in zip(transformations, self.facets):
facet._self_to_parent_transform = transformation
Expand Down Expand Up @@ -231,7 +231,7 @@ def set_facet_positions(self, positions: Pxyz):
pos: Pxyz
facet._self_to_parent_transform = TransformXYZ.from_V(pos)

def set_facet_canting(self, canting_rotations: list[Rotation]):
def set_facet_cantings(self, canting_rotations: list[Rotation]):
"""
Set the canting rotations of the facets relative to the ensemble.
This function updates the canting rotations of the facets in the
Expand Down
6 changes: 3 additions & 3 deletions opencsp/common/lib/csp/HeliostatAbstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def set_tracking_configuration(self, aimpoint: Pxyz, location_lon_lat: Iterable,
def set_facet_positions(self, positions: Pxyz):
self.facet_ensemble.set_facet_positions(positions)

def set_facet_canting(self, canting_rotations: list[Rotation]):
self.facet_ensemble.set_facet_canting(canting_rotations)
def set_facet_cantings(self, canting_rotations: list[Rotation]):
self.facet_ensemble.set_facet_cantings(canting_rotations)

# TODO TJL:make this work and make it faster
def set_canting_from_equation(self, func: FunctionXYContinuous) -> None:
Expand Down Expand Up @@ -272,7 +272,7 @@ def set_canting_from_equation(self, func: FunctionXYContinuous) -> None:

facet_canting_rotations.append(canting)

self.facet_ensemble.set_facet_canting(facet_canting_rotations)
self.facet_ensemble.set_facet_cantings(facet_canting_rotations)

# RENDERING

Expand Down
2 changes: 1 addition & 1 deletion opencsp/common/lib/test/test_MirrorOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def setUp(self):
tilt_left * tilt_down,
tilt_right * tilt_down,
]
fe2x2.set_facet_canting(fe_2x2_canting_rotations)
fe2x2.set_facet_cantings(fe_2x2_canting_rotations)

self.h2x2 = HeliostatAzEl(fe2x2, name='Simple 2x2 Heliostat')
self.h2x2_title = 'Heliostat with Parametrically Defined Facets'
Expand Down
2 changes: 1 addition & 1 deletion opencsp/common/lib/test/test_RayTraceOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def setUp(self):
self.fe2x2 = FacetEnsemble(self.h2x2_facets)
fe2x2_positions = Pxyz([[-1.1, 1.1, -1.1, 1.1], [1.6, 1.6, -1.6, -1.6], [0, 0, 0, 0]])
self.fe2x2.set_facet_positions(fe2x2_positions)
self.fe2x2.set_facet_canting(self.h2x2_canting)
self.fe2x2.set_facet_cantings(self.h2x2_canting)
self.h2x2 = HeliostatAzEl(self.fe2x2, 'Simple 2x2 Heliostat')
self.h2x2.pivot = 0
self.h2x2_title = 'Heliostat with Parametrically Defined Facets'
Expand Down

0 comments on commit 350131e

Please sign in to comment.