ijazz.config
Functions
|
Recursively merges dict2 into dict1. |
Entry point for the IJazZ Scale and Smearing fit configuration script. |
|
|
Creates YAML configuration files for SAS steps |
Module Contents
- ijazz.config.ijazz_config_sas()[source]
Entry point for the IJazZ Scale and Smearing fit configuration script. This script reads the provided configuration file and generates YAML files for each step.
- ijazz.config.config_sas(config: dict, cfg: dict)[source]
Creates YAML configuration files for SAS steps based on the provided config and cfg dictionaries. This function processes datasets, applies cuts, and generates YAML files for each step in the configuration.
- Parameters:
config (dict) – A dictionary containing the main configuration. Expected keys include: - ‘datasets’: List of dataset dictionaries with ‘file_dt’ and ‘file_mc’ keys. - ‘dir_yaml’: Directory path to save the generated YAML files. - ‘sas’: Dictionary containing SAS-specific configurations (e.g., ‘cut’). - ‘object_type’: A string representing the object type. - ‘year’: A string representing the year. - ‘dir_results’: Directory path for storing results.
cfg (dict) –
A dictionary containing the SAS steps configuration. Expected keys include: - ‘steps’: List of step dictionaries, each containing:
’name’: Name of the step.
’split’: Boolean indicating whether to split datasets.
- ’sas’: Dictionary with SAS-specific step configurations
(e.g., ‘correct_data’).
- Returns:
The function writes YAML files to the specified directory.
- Return type:
None
Example
- config = {
‘datasets’: [{‘file_dt’: [‘data1.parquet’], ‘file_mc’: [‘mc1.parquet’]}], ‘dir_yaml’: ‘./yaml_configs’, ‘sas’: {‘cut’: ‘some_cut’}, ‘object_type’: ‘Pho’, ‘year’: ‘2023’, ‘dir_results’: ‘./results’
} cfg = {
‘steps’: [{‘name’: ‘Step1’, ‘split’: False, ‘sas’: {‘correct_data’: True}}]
} config_sas(config, cfg)