-
Notifications
You must be signed in to change notification settings - Fork 28
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
Aladin widget does not show coordinates #61
Comments
Hello and thanks for opening this issue here 🙂 The function add_table only works to modify an existing widget. It should be called after the cell containing ipyaladin and the table appears in the above cell. See here : (I clicked on the point to highlight it) Does this answer your question? Or did I get you wrong? |
Hi, |
Hi @ManonMarchand, Thanks for the reply! Is it therefore mandatory to use functions like add_table in a separate cell? I ask because until recently (maybe a month ago) I was able to run code like this from a separate library (thus everything was in a single cell) but now such code works only sometimes. For instance, sometimes when I set the aladin.target the widget is updated to the object coordinates, but other times it seems to ignore the command and only shows coordinates (0,0). Same happens to me with add_table, sometimes it shows the symbols and others it doesn't. Did something change recently? If it helps, I include the code versions I'm using: astropy==5.2.2 Thanks in advance! |
Aaaah yes, indeed. What we do internally is that we have a listener that adds the table to the widget when the boolean With this, it can happen that if you do everything in the same cell, the aladin view or the listener does not exist yet when the table is called. It seems to be a computer-dependent issue. A workaround is to call aladin.table_flag = not aladin.table_flag in a next cell, but I'm aware that it does not solve your use case, very sorry 😦 Changing this behaviour requires some refactoring and won't be done right now (we're quite busy for the next 2 months) but I opened an issue for the v1 release #63 |
Thanks @ManonMarchand! I added some |
Hi @jpbrandtu - we recently changed ipyaladin for using anywidget. We will test it to see if things are getting better (I suppose this is because aladin lite instanciation is done async and maybe anywidget fix those types of errors). To be further tested. |
Hi,
I am using Aladin widget in Python to show SN coordinates, but it does not work properly (the symbol indicating the coordinates does not appear, even when I provide them in the add_table function).
This is the code:
And this is the output:
The text was updated successfully, but these errors were encountered: