sunkit-image icon indicating copy to clipboard operation
sunkit-image copied to clipboard

Proposed solution for the second Part of the issue #186

Open PaoloBiolghini opened this issue 1 year ago • 10 comments

Proposed a solution for the second Part of the issue #186

As proposed in the comments, i have used m.center.T.. to avoid the possible issues given by the difference between the centers of the maps in the sequence. xshift_arcseconds[i] = new_coordinate.Tx - m.center.Tx yshift_arcseconds[i] = new_coordinate.Ty - m.center.Ty

In order to make the rotation vectors relative to the reference index, before returnig these vectores i subtract the value of the recerence map to all the elements; in this way the rotation of the reference map is 0. xshift_arcseconds=[x-xshift_ref for x in xshift_arcseconds] yshift_arcseconds=[y-yshift_ref for y in yshift_arcseconds]

I have also removed the variable rotate_to_this_layer and created a variable observer_coordinate_ref_layer that stores the observer coordinate because we no longer use rotate_to_this_layer.center.T...

PaoloBiolghini avatar Mar 28 '24 13:03 PaoloBiolghini

Is there a before and after this change example or output you can show us?

nabobalis avatar Mar 28 '24 15:03 nabobalis

Is there a before and after this change example or output you can show us?

I can try to create one if it is helpful

PaoloBiolghini avatar Mar 28 '24 18:03 PaoloBiolghini

I would like to know if this works and what it changes to the output, so I think it would be helpful.

nabobalis avatar Mar 28 '24 18:03 nabobalis

I would like to know if this works and what it changes to the output, so I think it would be helpful.

Hi, I have create a python notebook that show the difference with the previous method https://paolobiolghini.github.io/Sunkit_Image_Examples/showExample.html

PaoloBiolghini avatar Mar 30 '24 11:03 PaoloBiolghini

I would like to know if this works and what it changes to the output, so I think it would be helpful.

Hi, I have create a python notebook that show the difference with the previous method paolobiolghini.github.io/Sunkit_Image_Examples/showExample.html

Thanks for the notebook, but I wasn't clear so I caused confusion.

This change did not affect any of the unit tests and that means we do not have a way to validate this change within our test suite. We can't merge a change like this without some sort of test to ensure that it was broken before, its fixed now and will be fixed in the future.

Could you add a unit test for this?

nabobalis avatar Mar 30 '24 15:03 nabobalis

I would like to know if this works and what it changes to the output, so I think it would be helpful.

Hi, I have create a python notebook that show the difference with the previous method paolobiolghini.github.io/Sunkit_Image_Examples/showExample.html

Thanks for the notebook, but I wasn't clear so I caused confusion.

This change did not affect any of the unit tests and that means we do not have a way to validate this change within our test suite. We can't merge a change like this without some sort of test to ensure that it was broken before, its fixed now and will be fixed in the future.

Could you add a unit test for this?

yes i can try in the next few days

PaoloBiolghini avatar Mar 30 '24 22:03 PaoloBiolghini

is it possible to use my custom map inside the tests or should i use the one that are already used in the tests?

PaoloBiolghini avatar Apr 07 '24 11:04 PaoloBiolghini

I would prefer if we can use existing ones however, if the existing ones are not good enough to use. Then we can consider adding some resized test data that works

nabobalis avatar Apr 07 '24 11:04 nabobalis

is actually requiring more time than i thought because i have some troubles with pytest

PaoloBiolghini avatar Apr 15 '24 17:04 PaoloBiolghini

That's ok, there is no deadline or rush.

Anything I can try to help with?

nabobalis avatar Apr 15 '24 18:04 nabobalis

Thanks for your efforts here @PaoloBiolghini. Given the complete refactoring of the API that's ongoing in #207, I'm goong to close this since we've now removed this particular alignment method anyway. Thanks again for your efforts and apologies this was stuck in limbo for so long.

wtbarnes avatar Jul 08 '24 05:07 wtbarnes