Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
*egg-info
*zip
*log
*in
*in
*sh
*dat
*out
*top
*in
2 changes: 1 addition & 1 deletion CPET/source/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,4 @@ def cluster_analyze(self):
plt.show()
if self.plot_dwell_times == True:
print(0)
return compressed_dictionary
return compressed_dictionary
18 changes: 11 additions & 7 deletions CPET/source/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,17 @@ def __init__(self, options):
else:
self.pca_obj = None

# load dataset and metadata
self.field_file_list = []
for file in glob(self.inputpath + "/*.dat"):
self.field_file_list.append(file)
if len(self.field_file_list) == 0:
raise ValueError("No data found in the input path!")

# user should also be able to specify list of files alternatively
if "field_file_list" not in options:
# load dataset and metadata
self.field_file_list = []
for file in glob(self.inputpath + "/*.dat"):
self.field_file_list.append(file)
if len(self.field_file_list) == 0:
raise ValueError("No data found in the input path!")
else:
self.field_file_list = options["field_file_list"]

self.load()

def load(self):
Expand Down
226 changes: 226 additions & 0 deletions CPET/source/scripts/triangulation.ipynb

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions CPET/utils/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,14 @@ def make_histograms_mem(topo_files, output_dir, plot=False):
for line in topology_data:
if line.startswith("#"):
continue

line = line.split()
# strip the line of any leading or trailing whitespace
line = line.strip()
# if the line has a comma split by comma
if "," in line:
line = line.split(",")
else:
line = line.split()
#print(line)
distances.append(float(line[0]))
curvatures.append(float(line[1]))
# print(max(distances),max(curvatures))
Expand Down