multicolorfits#

multicolorfits#

Colorize and combine FITS images for visually aesthetic scientific plots.

Crab Nebula multicolor composite (red–orange palette)

Stretch and tint multiwavelength layers, mix them with classic RGB or Lab compositing, and finish publication figures — from scripts or the browser / desktop GUI.

Tip

Human or AI agent? Start with import multicolorfits as mcf; mcf.overview() for the mental model and conventions, then mcf.recipes('<keyword>') for copy-paste code. The same catalog is served at the site root as llms.txt / llms-full.txt (generated from multicolorfits/_overview.py — see Getting oriented).

import multicolorfits as mcf

s = mcf.McfSession(n_panels=3)
s.load_files(
    ['ir.fits', 'r.fits', 'b.fits'],
    colors=['#BE599E', '#DEA215', '#77C0F9'],
    labels=['IR', 'R', 'B'],
)
s.compose.combine_mode = 'lab'
s.compose.combine_blend = 'screen'
rgb = s.render_combined()
Installation

pip install "multicolorfits[all]" for both GUIs and helpers, or pick extras à la carte.

Installation
User guide

Compositing modes, intensity scaling, the session model, saving outputs, and component mosaics.

User guide
Tutorials

Getting started, GUI walkthroughs, save/export, notebook embed, and short stubs that pair with the Examples narratives.

Tutorials
Examples

NGC 602, WLM, M74 transparent cutouts, color-space suite, and a gallery.

Examples
Browser GUI

mcf.gui() / mcf-web — panels, Lab compositing, live preview, session JSON, export script.

Browser GUI walkthrough
Migrating from v2

Traits-free GUIs, optional extras, and the shared McfSession controller.

Migrating from v2
API reference

Public functions and classes, grouped by topic, with autosummary signatures.

API reference
Package overview

README, gallery, citation, and source on GitHub.

https://github.com/pjcigan/multicolorfits

Quick install#

pip install "multicolorfits[all]"
mcf-web    # or: python -c "import multicolorfits as mcf; mcf.gui()"