{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\\\nimport h5py","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-10-09T08:06:32.401979Z","iopub.execute_input":"2022-10-09T08:06:32.40238Z","iopub.status.idle":"2022-10-09T08:06:32.555875Z","shell.execute_reply.started":"2022-10-09T08:06:32.402348Z","shell.execute_reply":"2022-10-09T08:06:32.554882Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fname = \"../input/g2net-detecting-continuous-gravitational-waves/train/001121a05.hdf5\"\nf = h5py.File(fname,'r')    ","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:14:32.932127Z","iopub.execute_input":"2022-10-09T08:14:32.932522Z","iopub.status.idle":"2022-10-09T08:14:32.941221Z","shell.execute_reply.started":"2022-10-09T08:14:32.932491Z","shell.execute_reply":"2022-10-09T08:14:32.940016Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for key in f.keys():\n    print(key) #Names of the root level object names in HDF5 file - can be groups or datasets.\n    print(type(f[key])) # get the object type: usually group or dataset","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:14:35.586602Z","iopub.execute_input":"2022-10-09T08:14:35.587039Z","iopub.status.idle":"2022-10-09T08:14:35.593621Z","shell.execute_reply.started":"2022-10-09T08:14:35.587001Z","shell.execute_reply":"2022-10-09T08:14:35.592039Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"group = f['001121a05']","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:16:28.491146Z","iopub.execute_input":"2022-10-09T08:16:28.491929Z","iopub.status.idle":"2022-10-09T08:16:28.497492Z","shell.execute_reply.started":"2022-10-09T08:16:28.491884Z","shell.execute_reply":"2022-10-09T08:16:28.496275Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"group.keys()","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:16:54.956374Z","iopub.execute_input":"2022-10-09T08:16:54.956861Z","iopub.status.idle":"2022-10-09T08:16:54.968487Z","shell.execute_reply.started":"2022-10-09T08:16:54.956821Z","shell.execute_reply":"2022-10-09T08:16:54.966848Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":" a_group_key = list(f1.keys())[0]","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"h1_data = group[\"H1\"]\nl1_data = group[\"L1\"]\nfreq_data = group[\"frequency_Hz\"]","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:18:06.450652Z","iopub.execute_input":"2022-10-09T08:18:06.451639Z","iopub.status.idle":"2022-10-09T08:18:06.458143Z","shell.execute_reply.started":"2022-10-09T08:18:06.451592Z","shell.execute_reply":"2022-10-09T08:18:06.456456Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"freq_data","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:18:11.34181Z","iopub.execute_input":"2022-10-09T08:18:11.342203Z","iopub.status.idle":"2022-10-09T08:18:11.349738Z","shell.execute_reply.started":"2022-10-09T08:18:11.342172Z","shell.execute_reply":"2022-10-09T08:18:11.348535Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"l1_data.keys()","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:18:29.949044Z","iopub.execute_input":"2022-10-09T08:18:29.949515Z","iopub.status.idle":"2022-10-09T08:18:29.957925Z","shell.execute_reply.started":"2022-10-09T08:18:29.949479Z","shell.execute_reply":"2022-10-09T08:18:29.956426Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sft = l1_data['SFTs'][()]","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:19:18.359567Z","iopub.execute_input":"2022-10-09T08:19:18.360001Z","iopub.status.idle":"2022-10-09T08:19:18.375142Z","shell.execute_reply.started":"2022-10-09T08:19:18.359967Z","shell.execute_reply":"2022-10-09T08:19:18.374102Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sft.shape","metadata":{"execution":{"iopub.status.busy":"2022-10-09T08:19:36.805188Z","iopub.execute_input":"2022-10-09T08:19:36.805662Z","iopub.status.idle":"2022-10-09T08:19:36.814103Z","shell.execute_reply.started":"2022-10-09T08:19:36.805624Z","shell.execute_reply":"2022-10-09T08:19:36.812845Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}