Skip to content

Commit

Permalink
Remove unnecessary helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
YooSunYoung committed Jan 10, 2024
1 parent ed546e8 commit b36dd6a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/ess/nmx/mcstas_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ def from_xml(
) -> 'DetectorDesc':
"""Create detector description from xml component and type."""

def _rotate_axis(matrix: sc.Variable, axis: sc.Variable) -> sc.Variable:
return matrix * axis

location = select_by_tag(component, 'location')
rotation_matrix = _rotation_matrix_from_location(
location, simulation_settings.angle_unit
Expand All @@ -191,12 +188,8 @@ def _rotate_axis(matrix: sc.Variable, axis: sc.Variable) -> sc.Variable:
start_y=float(type_desc.attrib['ystart']),
position=_position_from_location(location, simulation_settings.length_unit),
rotation_matrix=rotation_matrix,
fast_axis=_rotate_axis(
rotation_matrix, _AXISNAME_TO_UNIT_VECTOR[fast_axis_name]
),
slow_axis=_rotate_axis(
rotation_matrix, _AXISNAME_TO_UNIT_VECTOR[slow_axis_name]
),
fast_axis=rotation_matrix * _AXISNAME_TO_UNIT_VECTOR[fast_axis_name],
slow_axis=rotation_matrix * _AXISNAME_TO_UNIT_VECTOR[slow_axis_name],
)

@property
Expand Down

0 comments on commit b36dd6a

Please sign in to comment.