def test_expandToPlotFileName(self): logger.info("== {} ==".format(self._testMethodName)) ev = Environment(debug=False, rt=self.rt, logger=logger) res = ev.expandToPlotFileName() self.assertEqual(res, "myPlot-{}.png".format(ev.startTime[0:19]), "return value:{}".format(res))
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))
def test_expandToPlotFileName(self): logger.info('== {} =='.format(self._testMethodName)) ev=Environment(debug=False, rt=self.rt, logger=logger) res=ev.expandToPlotFileName() self.assertEqual(res, 'myPlot-{}.png'.format(ev.startTime[0:19]),'return value:{}'.format(res))
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))