dfa91276a7aa464de60f00e6c7ca80e8d9caf06d,hyperspy/io_plugins/jeol.py,,file_reader,#Any#,48

Before Change


		if (file_magic == 0):
			fd.seek(12)
			filetree = parsejeol(fd)
			filepath = filename[:filename.rfind("/")+1]
			if "SampleInfo" in filetree.keys():
				for i in sorted(filetree["SampleInfo"].keys(), key=float):
					if "ViewInfo" in filetree["SampleInfo"][i].keys():
						for j in sorted(filetree["SampleInfo"][i]["ViewInfo"].keys(), key=float):

After Change


		if (file_magic == 0):
			fd.seek(12)
			filetree = parsejeol(fd)
			filepath, filen = os.path.split(os.path.abspath(filename))
			if "SampleInfo" in filetree.keys():
				for i in sorted(filetree["SampleInfo"].keys(), key=float):
					if "ViewInfo" in filetree["SampleInfo"][i].keys():
						for j in sorted(filetree["SampleInfo"][i]["ViewInfo"].keys(), key=float):
							if "ViewData" in filetree["SampleInfo"][i]["ViewInfo"][j].keys():
								scale = filetree["SampleInfo"][i]["ViewInfo"][j]["PositionMM"]*1000
								for k in sorted(filetree["SampleInfo"][i]["ViewInfo"][j]["ViewData"].keys(), key=float): 
									root, sample_folder, view_folder, data_file = filetree["SampleInfo"][i]["ViewInfo"][j]["ViewData"][k]["Filename"].split("\\")
									subfile = os.path.join(root, sample_folder, view_folder, data_file)
									sub_ext = os.path.splitext(subfile)[-1][1:]
									if sub_ext == "img" or sub_ext == "map":
										dictionary.append(read_img(os.path.join(filepath,subfile), scale))
									elif sub_ext == "pts":
										dictionary.append(read_pts(os.path.join(filepath,subfile), scale))
									elif sub_ext == "eds":
										dictionary.append(read_eds(os.path.join(filepath,subfile)))
									else:
										print("Unknow extension")
		else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: hyperspy/hyperspy
Commit Name: dfa91276a7aa464de60f00e6c7ca80e8d9caf06d
Time: 2020-12-23
Author: 48522174+sempicor@users.noreply.github.com
File Name: hyperspy/io_plugins/jeol.py
Class Name:
Method Name: file_reader


Project Name: nilmtk/nilmtk
Commit Name: f995ae8ee2aaf365eb3b147e4afb1f7eacc17ee6
Time: 2014-01-06
Author: nipunreddevil@gmail.com
File Name: nilmtk/dataset/dataset.py
Class Name: DataSet
Method Name: export_csv


Project Name: mindsdb/mindsdb
Commit Name: 7283915223e65af525bc8334e7593bbcac9943cf
Time: 2020-06-26
Author: wzzhz13@gmail.com
File Name: distributions/windows/install.py
Class Name:
Method Name:


Project Name: hyperspy/hyperspy
Commit Name: dfa91276a7aa464de60f00e6c7ca80e8d9caf06d
Time: 2020-12-23
Author: 48522174+sempicor@users.noreply.github.com
File Name: hyperspy/io_plugins/jeol.py
Class Name:
Method Name: file_reader