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

Set minimum monthly EIR to 1% of the max monthly EIR #380

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

acavelan
Copy link
Collaborator

@acavelan acavelan commented Jan 12, 2024

This changes the minimum monthly EIR value to 1% of the maximum monthly EIR, which helps conserving the original length of the season better after smoothing (only applicable to when monthly EIR values are used).

When low values or even zeros are used in the seasonality, the Fourier smoothing struggles to find a good approximation and the resulting smoothed seasonality may not match the original input values.

Many users probably have this problem without realizing their smoothed input EIR in OpenMalaria doesn't actually match their initial monthly values.

To illustrate this, you can copy-paste the following monthly EIR values into this tool: https://swisstph.github.io/openmalaria/fourier The following values will crash the simulation when using the SimpleMPD model. You can see with the tool that the Fourier series does not match the input very well.

1.0
0.950484
0.850176
0.998646
0.592984
0.090076
0.002824
0.001974
0.019501
0.115986
0.440608
0.866085

image

However, adding 0.01 to the two smallest values solves the problem in most cases:

1.0
0.950484
0.850176
0.998646
0.592984
0.090076
0.012824
0.011974
0.019501
0.115986
0.440608
0.866085

image

This is an arbitrary solution but it seems to work well.

Copy link
Collaborator

@nakul7 nakul7 left a comment

Choose a reason for hiding this comment

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

As discussed on call

@acavelan acavelan merged commit 7f78dd7 into SwissTPH:main Jan 17, 2024
7 checks passed
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.

2 participants