simpeg / aurora

software for processing natural source electromagnetic data
MIT License
14 stars 2 forks source link

Streamlining process mth5 #223

Closed kkappler closed 2 years ago

kkappler commented 2 years ago

Several complications with process_mth5 have become relevant recently:

  1. In process mth5, the dataset dataframe has a column called "run". The elements of that column are objects of type mth5.groups.master_station_run_channel.RunGroup. There is an error in pandas 1.5.0 that is triggered when I try to pack this object into more than one cell of the dataframe. This error can be avoided by not packing the run at all, but instead by packing the run_obj.hdf5_group.ref and then, whenever the run is needed, we can instead call: the .from_reference() method of the parent mth5_object. E.g. store run.hdf5_group.ref, and when run is needed call h5_obj.from_reference(ref)
  2. decimation can be done without dropping out of xarray
  3. The sample rate, rather than being updated in the run object, should be updated in the xarray run_ts, and the run_object (which is an acquisition run_object) treated as immutable.