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

Fixed bug in which qdisk structure was incorrectly zeroed before photon ... #69

Merged
merged 1 commit into from
Feb 14, 2014

Conversation

jhmatthews
Copy link
Collaborator

...generation.

This fixes a silly error in which the heating stored in the qdisk structure was zeroed before it was even used, meaning that the SEDs used for the ionization state was identical if you were using disk illumination mode 2 or mode 0. To fix, I simply move the zeroing line after photon_gen in python.c. I've tested that this fix moves the illuminating SED up to roughly the expected level.

Interestingly in the spectral cycles the SEDs were different because it still had the information from the last ion cycle.

I just looked in python 58 and the same bug appears to be present there. I'm now a little worried that this may have affected @ssim 's 2005 paper, as a number of reprocessing models were used in that study.

@ssim
Copy link
Collaborator

ssim commented Feb 14, 2014

HI James,

If I recall correctly, in the 2005 paper we used an analytic formula for the amount of reprocessing, which I think assumed that the disk is directly illuminated by the central star (I'd have to check the formula) - but I don't think we used the option to try and have Python predict how much re-radiation we expected. So I think we used reprocessing options "1" (which is the reflecting case) and "3" which was this analytic approximation. I don't think either of those cases should be affected by what is in qdisk (but would be good to check).

Stuart

On 13 Feb 2014, at 18:43, James Matthews [email protected] wrote:

...generation.

This fixes a silly error in which the heating stored in the qdisk structure was zeroed before it was even used, meaning that the SEDs used for the ionization state was identical if you were using disk illumination mode 2 or mode 0. To fix, I simply move the zeroing line after photon_gen in python.c. I've tested that this fix moves the illuminating SED up to roughly the expected level.

Interestingly in the spectral cycles the SEDs were different because it still had the information from the last ion cycle.

I just looked in python 58 and the same bug appears to be present there. I'm now a little worried that this may have affected @ssim 's 2005 paper, as a number of reprocessing models were used in that study.

You can merge this Pull Request by running

git pull https://github.com/jhmatthews/python qdisk
Or view, comment on, or merge it at:

https://github.com/agnwinds/python/pull/69

Commit Summary

• Fixed bug in which qdisk structure was incorrectly zeroed before photon generation
File Changes

• M python.c (28)
Patch Links:

https://github.com/agnwinds/python/pull/69.patch
https://github.com/agnwinds/python/pull/69.diff

Reply to this email directly or view it on GitHub.

@jhmatthews
Copy link
Collaborator Author

I've just checked Stuart and you're absolutely right. Reprocessing options 1 and 3 are never affected by this, just 2 and I don't think we've used this for anything, which is lucky!

Merging this right away.

jhmatthews added a commit that referenced this pull request Feb 14, 2014
Fixed bug in which qdisk structure was incorrectly zeroed
@jhmatthews jhmatthews merged commit 74a6002 into sirocco-rt:dev Feb 14, 2014
@jhmatthews jhmatthews deleted the qdisk branch June 3, 2016 15:40
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