astropy:docs

scalarmosaicfactory API Reference

Make mosaics using scalar sky offsets.

class skyoffset.scalarmosaicfactory.ScalarMosaicFactory(mosaic_name, block_sel, blockdb, mosaicdb, workdir, swarp_configs=None)[source]

Pipeline class for solving scalar sky offsets between overlapping images and producing a mosaic.

Parameters:

mosaic_name : str

Name of the mosaic being generated.

block_sel : dict

A MongoDB selector for blocks in the BlockDB.

blockdb : skyoffset.imagedb.MosaicDB instance

A MosaicDB database containing blocks, the component images that will be mosaiced together.

mosaicdb : skyoffset.imagedb.MosaicDB instance

A MosaicDB database where the final mosaic will be stored.

workdir : str

Directory where the mosaic will be created. This directory will be created if necessary.

swarp_configs : dict

A dictionary of configurations to pass to moastro.astromatic.Swarp.

make_mosaic(block_selector=None, target_fits=None)[source]

Swarp a mosaic using the optimal sky offsets.

The mosaic can be made anytime once entries are added to the solver’s collection. This is because we initialize a SimplexScalarOffsetSolver that re-generates the list of best offsets from the collection of solver documents.

Parameters:

block_selector : dict

An alternative MongoDB block selector (used instead of the one specific during instance initialization). This can be useful for building a mosaic with a subset of the blocks.

target_fits : str

Set to the path of a FITS file that will be used to define the output frame of the block. The output blocks will then correspond pixel-to-pixel. Note that both blocks should already be resampled into the same pixel space.

make_noisemap(block_selector=None)[source]

Make a Gaussian sigma noise map, propagating those from stacks.

Parameters:

block_selector : dict

An alternative MongoDB block selector (used instead of the one specific during instance initialization). This can be useful for building a mosaic with a subset of the blocks.

make_tiff()[source]

Render a tiff image of this block.

solve_offsets(solver_dbname, solver_cname, n_runs=1000, dbmeta=None, reset_couplings=False, fresh_start=True, init_scale=5.0, restart_scale=2.0)[source]

Pipeline for solving the scalar sky offsets between a set of blocks.

Parameters:

solver_dbname : str

Name of the MongoDB database where results from sky offset optimization are persisted.

solver_cname : str

Name of the MongoDB collection where results from sky offset optimization are persisted.

n_runs : int

Number of optimizations to start; the sky offsets from the best optimization run are chosen.

init_scale : float

Sets dispersion of initial guesses sky offsets as a fraction of the block difference dispersion.

restart_scale : float

Sets dispersion of sky offset simplex re-inflation as a fraction of the block difference dispersion after an optimization as converged.

dbmeta : dict

Arbitrary metadata to store in the mosaic’s MongoDB document.

reset_couplings : bool

If True, then the couplings (differences) between blocks will be recomputed.

fresh_start : bool

If True, then previous optimization runs for this mosaic will be deleted from the sky offset solver MongoDB collection.

subsample_mosaic(pixel_scale=1.0, fluxscale=True)[source]

Subsamples the existing mosaic.