Skip to content
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

Multi tissue tortuosity #110

Closed

Conversation

matteofrigo
Copy link
Contributor

The multi-tissue correction is triggered as follows:

    model.set_tortuous_parameter(
        lambda_perp_parameter_name,
        lambda_par_parameter_name,
        volume_fraction_intra_parameter_name,
        volume_fraction_extra_parameter_name,
        S0_correction=True
    )

where the trigger is the S0_correction=True. The used S0 is the one passed to the constructor of the model.

Limitations

The stick and the zeppelin must both be at the top level of the model.

Example of admissible model:

ball = gaussian_models.G1Ball()
stick = SD1WatsonDistributed([cylinder_models.C1Stick()])
zeppelin = SD1WatsonDistributed([gaussian_models.G2Zeppelin()])
model = MultiCompartmentModel(models=[stick, zeppelin, ball], S0_tissue_responses=[s0_stick, s0_zeppelin, s0_ball])

This PR replaces #84 .

This commit adds the possibility to correct the tortuosity constraint
by taking into account the multi-tissue properties of the employed
model. In order to do this, the new syntax of the
`set_tortuous_parameter` method of the `MultiCompartmentModel` class is
extended in such a way that it can take as input the S0 of the tissues
modelled by the intra-cellular and the extra-cellular compartments.
Backward compatibility is maintained.
This commit adds the raise tests that cover the parsing of the multi
tissue correction of the tortuosity constraint.

Also, a typo in the filename of the test of the tortuosity function is
fixed: tisssue -> tissue.
This commit is responsible for transforming the T1_tortuosity function
into a class. This is made necessary by the introduction of the
correction of tortuosity constraint in generalized tissue modelling.
The corresponding changes in the constraint checks are applied both in
the modeling_framework file and in the distribute_models file.

Also, this commit solves several pep8 and other minor style issues.
Also, minor flake8 issues have been solved.
@matteofrigo matteofrigo mentioned this pull request Jan 17, 2021
@codecov-io
Copy link

Codecov Report

Merging #110 (86a0a44) into master (21c3efc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #110   +/-   ##
=======================================
  Coverage   82.86%   82.86%           
=======================================
  Files          67       67           
  Lines        5871     5871           
  Branches      696      696           
=======================================
  Hits         4865     4865           
  Misses        817      817           
  Partials      189      189           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21c3efc...86a0a44. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 727

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.105%

Totals Coverage Status
Change from base Build 726: 0.0%
Covered Lines: 5054
Relevant Lines: 5871

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants