Conversation
few fixes in refs fixing the refs
importing funcs testing import i think final final nail explicit imports
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
lint
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
240258d to
01c1344
Compare
|
I do not understand why this changelog check is failing... Most of the other test fails are fixed by #301 |
I think since there are two and one is not for this PR. |
Ah I didn't realize that other one got modified. |
Cadair
left a comment
There was a problem hiding this comment.
This looks really good.
One general thing is that spacing around operators is chaotic in this PR.
| ] | ||
|
|
||
|
|
||
| class AffineParams(NamedTuple): |
There was a problem hiding this comment.
mostly out of curiosity. Why NamedTuple here rather than say dataclass?
There was a problem hiding this comment.
No reason, would you prefer a dataclass?
|
|
||
| .. note:: | ||
|
|
||
| This function is intended to correct maps with inaccurate metadata. |
There was a problem hiding this comment.
Is it worth explaining here that this only handles affine transform like modification of the metadata?
| # Particularly for this method, there is no change in the rotation or scaling, | ||
| # hence the hardcoded values of scale to 1.0 & rotation to identity matrix | ||
| scale = np.array([1.0, 1.0]) | ||
| rotation_matrix = np.eye(2) | ||
| return AffineParams(scale=scale, rotation_matrix=rotation_matrix, translation=(x_shift, y_shift)) |
There was a problem hiding this comment.
This is a more concrete example of my comment about NamedTuple vs something else. Something else could have defaults of unity for everything? (Is explicit better though? maybe?)
There was a problem hiding this comment.
🤷♂️ I don't have a strong opinion here. We could always switch to using a dataclass later on.
docs/code_ref/coalignment.rst
Outdated
| .. automodapi:: sunkit_image.coalignment.match_template | ||
|
|
||
| .. automodapi:: sunkit_image.coalignment.phase_cross_correlation | ||
|
|
||
| .. automodapi:: sunkit_image.coalignment.interface | ||
| :no-inheritance-diagram: | ||
| :skip: coalign | ||
|
|
||
| .. automodapi:: sunkit_image.coalignment.register | ||
| :no-heading: |
There was a problem hiding this comment.
These have the wrong heading levels, they should be sub-headings to sunkit_image.coalignment.
There was a problem hiding this comment.
I revamped the entire reference section instead
There was a problem hiding this comment.
This looks way better to me. Thanks!
| ] | ||
|
|
||
| # Global Dictionary to store the registered methods and their names | ||
| REGISTERED_METHODS = {} |
There was a problem hiding this comment.
This probably isn't thread-safe 😆
There was a problem hiding this comment.
How would we make it thread safe?
There was a problem hiding this comment.
No idea, but we should probably at least track it. Maybe Albert has some ideas given his work on sunpy.
| # NOTE: Currently, the only metadata updates that are supported are shifts in | ||
| # the reference coordinate. Once other updates are supported, this check can be removed. | ||
| if not (affine_params.rotation_matrix == np.eye(2)).all(): | ||
| raise NotImplementedError('Changes to the rotation metadata are currently not supported.') | ||
| if not (affine_params.scale == np.array([1,1])).all(): | ||
| raise NotImplementedError('Changes to the pixel scale metadata are currently not supported.') |
There was a problem hiding this comment.
Can we open an issue for this? and document that they are currently unsupported? Also edit these error messages to tell people that they should come ask us about them if they have a use for them.
There was a problem hiding this comment.
I added a message to open an issue with a link.
Co-authored-by: Stuart Mumford <stuart@cadair.com>
|
I handled the rename and updating the api docs. |
a1fef30 to
15292d7
Compare
baa86ea to
8e45e74
Compare
docs/code_ref/stara.rst
Outdated
| @@ -1 +1,7 @@ | |||
| Granule Detection (`sunkit_image.granule`) | |||
There was a problem hiding this comment.
This one is mislabeled. It should be STARA.
|
Looks like tox update decided to break things. |
Since I lack write access now, I copied #207 here.
coalignmentmodule #83This should be squash merged
Fixes #302 by removing it. I didn't fix anything with anything else.