multicolorfits.make_component_mosaic#

multicolorfits.make_component_mosaic(session, combined=None, *, components='top', max_per_line=3, ticks='plain', show=None, gap=0.06, panel_pad=0.2, cell_size=1.7, figsize=None, facecolor=None, overlays='hero', title=None, label_loc='upper left')[source]#

Combined image plus colorized component frames in a shared-WCS mosaic.

Default layout: a full-width hero (combined) panel with a strip of smaller single-layer renderings on one side. The strip is an ImageGrid (same approach as skyplothelper channel_map): equal square cells, axes_pad in inches, optional shared WCS. Component lines closest to the hero fill first; leftover empty cells stay blank for custom labels.

Parameters:
  • session (McfSession)

  • combined (array or None) – Pre-rendered combined RGB; computed if None.

  • components ({'top', 'bottom', 'left', 'right'}) – Side of the hero for the component strip.

  • max_per_line (int) – Max panels per strip row (top/bottom) or column (left/right). Default 3.

  • ticks ({'plain', 'minimal', 'full'}) – plain — no ticks/labels (default); minimal — full ticks on the hero, matching ticks without labels on components; full — ticks and labels on every panel.

  • show (sequence of int or None) – Active-panel indices to include (and order). None = all active.

  • gap (float) – Padding between adjacent strip panels in inches (ImageGrid axes_pad). Default 0.06.

  • panel_pad (float) – Outer figure margin in inches. Default 0.2.

  • cell_size (float) – Side length in inches of each strip cell (sets default figsize). Default 1.7.

  • figsize ((w, h) or None) – If None, sized tightly from cell_size / gap / image aspect.

  • facecolor (color or None) – Canvas background; defaults to session.compose.facecolor.

  • overlays ({'hero', 'none'}) – Apply compose beam/compass/scale-bar overlays on the hero only, or skip.

  • title (str or None) – Optional figure-level title (not per-axes).

  • label_loc (str) – Component band-label placement: interior corner ('upper left' default, also 'upper right' / 'lower left' / 'lower right'), 'title' for an external axes title, or 'none' to omit.

Returns:

  • fig (matplotlib.figure.Figure)

  • axes (dict) – combined — hero axes; components — list of component axes in show/active order; slots — 2D grid of axes or None matching component_slot_grid().