Skip to content

Commit 2ecf36f

Browse files
committed
Update make_mth5_from_lemi.ipynb
1 parent 27e7fa1 commit 2ecf36f

1 file changed

Lines changed: 131 additions & 9 deletions

File tree

src/make_mth5/make_mth5_from_lemi.ipynb

Lines changed: 131 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": 2,
15+
"execution_count": 1,
1616
"id": "1208c257-8064-4ed3-a7db-eebe14b248d2",
1717
"metadata": {},
1818
"outputs": [],
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"cell_type": "code",
49-
"execution_count": 3,
49+
"execution_count": 2,
5050
"id": "2e0dc972-54eb-43d3-af4f-0abc2c4834e1",
5151
"metadata": {},
5252
"outputs": [
@@ -68,7 +68,7 @@
6868
},
6969
{
7070
"cell_type": "code",
71-
"execution_count": 4,
71+
"execution_count": 3,
7272
"id": "039570b6-e1c1-46ce-bdec-d92554e30497",
7373
"metadata": {},
7474
"outputs": [
@@ -280,16 +280,16 @@
280280
},
281281
{
282282
"cell_type": "code",
283-
"execution_count": 5,
283+
"execution_count": 4,
284284
"id": "f1377448",
285285
"metadata": {},
286286
"outputs": [
287287
{
288288
"name": "stdout",
289289
"output_type": "stream",
290290
"text": [
291-
"\u001b[1m2026-01-05T21:17:14.371451-0800 | INFO | mth5.mth5 | _initialize_file | line: 678 | Initialized MTH5 0.2.0 file c:\\Users\\peaco\\OneDrive\\Documents\\GitHub\\mth5_tutorial\\src\\notebooks\\from_lemi424.h5 in mode w\u001b[0m\n",
292-
"\u001b[1m2026-01-05T21:17:19.270794-0800 | INFO | mth5.mth5 | close_mth5 | line: 772 | Flushing and closing c:\\Users\\peaco\\OneDrive\\Documents\\GitHub\\mth5_tutorial\\src\\notebooks\\from_lemi424.h5\u001b[0m\n"
291+
"\u001b[1m2026-01-05T21:39:52.726196-0800 | INFO | mth5.mth5 | _initialize_file | line: 678 | Initialized MTH5 0.2.0 file c:\\Users\\peaco\\OneDrive\\Documents\\GitHub\\mth5_tutorial\\src\\make_mth5\\from_lemi424.h5 in mode w\u001b[0m\n",
292+
"\u001b[1m2026-01-05T21:39:57.983802-0800 | INFO | mth5.mth5 | close_mth5 | line: 772 | Flushing and closing c:\\Users\\peaco\\OneDrive\\Documents\\GitHub\\mth5_tutorial\\src\\make_mth5\\from_lemi424.h5\u001b[0m\n"
293293
]
294294
}
295295
],
@@ -311,7 +311,7 @@
311311
},
312312
{
313313
"cell_type": "code",
314-
"execution_count": 6,
314+
"execution_count": 5,
315315
"id": "0dc5b3ab",
316316
"metadata": {},
317317
"outputs": [
@@ -399,7 +399,7 @@
399399
" .........................\n",
400400
" --> Dataset: tf_summary\n",
401401
" .........................\n",
402-
"\u001b[1m2026-01-05T21:17:32.236604-0800 | INFO | mth5.mth5 | close_mth5 | line: 772 | Flushing and closing c:\\Users\\peaco\\OneDrive\\Documents\\GitHub\\mth5_tutorial\\src\\notebooks\\from_lemi424.h5\u001b[0m\n"
402+
"\u001b[1m2026-01-05T21:40:10.605473-0800 | INFO | mth5.mth5 | close_mth5 | line: 772 | Flushing and closing c:\\Users\\peaco\\OneDrive\\Documents\\GitHub\\mth5_tutorial\\src\\make_mth5\\from_lemi424.h5\u001b[0m\n"
403403
]
404404
}
405405
],
@@ -408,7 +408,8 @@
408408
" m = m.open_mth5(mth5_path)\n",
409409
" print(m)\n",
410410
" channel_df = m.channel_summary.to_dataframe()\n",
411-
" run_df = m.run_summary"
411+
" run_df = m.run_summary\n",
412+
" experiment = m.to_experiment()"
412413
]
413414
},
414415
{
@@ -981,11 +982,132 @@
981982
"run_df"
982983
]
983984
},
985+
{
986+
"cell_type": "markdown",
987+
"id": "b36ba0cb",
988+
"metadata": {},
989+
"source": [
990+
"## Experiment Metadata\n",
991+
"\n",
992+
"The `experiment` object contains all the metadata contained within the MTH5 file."
993+
]
994+
},
984995
{
985996
"cell_type": "markdown",
986997
"id": "e528d47d",
987998
"metadata": {},
988999
"source": []
1000+
},
1001+
{
1002+
"cell_type": "code",
1003+
"execution_count": 6,
1004+
"id": "8457edca",
1005+
"metadata": {},
1006+
"outputs": [
1007+
{
1008+
"data": {
1009+
"text/plain": [
1010+
"Experiment Contents\n",
1011+
"--------------------\n",
1012+
"Number of Surveys: 1\n",
1013+
" Survey ID: test\n",
1014+
" Number of Stations: 1\n",
1015+
" Number of Filters: 0\n",
1016+
" --------------------\n",
1017+
" Station ID: mt01\n",
1018+
" Number of Runs: 2\n",
1019+
" --------------------\n",
1020+
" Run ID: sr1_0001\n",
1021+
" Number of Channels: 7\n",
1022+
" Recorded Channels: bx, by, bz, e1, e2, temperature_e, temperature_h\n",
1023+
" Start: 2020-10-01T00:00:00+00:00\n",
1024+
" End: 2020-10-01T00:01:59+00:00\n",
1025+
" --------------------\n",
1026+
" Run ID: sr1_0002\n",
1027+
" Number of Channels: 7\n",
1028+
" Recorded Channels: bx, by, bz, e1, e2, temperature_e, temperature_h\n",
1029+
" Start: 2020-10-02T00:00:00+00:00\n",
1030+
" End: 2020-10-02T00:01:59+00:00\n",
1031+
" --------------------"
1032+
]
1033+
},
1034+
"execution_count": 6,
1035+
"metadata": {},
1036+
"output_type": "execute_result"
1037+
}
1038+
],
1039+
"source": [
1040+
"experiment"
1041+
]
1042+
},
1043+
{
1044+
"cell_type": "code",
1045+
"execution_count": 11,
1046+
"id": "f882ad73",
1047+
"metadata": {},
1048+
"outputs": [
1049+
{
1050+
"data": {
1051+
"text/plain": [
1052+
"{\n",
1053+
" \"run\": {\n",
1054+
" \"acquired_by.author\": \"\",\n",
1055+
" \"channels_recorded_auxiliary\": [\n",
1056+
" \"temperature_e\",\n",
1057+
" \"temperature_h\"\n",
1058+
" ],\n",
1059+
" \"channels_recorded_electric\": [\n",
1060+
" \"e1\",\n",
1061+
" \"e2\"\n",
1062+
" ],\n",
1063+
" \"channels_recorded_magnetic\": [\n",
1064+
" \"bx\",\n",
1065+
" \"by\",\n",
1066+
" \"bz\"\n",
1067+
" ],\n",
1068+
" \"data_logger.firmware.author\": \"\",\n",
1069+
" \"data_logger.firmware.name\": \"\",\n",
1070+
" \"data_logger.firmware.version\": \"\",\n",
1071+
" \"data_logger.manufacturer\": \"LEMI\",\n",
1072+
" \"data_logger.model\": \"LEMI424\",\n",
1073+
" \"data_logger.power_source.voltage.end\": 12.98,\n",
1074+
" \"data_logger.power_source.voltage.start\": 12.99,\n",
1075+
" \"data_logger.timing_system.drift\": 0.0,\n",
1076+
" \"data_logger.timing_system.type\": \"GPS\",\n",
1077+
" \"data_logger.timing_system.uncertainty\": 0.0,\n",
1078+
" \"data_type\": \"BBMT\",\n",
1079+
" \"id\": \"sr1_0001\",\n",
1080+
" \"metadata_by.author\": \"\",\n",
1081+
" \"provenance.archive.name\": \"\",\n",
1082+
" \"provenance.creation_time\": \"1980-01-01T00:00:00+00:00\",\n",
1083+
" \"provenance.creator.author\": \"\",\n",
1084+
" \"provenance.software.author\": \"\",\n",
1085+
" \"provenance.software.name\": \"\",\n",
1086+
" \"provenance.software.version\": \"\",\n",
1087+
" \"provenance.submitter.author\": \"\",\n",
1088+
" \"sample_rate\": 1.0,\n",
1089+
" \"time_period.end\": \"2020-10-01T00:01:59+00:00\",\n",
1090+
" \"time_period.start\": \"2020-10-01T00:00:00+00:00\"\n",
1091+
" }\n",
1092+
"}"
1093+
]
1094+
},
1095+
"execution_count": 11,
1096+
"metadata": {},
1097+
"output_type": "execute_result"
1098+
}
1099+
],
1100+
"source": [
1101+
"experiment.surveys[0].stations[0].runs[0]"
1102+
]
1103+
},
1104+
{
1105+
"cell_type": "code",
1106+
"execution_count": null,
1107+
"id": "4f48d2f6",
1108+
"metadata": {},
1109+
"outputs": [],
1110+
"source": []
9891111
}
9901112
],
9911113
"metadata": {

0 commit comments

Comments
 (0)