-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add Real World Coordinates from Sliced Out Axes of WCS to Extra_coords #151
Conversation
Hello @kakirastern! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-08-19 19:43:40 UTC |
Hi @kakirastern. Thanks for this PR. I'm looking forward to having this issue addressed. Before giving you further advice on how best to move ahead, I think it would be instructive if you told me a little of how you understand |
Sure @DanRyanIrish. So the
As such three main conditional statements have been used in the definition, to first decide which kind of slicing (of the above three) has been applied, then to check each sliced item to be added to the output variable |
That's OK @kakirastern. Seems you have a fairly good understanding, especially considering that this overall slicing infrastructure this sits in is not the simplest. One further question. What is your understanding of the purpose of the |
Thanks, @DanRyanIrish. The |
You really seem to have got your head around it! In that case, let's look more closely at your PR. The function However if I remember correctly, an axis whose data dimension is sliced away is only retained and labelled "missing" if a non-missing axis is dependent on it, like in the case of your latitude/longitude example. If this is not the case, the axis is dropped altogether from the Looking more closely at This means we can both slice the new WCS ( Finally, instead of returning a I suggest we start doing this only for non-dependent or dropped sets of dependent axes. This should hopefully make the process a little easier. And we may want to keep the dependent axes values only available in the WCS...perhaps? That is as yet an open question. How does this sound as a strategy? I realise I've written a lot here and it may not all be clear. Feel free to respond with questions about any of it. |
Yup, I agree with your suggested approach to adding the new feature by way of a a commonly formatted |
Hi @kakirastern. No I think it requires rewriting of The biggest effort will be adding a piece of code to |
HI @DanRyanIrish. Sure, I have just pushed the first (or the easy) part of the changes to my branch... Am thinking about the second part of your comments though. Will need a bit of time to think things through... Really appreciate your comments as a guide! They are really helpful. |
These changes look good @kakirastern. I think you're on the right track. |
I just figured out the next few lines of code to add...
Will need time to think about the rest of the bits to be added. Think this is any good? |
Hi @kakirastern. I think So you should play around with One other piece of advice which will be very helpful is to write unique commit messages. They don't have to be long. But something that will give readers like me an idea about what changes were made and why is very useful. The files you changed is easily inspected on GitHub, so "Update wcs.py" doesn't tell us anything useful. Just some helpful advice in moving forward with your git career :) |
Thanks @DanRyanIrish for the advice about commenting on PR! So I will just use the following instead:
Still thinking about the |
Right. Just from a code point of view, I think all elements in for slice_element in item_:
if (slice_element.stop - slice_element.start) == 1:
... |
Thanks for the suggestion! |
Hi @kakirastern. Apologies for the delay in responding. I was preoccupied with the holiday weekend in the States. What country/timezone are you in by the way? Anyway, I've made some suggestions on how to move ahead with your PR. You're definitely moving in the right direction. |
No worries @DanRyanIrish. I am from Hong Kong by the way, so am in the GMT+8 time zone. Thanks for checking the code I am modifying in this PR and for your instructions/suggestions. I have tried hard to follow them. Please see my attempts. |
@DanRyanIrish It's weird, seems like some changes have not been saved since the last time I tried to change them. Might be why it appears somewhat odd, especially after you already made some request for me to modify some codes... Let me check what I have done wrong. |
Hmmm. Have you committed and pushed your latest changes to your github account? |
I checked with my branch... I think I may have been careless about some of the changes, but most others have been committed and pushed to my branch. @DanRyanIrish, I am sorry about the confusion earlier. |
No worries about the confusion. It's easy to make mistakes with git when you're starting out...sometimes even when you're more experienced too! |
Hi @kakirastern. I left a few minor comments but left didn't comment on the innermost loop where the extra coords are compiled as you seem to still be working on that. Let me know when you're stuck/ready for more comments on that part. In working these things out, I would recommend building your own WCS object following the ndcube docs (http://docs.sunpy.org/projects/ndcube/en/stable/ndcube.html) and play around with the commands and objects from the code on the command line/jupyter notebook to better understand what's going on. Perhaps you are doing this already though. |
I'm liking the new git commit comments, by the way! ;) |
Got rid of all the bugs in |
I will try to see where things are after the latest NDCube release and go from there. |
Hi @kakirastern. Just to let you know that I took a look at this last night. Because of some significant changes to the code base, this will likely need a serious rebase. This effort will have to be a longer term goal than we originally hoped and so no further work should be done on it for now. However, I think keeping this PR open as it will be very helpful to that future effort as a reminder the desired behaviour. |
Hi @DanRyanIrish Sure |
This pull request has been automatically marked as stale because it has not had any activity for the past five months. It will be closed if no further activity occurs. If the ideas in this pull request are still worth implementing, please make sure you open an issue to keep track of that idea! |
This pull request has been automatically closed since there was no activity for a month since it was marked as stale. If the ideas in this pull request are still worth implementing, please make sure you open an issue to keep track of that idea! |
To follow up on Issue #136 to add a new feature.