diff --git a/bin/pycbc_multi_inspiral b/bin/pycbc_multi_inspiral index 02090589d37..cd30145c0b6 100755 --- a/bin/pycbc_multi_inspiral +++ b/bin/pycbc_multi_inspiral @@ -473,10 +473,10 @@ with ctx: # If we have triggers above coinc threshold and more than 2 # ifos, then calculate the coherent statistics if len(coinc_idx) != 0 and nifo > 2: + # Plus and cross polarization + fp = {ifo: ap[ifo][position_index][0] for ifo in args.instruments} + fc = {ifo: ap[ifo][position_index][1] for ifo in args.instruments} if args.projection=='left+right': - #Plus and cross polarization - fp = {ifo: ap[ifo][position_index][0] for ifo in args.instruments} - fc = {ifo: ap[ifo][position_index][1] for ifo in args.instruments} # Left polarized coherent SNR project_l = coh.get_projection_matrix( fp, fc, sigma, projection='left') diff --git a/bin/pygrb/pycbc_pygrb_grb_info_table b/bin/pygrb/pycbc_pygrb_grb_info_table index 2973ef5150e..9c88861a00e 100644 --- a/bin/pygrb/pycbc_pygrb_grb_info_table +++ b/bin/pygrb/pycbc_pygrb_grb_info_table @@ -74,10 +74,10 @@ data[0].append(utc_time) headers.append('Coordinated Universal Time') data[0].append(str(opts.ra)) -headers.append('R.A.') +headers.append('R.A. (deg)') data[0].append(str(opts.dec)) -headers.append('Dec') +headers.append('Dec (deg)') data[0].append(str(opts.sky_error)) headers.append('Sky Error') diff --git a/bin/pygrb/pycbc_pygrb_plot_coh_ifosnr b/bin/pygrb/pycbc_pygrb_plot_coh_ifosnr index 1af496ee01d..05a94681162 100644 --- a/bin/pygrb/pycbc_pygrb_plot_coh_ifosnr +++ b/bin/pygrb/pycbc_pygrb_plot_coh_ifosnr @@ -97,16 +97,16 @@ def load_data(input_file, vetoes, ifos, opts, injections=False): sigma_tot = numpy.zeros(num_trigs) # Get parameters necessary for antenna responses - longitude = numpy.degrees(trigs['network/longitude']) - latitude = numpy.degrees(trigs['network/latitude']) + ra = trigs['network/ra'][:] + dec = trigs['network/dec'][:] time = trigs['network/end_time_gc'][:] # Get antenna response based parameters for ifo in ifos: antenna = Detector(ifo) ifo_f_resp = \ - ppu.get_antenna_responses(antenna, longitude, - latitude, time) + ppu.get_antenna_responses(antenna, ra, + dec, time) # Get the average for f_resp_mean and calculate sigma_tot data['f_resp_mean'][ifo] = ifo_f_resp.mean() diff --git a/bin/pygrb/pycbc_pygrb_plot_injs_results b/bin/pygrb/pycbc_pygrb_plot_injs_results index d7c1fccf357..22915b945cd 100644 --- a/bin/pygrb/pycbc_pygrb_plot_injs_results +++ b/bin/pygrb/pycbc_pygrb_plot_injs_results @@ -18,7 +18,7 @@ """ -Plot found/missed injection properties for the triggered search (PyGRB).' +Plot found/missed injection properties for the triggered search (PyGRB). """ import h5py, logging, os.path, argparse, sys diff --git a/bin/pygrb/pycbc_pygrb_plot_skygrid b/bin/pygrb/pycbc_pygrb_plot_skygrid index 3c043dfede6..feb6fda4594 100644 --- a/bin/pygrb/pycbc_pygrb_plot_skygrid +++ b/bin/pygrb/pycbc_pygrb_plot_skygrid @@ -91,8 +91,8 @@ trig_data = load_data(trig_file, vetoes) # Generate sky grid plot # -xlabel = "Longitude (Degrees)" -ylabel = "Latitude (Degrees)" +xlabel = "RA (deg)" +ylabel = "Dec (deg)" if opts.verbose: sys.stdout.write("\nPlotting...\n") @@ -103,7 +103,8 @@ fig = plt.figure() ax = fig.gca() ax.set_xlabel(xlabel)#, fontsize=16) ax.set_ylabel(ylabel)#, fontsize=16) -ax.plot(trig_data['network/longitude'][:], trig_data['network/latitude'][:], +# Trigger RA/Dec data is stored in radians, so convert to degrees +ax.plot(numpy.rad2deg(trig_data['network/ra']), numpy.rad2deg(trig_data['network/dec']), 'ko', markerfacecolor='blue') # Wrap up save_fig_with_metadata(fig, outfile, cmd=' '.join(sys.argv), diff --git a/bin/pygrb/pycbc_pygrb_pp_workflow b/bin/pygrb/pycbc_pygrb_pp_workflow index 7e51112c303..71734fef27e 100644 --- a/bin/pygrb/pycbc_pygrb_pp_workflow +++ b/bin/pygrb/pycbc_pygrb_pp_workflow @@ -387,8 +387,8 @@ ini_file = _workflow.FileList([_workflow.File(wflow.ifos, '', layout.single_layout(base, ini_file) # Create versioning information -wf.make_versioning_page( - _workflow, +_workflow.make_versioning_page( + wflow, wflow.cp, rdir['workflow/version'], ) diff --git a/pycbc/conversions.py b/pycbc/conversions.py index 167127eb8f6..20c78f88949 100644 --- a/pycbc/conversions.py +++ b/pycbc/conversions.py @@ -562,7 +562,7 @@ def remnant_mass_from_mass1_mass2_spherical_spin_eos( # If a maximum NS mass is not provided, accept all values and # let the EOS handle this (in ns.initialize_eos) if ns_bh_mass_boundary is None: - mask = numpy.ones(ensurearray(mass2).size[0], dtype=bool) + mask = numpy.ones(ensurearray(mass2)[0].size, dtype=bool) # Otherwise perform the calculation only for small enough NS masses... else: mask = mass2 <= ns_bh_mass_boundary diff --git a/pycbc/workflow/matched_filter.py b/pycbc/workflow/matched_filter.py index 7296cf34a86..eae944511d8 100644 --- a/pycbc/workflow/matched_filter.py +++ b/pycbc/workflow/matched_filter.py @@ -238,6 +238,8 @@ def setup_matchedfltr_dax_generated_multi(workflow, science_segs, datafind_outs, if match_fltr_exe == 'pycbc_multi_inspiral': exe_class = select_matchedfilter_class(match_fltr_exe) + # Right ascension + declination provided in degrees, + # so convert to radians cp.set('inspiral', 'ra', str(radians(float(cp.get('workflow', 'ra'))))) cp.set('inspiral', 'dec',