Handle files with stokes and channel axes switched (addresses issue #26)#60
Draft
marcinsokolowski wants to merge 1 commit into
Draft
Handle files with stokes and channel axes switched (addresses issue #26)#60marcinsokolowski wants to merge 1 commit into
marcinsokolowski wants to merge 1 commit into
Conversation
…CY axis is discovered (3rd axis STOKES and 4th axis FREQ) and program works appropriately to convert FITS to HDF5 file without going through interemediate step of swapaxis in python.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial revision of version where swapped order of STOKES and FREQUENCY axis is discovered (3rd axis STOKES and 4th axis FREQ) and program works appropriately to convert FITS to HDF5 file without going through intermediate step of swapaxes in python. This addresses issue #26 where converter does not for new ASKAP data with CTYPE3=STOKES and CTYPE4=FREQ (swapped axis).
The idea is to make a simple fix and I assume that STOKES and FREQ axis can only be 3rd or 4th, and spatial axis are always going to be 1,2. Any more complex axis ordering may be considered in the future (for example after TIME axis is added).
It was already tested on both normal-ordered axis data and swapped-axis data and works fine.
Should not conflict with any other changes, can be reviewed and potentially merged to the main branch.
However, it can potentially live in a separate branch if there are good reasons for it. I've already compiled it on Setonix in Perth and it seems to be working ok there.
TODO in the future
I will look at the same in the smart-converter mode later when I start testing and merging it to the main branch.