Skip to content

Commit 357b3ad

Browse files
committed
Renaming hdf5 to HAWC2 HDF5
1 parent 7b367f4 commit 357b3ad

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

pydatview/io/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ def fileFormats(userpath=None, ignoreErrors=False, verbose=False):
7070
from .rosco_discon_file import ROSCODISCONFile
7171
from .rosco_performance_file import ROSCOPerformanceFile
7272
try:
73-
from .hdf5_file import Hdf5File
73+
from .hawc2_hdf5_file import HAWC2Hdf5File
7474
except ImportError:
75-
Hdf5File=None
75+
HAWC2Hdf5File=None
7676
from .plot3d_file import Plot3DFile
7777
from .yaml_file import YAMLFile
7878
from .airfoil_file import AirfoilShapeFile
@@ -102,9 +102,9 @@ def addFormat(priority, fmt):
102102
addFormat(30, FileFormat(HAWCStab2PwrFile))
103103
addFormat(30, FileFormat(HAWCStab2IndFile))
104104
addFormat(30, FileFormat(HAWCStab2CmbFile))
105+
if HAWC2Hdf5File is not None:
106+
addFormat(30, FileFormat(HAWC2Hdf5File))
105107
addFormat(30, FileFormat(MannBoxFile))
106-
if Hdf5File is not None:
107-
addFormat(30, FileFormat(Hdf5File))
108108
addFormat(40, FileFormat(FLEXBladeFile))
109109
addFormat(40, FileFormat(FLEXProfileFile))
110110
addFormat(40, FileFormat(FLEXOutFile))
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
import numpy as np
44
import pandas as pd
55

6-
class Hdf5File(File):
6+
class HAWC2Hdf5File(File):
77

88
@staticmethod
99
def defaultExtensions():
1010
return ['.hdf5']
1111

1212
@staticmethod
1313
def formatName():
14-
return 'hdf5 file'
14+
return 'HAWC2 hdf5 file'
1515

1616
def __init__(self, filename=None, **kwargs):
1717
self.info = {}
1818
self.data = np.array([])
19-
super(Hdf5File, self).__init__(filename=filename, **kwargs)
19+
super(HAWC2Hdf5File, self).__init__(filename=filename, **kwargs)
2020

2121
def _read(self):
2222
try:

pydatview/io/wetb/gtsdf/gtsdf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
try:
1313
import h5py
1414
except ImportError as e:
15-
print('[FAIL] h5py package not available. HDF5 format will fail. Do `pip install h5py` to use it.')
15+
print('[FAIL] h5py package not available. HAWC2 HDF5 format will fail. Do `pip install h5py` to use it.')
1616
raise e
17-
# h5py = None
18-
# raise ImportError("HDF5 library cannot be loaded. Windows XP is a known cause of this problem\n%s" % e)
17+
h5py = None
1918

2019
block_name_fmt = "block%04d"
2120

0 commit comments

Comments
 (0)