def test_analyze_runs_assoc(self): logger.info('== {} =='.format(self._testMethodName)) self.args.associate = True aRs = AnalyzeRuns(basePath = self.args.basePath, args = self.args, rt = self.rt, ev = self.ev, logger = logger) aRs.aggregateRuns() rFfFwhm, rFfFlux = aRs.analyzeRuns() # ToDo expand to Flux self.assertEqual(type(rFfFwhm[0]), ResultFit, 'return value: {}'.format(type(rFfFwhm[0])))
def test_analyze_runs_assoc(self): logger.info('== {} =='.format(self._testMethodName)) self.args.associate = True aRs = AnalyzeRuns(basePath=self.args.basePath, args=self.args, rt=self.rt, ev=self.ev, logger=logger) aRs.aggregateRuns() rFfFwhm, rFfFlux = aRs.analyzeRuns() # ToDo expand to Flux self.assertEqual(type(rFfFwhm[0]), ResultFit, 'return value: {}'.format(type(rFfFwhm[0])))
aRs = AnalyzeRuns(debug=args.debug, basePath=args.basePath, args=args, rt=rtc, ev=ev, logger=logger, xdisplay=XDISPLAY) aRs.aggregateRuns() if len(aRs.fS) == 0: logger.warn( 'rts2saf_analyze: exiting, no files found in basepath: {}'.format( args.basePath)) sys.exit(1) rFf = aRs.analyzeRuns() if len(rFf) == 0: logger.error('rts2saf_analyze: no results, exiting') sys.exit(1) if args.model: if rFf[0].ambientTemp in 'NoTemp': logger.warn( 'rts2saf_analyze: no ambient temperature available in FITS files, no model fitted' ) else: # temperature model PLOTFN = ev.expandToPlotFileName( plotFn='{}/temp-model.png'.format(args.basePath)) dom = TemperatureFocPosModel(showPlot=True,
parser.print_help() logger.warn('rts2saf_analyze: no --basepath specified') sys.exit(1) if not args.toconsole: print 'you may wish to enable logging to console --toconsole' print 'log file is written to: {}'.format(args.logfile) aRs = AnalyzeRuns(debug = args.debug, basePath = args.basePath, args = args, rt = rtc, ev = ev, logger = logger, xdisplay = XDISPLAY) aRs.aggregateRuns() if len(aRs.fS) == 0: logger.warn('rts2saf_analyze: exiting, no files found in basepath: {}'.format(args.basePath)) sys.exit(1) rFf = aRs.analyzeRuns() if len(rFf)==0: logger.error('rts2saf_analyze: no results, exiting') sys.exit(1) if args.model: if rFf[0].ambientTemp in 'NoTemp': logger.warn('rts2saf_analyze: no ambient temperature available in FITS files, no model fitted') else: # temperature model PLOTFN = ev.expandToPlotFileName( plotFn = '{}/temp-model.png'.format(args.basePath)) dom = TemperatureFocPosModel(showPlot = True, date = ev.startTime[0:19], comment = 'test run', plotFn = PLOTFN, resultFitFwhm = rFf, logger = logger) dom.fitData() dom.plotData() logger.info('rts2saf_analyze: storing plot at: {}'.format(PLOTFN))