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

calculate_eir function correction #296

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

RJSheppard
Copy link
Member

The function that calculates the initial EIR doesn't appear to be quite right. I don't think it needs to be multiplied by psi. When these values are drawn in lines 135-140 of biting_process.R they get multiplied by psi in line 144. That means we're effectively multiplying these values by psi^2. I think we can correct this by adjusting the calculation thusly.

The two tests at the end would then need adjusting (one way or another) to reflect this change - which could probably use some improving.

I've drawn a couple of plots to show the difference this is trying to correct and that it doesn't change too much:
eir_calculation_comp_timesteps.pdf
eir_calculation_comp.pdf

…on't think it needs to be multiplied by psi. When these values are drawn in lines 135-140 of biting_process.R they get multiplied by psi in line 144. That means we're effectively multiplying these values by psi^2. I think we can correct this by adjusting the calculation thusly.

The two tests at the end would then need adjusting (one way or another) to reflect this change - which could use improving.
@RJSheppard RJSheppard force-pushed the initial_eir_calculation_correction branch from 4a1d779 to b8f3c27 Compare May 8, 2024 14:14
tests/testthat/test-biology.R Outdated Show resolved Hide resolved
Copy link
Member

@pwinskill pwinskill left a comment

Choose a reason for hiding this comment

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

🙏
Thanks Richard. That little step change had puzzled me previously. Good to squash it.

@RJSheppard RJSheppard requested a review from giovannic May 15, 2024 14:24
@RJSheppard RJSheppard merged commit 6804095 into dev May 20, 2024
4 checks passed
@RJSheppard RJSheppard deleted the initial_eir_calculation_correction branch May 20, 2024 14:20
@giovannic giovannic mentioned this pull request Sep 11, 2024
Merged
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