Settings
This module sets the configuration parameters from the YAML configuration file.
get_pf8_info(config)
This function takes the peakfinder8 parameters from a config dictionary and parses them into a PF8Info object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
dict
|
A configuration dictionary in the format expected by beambusters. |
required |
Returns:
Name | Type | Description |
---|---|---|
pf8info |
PF8Info
|
Peakfinder8 parameters. |
Source code in beambusters/settings.py
parse(config)
This function receives the configuration dictionary loaded from the YAML and parse it into a flat dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
dict
|
A configuration dictionary loaded from the YAML file. |
required |
Returns:
Name | Type | Description |
---|---|---|
config |
dict
|
A configuration dictionary in a format expected by beambusters. |
Source code in beambusters/settings.py
parse_plots_info(config)
This function extracts plot parameters from a configuration dictionary and parses them into a flat dictionary of plot settings. Args: config (dict): A configuration dictionary (in the format expected by beambusters).
Returns:
Name | Type | Description |
---|---|---|
plots_info |
dict
|
A dictionary containg the plot settings. |
Source code in beambusters/settings.py
read(path)
This function reads a YAML configuration file from a specified path and loads it as a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to the YAML configuration file. |
required |
Returns:
Name | Type | Description |
---|---|---|
config |
dict
|
A configuration dictionary containing the information of the YAML configuration file. |