-
Notifications
You must be signed in to change notification settings - Fork 7
Dm 11476 Make demo sample to create charts with plot.ly #15
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
Conversation
…odify show_table to get table by giving target search info, and add demo sample likr ffapi-slate-test2.html for plot.ly direct plot.
examples/slate-demo-explicit2.ipynb
Outdated
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Dispaly tables, images, and charts in Window/Grid like layout\n", |
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.
Dispaly -> Display
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.
Works similar to JS version, just like it should.
examples/slate-demo-explicit2.ipynb
Outdated
" 'zaxis': {\n", | ||
" 'title': 'w1mpro'\n", | ||
" }\n", | ||
" }\n", |
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.
The layout object for 3d should be wrapped into scene - so that the labels are applied to the 3d axes:
layout3d = {
'scene': {
'xaxis': {
'color': 'red',
'title': 'ra',
'showline': True
},
'yaxis': {
'color': 'blue',
'title': 'dec',
'showline': True
},
'zaxis': {
'color': 'green',
'title': 'w1mpro',
'showline': True
}
}
}
However, there are still things to fix in firefly, so that scatter3d is not considered to be a scatter plot, and the default layout is not applied to it. I am planning to do it in a separate ticket.
3d plot looks great now! Setting visible to false for external axes as a workaround for Firefly issues works great. |
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.
Looks good. 3d updated are very nice. Make sure you put them back into ffapi-slate-test2.html in the firefly repository.
Update the chart content for 'slate-demo-explicit2.ipynb' on WISE as follows, |
…-demo-expliit2, and update the image in sync with Firefly grid-view samples.
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.
The notebooks are much improved, very nice! M31 three-color looks great with WISE at 1 degree.
In addition to line comments on the "explicit2" notebook, here are some more comments I couldn't make on "explict" because the modifications were made in an earlier PR:
line 84 -- typo in Dispaly
In the code cells: these start with summary comments that explain what is happening in that cell. The notebook would be easier to read if these summary comments were moved to Markdown cells before the corresponding code cells.
The last code cell shows "random" placement. This confused me the first few times. I think it is better to replace "random" with "unspecified" and say that Firefly places the cell. Some of the confusion is caused by the the coverage image being width=3. Then Firefly puts this last image in the next column with blank space from the WISE Cutout image. If I make coverage have width=2, then Firefly decides to put the last image in a new row. Anyway, it is confusing to make the coverage width=3 when that leaves a lot of empty space in that cell.
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, |
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.
It would be helpful to insert a Markdown cell above this one, explaining what reinit_viewer()
does. It seems to be different than reloading the browser window (clearing everything).
examples/slate-demo-explicit2.ipynb
Outdated
}, | ||
"outputs": [], | ||
"source": [ | ||
"target = '10.68479;41.26906;EQ_J2000'\n", |
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 suggest to add a hint about what the objects are, and to add a Galactic star-forming region, like this:
target = '10.68479;41.26906;EQ_J2000' # Galaxy M31
# other notable targets to try
#target = '148.88822;69.06529;EQ_J2000' # Galaxy M81
#target = '202.48417;47.23056;EQ_J2000' # Galaxy M51
#target = '136.9316774;+1.1195886;galactic' # W5 star-forming region
examples/slate-demo-explicit2.ipynb
Outdated
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Entering a target to search the catalog and image" |
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.
Please add here: the coordinates are in decimal hours and decimal degrees for EQ_J2000. The Galactic coordinates are in degrees.
examples/slate-demo-explicit2.ipynb
Outdated
] | ||
}, | ||
{ | ||
"cell_type": "code", |
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.
Add a Markdown cell before this one including:
- All plots are added in one notebook cell to better simulate an application
- Before re-executing this cell (perhaps with a different target selected), reload the Firefly browser window to clear out the existing plots.
examples/slate-demo-explicit2.ipynb
Outdated
" {'dataType': 'fireflyHeatmap'},\n", | ||
" {'dataType': 'fireflyHeatmap'},\n", | ||
" {'dataType': 'fireflyHeatmap'}]\n", | ||
" layout_hm = {'title': 'Photometry heatmap', \n", |
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.
A better title is "Magnitude-magnitude densities'
…rt due to the 3d bugs fixing in firefly.
I forgot one more point. It would be really nice in the 3-color plot to change the transparency of the marks so they don't obliterate the image -- like a transparency of 30%. I think I've done this with the JS API before. |
…show_plot based on Firefly update for plotly chart.
Regarding changing transparency for the maker, currently no firefly_client API supports that capability. we may create that later as needed. |
I have re-reviewed. Looks good to me! |
The development includes:
Test:
update firefly first
Open 'slate-demo-explicit2.ipynb' from jupyter notebook and run the code cells.