Skip to content

Commit

Permalink
ref: minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Apr 23, 2021
1 parent 0f30d16 commit c8bbabb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.10.9
- ref: minor code cleanup
0.10.8
- fix: wavelength could not be extracted for some phasics files
(section name "analyse data" vs "analyse data v1")
Expand Down
8 changes: 6 additions & 2 deletions qpformat/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def guess_format(path):


def load_data(path, fmt=None, bg_data=None, bg_fmt=None,
meta_data={}, holo_kw={}, as_type="float32"):
meta_data=None, holo_kw=None, as_type="float32"):
"""Load experimental data
Parameters
Expand All @@ -28,7 +28,7 @@ def load_data(path, fmt=None, bg_data=None, bg_fmt=None,
fmt: str
The file format to use (see `file_formats.formats`).
If set to `None`, the file format is guessed.
bg_data: str
bg_data: str or pathlib.Path
Path to background data file or `qpimage.QPImage`
bg_fmt: str
The file format to use (see `file_formats.formats`)
Expand All @@ -51,6 +51,10 @@ def load_data(path, fmt=None, bg_data=None, bg_fmt=None,
dataobj: SeriesData or SingleData
Object that gives lazy access to the experimental data.
"""
if holo_kw is None:
holo_kw = {}
if meta_data is None:
meta_data = {}
path = pathlib.Path(path).resolve()
# sanity checks
for kk in meta_data:
Expand Down

0 comments on commit c8bbabb

Please sign in to comment.