Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Minzhe Hu committed Jul 31, 2024
1 parent 4136282 commit c9b6597
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions daspy/core/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ def read(fname=None, output_type='section', **kwargs):
'h5': _read_h5, 'hdf5': _read_h5, 'segy': _read_segy,
'sgy': _read_segy}
if fname is None:
data, metadata = _read_pkl(Path(__file__).parent / 'example.pkl')
fname = Path(__file__).parent / 'example.pkl'
ftype = 'pkl'
else:
ftype = str(fname).lower().split('.')[-1]
data, metadata = fun_map[ftype](fname, **kwargs)

data, metadata = fun_map[ftype](fname, **kwargs)

if output_type.lower() == 'section':
metadata['source'] = Path(fname)
Expand Down

0 comments on commit c9b6597

Please sign in to comment.