-
Notifications
You must be signed in to change notification settings - Fork 8
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
adding xrt_teem #89
adding xrt_teem #89
Conversation
Initial upload of xrt_teem.py, code to create temperature and emission measure maps from two images based on the filter ratio method. Code was originally written in IDL by N. Narukage and shows that IDL legacy to some extent.
Now flake8 compliant. Also chose simpler expression for binning data.
Several small changes were made to the code, mainly to improve readability. Seems easiest to delete and then upload newer version.
version of xrt_teem with unused imports removed, better naming of variables.
fixes in formatting (removing trailing whitespace, etc.) and one bug - spect1, spect2 used before being defined
…as producing deprecation warning in tests.
…to jslavin-patch-2
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again for doing this! I'm excited to have this added! I only took a quick look so far. I'll try to look at this again in the next day or two.
I noticed that the .fits
files were giving pre-commit
some indigestion, so I made two quick pull requests to tell some of the pre-commit
hooks to ignore .fits
files and update the pre-commit
config. Assuming you have upstream
set as the remote for the XRTpy repo, doing git pull upstream main
and git push
should get the changes merged into this branch.
With regards to documentation, a lot of what's in XRTpy is based off of PlasmaPy, so the PlasmaPy doc guide might be helpful here too.
Accepting changes to docstring as suggested by Nick to use markdown formatting. Co-authored-by: Nick Murphy <[email protected]>
Accept reformatting of docstring. Co-authored-by: Nick Murphy <[email protected]>
Accept more reformatting of docstring. Co-authored-by: Nick Murphy <[email protected]>
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
@jslavin If possible, add documentation to the section of Getting Started - XRTpy Objects for users to get more information about xrt_teem before the squash and merge. However, this can be a later pull request of its own as well. |
I've not taken a close look at this, but one high level suggestion would be to make the two input XRT images sunpy map objects rather than accepting two data header pairs. This would vastly simplify the metadata handling as SunPy already includes code for handling XRT headers. For example, the parsing of the filter wheel combination is already done on the XRT map source in SunPy and can be accessed as a property. I would also suggest that the return type of the emission and temperature also be SunPy maps. That way, a user can continue to take advantage of all the usual operations (e.g. cropping, visualization) on their derived temperature maps. |
Understood
I suspect the issue is because, in the XRT map source, there is a fix for the non-standard I agree with you re: not including all the original metadata as it no longer applies to the resulting EM/temperature maps. My suggested fix would be to set the
That's an interesting point. In Note that you could you could recreate the kind of mask you're talking about by passing the |
…book to reflect those changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again for doing this! I especially liked the writing style for the docstrings and example notebooks, since I found it quite understandable. A lot of my comments are related to reStructuredText formatting and thus should be fairly straightforward to implement.
My philosophy with code review is for the reviewer to offer thoughts and suggestions, and then usually have the code author decide whether or not to accept the suggestion since they're the expert on it. So, if there are suggestions that you disagree with or would prefer to address in a different way, please take the approach that you decide would be best.
Thank you again!
Co-authored-by: Nick Murphy <[email protected]>
Co-authored-by: Nick Murphy <[email protected]>
Co-authored-by: Nick Murphy <[email protected]>
Co-authored-by: Nick Murphy <[email protected]>
Co-authored-by: Nick Murphy <[email protected]>
Co-authored-by: Nick Murphy <[email protected]>
…easurement attribute to TemperatureResponseFundamental filtername format
…to jslavin-patch-2
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
:orphan: | ||
|
||
`xrtpy.response.xrt_teem` | ||
========================= | ||
|
||
.. currentmodule:: xrtpy.response.xrt_teem | ||
|
||
.. automodapi:: xrtpy.response.xrt_teem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we add a new module, we often need to add a stub documentation file so that the docstrings from the module show up in the online documentation.
@@ -120,6 +120,7 @@ extend-ignore = | |||
W605, | |||
RST210, | |||
RST213, | |||
RST305, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to add this error code as one of the linter checks to ignore. This one checks for undefined substitutions, but isn't smart enough to check for our globally defined substitutions.
@jslavin — I made a few edits directly to this pull request to try getting the docstring to show up in the documentation preview for There seems to be a problem with the reStructuredText references to other packages not forming links. This may be an issue with how intersphinx is set up, though I wasn't able to find any problems. I'll have to look into this a bit more to figure out what's happening here. I think there was also just a new release of Sphinx, which might(?) have something to do with it. In any case, that's outside the scope of this pull request, so it shouldn't hold this up. |
Hi Nick,
The documentation looks good. Thanks for your work in getting that done.
Jon
…On Mon, Feb 13, 2023 at 6:36 PM Nick Murphy ***@***.***> wrote:
@jslavin <https://github.com/jslavin> — I made a few edits directly to
this pull request to try getting the docstring to show up in the documentation
preview for xrt_teem
<https://xrtpy--89.org.readthedocs.build/en/89/api/xrtpy.response.xrt_teem.xrt_teem.html#xrt-teem>,
and to ignore a linter error regarding substitutions. It'll be necessary to
do a git pull to get the updates.
There seems to be a problem with the reStructuredText references to other
packages not forming links. This may be an issue with how intersphinx is
set up, though I wasn't able to find any problems. I'll have to look into
this a bit more to figure out what's happening here. I think there was also
just a new release of Sphinx, which might(?) have something to do with it.
In any case, that's outside the scope of this pull request, so it shouldn't
hold this up.
—
Reply to this email directly, view it on GitHub
<#89 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE5OY3EXUIHHCIHSD53H5LWXLAPHANCNFSM6AAAAAASO4RUVQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Adding xrt_teem.py only