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

Unexpected behaviour for ixpeobssim.evt.kislat2015.xStokesAnalysis.calculate_polarization #696

Open
doroshv opened this issue Apr 22, 2023 · 0 comments

Comments

@doroshv
Copy link

doroshv commented Apr 22, 2023

Due to masking one can get unexpected results for PA for the said function when arbitrary intensity/stokes parameters are assumed (and I would expect masking to take care of such cases, not make problem invisible). For instance, calling

In [22]: ixpeobssim.evt.kislat2015.xStokesAnalysis.calculate_polarization(array(
...: [500]),array([50.0]),array([-50.0]),array([1]))
Out[22]:
(array([0.14142136]),
array([0.06299155]),
array([-0.39269908]),
array([0.22383074]))

gives correct values, whereas

In [23]: ixpeobssim.evt.kislat2015.xStokesAnalysis.calculate_polarization(array(
...: [50]),array([50.0]),array([-50.0]),array([1]))
Out[23]: (array([1.41421356]), array([0.]), array([0.]), array([0.]))

gives something which is clearly wrong (i.e. PA shall not depend on I). Initialising PA with nans rather than 0 would make it more obvious that something is going wrong.

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

1 participant