kujaku11 / mt_metadata

Tools for standardizing metadata, geared towards magnetotelluric (MT) data but is general enough to accommodate "any" type of metadata.
https://mt-metadata.readthedocs.io/en/latest/
MIT License
18 stars 4 forks source link

TF.has_impedance is slow #207

Open kujaku11 opened 5 months ago

kujaku11 commented 5 months ago

There is a slowdown or bottleneck in TF.has_{attr}. xarray.sel is currenlty slow, so there may be a better way to test if components are empty or not without using sel. See https://github.com/pydata/xarray/issues/2452. The main issue is that is returning a new data array, which takes time and is not necessary for this function.