Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ def _extract_coordinates(self):
extracted_columns = []
for column in self.columns:
if column in data:
extracted_columns.append(ak.to_numpy(data[column]))
if column == 'phi':
phi = ak.to_numpy(data['phi'])
extracted_columns.append(np.sin(phi))
extracted_columns.append(np.cos(phi))
else:
extracted_columns.append(ak.to_numpy(data[column]))

# Stack the extracted columns along the last axis
if extracted_columns:
Expand Down Expand Up @@ -79,6 +84,7 @@ def extract_simplices(simplex_tree):
simplices[k - 1][frozenset(simplex)] = len(simplices[k - 1])
return simplices

coord = (coord - coord.mean(axis=0)) / (coord.std(axis=0) + 1e-8)
rips_complex = gd.RipsComplex(points=coord, sparse=sparsity)
st = rips_complex.create_simplex_tree(max_dimension=max_dimension)
_ = st.prune_above_filtration(filtration_val)
Expand Down