def _run(self, img): _logger.debug('correcting non linearity in %s', img) data = self.datamodel.get_data(img) data = array.correct_nonlinearity(data, self.polynomial, dtype=self.dtype) # FIXME img[0].data = data return img
def run(self, img): _logger.debug('correcting non linearity in %s', img) data = self.datamodel.get_data(img) data = array.correct_nonlinearity(data, self.polynomial, dtype=self.dtype) # FIXME img[0].data = data hdr = self.datamodel.get_header(img) hdr['NUM-LIN'] = self.calibid hdr['history'] = 'Non-linearity correction with {}'.format(self.calibid) hdr['history'] = 'Non-linearity correction time {}'.format(datetime.datetime.utcnow().isoformat()) return img