-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue setup small fix + optional meas_pattern #45
Conversation
- solve, solve_eit, compute_jac and compute_b_matrix allow topass None ex_mat and None perm so we need to set them in each scope of those methods - notes: they are afterwards not memory in forward (only in eitbase)
- need to be tested and documented
- using of kwargs
- in fem.py improve the error str
The I am rewriting the interface for More detail: Forward(mesh, el_pos, ref_el) -> class
-> solve
-> EITForward(ex_mat, step, parser) -> class
-> solve_eit
-> jac, b |
Hy,
you mean
you want to make a base class Forward and make and child class EitForward? EITForward(mesh, el_pos, ref_el, ex_mat, step, parser) by the way mesh, el_pos, ref_el shoul be part of a mesh class (I started this but I wanted first you to get this fixs)... and ex_mat, step, parser could be part of a stimulation class like in EIDORS! or actually it would be better to pass ex_mat and meas_pattern instead ex_mat, step, parser and do like for ex_mat an external function to compute meas_pattern Something like that: by passing objs to to forward you avoid increasing the nb of arg and by need you can add a parameter simply by adding it in the parameter class! @dataclass
class PyEITMesh
node
element
perm
el_pos
ref_el
@proprety
def n_nodes:
@proprety
def n_el:
ex_mat= eit_scan_lines(n_el, step)
meas_mat= voltage_meter(ex_mat, step, parser)
@dataclass
class PyEITStim
ex_mat
meas_mat
class Forward(mesh: PyEITMesh, stim: PyEITStim)
mesh
stim
def solve:
def solve_eit:
def jac:
def b: for these PR I would invite you to add the small fix and the additional option to add a custom meas_pattern is very usefull for special electrode array! did you already made some changes? let me know about that! can you push it on a test branch? so that we can work together on that? |
sure, I have modify these change based on your previous commit. I will merge your this commit and push to a dev branch so we can work together.
|
I think it is a good idee only to pass |
Ok send me a message when have created the dev branch |
@DavidMetzIMT The latest changeset are commit to the dev branch. And please also see issue #44, #46 |
Hy @liubenyuan,
I saw you merged my precedent PR. could you already test it?
However I saw a small issue by trying to not pass ex_mat or perm to following method!
solve
,solve_eit
,compute_jac
andcompute_b_matrix
.test_fem.py
a small tests to see if defauflt call of each methods do not throughout an error!Moreover I have implemented an option to pass throught **kwargs a custom meas_patttern to
solve_eit
,compute_jac
andcompute_b_matrix
and toEitBase
!test_fem.py