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

Error raised on negative phase function for tabulated phase function #34

Open
Eric-Zhang0 opened this issue May 24, 2024 · 2 comments
Open

Comments

@Eric-Zhang0
Copy link

I tried to use phase function tables outside and I have already converted the original phase functions to the Wigner expansion by following the example of 'convert_libradtran_phase_to_at3d.py'. However, it still raised this error and I don't know whether it is related to the issue that I could not convert phase functions successfully.
Screenshot from 2024-05-24 18-33-18

@JRLoveridge
Copy link
Member

The phase function should be positive, so they aren't being converted correctly. You can check whether the phase function is reconstructed correctly from your converted coefficients by using at3d.util.get_phase_function. Given the large negative value, one thing to double check is the normalization. The Legendre coefficients should include the (2i + 1) factor, for the ith Legendre coefficient, so an asymmetry parameter of 0.85 will correspond to a Legendre coefficient of 0.85(2*1+1) = 2.55.

@Eric-Zhang0
Copy link
Author

Thanks for your kind advice and I will try it agian.

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

No branches or pull requests

2 participants