gwcelery.tasks.lalinference module

Source Parameter Estimation with LALInference.

exception gwcelery.tasks.lalinference.NotEnoughData[source]

Bases: Exception

Raised if found data is not enough due to the latency of data transfer

(task)gwcelery.tasks.lalinference.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.lalinference.upload_no_frame_files(request, exc, traceback, superevent_id)[source]

Upload notification when no frame files are found.

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
(task)gwcelery.tasks.lalinference.prepare_ini(frametype_dict, event, superevent_id=None)[source]

Determine an appropriate PE settings for the target event and return ini file content

gwcelery.tasks.lalinference.pre_pe_tasks(event, superevent_id)[source]

Return canvas of tasks executed before parameter estimation starts

(task)gwcelery.tasks.lalinference.dag_prepare(coinc_psd, ini_contents, rundir, superevent_id)[source]

Create a Condor DAG to run LALInference on a given event.

Parameters:
  • coinc_psd (tuple) – The tuple of the byte contents of coinc.xml and psd.xml.gz
  • ini_contents (str) – The content of online_pe.ini
  • rundir (str) – The path to a run directory where the DAG file exits
  • superevent_id (str) – The GraceDB ID of a target superevent
Returns:

submit_file – The path to the .sub file

Return type:

str

(task)gwcelery.tasks.lalinference.job_error_notification(request, exc, traceback, superevent_id, rundir)[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
(task)gwcelery.tasks.lalinference._upload_url(pe_results_path, graceid)[source]

Upload url of a page containing all of the plots.

(task)gwcelery.tasks.lalinference._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.lalinference.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.lalinference.dag_finished(rundir, preferred_event_id, superevent_id)[source]

Upload PE results and clean up run directory

Parameters:
  • rundir (str) – The path to a run directory where the DAG file exits
  • preferred_event_id (str) – The GraceDB ID of a target preferred event
  • superevent_id (str) – The GraceDB ID of a target superevent
Returns:

tasks – The work-flow for uploading PE results

Return type:

canvas

(task)gwcelery.tasks.lalinference._download_psd(gid)[source]

Download psd.xml.gz and return its content. If that file does not exist, return None.

(task)gwcelery.tasks.lalinference.start_pe(ini_contents, preferred_event_id, superevent_id)[source]

Run LALInference on a given event.

Parameters:
  • ini_contents (str) – The content of online_pe.ini
  • preferred_event_id (str) – The GraceDB ID of a target preferred event
  • superevent_id (str) – The GraceDB ID of a target superevent