ax2.plot(plot_x, psf_fit(plot_x)*scale_match, "r-", linewidth=3) ax2.set_xlim((0, numpy.max(base_points))) ax2.set_ylim((-0.4*max_intensity, 1.2*max_intensity)) ax2.axhline(color='#80ff80', linewidth=3) ax2.axhline(y=-0.2*max_intensity, color='#8080ff', linewidth=3) ax2.set_xlabel("Radius [arcsec]") ax2.set_ylabel("Intensity [flux-normalized counts]") #fig2.show() fig2.savefig(plot_filename) #matplotlib.pyplot.show() if __name__ == "__main__": options = podi_logging.setup_logging() logger = logging.getLogger("StackAll") filename = get_clean_cmdline()[1] print filename hdulist = pyfits.open(filename) # # Gather a list of all <GRPID>s and corresponding <EXTNAME>s # grpids = {} print "Gathering exposure groupings" for ext in hdulist[1:]:
out_hdu.close() del out_hdu del out_hdulist stdout_write(" done!\n") elif (return_hdu): logger.debug(" returning HDU for further processing ...") return out_hdu else: logger.debug(" couldn't write output file, no filename given!") return None if __name__ == "__main__": options = read_options_from_commandline(None) podi_logging.setup_logging(options) outputfile = get_clean_cmdline()[1] filelist = handle_filelists(get_clean_cmdline()[2:]) operation = cmdline_arg_set_or_default("-op", "mean") subtract = cmdline_arg_set_or_default("-subtract", None) scale = cmdline_arg_set_or_default("-scale", None) print("Combining into %s:\n -- %s" % (outputfile, "\n -- ".join(filelist))) imcombine(filelist, outputfile, operation, subtract=subtract, scale=scale)
cli1.bind_receive_message(setup.message_queue, receive_msg) cli1.disconnect() print("\nConnection successful!\n") except Exception as err: print("\nProblem connecting {0}\n ".format(err)) pass sys.exit(0) elif (cmdline_arg_isset("-yappi")): print("Running with yappi profiler") import yappi yappi.start() SAMPListener() profiler = open("profile.data", "w") yappi.get_func_stats().debug_print() #print_all() yappi.get_thread_stats().print_all(out=profiler) profiler.close() else: print("Starting logger") options = read_options_from_commandline(None, ignore_errors=True) options = podi_logging.setup_logging(options) SAMPListener() print("Shutting down QuickReduce logging") podi_logging.shutdown_logging(options)