Skip to content

Commit

Permalink
fixing byteorder to native
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Dec 5, 2024
1 parent 09c2c5c commit 28c5edf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/valis/io/spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from astropy.io import fits
from astropy.nddata import InverseVariance
from astropy.wcs import WCS
import numpy as np

try:
from specutils import Spectrum1D
Expand Down Expand Up @@ -108,6 +109,12 @@ def extract_data(product: str, filepath: str, multispec: Union[int, str] = None)
else:
data[param] = hdulist[extension].data

# set dtype byteorder to the native
for key, val in data.items():
if key == 'header':
continue
val.dtype = val.dtype.newbyteorder('=')

return data


Expand Down

0 comments on commit 28c5edf

Please sign in to comment.