Assign default value of 0 to temp and mf
This commit is contained in:
@@ -183,8 +183,9 @@ def parse_1D(fileobj, data_type):
|
|||||||
|
|
||||||
s["om"] = np.array(s["om"])
|
s["om"] = np.array(s["om"])
|
||||||
|
|
||||||
if "mf" not in metadata:
|
for param in ("mf", "temp"):
|
||||||
print("Magnetic field is not present in dat file")
|
if param not in metadata:
|
||||||
|
s[param] = 0
|
||||||
|
|
||||||
s["n_points"] = len(s["om"])
|
s["n_points"] = len(s["om"])
|
||||||
s["monitor"] = s["Monitor1"][0]
|
s["monitor"] = s["Monitor1"][0]
|
||||||
|
|||||||
Reference in New Issue
Block a user