

def mosaic_some(self, paths, image_loader=None):
    if (image_loader is None):
        image_loader = self.fv.load_image
    for url in paths:
        if self.ev_intr.isSet():
            break
        mosaic_hdus = self.settings.get('mosaic_hdus', False)
        if mosaic_hdus:
            self.logger.debug('mosaicing hdus')
            with pyfits.open(url, 'readonly') as in_f:
                i = 0
                for hdu in in_f:
                    i += 1
                    if (hdu.data is None):
                        continue
                    self.logger.debug(('ingesting hdu #%d' % i))
                    image = AstroImage.AstroImage(logger=self.logger)
                    image.load_hdu(hdu)
                    image.set(name=('hdu%d' % i))
                    image = self.preprocess(image)
                    self.ingest_one(image)
        else:
            image = image_loader(url)
            image = self.preprocess(image)
            self.ingest_one(image)

dataset/ETHPy150Open ejeschke/ginga/ginga/misc/plugins/Mosaic.py Mosaic.mosaic_some/original