# # ============================================================================= # # Load Data # # ============================================================================= # summary = {} seglists = segments.segmentlistdict() for n, filename in enumerate(ligolw_utils.sort_files_by_size(filenames, options.verbose, reverse = True)): if options.verbose: print("%d/%d:" % (n + 1, len(filenames)), end=' ', file=sys.stderr) xmldoc = ligolw_utils.load_filename(filename, verbose = options.verbose, contenthandler = ligolw.LIGOLWContentHandler) seglists |= ligolw_search_summary.segmentlistdict_fromsearchsummary(xmldoc, options.livetime_program).coalesce() xmldoc.unlink() # # ============================================================================= # # Plot # # ============================================================================= #
RecoveredVsInjectedAmplitude(options.amplitude_func, options.amplitude_lbl)), (2, True, RecoveredTimeOffset(segments.segment(-0.01, +0.01), 0.00005)), (3, True, RecoveredFreq()), (4, False, Chi2VsRho())] if options.plot is not None: plots = [plots[i] for i in options.plot] # # Process files # for n, filename in enumerate( ligolw_utils.sort_files_by_size(filenames, options.verbose, reverse=True)): if options.verbose: print >> sys.stderr, "%d/%d: %s" % (n + 1, len(filenames), filename) working_filename = dbtables.get_connection_filename( filename, tmp_path=options.tmp_space, verbose=options.verbose) database = SnglBurstUtils.CoincDatabase(sqlite3.connect(working_filename), options.live_time_program, search="StringCusp") if options.verbose: SnglBurstUtils.summarize_coinc_database(database) is_injection_db = "sim_burst" in dbtables.get_table_names( database.connection) if is_injection_db: database.connection.cursor().execute( """
# # ============================================================================= # # Load Data # # ============================================================================= # summary = {} seglists = segments.segmentlistdict() for n, filename in enumerate(ligolw_utils.sort_files_by_size(filenames, options.verbose, reverse = True)): if options.verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = ligolw_utils.load_filename(filename, verbose = options.verbose, contenthandler = ligolw.LIGOLWContentHandler) seglists |= ligolw_search_summary.segmentlistdict_fromsearchsummary(xmldoc, options.livetime_program).coalesce() xmldoc.unlink() # # ============================================================================= # # Plot # # ============================================================================= #