Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endianess of data #54

Open
nilsdoe opened this issue Jul 3, 2024 · 1 comment
Open

Endianess of data #54

nilsdoe opened this issue Jul 3, 2024 · 1 comment
Assignees

Comments

@nilsdoe
Copy link

nilsdoe commented Jul 3, 2024

Hey,

thank you for this nice open-source project. I was wondering if you thought about adding the possibility to specify the endianess of the complex SAR data to load.

Thanks,
Nils

@rogerkuou
Copy link
Member

rogerkuou commented Sep 12, 2024

Hi @nilsdoe, thanks a lot for reaching out to us. And my apology for taking so long to reply.

I myself am not an expert in endianess. What we use in SARXarray is the standard Numpy data types. For example, in this documentation page, we use numpy.complex64. And according to Numpy documentation, by default the system native endian is used, with the possibility of customization.

Based on the information, I would expect if you follow the dtype constructing doc from Numpy, you can construct the dtype with the endian of your interest and pass it to sarxarray.from_binary().

For example, to read complex64 with big endian:

sarxarray.from_binary( ..., dtype='>c8')

Could you please give this a try?

@rogerkuou rogerkuou self-assigned this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants