dolfyn icon indicating copy to clipboard operation
dolfyn copied to clipboard

Rotate-variables list

Open lkilcher opened this issue 3 years ago • 2 comments

We should probably change from the list ds.attrs['rotate_vars'] to a DataArray attribute flag (e.g., ds['vel'].attrs['rotate_me']=True). Then we loop over all of the variables to identify which ones should be rotated.

The advantage of this is that when we do things like ds.drop_vars('accel_echo'), we don't later get an error when we do ds.velds.rotate2(...).

lkilcher avatar Jan 29 '22 01:01 lkilcher

We may want to make these attrs look like:

ds['vel'].attrs['rotate_with'] = 'orientmat'
...
ds['accel_b5'].attrs['rotate_with'] = 'orientmat_b5'
...
ds['accel_echo'].attrs['rotate_with'] = 'orientmat_echo'
...

But obviously that will also require implementing orientmat_b5 (etc) when we only have pitch_b5, roll_b5, and heading_b5.

lkilcher avatar Jan 29 '22 01:01 lkilcher

We should make this change at the same time as fixing #96 .

lkilcher avatar Apr 21 '22 18:04 lkilcher