Modules

asimov.git module

exception asimov.git.AsimovFileNotFound[source]

Bases: FileNotFoundError

class asimov.git.EventRepo(directory, url=None, update=False)[source]

Bases: object

Read a git repository containing event PE information.

Parameters:
directorystr

The path to the git repository on the filesystem.

urlstr

The URL of the git repository

updatebool

Flag to determine if the repository is updated when loaded. Defaults to False.

Methods

add_file(source, destination[, commit_message])

Add a new file to the repository.

create(location)

Create a new git repository to store configurations etc.

find_coincfile([category])

Find the coinc file for this calibration category in this repository.

find_prods([name, category])

Find all of the productions for a relevant category of runs in the event repository.

find_timefile([category])

Find the time file in this repository.

from_url(url, name[, directory, update])

Clone a git repository into a working directory, then create an EventRepo object for it.

update([stash, branch])

Pull the latest updates to the repository.

upload_preferred(event, prods)

Prepare the preferred PESummary file by combining all of the productions for an event which are marked as Preferred or Finalised.

upload_prod(production, rundir[, preferred, ...])

Upload the results of a PE job to the event repostory.

add_file(source, destination, commit_message=None)[source]

Add a new file to the repository.

Parameters:
sourcestr, file path

The path to the file to be added.

destinationstr

The location to which the file should be copied in the repository, relative to the root of the repository. Any directories which do not exist already will be created.

commit_messagestr, optional

The commit message for the git commit. Defaults to a description of the file addition.

classmethod create(location)[source]

Create a new git repository to store configurations etc.

Parameters:
locationstr

The location of the directory to be used.

find_coincfile(category='C01_offline')[source]

Find the coinc file for this calibration category in this repository.

find_prods(name=None, category='C01_offline')[source]

Find all of the productions for a relevant category of runs in the event repository.

Parameters:
namestr, optional

The name of the production. If omitted then all production ini files are returned.

categorystr, optional

The category of run. Defaults to “general/calibration_directory” from the config file.

find_timefile(category='C01_offline')[source]

Find the time file in this repository.

classmethod from_url(url, name, directory=None, update=False)[source]

Clone a git repository into a working directory, then create an EventRepo object for it.

Parameters:
urlstr

The URL of the git repository

namestr

The name for the git repository (probably the event name)

directorystr, optional

The location to store the cloned repository. If this value isn’t provided the repository is cloned into the /tmp directory.

updatebool

Flag to determine if the repository is updated when loaded. Defaults to False.

update(stash=False, branch='master')[source]

Pull the latest updates to the repository.

Parameters:
stashbool, optional

If true any changes which are in the local version of the repository are first stashed. Default is False.

branchstr, optional

The branch which should be checked-out. Default is master.

upload_preferred(event, prods)[source]

Prepare the preferred PESummary file by combining all of the productions for an event which are marked as Preferred or Finalised.

Parameters:
eventasimov.gitlab.EventIssue

The event which the preferred upload is being prepared for.

prodslist

A list of all of the productions which should be included in the preferred file.

upload_prod(production, rundir, preferred=False, category='C01_offline', rootdir='public_html/LVC/projects/O3/C01/', rename=False)[source]

Upload the results of a PE job to the event repostory.

Parameters:
categorystr, optional

The category of the job. Defaults to “C01_offline”.

productionstr

The production name.

rundirstr

The run directory of the PE job.

asimov.ini module

Handle run configuration files.

This module is inteded to read and manipulate the run configuration files which are used by LALInferencePipe to design a parameter estimation run.

class asimov.ini.RunConfiguration(path)[source]

Bases: object

A class to represent a run configuration.

Methods

check_fakecache()

Check to see if this file contains a fake-cache.

get_calibration()

Retrieve the calibration envelope locations.

get_engine()

Fetch all of the Lalinference engine data.

get_psds()

Check if PSDs have been set in the ini file, and return them if they have.

run_bayeswave([status])

Ensure that Bayeswave is run for this job.

set_lalinference(**kwargs)

Set the values of LALInference configuration variables.

update_accounting([user])

Update the accounting tag for this job.

update_psds(psds[, clobber])

Update the locations of the PSDs in the ini file.

update_webdir(event, prod[, rootdir])

Update the web directory in the ini file.

get_channels

get_ifos

save

set_approximant

set_queue

check_fakecache()[source]

Check to see if this file contains a fake-cache.

This can be used to determine whether the ini file sets up a configuration which uses e.g. deglitched frames.

Returns:
bool

Returns true if a fake cache has been used for this file.

get_calibration()[source]

Retrieve the calibration envelope locations.

get_channels()[source]
get_engine()[source]

Fetch all of the Lalinference engine data.

get_ifos()[source]
get_psds()[source]

Check if PSDs have been set in the ini file, and return them if they have.

run_bayeswave(status=True)[source]

Ensure that Bayeswave is run for this job.

This should be run in order to add Bayeswave to produce PSDs for an event.

Parameters:
statusbool, optional

If set to true (the default) then a line will be added to ensure that Bayeswave is run to generate PSDs. If False then this line will be removed from the ini file if it exists.

save()[source]
set_approximant(approximant, amporder, fref)[source]
set_lalinference(**kwargs)[source]

Set the values of LALInference configuration variables.

Parameters:
kwargs

Set a variety of parameters.

set_queue(queue='Priority_PE')[source]
update_accounting(user=None)[source]

Update the accounting tag for this job. Defaults to the user account running the supervisor.

Parameters:
userstr

The accounting user to be added to the ini file.

update_psds(psds, clobber=False)[source]

Update the locations of the PSDs in the ini file.

Parameters:
psdsdict

A dictionary of the various PSDs.

update_webdir(event, prod, rootdir='public_html/LVC/projects/O3/C01/')[source]

Update the web directory in the ini file.

asimov.mattermost module

class asimov.mattermost.Mattermost(url=None)[source]

Bases: object

Methods

send_message(message[, channel])

Send a message to a chat channel.

submit_payload(message[, attachments, ...])

Send a payload (normally a message) to a chat channel.

send_message(message, channel=None)[source]

Send a message to a chat channel.

Parameters:
messagestr

The text of the message.

channelstr, optional

The name of the channel. To send a direct message to a person prefix their username with an @ sign. Defaults to the default channel set in mattermost for the webhook.

submit_payload(message, attachments=None, props=None, channel=None)[source]

Send a payload (normally a message) to a chat channel.

Parameters:
messagestr

The text of the message.

channelstr, optional

The name of the channel. To send a direct message to a person prefix their username with an @ sign. Defaults to the default channel set in mattermost for the webhook.

Module contents

Supervisor: A package for interacting with long-running data analysis jobs.

© Copyright 2020-2024, Daniel Williams.
Created using Sphinx 7.2.6.