mt_metadata icon indicating copy to clipboard operation
mt_metadata copied to clipboard

Channel Nomenclature should be global

Open kujaku11 opened this issue 1 year ago • 2 comments

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.

kujaku11 avatar Feb 02 '24 23:02 kujaku11

fixed in PR #193

kujaku11 avatar Feb 03 '24 00:02 kujaku11

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_collection method.

kkappler avatar Aug 02 '25 15:08 kkappler