You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When playing around with aiapy.calibrate.register I found that if you pass a level 1.5 map again through this it changes the map. I suspect that this shouldn't happen? Maybe a check should go in when a map is passed to check the "lvl_num" meta keywords.
For example if you pass a registered map through aiapy.calibrate.register again and check the difference you can see some differences:
maybe I'm missing something, and its probably unlikely to be done by a user, but it would be best to have a check for the level number in the function.
The text was updated successfully, but these errors were encountered:
This is worrying. I'd agree that there should probably be a check on the level number. It doesn't really make sense to call the prep operation on a level 1.5 map. But I'm concerned about those differences. If the map has been rescaled, derotated, and centered already, subsequent rotate calls should not have an discernible effect.
The differences you show here are quite small (1e-9 whereas 171 counts are of order 1e3). I wonder if these differences are just due to interpolation? I guess a good test would doing many repeated calls on the map and looking at the distribution of differences.
!94 added a check to raise a warning to at least alert the user that they're calling register on a map with a processing level > 1.
I don't think this completely resolves the issue though. Looking into this a bit more, I called register repeatedly on a 171 map and took the difference between the two and just looked at the distribution of values. The legend indicates the number of times register was called on the data so "0-1" refers to the level 1 minus the level 1.5 map, "1-2" refers to the level 1.5 map minus a map that has had register run on it twice, etc.
You can see that the distribution of differences doesn't significantly narrow to essentially 0 until register has been called for a fourth time. I'm not completely sure what to make of this. I suspect that this is something that should be dealt with upstream in sunpy as well.
Note that even for the 1-2 case (calling register once versus twice, orange), the distribution of differences is symmetric and most of the differences are quite small compared to the difference between a registered and non-registered map (blue distribution). Though there still are a few pixels with differences of order 1e3 in the 1-2 case.
In GitLab by @hayesla on Nov 12, 2020, 11:12
When playing around with aiapy.calibrate.register I found that if you pass a level 1.5 map again through this it changes the map. I suspect that this shouldn't happen? Maybe a check should go in when a map is passed to check the "lvl_num" meta keywords.
For example if you pass a registered map through
aiapy.calibrate.register
again and check the difference you can see some differences:maybe I'm missing something, and its probably unlikely to be done by a user, but it would be best to have a check for the level number in the function.
The text was updated successfully, but these errors were encountered: