dolfyn
dolfyn copied to clipboard
Rotate-variables list
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(...)
.
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
.
We should make this change at the same time as fixing #96 .