inspiral module

class inspiral.CoincsDocument(url, process_params, process_start_time, comment, instruments, seg, offsetvectors, injection_filename=None, tmp_path=None, replace_file=None, verbose=False)[source]

Bases: object

commit()[source]
get_next_sngl_id()[source]
property process_id
sngl_inspiral_columns = ('process:process_id', 'ifo', 'end_time', 'end_time_ns', 'eff_distance', 'coa_phase', 'mass1', 'mass2', 'snr', 'chisq', 'chisq_dof', 'bank_chisq', 'bank_chisq_dof', 'sigmasq', 'spin1x', 'spin1y', 'spin1z', 'spin2x', 'spin2y', 'spin2z', 'template_duration', 'event_id', 'Gamma0', 'Gamma1', 'Gamma2')
write_output_url(seglistdicts=None, verbose=False)[source]
class inspiral.FakeGracedbClient(service_url)[source]

Bases: object

createEvent(group, pipeline, filename, filecontents, search)[source]
writeLabel(gracedb_id, tagname)[source]
writeLog(gracedb_id, message, filename, filecontents, tagname)[source]
class inspiral.FakeGracedbResp[source]

Bases: object

json()[source]
class inspiral.GracedBWrapper(instruments, far_threshold=None, min_instruments=None, group='Test', search='LowMass', label=None, pipeline='gstlal', service_url=None, kafka_server=None, analysis_tag='test', job_tag=None, delay_uploads=False, upload_auxiliary_data=True, delta_t=0.005, verbose=False)[source]

Bases: object

DEFAULT_SERVICE_URL = 'https://gracedb.ligo.org/api/'
do_alerts(last_coincs, psddict, rankingstat_xmldoc_func, seglistdicts, get_p_astro_func, sim_inspiral_table=None)[source]
property far_threshold
nearest_sim_table(gps_time, sim_inspiral)[source]
retries = 5
retry_delay = 5.0
web_get_gracedb_far_threshold()[source]
web_get_gracedb_min_instruments()[source]
web_set_gracedb_far_threshold()[source]
web_set_gracedb_min_instruments()[source]
class inspiral.LIGOLWContentHandler(document, start_handlers={})[source]

Bases: LIGOLWContentHandler

startArray(parent, attrs)
startColumn(parent, attrs)
startParam(parent, attrs)
startStream(parent, attrs, __orig_startStream=<function use_in.<locals>.startStream>)
startTable(parent, attrs, __orig_startTable=<function use_in.<locals>.startTable>)
inspiral.calc_expected_injection_snr(inj, psd, f_low=15.0, f_high=2048.0, sample_rate=16384.0)[source]

compute optimal SNR for an injection

inspiral.calc_sim_inspiral_table_snrs(sim_inspiral_table, psd, segment, f_low=15.0, f_high=2048.0, sample_rate=16384.0)[source]

calculate expected SNRs for a set of injections in a sim_inspiral table

inspiral.chisq_distribution(df, non_centralities, size)[source]

This produces a set of noncentral chisq values of size size, with degrees of freedom given by df

inspiral.noncentrality(snrs, prefactor)[source]

This produces a set of noncentrality parameters that scale with snr^2 according to the prefactor

inspiral.now()[source]
inspiral.parse_bank_files(svd_banks, verbose, snr_threshold=None)[source]

given a dictionary of lists of svd template bank file names parse them into a dictionary of bank classes

inspiral.parse_svdbank_string(bank_string)[source]

parses strings of form

H1:bank1.xml,H2:bank2.xml,L1:bank3.xml

into a dictionary of lists of bank files.

inspiral.set_common_snglinspiral_values(sngl_inspiral_table)[source]
inspiral.snr_distribution(size, startsnr)[source]

This produces a power law distribution in snr of size size starting at startsnr