-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
_plot_2D_cube
fails after slicing 3D cube
#132
Comments
Hi @byrdie. Thanks for raising this issue. I tried your minimal working example and it worked fine for me. Can I ask what version of >>> import ndcube
>>> ndcube.__version__ where |
@DanRyanIrish, that is interesting that it works for you, I wonder what I could've done to my system. I should be running the latest version of >>> import ndcube
>>> ndcube.__version__
'1.0' |
Hi @byrdie. I thought that must have been the issue. Update ndcube to 1.0.1 and that'll fix your problem. |
I don't understand, I cloned and installed the master branch, how is that not the latest version? I can even see the commits I just merged in... |
Ah. So there are two different types of installs. Stable and bleeding edge. The stable versions are installed via conda update ndcube from a terminal. Then you can start python, import ndcube and check the version number is 1.0.1. If this is the case, the problem this issue raised should be fixed. Now to the second question regarding the bleeding edge. The bleeding edge version is the master branch from the GitHub repo. The bleeding edge now includes your commits. The bleeding edge is not the same as the latest stable version. The latest stable version is a saved snapshot of the bleeding edge version from the past when we were confident that everything worked. (Although you have shown that for version 1.0 we missed some bugs, which is why we then released 1.0.1.) With a stable version saved and not changing in time, we are then free to keep adding features and bug fixes to the bleeding edge version without worrying about breaking the latest stable version that most people should be using. It is possible to install the bleeding edge and use that in your coding. But BE WARNED! As the name suggests, the bleeding edge is not stable and may change at any time, possibly causing code you've written relying on it to break. The advantage however, it you can get the latest new features and bug fixes straight away without waiting for a new stable release. I would discourage people installing the bleeding edge version unless either:
If either of the above apply to you, I am happy to explain how to install the the bleeding edge version. |
Sorry, I should've been more clear. Following the instructions here, I both cloned the repo and installed it using mkdir ~/sunpy
cd ~/sunpy
git clone https://github.com/sunpy/ndcube.git ndcube_dev
cd ndcube_dev
pip3 install -e . I checked that the version installed above is indeed the version being used using the following commands >>> import ndcube
>>> ndcube.__version__
'1.0'
>>> ndcube.__file__
'/home/byrdie/sunpy/ndcube_dev/ndcube/__init__.py' Since |
Ah! Thank you for clarifying @byrdie. I think I know what the problem is then. But first, can you confirm what version of sunpy you are using? |
Sure, no problem >>> import sunpy
>>> sunpy.__version__
'0.9.3' |
Yep. That's the problem. The bleeding edge version of If you don't want to rely on the bleeding edge version of sunpy, I would recommend using ndcube 1.0.1. You won't have all the latest ndcube features but I don't think this specific issue will be a problem for you. |
So apparently I had the both the bleeding edge (installed using
and made sure the bleeding edge version was up-to-date
and checked that I was using the correct version >>> import sunpy
>>> sunpy.__version__
'1.0.dev9964'
>>> sunpy.__file__
'/home/byrdie/sunpy/sunpy_dev/sunpy/__init__.py' but I am still getting the same error running my code from above! |
Try uninstalling with conda? |
Hi @byrdie. Did you ever determine whether this issue was indeed fixed by rebuilding your conda install? |
Hi @byrdie. I'm going to close this issue. But if you are still experiencing this problem please let us know. FYI, we have just released a new verison of ndcube, 1.1.1. So updating to that version may also solve you problem. If you find new bugs with 1.1.1 please also let us know and we can try to address them. |
Slicing a 3D
ndcube
into a 2D cube throws an error which I do not understand.Here is a minimal, working example using the code from the documentation
The above code throws the error
From my investigations, one of the problems seems to be that
new_axes_coordinates
in the_plot_2D_cube
function is a list of 2D arrays instead of 1D arrays. I haven't yet established why this is, I think the answer lies inside the_derive_axes_coordinates
, but I thought I'd post this here to see if anyone else has any input before tearing apart_derive_axes_coordinates
.For what it's worth, I checked to make sure the
_plot_2D_cube
function worked when defining a 2Dndcube
(instead of slicing a 3Dndcube
), and it did indeed work, so this is something specific to the slicing operation.The text was updated successfully, but these errors were encountered: