def _perform(self): args = self.action.args img = args.img h, w = img.shape out_args = Arguments() out_args.name = args.name out_args.img = self._applyAHEC(img).reshape((h, w)).astype(dtype="uint8") return out_args
def _perform(self): """ Expects action.args.name as fits file name Returns HDUs or (later) data model """ name = self.action.args.name self.logger.debug(f"Reading {name}") out_args = Arguments() out_args.name = name out_args.img = self.readData(name) return out_args
def _perform(self): ''' Expects action.args.name as fits file name Returns HDUs or (later) data model ''' name = self.action.args.name self.logger.info(f"Reading {name}") out_args = Arguments() out_args.name = name out_args.hdus = open_nowarning(name) return out_args
def _perform(self): # if self.context.data_set is None: # self.context.data_set = DataSet(None, self.logger, self.config, # self.context.event_queue) # self.context.data_set.append_item(self.action.args.name) self.logger.info( "------------------- Ingesting file %s -------------------" % self.action.args.name) self.name = self.action.args.name out_args = Arguments() ccddata, table = kcwi_fits_reader(self.name) # save the ccd data into an object # that can be shared across the functions self.ccddata = ccddata out_args.ccddata = ccddata out_args.table = table imtype = self.get_keyword("IMTYPE") groupid = self.get_keyword("GROUPID") if imtype is None: fname = os.path.basename(self.action.args.name) self.logger.warn(f"Unknown IMTYPE {fname}") out_args.name = self.action.args.name out_args.imtype = imtype out_args.groupid = groupid # CAMERA out_args.camera = self.camera() # DICH out_args.dich = self.dich() # CAMANGLE out_args.camangle = self.camang() # FILTER out_args.filter = self.filter() # GRANGLE out_args.grangle = self.grangle() # GRATING out_args.grating = self.grating() # ADJANGLE out_args.adjang = self.adjang() # RHO out_args.rho = self.rho() # CWAVE out_args.cwave = self.cwave() # RESOLUTION out_args.resolution = self.resolution() # ATSIG out_args.atsig = self.atsig() # DELTA WAVE OUT out_args.dwout = self.delta_wave_out() # NAMPS out_args.namps = int(self.get_keyword('NVIDINP')) # NASMASK out_args.nasmask = self.nasmask() # SHUFROWS out_args.shufrows = self.shufrows() # NUMOPEN out_args.numopen = self.numopen() # AMPMODE out_args.ampmode = self.ampmode() # BINNING out_args.xbinsize, out_args.ybinsize = \ map(int, self.get_keyword('BINNING').split(',')) # IFUNUM out_args.ifunum = int(self.get_keyword('IFUNUM')) # IFUNAM out_args.ifuname = self.get_keyword('IFUNAM') # PLOTLABEL out_args.plotlabel = self.plotlabel() # ILUM out_args.illum = self.illum() # MAPCCD out_args.map_ccd = self.map_ccd() # CALIBRATION LAMP out_args.calibration_lamp = self.calibration_lamp() # TTIME out_args.ttime = self.get_keyword('TTIME') # Are we already in proctab? out_args.in_proctab = self.context.proctab.in_proctab( frame=out_args.ccddata) return out_args