Package pylal :: Module imr_utils
[hide private]
[frames] | no frames]

Module imr_utils

source code

Classes [hide private]
  DataBaseSummary
This class stores summary information gathered across the databases
Functions [hide private]
 
allowed_analysis_table_names() source code
 
make_sim_inspiral_row_from_columns_in_db(connection)
get the unique mapping of a sim inspiral row from columns in this database
source code
 
time_within_segments(geocent_end_time, geocent_end_time_ns, zero_lag_segments=None)
Return True if injection was made in the given segmentlist, if no segments just return True
source code
 
get_min_far_inspiral_injections(connection, segments=None, table_name="coinc_inspiral")
This function returns the found injections from a database and the minimum far associated with them as tuple of the form (far, sim).
source code
 
get_max_snr_inspiral_injections(connection, segments=None, table_name="coinc_inspiral")
Like get_min_far_inspiral_injections but uses SNR to rank injections.
source code
 
get_instruments_from_coinc_event_table(connection)
This function returns a list of the instruments analyzed according to the coinc_event_table
source code
 
get_segments(connection, xmldoc, table_name, live_time_program, veto_segments_name=None, data_segments_name="datasegments") source code
 
get_event_fars(connection, table_name, segments=None)
return the false alarm rate of the most rare zero-lag coinc by instruments
source code
 
compute_search_efficiency_in_bins(found, total, ndbins, sim_to_bins_function=lambda sim:(sim.distance,))
This program creates the search efficiency in the provided ndbins.
source code
 
compute_search_volume(eff)
Integrate efficiency to get search volume.
source code
 
guess_nd_bins(sims, bin_dict={"distance":(200,rate.LinearBins)})
Given a dictionary of bin counts and bin objects keyed by sim attribute, come up with a sensible NDBins scheme
source code
 
guess_distance_mass1_mass2_bins_from_sims(sims, mass1bins=11, mass2bins=11, distbins=200)
Given a list of the injections, guess at the mass1, mass2 and distance bins.
source code
 
guess_distance_spin1z_spin2z_bins_from_sims(sims, spin1bins=11, spin2bins=11, distbins=200)
Given a list of the injections, guess at the spin1, spin2 and distance bins.
source code
 
guess_distance_effective_spin_parameter_bins_from_sims(sims, chibins=11, distbins=200)
Given a list of the injections, guess at the chi = (m1*s1z + m2*s2z)/(m1+m2) and distance bins.
source code
 
guess_distance_mass_ratio_bins_from_sims(sims, qbins=11, distbins=200)
Given a list of the injections, guess at the chi and distance bins.
source code
 
guess_distance_chirp_mass_bins_from_sims(sims, mbins=11, distbins=200)
Given a list of the injections, guess at the chirp mass and distance bins.
source code
 
guess_distance_total_mass_bins_from_sims(sims, nbins=11, distbins=200)
Given a list of the injections, guess at the mass1, mass2 and distance bins.
source code
 
sim_to_distance_mass1_mass2_bins_function(sim)
create a function to map a sim to a distance, mass1, mass2 NDBins based object
source code
 
sim_to_distance_total_mass_bins_function(sim)
create a function to map a sim to a distance, total mass NDBins based object
source code
 
sim_to_distance_spin1z_spin2z_bins_function(sim)
create a function to map a sim to a distance, spin1z, spin2z NDBins based object
source code
 
sim_to_distance_effective_spin_parameter_bins_function(sim)
Map a sim_inspiral row to a distance, "chi" spin parameter bin.
source code
 
sim_to_distance_mass_ratio_bins_function(sim)
create a function to map a sim to a distance, mass ratio NDBins based object
source code
 
sim_to_distance_chirp_mass_bins_function(sim)
create a function to map a sim to a distance, chirp mass NDBins based object
source code
 
symmetrize_sims(sims, col1, col2)
symmetrize by two columns that should be symmetric.
source code
Function Details [hide private]

get_min_far_inspiral_injections(connection, segments=None, table_name="coinc_inspiral")

source code 

This function returns the found injections from a database and the minimum far associated with them as tuple of the form (far, sim). It also tells you all of the injections that should have been injected. Subtracting the two outputs should tell you the missed injections

compute_search_efficiency_in_bins(found, total, ndbins, sim_to_bins_function=lambda sim:(sim.distance,))

source code 

This program creates the search efficiency in the provided ndbins. The first dimension of ndbins must be the distance. You also must provide a function that maps a sim inspiral row to the correct tuple to index the ndbins.

guess_distance_total_mass_bins_from_sims(sims, nbins=11, distbins=200)

source code 

Given a list of the injections, guess at the mass1, mass2 and distance bins. Floor and ceil will be used to round down to the nearest integers.

sim_to_distance_effective_spin_parameter_bins_function(sim)

source code 

Map a sim_inspiral row to a distance, "chi" spin parameter
bin. For IMR waveforms, "chi" refers to the effective spin,

   chi = (m1*s1z + m2*s2z)/(m1 + m2)

where s1z, s2z are the components of the spins along the
direction of the total angular momentum. For inspiral
waveforms, "chi" refers to the reduced spin,

   chi_red = chi_s + delta*chi_a - 76.*eta/113*chi_s,

where chi_s and chi_a are the symmetric and anti-symmetric
combinations of the spins, and delta=(m1-m2)/(m1+m2). Some
waveforms, e.g., SpinTaylorT4, use different coordinate
conventions and require a coordinate transformation before
applying these definitions.

symmetrize_sims(sims, col1, col2)

source code 

symmetrize by two columns that should be symmetric. For example mass1 and mass2