Update load_1D.py
added the data type to dict, it is necessary for adding dat files into ccl dicts
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user