def setUp(self): self.config = IsrTaskConfig() self.config.qa = IsrQaConfig() self.task = IsrTask(config=self.config) self.dataRef = isrMock.DataRefMock() self.camera = isrMock.IsrMock().getCamera() self.inputExp = isrMock.TrimmedRawMock().run() self.amp = self.inputExp.getDetector()[0] self.mi = self.inputExp.getMaskedImage()
def setUp(self): self.config = IsrTaskConfig() self.config.qa = IsrQaConfig() self.task = IsrTask(config=self.config) self.mockConfig = isrMock.IsrMockConfig() self.mockConfig.isTrimmed = False self.doGenerateImage = True self.dataRef = isrMock.DataRefMock(config=self.mockConfig) self.camera = isrMock.IsrMock(config=self.mockConfig).getCamera() self.inputExp = isrMock.RawMock(config=self.mockConfig).run() self.amp = self.inputExp.getDetector()[0] self.mi = self.inputExp.getMaskedImage()
args = [FLATS_REPO_DIR, '--rerun', 'test','--id', 'detector=%d'%DETECTOR,'--visit-pairs'] for pair in pairs: args.append(str(pair)) args = args + ['-c','xcorrCheckRejectLevel=2', 'doCalcGains=True', 'level="AMP"', 'forceZeroSum=True', 'correlationQuadraticFit=True', 'buildCorrelationModel=3', '--clobber-config', '--clobber-versions'] command_line = 'makeBrighterFatterKernel.py ' + ' '.join(args) print(command_line) corr_struct = MakeBrighterFatterKernelTask.parseAndRun(args=args) flats_butler = Butler(FLATS_REPO_DIR+'/rerun/test') bf_kernel = flats_butler.get('brighterFatterKernel', dataId={'raftName': RAFT, 'detectorName': 'S00', 'detector': DETECTOR}) gain_data = flats_butler.get('brighterFatterGain', dataId={'raftName': RAFT, 'detectorName': 'S00', 'detector': DETECTOR}) # Now we shift to the spots data # These setup the image characterization and ISR isrConfig = IsrTaskConfig() isrConfig.doBias = False isrConfig.doDark = False isrConfig.doFlat = False isrConfig.doFringe = False isrConfig.doDefect = False isrConfig.doAddDistortionModel = False isrConfig.doWrite = True isrConfig.doAssembleCcd = True isrConfig.expectWcs = False isrConfig.doLinearize = False charConfig = CharacterizeImageConfig() charConfig.installSimplePsf.fwhm = 0.05 charConfig.doMeasurePsf = False charConfig.doApCorr = False