Repository navigation
Conversation
There was a problem hiding this comment.
No need for the backticks here -- it causes formatting errors in the documentation.
|
I fixed the docstrings - although I couldn't get the double backtick to be parsed as literal code in the |
There was a problem hiding this comment.
Should inwcs.wcs.cunit be used instead of u.deg?
|
I like that both scales are now available since this can be used now in legacy code we have. I left a minor comment about units. @mcara may have other comments but 👍 from me. |
|
I thought about this issue, i.e., what do we call "pixel scale", and I think it is not simple and that the answer depends on how this pixel scale is intended to be used. Now, I have a really bad habit of being verbose, so I want to apologize for this ahead of time. Also, I will split my comments into thee parts: 1) I would like to discuss how is "pixel scale" being used; 2) I will discuss issues related to the current function as it is (assuming you insist on keeping this function); and 3) Propose two separate functions instead of the current function. Edit: went from 2 parts -> 3 parts (due to verbosity) 😃 |
|
With regard to the use of the "pixel scale"... I can imagine people using the pixel scale in the following ways:
For the first use case above, I believe, as explained in #3113, that we should be using Now, if users were to get two scales for each axis, how hard would it be to compute their mean? Well, I was thinking that Possibly, there may be other uses for an "average" pixel scale besides the ones mentioned above, so if anyone is aware of those, please contribute to this list. |
|
Assuming you want to keep this function, then I would like to make the following comments about it:
|
|
Because of the different use of "pixel scale" by different users, I would suggest having two different functions:
These functions (personally I do not like that their names are soooo looong hence "pixel_scale" -> "pscale") should take a single argument - the WCS for which pixel scale needs to be computed. In the future, if need (or interest) be, we can add (x,y) arguments to both functions so that pixel scale(s) can be computed in any part of the image based on distortion model in the WCS. For now, I think a number (or two) at CRPIX location is what most people want. EDIT: maybe call these functions |
|
@mcara - this all sounds reasonable to me, but I wouldn't consider myself a pixel scale power-user (I usually just need a 'representative'. In the interest of time, since it would be good to resolve this before the 1.0 release candidate (in a few days) maybe you could open a new pull request with your suggested changes since it will make it easier to review? If possible, you could include @sargas's commits in the branch so as to give him credit for his work here? |
|
@astrofrog which one of my two suggestions do you want me to implement: 1) splitting pixel scale into two functions; or 2) keeping the old function and applying the suggested (6) fixes? Also, can anyone instruct on how to do this: "If possible, you could include @sargas's commits in the branch so as to give him credit for his work here?" |
|
Based on @nden comment in #3113 (two scales for each axis) and on the discussion in this PR, I created PR #3304 that replaces |
|
@mcara - can this now be closed? |
|
@astrofrog I believe that #3304 essentially solved the issue of what do we call a "pixel scale(s)"... So, from my point of view, I think this issue can be closed. |
Simple change. There didn't seem to be any disagreement to @mcara's suggestion in #3113 to use the geometric mean. This PR does that and adds a
which=kwarg for obtaining a the pixel scale in a specific diminsion, and @nden's suggestion of exposing the pixel scale for each diminsion.