Skip to content

Commit

Permalink
Update pathway (#5)
Browse files Browse the repository at this point in the history
* first update on PAM

* add status as attribute for axons

* save different status to h5 file

* fix filtering

* FIX check inside domain

* cleanup pathway script

* new ngsolve version

---------

Co-authored-by: jp432 <[email protected]>
Co-authored-by: Julius Zimmermann <[email protected]>
  • Loading branch information
3 people authored Jan 5, 2024
1 parent 0781c7b commit dc3891a
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 109 deletions.
11 changes: 6 additions & 5 deletions ossdbs/fem/volume_conductor/volume_conductor_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,11 @@ def reconstruct_time_signals(
frequency_indices = frequency_indices.astype(np.uint16)
result_in_time = np.zeros(shape=(n_lattice_points, len(tmp_freq_domain)))

if n_lattice_points == 0:
raise ValueError(
"No lattice points to process."
)

# go through points in lattice
for point_idx in range(n_lattice_points):
# write frequencies
Expand Down Expand Up @@ -721,11 +726,7 @@ def prepare_point_model_grids(self, point_model):
inside_encap = self.get_points_in_encapsulation_layer(lattice)
if isinstance(point_model, Pathway):
# if pathway, always mark complete axons
if point_model._axon_mask is None:
raise RuntimeError("The creation of the axon_mask did not work")
[inside_csf, inside_encap] = point_model.filter_csf_encap(
inside_csf, inside_encap
)
point_model.filter_csf_encap(inside_csf, inside_encap)
# create index for axons
axon_index = point_model.create_index(lattice)
else:
Expand Down
3 changes: 1 addition & 2 deletions ossdbs/point_analysis/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ def _write_file(self, data, file):
)

def filter_csf_encap(self, inside_csf: np.ndarray, inside_encap: np.ndarray):
# TODO implement
raise NotImplementedError("Filtering for lattice not implemented yet.")
raise NotImplementedError("Filtering for lattice not implemented.")

def save_hdf5(
self,
Expand Down
Loading

0 comments on commit dc3891a

Please sign in to comment.