Mosaic plugin

Plugin to create an image mosaic by constructing a composite image.

Plugin Type: Local

Mosaic is a local plugin, which means it is associated with a channel. An instance can be opened for each channel.



This can be very memory intensive.

This plugin is used to automatically build a mosaic image in the channel using images provided by the user (e.g., using FBrowser). The position of an image on the mosaic is determined by its WCS without distortion correction. This is meant as a quick-look tool, not a replacement for image drizzling that takes account of image distortion, etc. The mosaic only exists in memory but you can save it out to a FITS file using SaveImage.

When a mosaic falls out of memory, it is no longer accessible in Ginga. To avoid this, you must configure your session such that your Ginga data cache is sufficiently large (see “Customizing Ginga” in the manual).

To create a new mosaic, set the FOV and drag files onto the display window. Images must have a working WCS. The first image’s WCS will be used to orient the other tiles.

Difference from `Collage` plugin

  • Allocates a single large array to hold all the mosaic contents

  • Slower to build, but can be quicker to manipulate large resultant images

  • Can save the mosaic as a new data file

  • Fills in values between tiles with a fill value (can be NaN)

It is customizable using ~/.ginga/plugin_Mosaic.cfg, where ~ is your HOME directory:

# Mosaic plugin preferences file
# Place this in file under ~/.ginga with the name "plugin_Mosaic.cfg"

# annotate images with their names
annotate_images = False

# default FOV for new mosaics
fov_deg = 0.2

# Try to match backgrounds
match_bg = False

# Number of pixels to trim from edges
trim_px = 0

# Merge (coadd pixels) instead of overlapping tiles
merge = False

# Number of threads to devote to opening images
num_threads = 4

# dropping a new file or files starts a new mosaic
drop_creates_new_mosaic = False

# Set to True when you want to mosaic image HDUs in a file
mosaic_hdus = False

# Limit on skew between X and Y axis after warping tile acceptable for mosaic
skew_limit = 0.1

# Allow the mosaic image to expand if new tiles are added that
# aren't in the region
allow_expand = True

# When expanding an image, pad on a side by this many deg
expand_pad_deg = 0.01

# Maximum delta from center of image (in deg) beyond which new images
# are assumed to start a new mosaic. Set to None if you never want this
# bahavior
max_center_deg_delta = 2.0

# Allow mosaic images to create thumbnail entries
make_thumbs = False

# Reuse existing mosaic for new mosaic (faster)
reuse_image = False