Пример #1
0
def getSegments(sim_table, seglist, ifokey):

    tmptable = readMeta.metaDataTable(None, "sim_inspiral")

    for e in sim_table.table:
        end_time = e[ifokey]
        if seglist.__contains__(end_time):
            tmptable.table.append(e)

    return tmptable
def getSegments ( sim_table, seglist, ifokey ):

  tmptable = readMeta.metaDataTable( None, "sim_inspiral" )

  for e in sim_table.table:
    end_time = e[ifokey]
    if seglist.__contains__(end_time):
      tmptable.table.append(e)

  return tmptable
Пример #3
0
                  help="start from GPS time SECONDS")
parser.add_option("-d",
                  "--duration",
                  metavar="SECONDS",
                  default=None,
                  help="duration")
options, args = parser.parse_args()
del parser

if options.gps_start_time:
    options.gps_start_time = int(options.gps_start_time)
if options.duration:
    options.duration = int(options.duration)

# interpret the remaining command line arguments as trigger file names
triggers = readMeta.metaDataTable(args, "sngl_burst")

# extract some arrays from the trigger table
peak_time = triggers.mkarray("peak_time")

i = 1

os.system('rm -rf plotdata/')
os.system('mkdir plotdata/')

for time in peak_time:
    print 'Producing plot data for trigger at: ', time
    seg_file = open('seg.txt', mode='r')
    seg_list = seg_file.readlines()
    #do the slides
    for seg in seg_list:
Пример #4
0
from pylal import viz

# grab command line options
parser = OptionParser(version="%prog CVS $Id$")
parser.add_option("-s", "--gps-start-time", metavar="SECONDS", default=None, help="start from GPS time SECONDS")
parser.add_option("-d", "--duration", metavar="SECONDS", default=None, help="duration")
options, args = parser.parse_args()
del parser

if options.gps_start_time:
	options.gps_start_time = int(options.gps_start_time)
if options.duration:
	options.duration = int(options.duration)

# interpret the remaining command line arguments as trigger file names
triggers = readMeta.metaDataTable(args, "sngl_burst")

# extract some arrays from the trigger table
peak_time = triggers.mkarray("peak_time")

i=1

os.system('rm -rf plotdata/')
os.system('mkdir plotdata/')

for time in peak_time:
	print 'Producing plot data for trigger at: ', time
	seg_file=open('seg.txt',mode='r')
	seg_list=seg_file.readlines()
        #do the slides
	for seg in seg_list:
Пример #5
0
l1seglist = cleanlist(l1seglist, 2064)
l1seglist = l1seglist.contract(72)

triplelist = h1seglist & h2seglist & l1seglist
triplelist.coalesce()

h1h2doublelist = h1seglist & h2seglist
h1h2doublelist = h1h2doublelist.coalesce() - triplelist
h1l1doublelist = h1seglist & l1seglist
h1l1doublelist = h1l1doublelist - triplelist
h2l1doublelist = h2seglist & l1seglist
h2l1doublelist = h2l1doublelist - triplelist

if opts.injection_file:
    flist = [opts.injection_file]
    injections = readMeta.metaDataTable(flist, "sim_inspiral")
    print("No triple injections: %d" % \
        getSegments(injections, triplelist, "geocent_end_time").nevents())
    print("No H1H2 injections: %d" % \
        getSegments(injections, h1h2doublelist, "geocent_end_time").nevents())
    print("No H1L1 injections: %d" % \
        getSegments(injections, h1l1doublelist, "geocent_end_time").nevents())
    print("No H2L1 injections: %d" % \
        getSegments(injections, h2l1doublelist, "geocent_end_time").nevents())

if opts.glitch_time:
    if triplelist.__contains__(opts.glitch_time):
        print("Time " + str(opts.glitch_time) + " is in triple time")
    if h1h2doublelist.__contains__(opts.glitch_time):
        print("Time " + str(opts.glitch_time) + " is in h1h2 only time")
    if h1l1doublelist.__contains__(opts.glitch_time):
l1seglist = cleanlist(l1seglist, 2064)
l1seglist = l1seglist.contract(72)

triplelist = h1seglist & h2seglist & l1seglist
triplelist.coalesce()

h1h2doublelist = h1seglist & h2seglist
h1h2doublelist = h1h2doublelist.coalesce() - triplelist
h1l1doublelist = h1seglist & l1seglist
h1l1doublelist = h1l1doublelist - triplelist
h2l1doublelist = h2seglist & l1seglist
h2l1doublelist = h2l1doublelist - triplelist

if opts.injection_file:
  flist = [ opts.injection_file ]
  injections = readMeta.metaDataTable( flist, "sim_inspiral")
  print "No triple injections: %d" % \
      getSegments(injections, triplelist, "geocent_end_time").nevents()
  print "No H1H2 injections: %d" % \
      getSegments(injections, h1h2doublelist, "geocent_end_time").nevents()
  print "No H1L1 injections: %d" % \
      getSegments(injections, h1l1doublelist, "geocent_end_time").nevents()
  print "No H2L1 injections: %d" % \
      getSegments(injections, h2l1doublelist, "geocent_end_time").nevents()

if opts.glitch_time:
  if triplelist.__contains__(opts.glitch_time):
    print "Time " + str(opts.glitch_time) + " is in triple time"
  if h1h2doublelist.__contains__(opts.glitch_time):
    print "Time " + str(opts.glitch_time) + " is in h1h2 only time"
  if h1l1doublelist.__contains__(opts.glitch_time):