gwcelery.tasks.inference module¶
Source Parameter Estimation with LALInference, Bilby, and RapidPE.
- gwcelery.tasks.inference.RAPIDPE_GETENV = ['DEFAULT_SEGMENT_SERVER', 'GWDATAFIND_SERVER', 'LAL_DATA_PATH', 'LD_LIBRARY_PATH', 'LIBRARY_PATH', 'NDSSERVER', 'PATH', 'PYTHONPATH']¶
Names of environment variables to include in RapidPE HTCondor submit files.
- gwcelery.tasks.inference.RAPIDPE_ENVIRONMENT = {'RIFT_LOWLATENCY': 'True'}¶
Names and values of environment variables to include in RapidPE HTCondor submit files.
- gwcelery.tasks.inference.prepare_lalinference_ini(event, superevent_id)[source]¶
Determine LALInference configurations and return ini file content
- (task)gwcelery.tasks.inference._setup_dag_for_lalinference(coinc, rundir, event, superevent_id)[source]¶
Create DAG for a lalinference run and return the path to DAG.
- Parameters:
coinc (byte contents) – Byte contents of
coinc.xml
. The PSD is expected to be embedded.rundir (str) – The path to a run directory where the DAG file is created.
event (dict) – The json contents of a target G event retrieved from gracedb.get_event(), whose mass and spin information are used to determine analysis settings.
superevent_id (str) – The GraceDB ID of a target superevent
- Returns:
path_to_dag – The path to the .dag file
- Return type:
- (task)gwcelery.tasks.inference._setup_dag_for_bilby(coinc, rundir, event, superevent_id, mode='production')[source]¶
Create DAG for a bilby run and return the path to DAG.
- Parameters:
coinc (bytes) – Byte contents of
coinc.xml
. The PSD is expected to be embedded.rundir (str) – The path to a run directory where the DAG file is created
event (dict) – The json contents of a target G event retrieved from gracedb.get_event(), whose mass and spin information are used to determine analysis settings.
superevent_id (str) – The GraceDB ID of a target superevent
mode (str) – Analysis mode, allowed options are “production” and “fast_test”, default is “production”.
- Returns:
path_to_dag – The path to the .dag file
- Return type:
Notes
–channel-dict o3replay is added to bilby_pipe_gracedb arguments when the gracedb host is different from gracedb.ligo.org or gracedb-test.ligo.org. Condor queue is set to Online_PE if gracedb host is gracedb.ligo.org, and Online_PE_MDC otherwise.
- (task)gwcelery.tasks.inference._setup_dag_for_rapidpe(rundir, superevent_id, event)[source]¶
Create DAG for a rapidpe run and return the path to DAG.
- (task)gwcelery.tasks.inference._condor_no_submit(path_to_dag, include_env=None)[source]¶
Run ‘condor_submit_dag -no_submit’ and return the path to .sub file.
- gwcelery.tasks.inference.dag_prepare_task(rundir, event, superevent_id, pe_pipeline, **kwargs)[source]¶
Return a canvas of tasks to prepare DAG.
- Parameters:
rundir (str) – The path to a run directory where the DAG file is created
event (dict) – The json contents of a target G event retrieved from gracedb.get_event(), whose mass and spin information are used to determine analysis settings.
superevent_id (str) – The GraceDB ID of a target superevent
pe_pipeline (str) – The parameter estimation pipeline used, lalinference, bilby, or rapidpe.
- Returns:
canvas – The canvas of tasks to prepare DAG
- Return type:
canvas of tasks
- (task)gwcelery.tasks.inference._clean_up_bilby(rundir)[source]¶
Remove large data products produced by bilby
- Parameters:
rundir (str) –
- (task)gwcelery.tasks.inference.job_error_notification(request, exc, traceback, superevent_id, rundir, analysis)[source]¶
Upload notification when condor.submit terminates unexpectedly.
- Parameters:
request (Context (placeholder)) – Task request variables
exc (Exception) – Exception raised by condor.submit
traceback (str (placeholder)) – Traceback message from a task
superevent_id (str) – The GraceDB ID of a target superevent
rundir (str) – The run directory for PE
analysis (str) – Analysis name used as a label in uploaded messages
Notes
Some large bilby data products are cleaned up after the notification if the gracedb host is different from gracedb.ligo.org.
- (task)gwcelery.tasks.inference.dag_finished(rundir, superevent_id, pe_pipeline, **kwargs)[source]¶
Upload PE results
- (task)gwcelery.tasks.inference.start_pe(event, superevent_id, pe_pipeline)[source]¶
Run Parameter Estimation on a given event.
- Parameters:
event (dict) – The json contents of a target G event retrieved from gracedb.get_event(), whose mass and spin information are used to determine analysis settings.
superevent_id (str) – The GraceDB ID of a target superevent
pe_pipeline (str) – The parameter estimation pipeline used, lalinference, bilby, or rapidpe.