jdaviz
specvizcubevizdocs
  • Installation
  • Imviz
  • Specviz
  • Cubeviz
  • Mosviz
  • Saving the State of Your Jdaviz Session
  • Customizing Notebook Display Layout
  • Sample Notebooks
  • Developers
  • API
    • Configurations
      • jdaviz.configs.cubeviz.helper Module
      • jdaviz.configs.imviz.helper Module
        • Functions
        • Classes
      • jdaviz.configs.mosviz.helper Module
      • jdaviz.configs.specviz.helper Module
      • jdaviz.configs.specviz2d.helper Module
    • Viewers
    • Parsers
    • Plugins
    • Nuts and Bolts
  • Known Issues
jdaviz
  • »
  • API »
  • link_image_data
  • Edit on GitHub

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)[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
appApplication

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'. Choosing None 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. If False, warnings will be emitted as snackbar messages. When only warnings are emitted and no links are assigned, some Imviz functionality may not work properly.

Raises
ValueError

Invalid inputs or reference data.

Previous Next

© Copyright 2022, JDADF Developers. Revision fadf3b90. Last updated on 06 Jul 2022.

Built with Sphinx using a theme provided by Read the Docs.