-
Notifications
You must be signed in to change notification settings - Fork 3
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
Request to add the feature to get the exact image array size back after applying register. #330
Comments
Hello @dinesh-hegde, This is known behavior with that function that we had to add a warning note to the function. If you do need to go back to the original size of 4096 by 4096, the current best method is to do something like (this is old code, you will have to adapt it): if tempmap.data.shape == (4094, 4094):
padded_array = np.pad(tempmap.data, 1, mode="constant")
tempmap.meta["crpix1"] += 1
tempmap.meta["crpix2"] += 1
newmap = tempmap._new_instance(padded_array, tempmap.meta) The other choice would be to look at https://github.com/sunpy/sunpy/pull/6707/files and see how that padded the array. Can I ask a few questions: What was the output array size? |
Hi @nabobalis, Thank you. Do you think the resized output size is always 4094 by 4094? After looking at the warning on the documentation page,I was just thinking whether this manual padding of some constant value is ok or not. Output array was 4094 by 4094. |
For everyone, I have spoken to about this issue, the array has always been 4094 by 4094 but I forget if it was wavelength dependent. I think a lot of the time the array was the same size? How has been in your case? Padding the array by one each side, should be safe as you would be padding the edges and those are basically 0 |
Hi,
Please let me know if there is any straightforward way to get the full 4096 by 4096 array back after applying the register function. I checked that aia_prep.pro in SSWIDL is not doing this resizing. help needed.
The text was updated successfully, but these errors were encountered: