{ "cells": [ { "cell_type": "markdown", "id": "a7212ef8-04d2-41ab-8b7e-b477891b4cdb", "metadata": {}, "source": [ "# Time Series Metadata Examples\n", "\n", "Metadata can be confusing and a daunting task. Hopefully `mt_metadata` makes it easier. Here we will demonstrate some use cases." ] }, { "cell_type": "code", "execution_count": 1, "id": "f5304d5c-e26a-49f5-bcc2-ea796f521270", "metadata": {}, "outputs": [], "source": [ "from mt_metadata.timeseries import (\n", " Auxiliary, Electric, Experiment, Magnetic, Run, Station, Survey\n", ")" ] }, { "cell_type": "markdown", "id": "918474b6-063a-4f9a-b9e9-8d0403b1abd6", "metadata": {}, "source": [ "## Time Series Metadata as a Single Object\n", "\n", "`mt_metadata` was written so that all metadata can reside under a single object. For example, if you have a single station with multiple runs that have multiple channels, you don't want to carry around a single file for each. Each level of metadata, namely `Experiment`, `Survey`, `Station`, `Run` have convenience objects to contain a collection of the next level down. For example `Experiment.surveys`, `Survey.stations` or `Station.runs` or `Run.channels`. This object is a combination of a `List` and `Dictionary`, which allows the user to access items in the collection by index or key word. Each level of metadata also has a `add_`, `get_`, and `remove_` method to add/get/remove an item from the collection. And example below. \n", "\n", "