Closed ccfbeltran closed 1 year ago
Hi, the electrodes positions of thorax shape depends on thorax_pfix
, which is 16 by default. If you specify 32 electrodes, it will use the first 32 nodes as the electrodes. You could see the thorax_pfix
in shape.py
for example.
A work around is to specify a user customized thorax_pfix
uniformly located at 32 coordinates. You can implement this using the Polygon
function to find these locations.
Hi! Im using this code to generate the electrodes in the mesh of lungs. I'm using the 32 electrodes configuration:
# plot the mesh, visualize the electrodes locations fig, ax = plt.subplots(figsize=(6, 6)) ax.triplot(pts[:, 0], pts[:, 1], tri, linewidth=1) ax.plot(pts[mesh_obj.el_pos, 0], pts[mesh_obj.el_pos, 1], "ro") for i, el in enumerate(mesh_obj.el_pos): ax.text(pts[el, 0], pts[el, 1], str(i + 1), fontsize=15) ax.axis("equal") ax.axis([-1.2, 1.2, -1.2, 1.2])
and having this result :
is there any problem in my code to generate the good positions? Is there any way to make a better code?
thank you