

def mosaic(self, paths, new_mosaic=False, name=None, image_loader=None):
    if (image_loader is None):
        image_loader = self.fv.load_image
    self.fv.assert_nongui_thread()
    self.total_files = len(paths)
    if (self.total_files == 0):
        return
    self.ingest_count = 0
    self.images = []
    self.ev_intr.clear()
    self.process_elapsed = 0.0
    self.init_progress()
    self.start_time = time.time()
    image = image_loader(paths[0])
    time_intr1 = time.time()
    fov_deg = self.settings.get('fov_deg', 0.2)
    max_center_deg_delta = self.settings.get('max_center_deg_delta', None)
    if (new_mosaic or (self.img_mosaic is None)):
        self.prepare_mosaic(image, fov_deg, name=name)
    elif (max_center_deg_delta is not None):
        (ctr_x, ctr_y) = self.img_mosaic.get_center()
        (ra1_deg, dec1_deg) = self.img_mosaic.pixtoradec(ctr_x, ctr_y)
        (ctr_x, ctr_y) = image.get_center()
        (ra2_deg, dec2_deg) = image.pixtoradec(ctr_x, ctr_y)
        dist = wcs.deltaStarsRaDecDeg(ra1_deg, dec1_deg, ra2_deg, dec2_deg)
        if (dist > max_center_deg_delta):
            self.prepare_mosaic(image, fov_deg, name=name)
    self.update_status('Loading images...')
    time_intr2 = time.time()
    self.process_elapsed += (time_intr2 - time_intr1)
    num_threads = self.settings.get('num_threads', 4)
    groups = dp.split_n(image, num_threads)
    self.logger.info(('len groups=%d' % len(groups)))
    for group in groups:
        self.fv.nongui_do(self.mosaic_some, group, image_loader=image_loader)
    return self.img_mosaic

dataset/ETHPy150Open ejeschke/ginga/ginga/misc/plugins/Mosaic.py Mosaic.mosaic/VarMisuse@340/498 `paths`->`image`