# Replacing this GTI does not work. It needs to be ANDed with the existing GTI etable.meta['EXPOSURE'] = g['DURATION'].sum() gtitable = g log.info('Exposure : {0:.2f}'.format(etable.meta['EXPOSURE'])) #If you want to correlate over/undershoot data to time, then data.hkshoottable or data.eventshoottable will get you there. #------------------------------------------------------PLOTTING HAPPENS BELOW HERE ------------------------------------------------------ # Background plots are diagnostics for background rates and filtering if args.bkg: if hkmet is None: log.error("Can't make background plots without MPU HKP files") else: if eventovershoots is not None: figure4 = bkg_plots(etable, data, gtitable, args, mktable, data.eventshoottable) else: figure4 = bkg_plots(etable, data, gtitable, args, mktable, data.hkshoottable) figure4.set_size_inches(16, 12) if args.save: log.info('Writing bkg plot {0}'.format(basename)) figure4.savefig('{0}_bkg.png'.format(basename), dpi=100) # Engineering plots are reset rates, count rates by detector, and deadtime if args.eng: figure1 = eng_plots(etable, args, reset_rates, filttable) figure1.set_size_inches(16, 12) if args.save: log.info('Writing eng plot {0}'.format(basename)) if args.filtall:
log.info('Exposure : {0:.2f}'.format(etable.meta['EXPOSURE'])) #If you want to correlate over/undershoot data to time, then data.hkshoottable or data.eventshoottable will get you there. #------------------------------------------------------PLOTTING HAPPENS BELOW HERE ------------------------------------------------------ # Background plots are diagnostics for background rates and filtering if args.bkg: #if hkmet is None: # log.error("Can't make background plots without MPU HKP files") #else: # if eventovershoots is not None: # figure4 = bkg_plots(etable, data, gtitable, args, mktable, data.eventshoottable) # else: # figure4 = bkg_plots(etable, data, gtitable, args, mktable, data.hkshoottable) figure4 = bkg_plots(etable, gtitable, args, mktable, ovbintable) figure4.set_size_inches(16, 12) if args.save: log.info('Writing bkg plot {0}'.format(basename)) figure4.savefig('{0}_bkg.png'.format(basename), dpi=100) # Engineering plots are reset rates, count rates by detector, and deadtime if args.eng: # figure1 = eng_plots(etable, args, reset_rates, filttable, gtitable) figure1 = eng_plots(etable, args, mktable, filttable, gtitable) figure1.set_size_inches(16, 12) if args.save: log.info('Writing eng plot {0}'.format(basename)) if args.filtall: figure1.savefig('{0}_eng_{1:.1f}-{2:.1f}keV.png'.format( basename, args.emin, args.emax),