mt_metadata
mt_metadata copied to clipboard
Channel Nomenclature should be global
Channel Nomenclature is found in many objects and could benefit from a global variable. Currently the default is:
{
"hx": "hx",
"hy": "hy",
"hz": "hz",
"ex": "ex",
"ey": "ey",
}
Should move this to mt_metadata.__init__.py. That way it's not populated incorrectly in various places.
fixed in PR #193
Aurora issue 385 was triaged by
# TODO: this should be done inside the TF initialization
for i_run, run in enumerate(tf_cls.station_metadata.runs):
for i_ch, channel in enumerate(run.channels):
new_ch = channel.copy()
default_component = channel.component
new_component = channel_nomenclature_dict[default_component]
new_ch.component = new_component
tf_cls.station_metadata.runs[i_run].remove_channel(default_component)
tf_cls.station_metadata.runs[i_run].add_channel(new_ch)
Bascially, if there is a channel nomenclature mapping it is applied to channel names at the run level (because station gets its channel info from the runs).
This would be better applied in mt_metadata in the initialization of the TF object.
- [ ] rename the channels for each run of a TF object per the channel_nomenclature during initialization
- [ ] once tests passing on mt_metadata, remove the extraneous code applying the channel re-labelling from aurora's
export_tf_collectionmethod.