Skip to content

Commit

Permalink
response to pr
Browse files Browse the repository at this point in the history
  • Loading branch information
laspsandoval committed Aug 13, 2024
1 parent 7aeb4f3 commit f6c5fdc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions imap_processing/ultra/l1b/ultra_l1b_extended.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Calculates Extended Raw Events for ULTRA L1b."""

import numpy as np
from numpy import ndarray

from imap_processing.ultra.l1b.lookup_utils import (
get_image_params,
Expand All @@ -17,9 +18,7 @@
# TODO: make lookup tables into config files.


def get_front_x_position(
start_type: np.array, start_position_tdc: np.array
) -> np.array:
def get_front_x_position(start_type: ndarray, start_position_tdc: ndarray) -> ndarray:
"""
Calculate the front xf position.
Expand Down Expand Up @@ -51,12 +50,10 @@ def get_front_x_position(
# Calculate xf and convert to hundredths of a millimeter
xf = (xftsc * -start_position_tdc[indices] + xft_off) * 100

return xf
return np.array(xf)


def get_front_y_position(
start_type: np.array, yb: np.array
) -> tuple[np.array, np.array]:
def get_front_y_position(start_type: ndarray, yb: ndarray) -> tuple[ndarray, ndarray]:
"""
Compute the adjustments for the front y position and distance front to back.
Expand Down Expand Up @@ -111,4 +108,4 @@ def get_front_y_position(
# hundredths of a millimeter
d[index_right] = (SLIT_Z - distance_adjust_right) * 100

return d, yf
return np.array(d), np.array(yf)

0 comments on commit f6c5fdc

Please sign in to comment.