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 e6165d0 commit 7aeb4f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
9 changes: 0 additions & 9 deletions imap_processing/ultra/l1b/l1b_extended_config.py

This file was deleted.

21 changes: 10 additions & 11 deletions imap_processing/ultra/l1b/ultra_l1b_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@

import numpy as np

from imap_processing.ultra.l1b.l1b_extended_config import (
D_SLIT_FOIL,
N_ELEMENTS,
SLIT_Z,
TRIG_CONSTANT,
YF_ESTIMATE_LEFT,
YF_ESTIMATE_RIGHT,
)
from imap_processing.ultra.l1b.lookup_utils import (
get_image_params,
get_y_adjust,
)

# Constants in IMAP-Ultra Flight Software Specification document.
D_SLIT_FOIL = 3.39 # shortest distance from slit to foil (mm)
SLIT_Z = 44.89 # position of slit on Z axis (mm)
YF_ESTIMATE_LEFT = 40.0 # front position of particle for left shutter (mm)
YF_ESTIMATE_RIGHT = -40 # front position of particle for right shutter (mm)
N_ELEMENTS = 256 # number of elements in lookup table
TRIG_CONSTANT = 81.92 # trigonometric constant (mm)
# TODO: make lookup tables into config files.


Expand Down Expand Up @@ -42,7 +41,7 @@ def get_front_x_position(
X front position (hundredths of a millimeter).
"""
# Left and right start types.
indices = np.where((start_type == 1) | (start_type == 2))
indices = np.nonzero((start_type == 1) | (start_type == 2))

xftsc = get_image_params("XFTSC")
xft_lt_off = get_image_params("XFTLTOFF")
Expand Down Expand Up @@ -80,8 +79,8 @@ def get_front_y_position(
Front y position in hundredths of a millimeter.
"""
# Determine start types
index_left = np.where(start_type == 1)
index_right = np.where(start_type == 2)
index_left = np.nonzero(start_type == 1)
index_right = np.nonzero(start_type == 2)

yf = np.zeros(len(start_type))
d = np.zeros(len(start_type))
Expand Down

0 comments on commit 7aeb4f3

Please sign in to comment.