{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "f2f4a5c6-6eb4-4e94-8382-eeb1064996aa", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import DiadFit as pf" ] }, { "cell_type": "code", "execution_count": 2, "id": "c5292ee3-9fef-4a10-a3a5-c44767b1903f", "metadata": {}, "outputs": [], "source": [ "import os\n", "path=os.getcwd()" ] }, { "cell_type": "code", "execution_count": 3, "id": "39380e23-b6da-4cb5-9f4f-5ed448279561", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['Horiba_file1.txt', 'Horiba_file2.txt']" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "files=pf.get_files(path=path, file_ext='.txt', ID_str='Horiba')\n", "files" ] }, { "cell_type": "code", "execution_count": 4, "id": "700aca58-2e64-4f82-9ae3-5d9b2927242a", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "100%|████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 37.35it/s]\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
filenamespectral_namedateMonthDaypower (mw)Int_time (s)accumulationsMag (X)duration24hr_timesec since midnightSpectral_Center
0Horiba_file1.txtg12-mi128.03.2022March2022-03-28no data60.05.0x100 LWD300.019:41:16708761240.03
1Horiba_file2.txtg12-mi128.03.2022March2022-03-28no data60.05.0x100 LWD300.019:46:10711701240.03
\n", "
" ], "text/plain": [ " filename spectral_name date Month Day power (mw) \\\n", "0 Horiba_file1.txt g12-mi1 28.03.2022 March 2022-03-28 no data \n", "1 Horiba_file2.txt g12-mi1 28.03.2022 March 2022-03-28 no data \n", "\n", " Int_time (s) accumulations Mag (X) duration 24hr_time \\\n", "0 60.0 5.0 x100 LWD 300.0 19:41:16 \n", "1 60.0 5.0 x100 LWD 300.0 19:46:10 \n", "\n", " sec since midnight Spectral_Center \n", "0 70876 1240.03 \n", "1 71170 1240.03 " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "meta=pf.stitch_metadata_in_loop_horiba(AllFiles=files, path=path)\n", "meta" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "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.13" } }, "nbformat": 4, "nbformat_minor": 5 }