ijazz.config ============ .. py:module:: ijazz.config Functions --------- .. autoapisummary:: ijazz.config.merge_dicts ijazz.config.ijazz_config_sas ijazz.config.config_sas Module Contents --------------- .. py:function:: merge_dicts(dict1, dict2) Recursively merges dict2 into dict1. .. py:function:: ijazz_config_sas() 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. .. py:function:: config_sas(config: dict, cfg: dict) 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. :param config: 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. :type config: dict :param cfg: 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'). :type cfg: dict :returns: The function writes YAML files to the specified directory. :rtype: None .. rubric:: 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)