gravelamps.core.graveparser

Gravelamps Program Argument Parsing

Following are functions handling the various argument parsers used by programs within Gravelamps using the python builtin argparse module.

Written by Mick Wright 2022

Routines

create_bilbypipe_parser

Create a parser for bilby_pipe function usage

create_graveparser

Metafunction that creates the specific gravelamps parser based on the program name

get_bilbypipe_args

Parses arguments into known and unknown for bilby_pipe

graveparser_lens_generation_parser

Creates a parser for lens generation program usage

graveparser_inference_parser

Creates a parser for inference program usage

graveparser_interpolator_parser

Creates a parser for the minimal interpolator data program usage

Functions

create_bilbypipe_parser()

Creates a parser for bilby_pipe function usage

create_graveparser()

Metafunction that creates the specific gravelamps parser based on the program name

get_bilbypipe_args(bilby_pipe_config)

Parses a configuration file for bilby_pipe into known and unknown arguments

graveparser_lens_generation_parser()

Create a parser for lens generation program usage

graveparser_inference_parser()

Create a parser for inference program usage

graveparser_interpolator_parser()

Create a parser for the minimal lens interpolator program usage

graveparser_strong_lensing_parser()

Create a parser for the strong lensing model selection program

Module Contents

gravelamps.core.graveparser.create_bilbypipe_parser()

Creates a parser for bilby_pipe function usage

Returns:
bilbypipe_parserargparse.ArgumentParser

parser for the bilby_pipe program

gravelamps.core.graveparser.create_graveparser()

Metafunction that creates the specific gravelamps parser based on the program name

Returns:
graveparserargparse.ArgumentParser

parser for the specific gravelamps program being run

gravelamps.core.graveparser.get_bilbypipe_args(bilby_pipe_config)

Parses a configuration file for bilby_pipe into known and unknown arguments

Parameters:
bilby_pipe_configdict

Contains arguments to bilby_pipe to be stored in configuration file

Returns:
bilby_pipe_parserargparse.ArgumentParser

bilby_pipe configuration parser

bilby_pipe_argsargparse.Namespace

Object containing known settings and values for bilby_pipe

bilby_pipe_unknown_argsargparse.Namespace

Object containing any unknown settings and values for bilby_pipe

gravelamps.core.graveparser.graveparser_lens_generation_parser()

Create a parser for lens generation program usage

Returns:
graveparserargparse.ArgumentParser

gravelamps_generate_lens program argument parser

gravelamps.core.graveparser.graveparser_inference_parser()

Create a parser for inference program usage

Returns:
graveparserargparse.ArgumentParser

gravelamps_inference program argument parser

gravelamps.core.graveparser.graveparser_interpolator_parser()

Create a parser for the minimal lens interpolator program usage

Returns:
graveparserargparse.ArgumentParser

Minimal lens interpolator (gravelamps_interpolator_data) program argument parser

gravelamps.core.graveparser.graveparser_strong_lensing_parser()

Create a parser for the strong lensing model selection program

Returns:
graveparserargparse.ArgumentParser

Strong lensing model selection (gravelamps_strong_lensing) program argument parser