{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Synthetic Data Tutorial\n", "\n", "This notebook shows how to process MTH5 data from a synthetic dataset.\n", "\n", "It also shows how to modify processing so that Fourier coefficients are saved in the mth5. These FCs can be used to perform TF estimation using different regression settings. The same FCs will be used for feature extraction in future (This section is a work in Progress). \n", "\n", "## Contents:\n", "\n", "1. [Process Synthetic Data with Aurora](#Process-Synthetic-Data-with-Aurora)\n", "2. [Fourier coefficient storage in MTH5](#Fourier-coefficient-storage-in-MTH5)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Process Synthetic Data with Aurora" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is a minimal example of running aurora processing on an mth5 populated with synthetic time series.\n", "\n", "\n", "Steps:\n", "1. Create the synthetic mth5\n", "2. Get a Run Summary from the mth5\n", "3. Select the station to process and optionally the remote reference station\n", "4. Create a processing config\n", "5. Generate TFs\n", "6. Archive the TFs (in emtf_xml or z-file)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Here are the modules we will need to import " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/kkappler/software/irismt/mtpy-v2/mtpy/modeling/simpeg/recipes/inversion_2d.py:39: UserWarning: Pardiso not installed see https://github.com/simpeg/pydiso/blob/main/README.md.\n", " warnings.warn(\n" ] } ], "source": [ "import pathlib\n", "import warnings\n", "\n", "from aurora.config.config_creator import ConfigCreator\n", "from aurora.pipelines.process_mth5 import process_mth5\n", "from mth5.data.make_mth5_from_asc import create_test12rr_h5\n", "from mth5.data.paths import SyntheticTestPaths\n", "from mth5.processing import RunSummary, KernelDataset\n", "\n", "warnings.filterwarnings('ignore')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Define target folder and mth5 path\n", "\n", "By default, the synthetic mth5 file is used for testing in `aurora/tests/synthetic/` and probably already exists on your system if you have run the tests. In the code below, we check if the file exists already, and if not we make it.\n", "\n", "**NOTE:** If using a read-only HPC installation, you may not be able to write to the directory where aurora is installed. In that case, defining your target path as somewhere you have write permission. In that case, uncommment the READ ONLY INSTALLATION block below." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "synthetic_test_paths = SyntheticTestPaths()\n", "target_folder = synthetic_test_paths.mth5_path\n", "\n", "## READ ONLY INSTALLATION\n", "# home = pathlib.Path.home()\n", "# target_folder = home.joinpath(\"aurora_test_folder\")\n", "# target_folder.mkdir(parents=True, exist_ok=True)\n", "\n", "mth5_path = target_folder.joinpath(\"test12rr.h5\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If the mth5 doesn't already exist, or you want to re-make it, call `create_test12rr_h5()`" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "# Uncomment this to start with a fresh mth5 file\n", "\n", "# mth5_path.unlink()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "if not mth5_path.exists():\n", " create_test12rr_h5(target_folder=target_folder) " ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "### Get a Run Summary\n", "\n", "Note that we didn't need to explicitly open the mth5 to do that, we can pass the path if we want.\n", "Run summary takes a list of mth5 paths as input argument." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m25:03:08T12:58:52 | INFO | line:777 |mth5.mth5 | close_mth5 | Flushing and closing /home/kkappler/software/irismt/mth5/mth5/data/mth5/test12rr.h5\u001b[0m\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
surveystationrunstartendduration
0EMTF Synthetictest10011980-01-01 00:00:00+00:001980-01-01 11:06:39+00:0039999.0
1EMTF Synthetictest20011980-01-01 00:00:00+00:001980-01-01 11:06:39+00:0039999.0
\n", "
" ], "text/plain": [ " survey station run start \\\n", "0 EMTF Synthetic test1 001 1980-01-01 00:00:00+00:00 \n", "1 EMTF Synthetic test2 001 1980-01-01 00:00:00+00:00 \n", "\n", " end duration \n", "0 1980-01-01 11:06:39+00:00 39999.0 \n", "1 1980-01-01 11:06:39+00:00 39999.0 " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mth5_run_summary = RunSummary()\n", "mth5_run_summary.from_mth5s([mth5_path,])\n", "run_summary = mth5_run_summary.clone()\n", "run_summary.mini_summary" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Define a Kernel Dataset\n" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m25:03:08T12:58:52 | INFO | line:262 |mtpy.processing.kernel_dataset | _add_columns | KernelDataset DataFrame needs column fc, adding and setting dtype to .\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:262 |mtpy.processing.kernel_dataset | _add_columns | KernelDataset DataFrame needs column remote, adding and setting dtype to .\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:262 |mtpy.processing.kernel_dataset | _add_columns | KernelDataset DataFrame needs column run_dataarray, adding and setting dtype to .\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:262 |mtpy.processing.kernel_dataset | _add_columns | KernelDataset DataFrame needs column stft, adding and setting dtype to .\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:262 |mtpy.processing.kernel_dataset | _add_columns | KernelDataset DataFrame needs column mth5_obj, adding and setting dtype to .\u001b[0m\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
surveystationrunstartendduration
0EMTF Synthetictest10011980-01-01 00:00:00+00:001980-01-01 11:06:39+00:0039999.0
1EMTF Synthetictest20011980-01-01 00:00:00+00:001980-01-01 11:06:39+00:0039999.0
\n", "
" ], "text/plain": [ " survey station run start \\\n", "0 EMTF Synthetic test1 001 1980-01-01 00:00:00+00:00 \n", "1 EMTF Synthetic test2 001 1980-01-01 00:00:00+00:00 \n", "\n", " end duration \n", "0 1980-01-01 11:06:39+00:00 39999.0 \n", "1 1980-01-01 11:06:39+00:00 39999.0 " ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "kernel_dataset = KernelDataset()\n", "kernel_dataset.from_run_summary(run_summary, \"test1\", \"test2\")\n", "kernel_dataset.mini_summary" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Now define the processing Configuration\n", "\n", "The only things we need to provide are our band processing scheme, and the data sample rate to generate a default processing configuration.\n", "\n", "The config will get its information about the specific stations to process via the kernel dataset.\n", "\n", "**NOTE:** When doing only single station processing you need to specify RME processing (rather than remote reference processing which expects extra time series from another station)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m25:03:08T12:58:52 | INFO | line:108 |aurora.config.config_creator | determine_band_specification_style | Bands not defined; setting to EMTF BANDS_DEFAULT_FILE\u001b[0m\n" ] } ], "source": [ "cc = ConfigCreator()\n", "config = cc.create_from_kernel_dataset(kernel_dataset)\n", "\n", "# you can export the config to a json by uncommenting the following line\n", "# cfg_json = config.to_json()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Take a look at the processing configuration" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "{\n", " \"processing\": {\n", " \"band_setup_file\": \"/home/kkappler/software/irismt/aurora/aurora/config/emtf_band_setup/bs_test.cfg\",\n", " \"band_specification_style\": \"EMTF\",\n", " \"channel_nomenclature.ex\": \"ex\",\n", " \"channel_nomenclature.ey\": \"ey\",\n", " \"channel_nomenclature.hx\": \"hx\",\n", " \"channel_nomenclature.hy\": \"hy\",\n", " \"channel_nomenclature.hz\": \"hz\",\n", " \"decimations\": [\n", " {\n", " \"decimation_level\": {\n", " \"bands\": [\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.23828125,\n", " \"frequency_min\": 0.19140625,\n", " \"index_max\": 30,\n", " \"index_min\": 25\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.19140625,\n", " \"frequency_min\": 0.15234375,\n", " \"index_max\": 24,\n", " \"index_min\": 20\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.15234375,\n", " \"frequency_min\": 0.12109375,\n", " \"index_max\": 19,\n", " \"index_min\": 16\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.12109375,\n", " \"frequency_min\": 0.09765625,\n", " \"index_max\": 15,\n", " \"index_min\": 13\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.09765625,\n", " \"frequency_min\": 0.07421875,\n", " \"index_max\": 12,\n", " \"index_min\": 10\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.07421875,\n", " \"frequency_min\": 0.05859375,\n", " \"index_max\": 9,\n", " \"index_min\": 8\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.05859375,\n", " \"frequency_min\": 0.04296875,\n", " \"index_max\": 7,\n", " \"index_min\": 6\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 0,\n", " \"frequency_max\": 0.04296875,\n", " \"frequency_min\": 0.03515625,\n", " \"index_max\": 5,\n", " \"index_min\": 5\n", " }\n", " }\n", " ],\n", " \"decimation.anti_alias_filter\": \"default\",\n", " \"decimation.factor\": 1.0,\n", " \"decimation.level\": 0,\n", " \"decimation.method\": \"default\",\n", " \"decimation.sample_rate\": 1.0,\n", " \"estimator.engine\": \"RME_RR\",\n", " \"estimator.estimate_per_channel\": true,\n", " \"input_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"output_channels\": [\n", " \"ex\",\n", " \"ey\",\n", " \"hz\"\n", " ],\n", " \"reference_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"regression.max_iterations\": 10,\n", " \"regression.max_redescending_iterations\": 2,\n", " \"regression.minimum_cycles\": 10,\n", " \"regression.r0\": 1.5,\n", " \"regression.tolerance\": 0.005,\n", " \"regression.u0\": 2.8,\n", " \"regression.verbosity\": 0,\n", " \"save_fcs\": false,\n", " \"stft.harmonic_indices\": [\n", " -1\n", " ],\n", " \"stft.method\": \"fft\",\n", " \"stft.min_num_stft_windows\": 2,\n", " \"stft.per_window_detrend_type\": \"linear\",\n", " \"stft.pre_fft_detrend_type\": \"linear\",\n", " \"stft.prewhitening_type\": \"first difference\",\n", " \"stft.recoloring\": true,\n", " \"stft.window.clock_zero_type\": \"ignore\",\n", " \"stft.window.normalized\": true,\n", " \"stft.window.num_samples\": 128,\n", " \"stft.window.overlap\": 32,\n", " \"stft.window.type\": \"boxcar\"\n", " }\n", " },\n", " {\n", " \"decimation_level\": {\n", " \"bands\": [\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 1,\n", " \"frequency_max\": 0.0341796875,\n", " \"frequency_min\": 0.0263671875,\n", " \"index_max\": 17,\n", " \"index_min\": 14\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 1,\n", " \"frequency_max\": 0.0263671875,\n", " \"frequency_min\": 0.0205078125,\n", " \"index_max\": 13,\n", " \"index_min\": 11\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 1,\n", " \"frequency_max\": 0.0205078125,\n", " \"frequency_min\": 0.0166015625,\n", " \"index_max\": 10,\n", " \"index_min\": 9\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 1,\n", " \"frequency_max\": 0.0166015625,\n", " \"frequency_min\": 0.0126953125,\n", " \"index_max\": 8,\n", " \"index_min\": 7\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 1,\n", " \"frequency_max\": 0.0126953125,\n", " \"frequency_min\": 0.0107421875,\n", " \"index_max\": 6,\n", " \"index_min\": 6\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 1,\n", " \"frequency_max\": 0.0107421875,\n", " \"frequency_min\": 0.0087890625,\n", " \"index_max\": 5,\n", " \"index_min\": 5\n", " }\n", " }\n", " ],\n", " \"decimation.anti_alias_filter\": \"default\",\n", " \"decimation.factor\": 4.0,\n", " \"decimation.level\": 1,\n", " \"decimation.method\": \"default\",\n", " \"decimation.sample_rate\": 0.25,\n", " \"estimator.engine\": \"RME_RR\",\n", " \"estimator.estimate_per_channel\": true,\n", " \"input_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"output_channels\": [\n", " \"ex\",\n", " \"ey\",\n", " \"hz\"\n", " ],\n", " \"reference_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"regression.max_iterations\": 10,\n", " \"regression.max_redescending_iterations\": 2,\n", " \"regression.minimum_cycles\": 10,\n", " \"regression.r0\": 1.5,\n", " \"regression.tolerance\": 0.005,\n", " \"regression.u0\": 2.8,\n", " \"regression.verbosity\": 0,\n", " \"save_fcs\": false,\n", " \"stft.harmonic_indices\": [\n", " -1\n", " ],\n", " \"stft.method\": \"fft\",\n", " \"stft.min_num_stft_windows\": 2,\n", " \"stft.per_window_detrend_type\": \"linear\",\n", " \"stft.pre_fft_detrend_type\": \"linear\",\n", " \"stft.prewhitening_type\": \"first difference\",\n", " \"stft.recoloring\": true,\n", " \"stft.window.clock_zero_type\": \"ignore\",\n", " \"stft.window.normalized\": true,\n", " \"stft.window.num_samples\": 128,\n", " \"stft.window.overlap\": 32,\n", " \"stft.window.type\": \"boxcar\"\n", " }\n", " },\n", " {\n", " \"decimation_level\": {\n", " \"bands\": [\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 2,\n", " \"frequency_max\": 0.008544921875,\n", " \"frequency_min\": 0.006591796875,\n", " \"index_max\": 17,\n", " \"index_min\": 14\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 2,\n", " \"frequency_max\": 0.006591796875,\n", " \"frequency_min\": 0.005126953125,\n", " \"index_max\": 13,\n", " \"index_min\": 11\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 2,\n", " \"frequency_max\": 0.005126953125,\n", " \"frequency_min\": 0.004150390625,\n", " \"index_max\": 10,\n", " \"index_min\": 9\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 2,\n", " \"frequency_max\": 0.004150390625,\n", " \"frequency_min\": 0.003173828125,\n", " \"index_max\": 8,\n", " \"index_min\": 7\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 2,\n", " \"frequency_max\": 0.003173828125,\n", " \"frequency_min\": 0.002685546875,\n", " \"index_max\": 6,\n", " \"index_min\": 6\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 2,\n", " \"frequency_max\": 0.002685546875,\n", " \"frequency_min\": 0.002197265625,\n", " \"index_max\": 5,\n", " \"index_min\": 5\n", " }\n", " }\n", " ],\n", " \"decimation.anti_alias_filter\": \"default\",\n", " \"decimation.factor\": 4.0,\n", " \"decimation.level\": 2,\n", " \"decimation.method\": \"default\",\n", " \"decimation.sample_rate\": 0.0625,\n", " \"estimator.engine\": \"RME_RR\",\n", " \"estimator.estimate_per_channel\": true,\n", " \"input_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"output_channels\": [\n", " \"ex\",\n", " \"ey\",\n", " \"hz\"\n", " ],\n", " \"reference_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"regression.max_iterations\": 10,\n", " \"regression.max_redescending_iterations\": 2,\n", " \"regression.minimum_cycles\": 10,\n", " \"regression.r0\": 1.5,\n", " \"regression.tolerance\": 0.005,\n", " \"regression.u0\": 2.8,\n", " \"regression.verbosity\": 0,\n", " \"save_fcs\": false,\n", " \"stft.harmonic_indices\": [\n", " -1\n", " ],\n", " \"stft.method\": \"fft\",\n", " \"stft.min_num_stft_windows\": 2,\n", " \"stft.per_window_detrend_type\": \"linear\",\n", " \"stft.pre_fft_detrend_type\": \"linear\",\n", " \"stft.prewhitening_type\": \"first difference\",\n", " \"stft.recoloring\": true,\n", " \"stft.window.clock_zero_type\": \"ignore\",\n", " \"stft.window.normalized\": true,\n", " \"stft.window.num_samples\": 128,\n", " \"stft.window.overlap\": 32,\n", " \"stft.window.type\": \"boxcar\"\n", " }\n", " },\n", " {\n", " \"decimation_level\": {\n", " \"bands\": [\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 3,\n", " \"frequency_max\": 0.00274658203125,\n", " \"frequency_min\": 0.00213623046875,\n", " \"index_max\": 22,\n", " \"index_min\": 18\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 3,\n", " \"frequency_max\": 0.00213623046875,\n", " \"frequency_min\": 0.00164794921875,\n", " \"index_max\": 17,\n", " \"index_min\": 14\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 3,\n", " \"frequency_max\": 0.00164794921875,\n", " \"frequency_min\": 0.00115966796875,\n", " \"index_max\": 13,\n", " \"index_min\": 10\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 3,\n", " \"frequency_max\": 0.00115966796875,\n", " \"frequency_min\": 0.00079345703125,\n", " \"index_max\": 9,\n", " \"index_min\": 7\n", " }\n", " },\n", " {\n", " \"band\": {\n", " \"center_averaging_type\": \"geometric\",\n", " \"closed\": \"left\",\n", " \"decimation_level\": 3,\n", " \"frequency_max\": 0.00079345703125,\n", " \"frequency_min\": 0.00054931640625,\n", " \"index_max\": 6,\n", " \"index_min\": 5\n", " }\n", " }\n", " ],\n", " \"decimation.anti_alias_filter\": \"default\",\n", " \"decimation.factor\": 4.0,\n", " \"decimation.level\": 3,\n", " \"decimation.method\": \"default\",\n", " \"decimation.sample_rate\": 0.015625,\n", " \"estimator.engine\": \"RME_RR\",\n", " \"estimator.estimate_per_channel\": true,\n", " \"input_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"output_channels\": [\n", " \"ex\",\n", " \"ey\",\n", " \"hz\"\n", " ],\n", " \"reference_channels\": [\n", " \"hx\",\n", " \"hy\"\n", " ],\n", " \"regression.max_iterations\": 10,\n", " \"regression.max_redescending_iterations\": 2,\n", " \"regression.minimum_cycles\": 10,\n", " \"regression.r0\": 1.5,\n", " \"regression.tolerance\": 0.005,\n", " \"regression.u0\": 2.8,\n", " \"regression.verbosity\": 0,\n", " \"save_fcs\": false,\n", " \"stft.harmonic_indices\": [\n", " -1\n", " ],\n", " \"stft.method\": \"fft\",\n", " \"stft.min_num_stft_windows\": 2,\n", " \"stft.per_window_detrend_type\": \"linear\",\n", " \"stft.pre_fft_detrend_type\": \"linear\",\n", " \"stft.prewhitening_type\": \"first difference\",\n", " \"stft.recoloring\": true,\n", " \"stft.window.clock_zero_type\": \"ignore\",\n", " \"stft.window.normalized\": true,\n", " \"stft.window.num_samples\": 128,\n", " \"stft.window.overlap\": 32,\n", " \"stft.window.type\": \"boxcar\"\n", " }\n", " }\n", " ],\n", " \"id\": \"test1_rr_test2_sr1\",\n", " \"stations.local.id\": \"test1\",\n", " \"stations.local.mth5_path\": \"/home/kkappler/software/irismt/mth5/mth5/data/mth5/test12rr.h5\",\n", " \"stations.local.remote\": false,\n", " \"stations.local.runs\": [\n", " {\n", " \"run\": {\n", " \"id\": \"001\",\n", " \"input_channels\": [\n", " {\n", " \"channel\": {\n", " \"id\": \"hx\",\n", " \"scale_factor\": 1.0\n", " }\n", " },\n", " {\n", " \"channel\": {\n", " \"id\": \"hy\",\n", " \"scale_factor\": 1.0\n", " }\n", " }\n", " ],\n", " \"output_channels\": [\n", " {\n", " \"channel\": {\n", " \"id\": \"ex\",\n", " \"scale_factor\": 1.0\n", " }\n", " },\n", " {\n", " \"channel\": {\n", " \"id\": \"ey\",\n", " \"scale_factor\": 1.0\n", " }\n", " },\n", " {\n", " \"channel\": {\n", " \"id\": \"hz\",\n", " \"scale_factor\": 1.0\n", " }\n", " }\n", " ],\n", " \"sample_rate\": 1.0,\n", " \"time_periods\": [\n", " {\n", " \"time_period\": {\n", " \"end\": \"1980-01-01T11:06:39+00:00\",\n", " \"start\": \"1980-01-01T00:00:00+00:00\"\n", " }\n", " }\n", " ]\n", " }\n", " }\n", " ],\n", " \"stations.remote\": [\n", " {\n", " \"station\": {\n", " \"id\": \"test2\",\n", " \"mth5_path\": \"/home/kkappler/software/irismt/mth5/mth5/data/mth5/test12rr.h5\",\n", " \"remote\": true,\n", " \"runs\": [\n", " {\n", " \"run\": {\n", " \"id\": \"001\",\n", " \"input_channels\": [\n", " {\n", " \"channel\": {\n", " \"id\": \"hx\",\n", " \"scale_factor\": 1.0\n", " }\n", " },\n", " {\n", " \"channel\": {\n", " \"id\": \"hy\",\n", " \"scale_factor\": 1.0\n", " }\n", " }\n", " ],\n", " \"output_channels\": [\n", " {\n", " \"channel\": {\n", " \"id\": \"ex\",\n", " \"scale_factor\": 1.0\n", " }\n", " },\n", " {\n", " \"channel\": {\n", " \"id\": \"ey\",\n", " \"scale_factor\": 1.0\n", " }\n", " },\n", " {\n", " \"channel\": {\n", " \"id\": \"hz\",\n", " \"scale_factor\": 1.0\n", " }\n", " }\n", " ],\n", " \"sample_rate\": 1.0,\n", " \"time_periods\": [\n", " {\n", " \"time_period\": {\n", " \"end\": \"1980-01-01T11:06:39+00:00\",\n", " \"start\": \"1980-01-01T00:00:00+00:00\"\n", " }\n", " }\n", " ]\n", " }\n", " }\n", " ]\n", " }\n", " }\n", " ]\n", " }\n", "}" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "config" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Call process_mth5" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[1m25:03:08T12:58:52 | INFO | line:291 |aurora.pipelines.transfer_function_kernel | show_processing_summary | Processing Summary Dataframe:\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:292 |aurora.pipelines.transfer_function_kernel | show_processing_summary | \n", " duration has_data n_samples run station survey run_hdf5_reference station_hdf5_reference fc remote stft mth5_obj dec_level dec_factor sample_rate window_duration num_samples_window num_samples num_stft_windows\n", "0 39999.0 True 40000 001 test1 EMTF Synthetic False None None 0 1.0 1.000000 128.0 128 39999.0 416.0\n", "1 39999.0 True 40000 001 test1 EMTF Synthetic False None None 1 4.0 0.250000 512.0 128 9999.0 103.0\n", "2 39999.0 True 40000 001 test1 EMTF Synthetic False None None 2 4.0 0.062500 2048.0 128 2499.0 25.0\n", "3 39999.0 True 40000 001 test1 EMTF Synthetic False None None 3 4.0 0.015625 8192.0 128 624.0 6.0\n", "4 39999.0 True 40000 001 test2 EMTF Synthetic True None None 0 1.0 1.000000 128.0 128 39999.0 416.0\n", "5 39999.0 True 40000 001 test2 EMTF Synthetic True None None 1 4.0 0.250000 512.0 128 9999.0 103.0\n", "6 39999.0 True 40000 001 test2 EMTF Synthetic True None None 2 4.0 0.062500 2048.0 128 2499.0 25.0\n", "7 39999.0 True 40000 001 test2 EMTF Synthetic True None None 3 4.0 0.015625 8192.0 128 624.0 6.0\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:680 |aurora.pipelines.transfer_function_kernel | memory_check | Total memory: 62.74 GB\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:684 |aurora.pipelines.transfer_function_kernel | memory_check | Total Bytes of Raw Data: 0.001 GB\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:687 |aurora.pipelines.transfer_function_kernel | memory_check | Raw Data will use: 0.001 % of memory\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:733 |aurora.pipelines.transfer_function_kernel | mth5_has_fcs | Fourier coefficients not detected for survey: EMTF Synthetic, station: test1, run: 001-- Fourier coefficients will be computed\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:777 |mth5.mth5 | close_mth5 | Flushing and closing /home/kkappler/software/irismt/mth5/mth5/data/mth5/test12rr.h5\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:733 |aurora.pipelines.transfer_function_kernel | mth5_has_fcs | Fourier coefficients not detected for survey: EMTF Synthetic, station: test2, run: 001-- Fourier coefficients will be computed\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:777 |mth5.mth5 | close_mth5 | Flushing and closing /home/kkappler/software/irismt/mth5/mth5/data/mth5/test12rr.h5\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:262 |aurora.pipelines.transfer_function_kernel | check_if_fcs_already_exist | FC levels not present\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:552 |aurora.pipelines.process_mth5 | process_mth5_legacy | Processing config indicates 4 decimation levels\u001b[0m\n", "\u001b[1m25:03:08T12:58:52 | INFO | line:463 |aurora.pipelines.transfer_function_kernel | valid_decimations | After validation there are 4 valid decimation levels\u001b[0m\n", "\u001b[1m25:03:08T12:58:53 | INFO | line:900 |mtpy.processing.kernel_dataset | initialize_dataframe_for_processing | Dataset dataframe initialized successfully\u001b[0m\n", "\u001b[1m25:03:08T12:58:53 | INFO | line:157 |aurora.pipelines.transfer_function_kernel | update_dataset_df | Dataset Dataframe Updated for decimation level 0 Successfully\u001b[0m\n", "\u001b[1m25:03:08T12:58:53 | INFO | line:387 |aurora.pipelines.process_mth5 | save_fourier_coefficients | Skip saving FCs. dec_level_config.save_fc = False\u001b[0m\n", "\u001b[1m25:03:08T12:58:53 | INFO | line:387 |aurora.pipelines.process_mth5 | save_fourier_coefficients | Skip saving FCs. dec_level_config.save_fc = False\u001b[0m\n", "\u001b[1m25:03:08T12:58:53 | INFO | line:46 |aurora.time_series.frequency_band_helpers | get_band_for_tf_estimate | Accessing band 25.728968s (0.038867Hz)\u001b[0m\n", "\u001b[1m25:03:08T12:58:54 | INFO | line:208 |aurora.time_series.frequency_band_helpers | get_band_for_coherence_sorting | Processing band 25.728968s (0.038867Hz)\u001b[0m\n", "\u001b[33m\u001b[1m25:03:08T12:58:54 | WARNING | line:213 |aurora.time_series.frequency_band_helpers | get_band_for_coherence_sorting | Cant evaluate coherence with only 1 harmonic\u001b[0m\n", "\u001b[1m25:03:08T12:58:54 | INFO | line:214 |aurora.time_series.frequency_band_helpers | get_band_for_coherence_sorting | Widening band according to min3 rule\u001b[0m\n", "\u001b[1m25:03:08T12:58:54 | INFO | line:46 |aurora.time_series.frequency_band_helpers | get_band_for_tf_estimate | Accessing band 26.836092s (0.037263Hz)\u001b[0m\n", "\u001b[1m25:03:08T12:58:54 | INFO | line:116 |mth5.helpers | close_open_files | /home/kkappler/software/irismt/mth5/mth5/data/mth5/test12rr.h5, Closed File\u001b[0m\n", "\u001b[1m25:03:08T12:58:54 | INFO | line:116 |mth5.helpers | close_open_files | /home/kkappler/software/irismt/mth5/mth5/data/mth5/test12rr.h5, Closed File\u001b[0m\n", "\u001b[31m\u001b[1m25:03:08T12:58:54 | ERROR | line:665 |aurora.pipelines.process_mth5 | process_mth5 | Failed to run legacy processing\n", "closing all open mth5 files and exitingThe encountered exception was 'Band' object has no attribute 'bands'\u001b[0m\n", "\u001b[31m\u001b[1m25:03:08T12:58:54 | ERROR | line:666 |aurora.pipelines.process_mth5 | process_mth5 | Failed to run legacy processing\n", "closing all open mth5 files and exitingThe encountered exception was 'Band' object has no attribute 'bands'\u001b[0m\n", "\u001b[33m\u001b[1mTraceback (most recent call last):\u001b[0m\n", "\n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/runpy.py\", line 197, in _run_module_as_main\n", " return _run_code(code, main_globals, None,\n", " │ │ └ {'__name__': '__main__', '__doc__': 'Entry point for launching an IPython kernel.\\n\\nThis is separate from the ipykernel pack...\n", " │ └ at 0x7cf02c8ee450, file \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel_lau...\n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/runpy.py\", line 87, in _run_code\n", " exec(code, run_globals)\n", " │ └ {'__name__': '__main__', '__doc__': 'Entry point for launching an IPython kernel.\\n\\nThis is separate from the ipykernel pack...\n", " └ at 0x7cf02c8ee450, file \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel_lau...\n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel_launcher.py\", line 18, in \n", " app.launch_new_instance()\n", " │ └ >\n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/traitlets/config/application.py\", line 1075, in launch_instance\n", " app.start()\n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/kernelapp.py\", line 739, in start\n", " self.io_loop.start()\n", " │ │ └ \n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/tornado/platform/asyncio.py\", line 205, in start\n", " self.asyncio_loop.run_forever()\n", " │ │ └ \n", " │ └ <_UnixSelectorEventLoop running=True closed=False debug=False>\n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/asyncio/base_events.py\", line 601, in run_forever\n", " self._run_once()\n", " │ └ \n", " └ <_UnixSelectorEventLoop running=True closed=False debug=False>\n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/asyncio/base_events.py\", line 1905, in _run_once\n", " handle._run()\n", " │ └ \n", " └ (, ...],))>)>\n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/asyncio/events.py\", line 80, in _run\n", " self._context.run(self._callback, *self._args)\n", " │ │ │ │ │ └ \n", " │ │ │ │ └ (, ...],))>)>\n", " │ │ │ └ \n", " │ │ └ (, ...],))>)>\n", " │ └ \n", " └ (, ...],))>)>\n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/kernelbase.py\", line 545, in dispatch_queue\n", " await self.process_one()\n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/kernelbase.py\", line 534, in process_one\n", " await dispatch(*args)\n", " │ └ ([, ')>, , >\n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/kernelbase.py\", line 437, in dispatch_shell\n", " await result\n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/ipkernel.py\", line 362, in execute_request\n", " await super().execute_request(stream, ident, parent)\n", " │ │ └ {'header': {'date': datetime.datetime(2025, 3, 8, 20, 58, 47, 601000, tzinfo=tzutc()), 'msg_id': 'c417b299-e8a6-4e18-a64c-c08...\n", " │ └ [b'19410a80-f302-4536-b66f-4b7ff0d5f633']\n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/kernelbase.py\", line 778, in execute_request\n", " reply_content = await reply_content\n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/ipkernel.py\", line 449, in do_execute\n", " res = shell.run_cell(\n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/ipykernel/zmqshell.py\", line 549, in run_cell\n", " return super().run_cell(*args, **kwargs)\n", " │ └ {'store_history': True, 'silent': False, 'cell_id': '667bf6f1-9faf-4dd7-b7cb-15e65c50ba0f'}\n", " └ ('show_plot = True\\ntf_cls = process_mth5(config,\\n kernel_dataset,\\n units=\"MT\",\\n ...\n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/IPython/core/interactiveshell.py\", line 3048, in run_cell\n", " result = self._run_cell(\n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/IPython/core/interactiveshell.py\", line 3103, in _run_cell\n", " result = runner(coro)\n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/IPython/core/async_helpers.py\", line 129, in _pseudo_sync_runner\n", " coro.send(None)\n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/IPython/core/interactiveshell.py\", line 3308, in run_cell_async\n", " has_raised = await self.run_ast_nodes(code_ast.body, cell_name,\n", " │ │ │ │ └ '/tmp/ipykernel_2837066/2463673138.py'\n", " │ │ │ └ [, ]\n", " │ │ └ \n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/IPython/core/interactiveshell.py\", line 3490, in run_ast_nodes\n", " if await self.run_code(code, result, async_=asy):\n", " │ │ │ │ └ False\n", " │ │ │ └ at 0x7cefbdb1d9d0, file \"/tmp/ipykernel_2837066/2463673138.py\", line 2>\n", " │ └ \n", " └ \n", " File \"/home/kkappler/anaconda3/envs/aurora/lib/python3.9/site-packages/IPython/core/interactiveshell.py\", line 3550, in run_code\n", " exec(code_obj, self.user_global_ns, self.user_ns)\n", " │ │ │ │ └ {'__name__': '__main__', '__doc__': 'Automatically created module for IPython interactive environment', '__package__': None, ...\n", " │ │ │ └ \n", " │ │ └ \n", " │ └ \n", " └ at 0x7cefbdb1d9d0, file \"/tmp/ipykernel_2837066/2463673138.py\", line 2>\n", "\n", " File \"\u001b[32m/tmp/ipykernel_2837066/\u001b[0m\u001b[32m\u001b[1m2463673138.py\u001b[0m\", line \u001b[33m2\u001b[0m, in \u001b[35m\u001b[0m\n", " \u001b[1mtf_cls\u001b[0m \u001b[35m\u001b[1m=\u001b[0m \u001b[1mprocess_mth5\u001b[0m\u001b[1m(\u001b[0m\u001b[1mconfig\u001b[0m\u001b[1m,\u001b[0m\n", " \u001b[36m │ └ \u001b[0m\u001b[36m\u001b[1m{\u001b[0m\n", " \u001b[36m │ \u001b[0m\u001b[36m\u001b[1m \"processing\": {\u001b[0m\n", " \u001b[36m │ \u001b[0m\u001b[36m\u001b[1m \"band_setup_file\": \"/home/kkappler/software/irismt/aurora/aurora/config/emtf_band_setup/bs_test...\u001b[0m\n", " \u001b[36m └ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", "\n", "> File \"\u001b[32m/home/kkappler/software/irismt/aurora/aurora/pipelines/\u001b[0m\u001b[32m\u001b[1mprocess_mth5.py\u001b[0m\", line \u001b[33m652\u001b[0m, in \u001b[35mprocess_mth5\u001b[0m\n", " \u001b[35m\u001b[1mreturn\u001b[0m \u001b[1mprocess_mth5_legacy\u001b[0m\u001b[1m(\u001b[0m\n", " \u001b[36m └ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", "\n", " File \"\u001b[32m/home/kkappler/software/irismt/aurora/aurora/pipelines/\u001b[0m\u001b[32m\u001b[1mprocess_mth5.py\u001b[0m\", line \u001b[33m567\u001b[0m, in \u001b[35mprocess_mth5_legacy\u001b[0m\n", " \u001b[1mttfz_obj\u001b[0m \u001b[35m\u001b[1m=\u001b[0m \u001b[1mprocess_tf_decimation_level\u001b[0m\u001b[1m(\u001b[0m\n", " \u001b[36m └ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", "\n", " File \"\u001b[32m/home/kkappler/software/irismt/aurora/aurora/pipelines/\u001b[0m\u001b[32m\u001b[1mprocess_mth5.py\u001b[0m\", line \u001b[33m200\u001b[0m, in \u001b[35mprocess_tf_decimation_level\u001b[0m\n", " \u001b[1mtransfer_function_obj\u001b[0m \u001b[35m\u001b[1m=\u001b[0m \u001b[1mprocess_transfer_functions\u001b[0m\u001b[1m(\u001b[0m\n", " \u001b[36m └ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", "\n", " File \"\u001b[32m/home/kkappler/software/irismt/aurora/aurora/pipelines/\u001b[0m\u001b[32m\u001b[1mtransfer_function_helpers.py\u001b[0m\", line \u001b[33m290\u001b[0m, in \u001b[35mprocess_transfer_functions\u001b[0m\n", " \u001b[1mspgm\u001b[0m\u001b[35m\u001b[1m.\u001b[0m\u001b[1mcross_powers\u001b[0m\u001b[1m(\u001b[0m\u001b[1mfrequency_bands\u001b[0m\u001b[35m\u001b[1m=\u001b[0m\u001b[1m(\u001b[0m\u001b[1mfeature_band\u001b[0m\u001b[1m)\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[36m│ │ └ \u001b[0m\u001b[36m\u001b[1m{\u001b[0m\n", " \u001b[36m│ │ \u001b[0m\u001b[36m\u001b[1m \"band\": {\u001b[0m\n", " \u001b[36m│ │ \u001b[0m\u001b[36m\u001b[1m \"center_averaging_type\": \"geometric\",\u001b[0m\n", " \u001b[36m│ │ \u001b[0m\u001b[36m\u001b[1m \"closed\": \"left\",\u001b[0m\n", " \u001b[36m│ │ \u001b[0m\u001b[36m\u001b[1m \"decimation_level\": 0,\u001b[0m\n", " \u001b[36m│ │ \u001b[0m\u001b[36m\u001b[1m ...\u001b[0m\n", " \u001b[36m│ └ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", " \u001b[36m└ \u001b[0m\u001b[36m\u001b[1mSpectrogram:\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m3 harmonics, 0.0078125Hz spaced \u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m from 0.03125 to 0.046875 Hz.\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m416 Time observations \u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1mStart: 1980-01-01T00:00:0...\u001b[0m\n", "\n", " File \"\u001b[32m/home/kkappler/software/irismt/mth5/mth5/timeseries/spectre/\u001b[0m\u001b[32m\u001b[1mspectrogram.py\u001b[0m\", line \u001b[33m265\u001b[0m, in \u001b[35mcross_powers\u001b[0m\n", " \u001b[1mvalid_frequency_bands\u001b[0m \u001b[35m\u001b[1m=\u001b[0m \u001b[1mself\u001b[0m\u001b[35m\u001b[1m.\u001b[0m\u001b[1m_validate_frequency_bands\u001b[0m\u001b[1m(\u001b[0m\u001b[1mfrequency_bands\u001b[0m\u001b[1m)\u001b[0m\n", " \u001b[36m │ │ └ \u001b[0m\u001b[36m\u001b[1m{\u001b[0m\n", " \u001b[36m │ │ \u001b[0m\u001b[36m\u001b[1m \"band\": {\u001b[0m\n", " \u001b[36m │ │ \u001b[0m\u001b[36m\u001b[1m \"center_averaging_type\": \"geometric\",\u001b[0m\n", " \u001b[36m │ │ \u001b[0m\u001b[36m\u001b[1m \"closed\": \"left\",\u001b[0m\n", " \u001b[36m │ │ \u001b[0m\u001b[36m\u001b[1m \"decimation_level\": 0,\u001b[0m\n", " \u001b[36m │ │ \u001b[0m\u001b[36m\u001b[1m ...\u001b[0m\n", " \u001b[36m │ └ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", " \u001b[36m └ \u001b[0m\u001b[36m\u001b[1mSpectrogram:\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m3 harmonics, 0.0078125Hz spaced \u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m from 0.03125 to 0.046875 Hz.\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m416 Time observations \u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1mStart: 1980-01-01T00:00:0...\u001b[0m\n", "\n", " File \"\u001b[32m/home/kkappler/software/irismt/mth5/mth5/timeseries/spectre/\u001b[0m\u001b[32m\u001b[1mspectrogram.py\u001b[0m\", line \u001b[33m219\u001b[0m, in \u001b[35m_validate_frequency_bands\u001b[0m\n", " \u001b[1mvalid_bands\u001b[0m \u001b[35m\u001b[1m=\u001b[0m \u001b[1m[\u001b[0m\u001b[1mx\u001b[0m \u001b[35m\u001b[1mfor\u001b[0m \u001b[1mx\u001b[0m \u001b[35m\u001b[1min\u001b[0m \u001b[1mfrequency_bands\u001b[0m\u001b[35m\u001b[1m.\u001b[0m\u001b[1mbands\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m \u001b[35m\u001b[1mif\u001b[0m \u001b[1mself\u001b[0m\u001b[35m\u001b[1m.\u001b[0m\u001b[1mfrequency_band\u001b[0m\u001b[35m\u001b[1m.\u001b[0m\u001b[1mcontains\u001b[0m\u001b[1m(\u001b[0m\u001b[1mx\u001b[0m\u001b[1m)\u001b[0m\u001b[1m]\u001b[0m\n", " \u001b[36m │ │ └ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", " \u001b[36m │ └ \u001b[0m\u001b[36m\u001b[1mSpectrogram:\u001b[0m\n", " \u001b[36m │ \u001b[0m\u001b[36m\u001b[1m3 harmonics, 0.0078125Hz spaced \u001b[0m\n", " \u001b[36m │ \u001b[0m\u001b[36m\u001b[1m from 0.03125 to 0.046875 Hz.\u001b[0m\n", " \u001b[36m │ \u001b[0m\u001b[36m\u001b[1m\u001b[0m\n", " \u001b[36m │ \u001b[0m\u001b[36m\u001b[1m416 Time observations \u001b[0m\n", " \u001b[36m │ \u001b[0m\u001b[36m\u001b[1mStart: 1980-01-01T00:00:0...\u001b[0m\n", " \u001b[36m └ \u001b[0m\u001b[36m\u001b[1m{\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m \"band\": {\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m \"center_averaging_type\": \"geometric\",\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m \"closed\": \"left\",\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m \"decimation_level\": 0,\u001b[0m\n", " \u001b[36m \u001b[0m\u001b[36m\u001b[1m ...\u001b[0m\n", "\n", "\u001b[31m\u001b[1mAttributeError\u001b[0m:\u001b[1m 'Band' object has no attribute 'bands'\u001b[0m\n" ] } ], "source": [ "show_plot = True\n", "tf_cls = process_mth5(config,\n", " kernel_dataset,\n", " units=\"MT\",\n", " show_plot=show_plot,\n", " z_file_path=None,\n", " )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Export TF to a file " ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "ename": "AttributeError", "evalue": "'NoneType' object has no attribute 'write'", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", "Cell \u001b[0;32mIn[10], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m xml_file_base \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msynthetic_test1.xml\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m----> 2\u001b[0m \u001b[43mtf_cls\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mwrite\u001b[49m(fn\u001b[38;5;241m=\u001b[39mxml_file_base, file_type\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124memtfxml\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", "\u001b[0;31mAttributeError\u001b[0m: 'NoneType' object has no attribute 'write'" ] } ], "source": [ "xml_file_base = f\"synthetic_test1.xml\"\n", "tf_cls.write(fn=xml_file_base, file_type=\"emtfxml\")\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "edi_file_base = f\"synthetic_test1.edi\"\n", "tf_cls.write(fn=edi_file_base, file_type=\"edi\")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
NOTE Fourier coefficient section below here is a work in progress.
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fourier coefficient storage in MTH5\n", "\n", "The capability to store Fourier coeffficients (FCs) in MTH5 is now available. This will enable some different approaches to processing and data quality control (QC). The data QC tools are a work in progress. The following examples show how to add some FC levels to an MTH5, providing a starting point for processing or feature extraction from these data.\n", "\n", "There are currently two main ways to add FCs to the MTH5.\n", "\n", "1. Store on the fly while processing with Aurora\n", "2. Use a dedicated method to make FCs only." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Storing while processing with Aurora\n", "\n", "We can store FCs while processing by changing the processing config's `save_fcs` attribute to True \n", "\n", "If we do that with the current processing config however we encouter a warning:\n", "\n", "```\n", "Saving FCs for remote reference processing is not supported \n", " - To save FCs, process as single station, then you can use the FCs for RR processing \n", " - See issue #319 for details \n", " - forcing processing config save_fcs = False \n", "```\n", "\n", "There are two workarounds for this:\n", "1. Process each station as a single station, and then the FCs (TODO: Add an example of this)\n", "2. Explicitly call `add_fcs` function.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "file_size_before_adding_fcs = mth5_path.stat().st_size\n", "print(f\"file_size_before_adding_fcs: {file_size_before_adding_fcs}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Using the \"single-station processing method\" of FC generation" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# set kernel_dataset to work on one station only\n", "kernel_dataset = KernelDataset()\n", "kernel_dataset.from_run_summary(run_summary, \"test1\", None) \n", "\n", "# Update the processing config\n", "\n", "cc = ConfigCreator()\n", "config = cc.create_from_kernel_dataset(kernel_dataset)\n", "\n", "# tell the config to save the FCs\n", "for dec in config.decimations:\n", " dec.save_fcs = True\n", " dec.save_fcs_type = \"h5\"\n", "\n", "# you can export the config to a json by uncommenting the following line\n", "# cfg_json = config.to_json()\n", "kernel_dataset.mini_summary" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "show_plot = False\n", "tf_cls = process_mth5(config,\n", " kernel_dataset,\n", " units=\"MT\",\n", " show_plot=show_plot,\n", " z_file_path=None,\n", " )" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "file_size_after_adding_fcs_station_1 = mth5_path.stat().st_size\n", "print(f\"file_size_after_adding_fcs_station_1: {file_size_after_adding_fcs_station_1}\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Now the other station\n", "\n", "# set kernel_dataset to work on one station only\n", "kernel_dataset = KernelDataset()\n", "kernel_dataset.from_run_summary(run_summary, \"test2\", None) \n", "\n", "# Update the processing config\n", "\n", "cc = ConfigCreator()\n", "config = cc.create_from_kernel_dataset(kernel_dataset)\n", "\n", "# tell the config to save the FCs\n", "for dec in config.decimations:\n", " dec.save_fcs = True\n", " dec.save_fcs_type = \"h5\"\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "show_plot = False\n", "tf_cls = process_mth5(config,\n", " kernel_dataset,\n", " units=\"MT\",\n", " show_plot=show_plot,\n", " z_file_path=None,\n", " )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "Now, the FCs are there (for the specific processing configuration).\n", "\n", "If you were to re-process the data, the FCs are already there, " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "file_size_after_adding_fcs_station_2 = mth5_path.stat().st_size\n", "print(f\"file_size_after_adding_fcs_station_2: {file_size_after_adding_fcs_station_2}\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# set kernel_dataset to work on both stations again\n", "kernel_dataset = KernelDataset()\n", "kernel_dataset.from_run_summary(run_summary, \"test1\", \"test2\") \n", "\n", "# Update the processing config\n", "\n", "cc = ConfigCreator()\n", "config = cc.create_from_kernel_dataset(kernel_dataset)\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n", "from aurora.pipelines.transfer_function_kernel import TransferFunctionKernel\n", "tfk = TransferFunctionKernel(dataset=kernel_dataset, config=config)\n", "tfk.update_processing_summary()\n", "tfk.check_if_fcs_already_exist()\n", "tfk.dataset_df" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "show_plot = False\n", "tf_cls = process_mth5(config,\n", " kernel_dataset,\n", " units=\"MT\",\n", " show_plot=show_plot,\n", " z_file_path=None,\n", " )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Using Dedicated FC Generation (`add_fcs` function)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from mth5.timeseries.spectre.helpers import add_fcs_to_mth5\n", "from mth5.timeseries.spectre.helpers import fc_decimations_creator\n", "from mth5.timeseries.spectre.helpers import read_back_fcs" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Build a fresh copy of the synthetic data file" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "mth5_path.unlink()\n", "create_test12rr_h5(target_folder=target_folder)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this case we need to prescribe the decimation configuration.\n", "\n", "If we dont want to decimate, we can just pass \n", "`fc_decimations == \"degenerate\"` to add_fcs\n", "\n", "Here is how the decimations can be created" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sample_rate = 1.0\n", "fc_decimations = fc_decimations_creator(initial_sample_rate=sample_rate, time_period=None)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And here is what they look like, ... a list, with each element specifying the\n", "needed info for decimation and FFT." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fc_decimations\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now add the decimation levels:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "add_fcs_to_mth5(mth5_path, fc_decimations=fc_decimations)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now take a look at the mth5" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import mth5\n", "m = mth5.mth5.MTH5(mth5_path)\n", "m.open_mth5()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m.close_mth5()\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Alternatively, we could have translated the Aurora processing config to an \n", "mt_metadata FC decimation and gnerated FCs with the same function." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "mth5_path.unlink()\n", "create_test12rr_h5(target_folder=target_folder)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Extract FC decimations from processing config and build the layer\n", "\n", "fc_decimations = [\n", " x.to_fc_decimation() for x in config.decimations\n", "]\n", "\n", "add_fcs_to_mth5(mth5_path, fc_decimations=fc_decimations)\n", " " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\n", "read_back_fcs(mth5_path)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And we can see that when processing, aurora detects that the FC layer is already there, and skips creating it." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "show_plot = False\n", "tf_cls = process_mth5(config,\n", " kernel_dataset,\n", " units=\"MT\",\n", " show_plot=show_plot,\n", " z_file_path=None,\n", " )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
NOTE Feature storage section below is a work in progress.
" ] }, { "cell_type": "markdown", "metadata": { "tags": [] }, "source": [ "\n", "# Feature Storage **Experimental work in progress**\n", "\n", "### Make an example of a feature embedded in mth5 file from the FCs.\n", "\n", "Any spectrogram (FC array at some decimation level) can be passed to a feature extraction method.\n", "These features can, in turn be stored in the mth5.\n", "\n", "This will have the following steps:\n", "\n", "0. select the source FC decimation level (Will use \"0\" to start, but also test with \"1\",)\n", "\n", "1. Select the frequency bands (probably make these wider than normal so we have plenty of FCs per time window)\n", "\n", "- Note these are `feature_extraction_bands`, which are possibly different from TF estimation bands.\n", "\n", "To do this we will want to look at the frequencies associated with each FCGroup, and each decimation level.\n", "- Group Runs on Sample Rate\n", " - tabulate decimation levels\n", " - group decimation levels by id (and validate that the decimation_level.metadata.sample_rate_decimations agree)\n", " - for each decimation level, we should get the frequencies associated -- this can be deduced from the shape of the dataset, and\n", " the min/max frequecies of the metadata, but for now we can just unpack the xarray and take the frequncey axis)\n", "\n", "2. loop over the bands (for each band:)\n", "\n", "- 2a. extract the band from the FClayer in the mth5 (shape will be nch x ntime x nharmonics)\n", "\n", "3. loop over time window (for each time):\n", "\n", "- 3a) extract feature\n", "\n", "As a placeholder, we will compute the channel crosspowers, and or channel energy.\n", "\n", "- 3b) place the feature into an xarray\n", "\n", "4) save teh xarray as \"feature_cross_power\"\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Imports \n", "\n", "from mth5.mth5 import MTH5\n", "\n", "import numpy as np\n", "import pandas as pd" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# # Selection of frequency bands \n", "\n", "# active_decimation_level = \"0\"\n", "\n", "# m = MTH5(mth5_path)\n", "# m.open_mth5()\n", "# run_summary_df = m.run_summary # This fails on current main but works on add_aurora_tools branch.\n", "# run_summary_df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It would be nice if we could get a summary of the fcs available in the mth5. here is a prototype for how that could be done.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [] }, "outputs": [], "source": [ "# # Prototype for fc_summary\n", "\n", "# fc_summary = None\n", "\n", "# for i, row in run_summary_df.iterrows():\n", "# print(row.station, row.run)\n", "# station_obj = m.get_station(row.station)\n", "# run_fc_group = station_obj.fourier_coefficients_group.get_fc_group(row.run)\n", "# if fc_summary is None:\n", "# fc_summary = run_fc_group.decimation_level_summary\n", "# fc_summary[\"station\"] = row.station\n", "# fc_summary[\"run\"] = row.run\n", "# fc_summary[\"sample_rate_time_series\"] = 0.0\n", "# fc_summary[\"window_num_samples\"] = 0\n", "# fc_summary[\"harmonic_indices\"] = None\n", "# else:\n", "# tmp = run_fc_group.decimation_level_summary\n", "# tmp[\"station\"] = row.station\n", "# tmp[\"run\"] = row.run\n", "# tmp[\"sample_rate_time_series\"] = 0.0\n", "# tmp[\"window_num_samples\"] = 0\n", "# tmp[\"harmonic_indices\"] = None\n", "# fc_summary = pd.concat([fc_summary, tmp], ignore_index=True)\n", " \n", "# #print(run_fc_group)\n", "# for dec_level_id in run_fc_group.groups_list:\n", "# dec_level = run_fc_group.get_decimation_level(dec_level_id)\n", "# cond1 = fc_summary.station==row.station\n", "# cond2 = fc_summary.run==row.run\n", "# cond3 = fc_summary.component==dec_level_id\n", "# fc_summary.loc[cond1 & cond2 & cond3] # this should be a unique row\n", "# ndx = fc_summary.loc[cond1 & cond2 & cond3].index\n", "# assert(len(ndx))==1\n", "# #fc_summary[\"sample_rate_time_series\"].at[ndx] = dec_level.metadata.i\n", "# fc_summary[\"window_num_samples\"].at[ndx[0]] = dec_level.metadata.window.num_samples\n", "# fc_summary[\"sample_rate_time_series\"].at[ndx[0]] = dec_level.metadata.sample_rate\n", "# fc_summary[\"harmonic_indices\"].at[ndx[0]] = dec_level.metadata.harmonic_indices\n", " \n", " \n", "# #print(dec_level_id, dec_level)\n", "# xr_dec_level = dec_level.to_xarray()\n", "# print(\"station\", row.station, \"run\", row.run, \"decimation level\", dec_level_id, \"SAMPLE rate\", dec_level.metadata.sample_rate) # xr_dec_level.frequency)\n", " " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# fc_summary[\"delta_f\"] = fc_summary[\"sample_rate_time_series\"] / fc_summary[\"window_num_samples\"]\n", "# fc_summary" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The above table tells us what we need to know to get frequency axes .. and actually, we can make `_frequencies()` a method of `FC_dec_level`.\n", "\n", "Note that when harmonic_indices is [-1,], that means all the (1-sided) FCs are kept.\n", "- this can be sanity checked by asserting that the dataset size is `window_num_samples`//2\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So now pick a decimation level, ... In this case, the `component` column is telling us the decimation level.\n", "- It would seem sensible to make sure that the sample rates, (and delta_f) values are same as well.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# cond0 = fc_summary[\"component\"] == active_decimation_level\n", "# fc_runs_to_featureize_df = fc_summary[cond0]\n", "# fc_runs_to_featureize_df" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# frqs = np.fft.fftfreq?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now pick a scheme for defining the feature frequency bands\n", "- we prefer not to use the lowest few harmonics ... this is like setting the minimum number of cycles per window, say 10\n", "- we also prefer not to take harmonics very close to the Nyquist frequency as these maybe attenuated by AAF, say we go up to 80% Nyq\n", "- For TF estimation, bands may be only a few FCs wide,but for feature extraction we make them much wider.\n", "- lets try with around half an octave\n", "- how about 2 bands per octave, mean" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# min_cycles = 10\n", "# nyquist_fraction = 0.8\n", "# n_feature_bands_per_octave = 2" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# for i, row in fc_runs_to_featureize_df.iterrows():\n", "# frequencies = np.fft.rfftfreq(row.window_num_samples, row.sample_rate_time_series)\n", "# lower_index = int(min_cycles)\n", "# upper_index = int(nyquist_fraction*(row.window_num_samples//2))\n", "# print(f\" lower_index={lower_index}, upper_index={upper_index}\")\n", "# freq_min = frequencies[lower_index]\n", "# freq_max = frequencies[upper_index]\n", "# print(f\"Available band: {freq_min:3f} to {freq_max:3f}\")\n", "# frequency_ratio = freq_max/freq_min\n", "# available_decades = np.log10(frequency_ratio)\n", "# available_ocataves = np.log2(frequency_ratio)\n", "# print(f\"Available decades: {available_decades:3f}\")\n", "# print(f\"Available octaves: {available_ocataves:3f}\")\n", "# num_feature_bands = available_ocataves * n_feature_bands_per_octave" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# dec_level.metadata\n", "# dec_level.to_xarray()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# cond1 = fc_summary.station==\"test1\"\n", "# cond2 = fc_summary.run==\"001\"\n", "# cond3 = fc_summary.component==\"0\"\n", "# fc_summary.loc[cond1 & cond2 & cond3].index" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# fc_summary[\"sample_rate_time_series\"].at[0]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# m.close_mth5()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "aurora-test", "language": "python", "name": "aurora-test" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.19" } }, "nbformat": 4, "nbformat_minor": 4 }