Commit 468bf7a6 authored by Camilla Dodge Koslowsky Harris's avatar Camilla Dodge Koslowsky Harris
Browse files

very simple h5 save format implemented

parent 31746013
......@@ -24,6 +24,7 @@ __email__ = ''
import os
import re
import h5py
import numpy as np
import tecplot
......@@ -217,6 +218,15 @@ def _trajectory_geometry(geometry_params: dict) -> dict:
def _save_hdf5(filename, geometry_params, new_zone, variables) -> None:
"""Save the aux data and a subset of the variables in hdf5 format.
column_names = [ for var in variables]
tp_data = []
for var in variables:
tp_data_np = np.array(tp_data).transpose()
with h5py.File(filename, 'w-') as h5_file:
h5_file['data'] = tp_data_np
h5_file['data'].attrs['names'] = column_names
def _save_csv(filename, geometry_params, new_zone, variables) -> None:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment