Closed wtbarnes closed 3 years ago
Just fixing this, but out of interest, how did you find the issue? It doesn't seem to actually have any impact, because mak_fitswcs_header
doesn't populate the NAXISi
keywords.
Ha well I actually found it just by looking at the source code and had been looking closely at make_fitswcs_header
as well and noticed it was inconsistent.
The docstring for
carr_cea_wcs_header
saysi.e.
shape
should be in cartesian order. This is then passed directly tomake_fitswcs_header
,https://github.com/dstansby/pfsspy/blob/961f07522ede53fdb3cde567cf3297c711a687f0/pfsspy/utils.py#L118
However,
make_fitswcs_header
assumes the ordering of this input is array-index ordered: https://docs.sunpy.org/en/stable/api/sunpy.map.make_fitswcs_header.html#sunpy.map.make_fitswcs_header.Additionally, the input can't just be reversed because the
scale
argument (correctly) assumes that the ordering is cartesian: https://github.com/dstansby/pfsspy/blob/961f07522ede53fdb3cde567cf3297c711a687f0/pfsspy/utils.py#L119-L120, consistent withmake_fitswcs_header
.