Parameters for Pix2Sky and Sky2Pix ConicOrthomorphic are invalid
mcara opened this issue · 0 comments
Parameters for Conic Orthomorphic models are invalid and this leads to crashes in gwcs
tests using astropy/astropy#12558.
The reason it was not causing issues before astropy/astropy#12558 is that previous code (or current as of now on astropy
's master) did delay setting WCS projection parameters until model was evaluated. The proposed PR on astropy
sets projection models at class initialization leading to crashes in gwcs
tests that import asdf_astropy/converters/transform/tests/test_transform.py
.
@nden To verify that even with current astropy
master (pre- astropy/astropy#12558) add:
m = astropy_models.Pix2Sky_ConicOrthomorphic(sigma=89.5, delta=0.5)
m(0, 0)
at the top of create_single_models()
and try to run gwcs
tests with this modification.
The reason is that theta1 = sigma + delta
and it is equal to 90 degrees which leads to singularities in the formula for C in https://docs.astropy.org/en/stable/api/astropy.modeling.projections.Pix2Sky_ConicOrthomorphic.html
If one wants to use something different from default values, then theta1 should be such that singularities are avoided. I would suggest
astropy_models.Pix2Sky_ConicOrthomorphic(sigma=88, delta=1) # or any delta < 2