Skip to content

Commit

Permalink
Handle case "setup:identifier" is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
maikherbig authored Aug 2, 2021
1 parent 6b3b42c commit 0a7d9af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion YouLabel/YouLabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ def write_rtdc(fname,rtdc_path,indices,decisions):
h5_targ.attrs["experiment:date"] = time.strftime("%Y-%m-%d")
h5_targ.attrs["experiment:time"] = time.strftime("%H:%M:%S")
h5_targ.attrs["imaging:pixel size"] = pixel_size
h5_targ.attrs["setup:identifier"] = h5_orig.attrs["setup:identifier"]
h5_targ.attrs["experiment:original_file"] = rtdc_path
meta_keys = list(h5_orig.attrs.keys())
if "setup:identifier" in meta_keys:
h5_targ.attrs["setup:identifier"] = rtdc_path


h5_targ.close()
Expand Down

0 comments on commit 0a7d9af

Please sign in to comment.