Comments (11)
@astrofrog and I were able to get a test version of the plots in glue-jupyter to run. It is quite the setup, and he correctly pointed out that the dev versions of the bqplot libraries are absolutely required as well as the new (and npm-installable) bqplot-image-gl
library.
Currently, the setup looks like this:
- Clone and install the bqplot python package.
cd
to thebqplot/js
directory and run annpm install
.cd
tojdaviz/web
.- Install the dev version of the bqplot node package:
yarn add /path/to/bqplot/js
. - Run
yarn run build
thenyarn run host
. - In another terminal, startup a jupyter kernel with
python -m notebook --no-browser --NotebookApp.allow_origin="*" --NotebookApp.disable_check_xsrf=True --NotebookApp.token=''
- Go to the web address printed after the
yarn run host
command. - Profit.
from jdaviz.
One issue that might be confusing things is that ipyastroimage (now bqplot-image-gl) and the scatter viewer in glue-jupyter both depend on the latest developer version of bqplot (but your app uses the latest stable version). To keep things simple, I'd recommend trying the following widget code:
[
"filename = '/Users/tom/Projects/STScI/jdaviz/examples/manga-7495-12704-LOGCUBE_fixed.fits'",
"from glue_jupyter import jglue",
"app = jglue()",
"data = app.load_data(filename)[0]",
"",
"app.profile1d(data=data)"
]
and if that still doesn't work,
[
"filename = '/Users/tom/Projects/STScI/jdaviz/examples/manga-7495-12704-LOGCUBE_fixed.fits'",
"from glue_jupyter import jglue",
"app = jglue()",
"data = app.load_data(filename)[0]",
"",
"app.profile1d(data=data, widget='matplotlib')"
]
to use the Matplotlib widget.
I was unable to run this locally to debug, as I ran into the following error:
Uncaught ReferenceError: require is not defined
at (index):16
but if you can provide advice on how to solve that, I can investigate further.
from jdaviz.
Uncaught ReferenceError: require is not defined at (index):16
Can be ignored -- it's only used when the website is wrapped in electron and show not effect the normal website operation. If you'd rather not see the error, you can comment out line 16 of the index.html
file.
from jdaviz.
For some reason I'm getting the following error when running yarn run build
:
ERROR in ./node_modules/bqplot-image-gl/lib/imagegl.js
Module not found: Error: Can't resolve 'raw-loader' in '/home/tom/Projects/STScI/jdaviz/web/node_modules/bqplot-image-gl/lib'
@ ./node_modules/bqplot-image-gl/lib/imagegl.js 113:36-88
@ ./node_modules/bqplot-image-gl/lib/index.js
@ ./dist/manager.js
@ ./dist/index.js
ERROR in ./node_modules/bqplot-image-gl/lib/imagegl.js
Module not found: Error: Can't resolve 'raw-loader' in '/home/tom/Projects/STScI/jdaviz/web/node_modules/bqplot-image-gl/lib'
@ ./node_modules/bqplot-image-gl/lib/imagegl.js 112:34-84
@ ./node_modules/bqplot-image-gl/lib/index.js
@ ./dist/manager.js
@ ./dist/index.js
error Command failed with exit code 2.
any idea what this could be caused by? (I updated the code locally to use bqplot-image-gl instead of ipyastroimage)
from jdaviz.
Module not found: Error: Can't resolve 'raw-loader' in '/home/tom/Projects/STScI/jdaviz/web/node_modules/bqplot-image-gl/lib'
This suggests that the raw-loader
isn't in the dependencies
section of the bqplot-image-gl
package.json
(as opposed to the devDependencies
).
from jdaviz.
Glad to hear it @nmearl!
Just to be clear though: once release versions of all this stuff are out its only really 6-8 that are necessary, right?
from jdaviz.
This ticket is now being tracked at DATJPP-85
from jdaviz.
This ticket is now being tracked at DATJPP-100
from jdaviz.
This ticket is now being tracked at DATJPP-108
from jdaviz.
@eteq That's right (also note that current install instructions can be found here).
from jdaviz.
Also, it now works, so closing. 😛
from jdaviz.
Related Issues (20)
- [BUG] Imviz API triggering IndexError from Glue HOT 4
- Test suite will fail when pytest 8.0 is released HOT 1
- TST: Re-enable numpy-dev when we can
- Remove deprecated Canvas Rotation plugin HOT 2
- [FEAT] Turning off certain features in plugins HOT 4
- Update Y axis label on spectrum viewer to accurately describe unit type
- BUG: Uncertainty type ignored in Cubeviz spectral extraction HOT 1
- BUG: Mask cube is ignored in Cubeviz spectral extraction HOT 2
- [BUG] Can't type in VMIN and VMAX values for the stretch HOT 3
- BUG: WCS to Pixels to WCS gives wrong reference data HOT 4
- [FEAT] smart viewer bounds
- _set_axes_lim called too many times when Imviz adjusts more than one limit at once
- [BUG] Click-to-center broken when WCS-linked HOT 3
- [BUG] No formats listed for Aperture Photometry table export
- [BUG] Moment map creates nan image with frequency units and continuum
- TST: test_cubeviz_aperphot_cube_orig_flux fails with RuntimeError: NULL error object in wcslib HOT 7
- Make jdaviz unit converter more robust to different data types HOT 1
- [BUG] Empty content when loading using JupyterLab
- API Proposal: Importing/loading spatial and spectral regions HOT 30
- Filter out impossible SB <> SB and Flux <> Flux conversions in unit conversion plugin[BUG]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jdaviz.