log.info('%s:reading PSDs', coinc.coinc_event_id) psds = tuple( reference_psd_for_ifo_and_filename(sngl_inspiral.ifo, reference_psd_filenames_by_process_id[sngl_inspiral.process_id]) for sngl_inspiral in sngl_inspirals) # Loop over sky localization methods for method in opts.method: log.info("%s:method '%s':computing sky map", coinc.coinc_event_id, method) if opts.chain_dump: chain_dump = '%s.chain.npy' % int(coinc.coinc_event_id) else: chain_dump = None try: sky_map, epoch, elapsed_time = ligolw_sky_map.ligolw_sky_map( sngl_inspirals, approximant, amplitude_order, phase_order, f_low, opts.min_distance, opts.max_distance, opts.prior_distance_power, psds=psds, method=method, nside=opts.nside, chain_dump=chain_dump) except (ArithmeticError, ValueError): log.exception("%s:method '%s':sky localization failed", coinc.coinc_event_id, method) count_sky_maps_failed += 1 if not opts.keep_going: raise else: log.info("%s:method '%s':saving sky map", coinc.coinc_event_id, method) fits.write_sky_map('%s.%s.fits.gz' % (int(coinc.coinc_event_id), method), sky_map, objid=str(coinc.coinc_event_id), gps_time=float(epoch), creator=parser.get_prog_name(), runtime=elapsed_time, instruments=instruments, nest=True) if count_sky_maps_failed > 0:
# Look up PSDs log.info('%s:reading PSDs', coinc.coinc_event_id) psds = reference_psds_for_sngls(sngl_inspirals) # Loop over sky localization methods for method in opts.method: log.info("%s:method '%s':computing sky map", coinc.coinc_event_id, method) if opts.chain_dump: chain_dump = '%s.chain.npy' % int(coinc.coinc_event_id) else: chain_dump = None try: sky_map, epoch, elapsed_time = ligolw_sky_map.ligolw_sky_map( sngl_inspirals, opts.waveform, opts.f_low, opts.min_distance, opts.max_distance, opts.prior_distance_power, psds=psds, method=method, nside=opts.nside, chain_dump=chain_dump, phase_convention=opts.phase_convention) except (ArithmeticError, ValueError): log.exception("%s:method '%s':sky localization failed", coinc.coinc_event_id, method) count_sky_maps_failed += 1 if not opts.keep_going: raise else: log.info("%s:method '%s':saving sky map", coinc.coinc_event_id, method) fits.write_sky_map('%s.%s.fits.gz' % (int(coinc.coinc_event_id), method), sky_map, objid=str(coinc.coinc_event_id), gps_time=float(epoch), creator=parser.prog, runtime=elapsed_time, instruments=instruments, nest=True)