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

Add Pituitary gland example function #75

Merged
merged 19 commits into from
Feb 23, 2021
Merged

Add Pituitary gland example function #75

merged 19 commits into from
Feb 23, 2021

Conversation

WolfByttner
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Feb 20, 2021

Codecov Report

Merging #75 (6459b74) into master (f87978d) will increase coverage by 0.63%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   75.66%   76.30%   +0.63%     
==========================================
  Files          24       26       +2     
  Lines        2466     2532      +66     
==========================================
+ Hits         1866     1932      +66     
  Misses        600      600              
Impacted Files Coverage Δ
traja/dataset/pituitary_gland.py 100.00% <100.00%> (ø)
traja/stats/brownian.py 100.00% <100.00%> (ø)

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 f87978d...6459b74. Read the comment docs.

@WolfByttner WolfByttner changed the title DRAFT: Add Pituitary gland example function Add Pituitary gland example function Feb 20, 2021
@WolfByttner WolfByttner marked this pull request as ready for review February 20, 2021 15:02
@WolfByttner WolfByttner merged commit 78b3bea into master Feb 23, 2021
Copy link
Collaborator

@MaddyThakker MaddyThakker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@WolfByttner WolfByttner deleted the pituitary_gland branch February 23, 2021 21:38
@@ -64,14 +64,36 @@ def pituitary_ode(w, t, p):

def compute_pituitary_gland_df_from_parameters(downsample_rate,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear how this is different than pituitary_ode. Can we give it a shorter name?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably leave out 'compute', and also 'df', since that is the return type. Maybe simulate_pituitary_ode?

@@ -64,14 +64,36 @@ def pituitary_ode(w, t, p):

def compute_pituitary_gland_df_from_parameters(downsample_rate,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably leave out 'compute', and also 'df', since that is the return type. Maybe simulate_pituitary_ode?

return df


def create_latin_hypercube_sampled_pituitary_df(downsample_rate=100, samples=1000):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove df from method name and also create, like lhs_pituitary() or pituitary_lhs(). Also add method docstring with return types eg, -> DataFrame, int.

# PyTest will not compute coverage correctly for @jit-compiled code.
# Thus we must explicitly suppress the coverage check.
@jit
def pituitary_ode(w, t, p): # pragma: no cover
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add type hints for return values -> Tuple[float, float, float, float] with from typing import Tuple at the top

@JustinShenk
Copy link
Collaborator

@WolfByttner I see it's already merged. Please let me know what you think about the suggestions.

Saran-nns pushed a commit that referenced this pull request Aug 23, 2024
Add Pituitary gland example function
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.

3 participants