Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Fix dtypes for numpy L1A

* Adding explicit numpy dependency
  • Loading branch information
maxinelasp committed Jun 17, 2024
1 parent 9b1c351 commit 345c3ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
6 changes: 5 additions & 1 deletion imap_processing/mag/l1a/mag_l1a.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,12 @@ def process_packets(
total_primary_vectors = seconds_per_packet * mag_l0.PRI_VECSEC
total_secondary_vectors = seconds_per_packet * mag_l0.SEC_VECSEC

# The raw vectors are of type int8, but the output vectors should be at least
# int16.
primary_vectors, secondary_vectors = MagL1a.process_vector_data(
mag_l0.VECTORS, total_primary_vectors, total_secondary_vectors
mag_l0.VECTORS.astype(dtype=np.int32),
total_primary_vectors,
total_secondary_vectors,
)

primary_timestamped_vectors = MagL1a.calculate_vector_time(
Expand Down
15 changes: 2 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ space_packet_parser = ">=4.2.0"
spiceypy = ">=6.0.0"
xarray = '>=2023.0.0'
pyyaml = "^6.0.1"
numpy = "^1.26.4"

# Optional dependencies
numpydoc = {version="^1.5.0", optional=true}
Expand Down

0 comments on commit 345c3ef

Please sign in to comment.