From 456a15a365d2b79bd73f96cf94d43c705c829f50 Mon Sep 17 00:00:00 2001 From: JakHolzer <53743814+JakHolzer@users.noreply.github.com> Date: Mon, 5 Oct 2020 15:32:59 +0200 Subject: [PATCH] Update load_1D.py added the data type to dict, it is necessary for adding dat files into ccl dicts --- pyzebra/load_1D.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyzebra/load_1D.py b/pyzebra/load_1D.py index 0d049a5..2d83a41 100644 --- a/pyzebra/load_1D.py +++ b/pyzebra/load_1D.py @@ -18,8 +18,10 @@ META_VARS_STR = ( "proposal_user", "proposal_title", "proposal_email", + "detectorDistance", ) META_VARS_FLOAT = ( + "omega", "mf", "2-theta", "chi", @@ -40,7 +42,6 @@ META_VARS_FLOAT = ( "mcvl", "momu", "mcvu", - "detectorDistance", "snv", "snh", "snvm", @@ -96,6 +97,7 @@ def parse_1D(fileobj, data_type): # read data if data_type == ".ccl": + metadata['data_type'] = data_type measurements = {} decimal = list() data = fileobj.readlines() @@ -160,6 +162,7 @@ def parse_1D(fileobj, data_type): elif data_type == ".dat": # skip the first 2 rows, the third row contans the column names + metadata['data_type'] = data_type next(fileobj) next(fileobj) col_names = next(fileobj).split()