BilbyJob class

Typically, methods of the GWCloud class will return instances of the BilbyJob class. Instances of this class are representations of the the Bilby jobs that are stored on the GWCloud server.

class gwcloud_python.bilby_job.BilbyJob(client, job_id, name, description, user, event_id, job_status, **kwargs)

Bases: GWDCObjectBase

BilbyJob class is useful for interacting with the Bilby jobs returned from a call to the GWCloud API. It is primarily used to store job information and obtain files related to the job.

Parameters:
  • client (GWCloud) – A reference to the GWCloud object instance from which the BilbyJob was created

  • job_id (str) – The id of the Bilby job, required to obtain the files associated with it

  • name (str) – Job name

  • description (str) – Job description

  • user (str) – User that ran the job

  • event_id (dict) – Event ID associated with job, should have keys corresponding to an EventID object

  • job_status (dict) – Status of job, should have ‘name’ and ‘date’ keys corresponding to the status code and when it was produced

  • kwargs (dict, optional) – Extra arguments, stored in other attribute

FILE_LIST_FILTERS = {'config': <function config_filter>, 'corner_plot': <function corner_plot_filter>, 'default': <function default_filter>, 'png': <function png_filter>, 'result_json': <function result_json_filter>}
get_config_file_list()

Get information for the config files associated with this GWDCObjectMeta

Returns:

Contains FileReference instances holding information on the config files

Return type:

FileReferenceList

get_config_files()

Download the content of all the config files.

WARNING: As the file contents are stored in memory, we suggest being cautious about the size of files being downloaded. If the files are large or very numerous, it is suggested to save the files and read them as needed instead.

Returns:

List containing tuples of the file path and associated file contents

Return type:

list

get_corner_plot_file_list()

Get information for the corner plot files associated with this GWDCObjectMeta

Returns:

Contains FileReference instances holding information on the corner plot files

Return type:

FileReferenceList

get_corner_plot_files()

Download the content of all the corner plot files.

WARNING: As the file contents are stored in memory, we suggest being cautious about the size of files being downloaded. If the files are large or very numerous, it is suggested to save the files and read them as needed instead.

Returns:

List containing tuples of the file path and associated file contents

Return type:

list

get_default_file_list()

Get information for the default files associated with this GWDCObjectMeta

Returns:

Contains FileReference instances holding information on the default files

Return type:

FileReferenceList

get_default_files()

Download the content of all the default files.

WARNING: As the file contents are stored in memory, we suggest being cautious about the size of files being downloaded. If the files are large or very numerous, it is suggested to save the files and read them as needed instead.

Returns:

List containing tuples of the file path and associated file contents

Return type:

list

get_png_file_list()

Get information for the png files associated with this GWDCObjectMeta

Returns:

Contains FileReference instances holding information on the png files

Return type:

FileReferenceList

get_png_files()

Download the content of all the png files.

WARNING: As the file contents are stored in memory, we suggest being cautious about the size of files being downloaded. If the files are large or very numerous, it is suggested to save the files and read them as needed instead.

Returns:

List containing tuples of the file path and associated file contents

Return type:

list

get_result_json_file_list()

Get information for the result json files associated with this GWDCObjectMeta

Returns:

Contains FileReference instances holding information on the result json files

Return type:

FileReferenceList

get_result_json_files()

Download the content of all the result json files.

WARNING: As the file contents are stored in memory, we suggest being cautious about the size of files being downloaded. If the files are large or very numerous, it is suggested to save the files and read them as needed instead.

Returns:

List containing tuples of the file path and associated file contents

Return type:

list

save_config_files(root_path)

Download and save the config files.

Parameters:

root_path (str or Path) – The base directory into which the files will be saved

save_corner_plot_files(root_path)

Download and save the corner plot files.

Parameters:

root_path (str or Path) – The base directory into which the files will be saved

save_default_files(root_path)

Download and save the default files.

Parameters:

root_path (str or Path) – The base directory into which the files will be saved

save_png_files(root_path)

Download and save the png files.

Parameters:

root_path (str or Path) – The base directory into which the files will be saved

save_result_json_files(root_path)

Download and save the result json files.

Parameters:

root_path (str or Path) – The base directory into which the files will be saved

set_description(description)

Set the description of a Bilby Job

Parameters:

event_id (str) – The new description

set_event_id(event_id=None)

Set the Event ID of a Bilby Job

Parameters:

event_id (EventID or str, optional) – The desired Event ID, by default None

set_name(name)

Set the name of a Bilby Job

Parameters:

event_id (str) – The new name