Skip to content

Commit 2d90a3b

Browse files
committed
return type hints
1 parent a644ea9 commit 2d90a3b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/ess/amor/geometry.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
3+
from typing import Tuple
4+
15
import scipp as sc
26

37

@@ -24,7 +28,9 @@ class Detector:
2428
distance = sc.scalar(4000, unit="mm")
2529

2630

27-
def _pixel_coordinate_in_detector_system(pixelID: sc.Variable):
31+
def _pixel_coordinate_in_detector_system(
32+
pixelID: sc.Variable,
33+
) -> Tuple[sc.Variable, sc.Variable]:
2834
"""Determines beam travel distance inside the detector
2935
and the beam divergence angle from the detector number."""
3036
(bladeNr, bPixel) = (
@@ -47,7 +53,9 @@ def _pixel_coordinate_in_detector_system(pixelID: sc.Variable):
4753
return distance_inside_detector, beam_divergence_angle
4854

4955

50-
def pixel_coordinate_in_lab_frame(pixelID: sc.Variable, nu: sc.Variable):
56+
def pixel_coordinate_in_lab_frame(
57+
pixelID: sc.Variable, nu: sc.Variable
58+
) -> Tuple[sc.Variable, sc.Variable]:
5159
"""Computes spatial coordinates (lab reference frame), and the beam divergence
5260
angle for the detector pixel associated with `pixelID`"""
5361
distance_in_detector, divergence_angle = _pixel_coordinate_in_detector_system(

0 commit comments

Comments
 (0)