Skip to content

Lo - Round-trip between numpy/xarray not needed #3357

Description

@vineetbansal

The _divide function in imap_processing/lo/l2/lo_l2.py is operating on numpy array, forcing the caller to switch to numpy and back to xarray. All this can likely just get done in xarray itself.

Note from Tim on this:

Just in general, as I got more experience with xarray, I found that doing the math directly in xarray objects ends up cleaner and avoids lots of code for extracting the numpy array and then putting that array into an xarray.DataArray. Not saying this needs to change, but it does look like xarray wraps the numpy.divide function: https://docs.xarray.dev/en/latest/generated/xarray.ufuncs.divide.html

Metadata

Metadata

Assignees

Labels

Ins: LoRelated to the IMAP-Lo instrument

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions