-
Notifications
You must be signed in to change notification settings - Fork 35
add seasonality with monthly values to example scenario #447
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
base: main
Are you sure you want to change the base?
add seasonality with monthly values to example scenario #447
Conversation
b-s-code
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support the inclusion of example monthly values.
The monthly values added here give different output to what is obtained by specifying Fourier coefficients.
The difference isn't huge and I assume it is to be expected? E.g. these output plots look similar but there are some observable differences. Top row = Fourier coefficients in XML, bottom row = monthly values in XML.
I don't suppose there's any reason this might be an issue? None come to my mind.
If no concerns on your end then I'm happy for this to be merged.
|
Apparently when using monthly values, InputEIR is shifted slightly. I'm working on a fix. |
|
openmalaria/model/Transmission/transmission.h Line 188 in e449fef
When using monthly values, the InputEIR vector is shifted by approximately half a month: this is most likely assuming the monthly values provided by the user are averages for each month. |
0e13aac to
2940247
Compare
b-s-code
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. Just a print statement left over.
model/Transmission/transmission.h
Outdated
|
|
||
| // Now we rescale to get an EIR of targetEIR. | ||
| // Calculate current sum as is usually done. | ||
| cout << EIRRotateAngle << endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can delete?
b-s-code
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
The current example scenario uses Fourier coefficients for seasonality. In practice, users may prefer monthly values. This PR adds an example using monthly values.
When using monthly values, the seasonality is shifter to the right by 15 days because the model is assuming the provided monthly values are averages for each month. This PR removes the shift to align with using Fourier coefficients so that both methods produce near identical InputEIR and SimulatedEIR.
Example of XML configuration:
Fourier coefficients
Monthly values
Note that
EIRRotateAnglebecomes available for monthly values (it was previously only available for Fourier coefficients).In addition,
EIRRotateAngleis now optional for both methods and defaults to 0.Tests that were using monthly values have been updated.