link_image_data
- jdaviz.configs.imviz.helper.link_image_data(app, link_type='pixels', wcs_fallback_scheme='pixels', wcs_use_affine=True, error_on_fail=False, update_plugin=True)[source] [edit on github]
(Re)link loaded data in Imviz with the desired link type. All existing links will be replaced.
Warning
Any markers added in Imviz would be removed automatically. You can add back the markers using
add_markers()
for the relevant viewer(s). During the markers removal, pan/zoom will also reset.- Parameters
- app
Application
Application associated with Imviz, e.g.,
imviz.app
.- link_type{‘pixels’, ‘wcs’}
Choose to link by pixels or WCS.
- wcs_fallback_scheme{None, ‘pixels’}
If WCS linking failed, choose to fall back to linking by pixels or not at all. This is only used when
link_type='wcs'
. ChoosingNone
may result in some Imviz functionality not working properly.- wcs_use_affinebool
Use an affine transform to represent the offset between images if possible (requires that the approximation is accurate to within 1 pixel with the full WCS transformations). If approximation fails, it will automatically fall back to full WCS transformation. This is only used when
link_type='wcs'
. Affine approximation is much more performant at the cost of accuracy.- error_on_failbool
If
True
, any failure in linking will raise an exception. IfFalse
, warnings will be emitted as snackbar messages. When only warnings are emitted and no links are assigned, some Imviz functionality may not work properly.- update_pluginbool
Whether to update the state of the “Links Control” plugin, if available.
- app
- Raises
- ValueError
Invalid inputs or reference data.