Imviz¶
- class jdaviz.configs.imviz.Imviz(app=None)[source] [edit on github]¶
Bases:
jdaviz.core.helpers.ConfigHelperImviz Helper class
Methods Summary
load_data(data[, parser_reference])Load data into Imviz.
Methods Documentation
- load_data(data, parser_reference=None, **kwargs)[source] [edit on github]¶
Load data into Imviz.
- Parameters
- dataobj or str
File name or object to be loaded. Supported formats include:
'filename.fits'(or any extension thatastropy.io.fitssupports; first image extension found is loaded unlessextkeyword is also given)'filename.fits[SCI]'(loads only first SCI extension)'filename.fits[SCI,2]'(loads the second SCI extension)'filename.jpg'(requiresscikit-image; grayscale only)'filename.png'(requiresscikit-image; grayscale only)JWST ASDF-in-FITS file (requires
jwst;dataor givenext+ GWCS)astropy.io.fits.HDUListobject (first image extension found is loaded unlessextkeyword is also given)astropy.io.fits.ImageHDUobjectastropy.nddata.NDDataobject (2D only but may have unit, mask, or uncertainty attached)Numpy array (2D only)
- parser_reference
This is used internally by the app.
- kwargsdict
Extra keywords to be passed into app-level parser. The only one you might call directly here is
ext(any FITS extension format supported byastropy.io.fits) andshow_in_viewer(bool).
Notes
When loading image formats that support RGB color like JPG or PNG, the files are converted to greyscale. This is done following the algorithm of
skimage.color.rgb2grey, which involves weighting the channels as0.2125 R + 0.7154 G + 0.0721 B. If you prefer a different weighting, you can useskimage.io.imreadto produce your own greyscale image as Numpy array and load the latter instead.