gwcelery.tasks.inference module¶
Source Parameter Estimation with LALInference and Bilby.
-
exception
gwcelery.tasks.inference.
NotEnoughData
[source]¶ Bases:
Exception
Raised if found data is not enough due to the latency of data transfer
-
(task)
gwcelery.tasks.inference.
query_data
(trigtime)[source]¶ Continues to query data until it is found with gwdatafind and return frametypes for the data. If data is not found in 86400 seconds = 1 day, raise NotEnoughData.
-
(task)
gwcelery.tasks.inference.
upload_no_frame_files
(request, exc, traceback, superevent_id)[source]¶ Upload notification when no frame files are found.
Parameters:
-
(task)
gwcelery.tasks.inference.
prepare_ini
(frametype_dict, event, superevent_id=None)[source]¶ Determine an appropriate PE settings for the target event and return ini file content for LALInference pipeline
-
gwcelery.tasks.inference.
pre_pe_tasks
(event, superevent_id)[source]¶ Return canvas of tasks executed before parameter estimation starts
-
(task)
gwcelery.tasks.inference.
_setup_dag_for_lalinference
(coinc_psd, ini_contents, rundir, superevent_id)[source]¶ Create DAG for a lalinference run and return the path to DAG.
Parameters: Returns: path_to_dag – The path to the .dag file
Return type:
-
(task)
gwcelery.tasks.inference.
_setup_dag_for_bilby
(event, rundir, preferred_event_id, superevent_id)[source]¶ Create DAG for a bilby run and return the path to DAG.
Parameters: Returns: path_to_dag – The path to the .dag file
Return type:
-
(task)
gwcelery.tasks.inference.
_condor_no_submit
(path_to_dag)[source]¶ Run ‘condor_submit_dag -no_submit’ and return the path to .sub file.
-
(task)
gwcelery.tasks.inference.
dag_prepare_task
(rundir, superevent_id, preferred_event_id, pe_pipeline, ini_contents=None)[source]¶ Return a canvas of tasks to prepare DAG.
Parameters: - rundir (str) – The path to a run directory where the DAG file exits
- superevent_id (str) – The GraceDB ID of a target superevent
- preferred_event_id (str) – The GraceDB ID of a target preferred event
- pe_pipeline (str) – The parameter estimation pipeline used Either ‘lalinference’ OR ‘bilby’
- ini_contents (str) – The content of online_lalinference_pe.ini Required if pe_pipeline == ‘lalinference’
Returns: canvas – The canvas of tasks to prepare DAG
Return type: canvas of tasks
-
(task)
gwcelery.tasks.inference.
job_error_notification
(request, exc, traceback, superevent_id, rundir, pe_pipeline)[source]¶ Upload notification when condor.submit terminates unexpectedly.
Parameters: - request (Context (placeholder)) – Task request variables
- exc (Exception) – Exception rased 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
- pe_pipeline (str) – The parameter estimation pipeline used Either lalinference OR bilby
-
(task)
gwcelery.tasks.inference.
_upload_url
(pe_results_path, graceid, pe_pipeline)[source]¶ Upload url of a page containing all of the plots.
-
(task)
gwcelery.tasks.inference.
_get_result_contents
(pe_results_path, filename)[source]¶ Return the contents of a PE results file by reading it from the local filesystem.
-
(task)
gwcelery.tasks.inference.
clean_up
(rundir)[source]¶ Clean up a run directory.
Parameters: rundir (str) – The path to a run directory where the DAG file exits
-
(task)
gwcelery.tasks.inference.
dag_finished
(rundir, preferred_event_id, superevent_id, pe_pipeline)[source]¶ Upload PE results and clean up run directory
Parameters: Returns: tasks – The work-flow for uploading PE results
Return type: canvas
-
(task)
gwcelery.tasks.inference.
_download_psd
(gid)[source]¶ Download
psd.xml.gz
and return its content. If that file does not exist, return None.