build-tools/merge_json.py
def split_digaree(json_dict, verbose=False):
    ''' Special-case to separate out quench-detection parameters from detuning
    '''
    k_expansion = {}
    names = [k for k in json_dict if 'piezo_sf_consts' in k]
    for name in names:
        if json_dict[name]['addr_width'] != 3:
            print("split_digaree is confused")
            continue
        element_name = name[:-15] + "quench_sf_consts"
        if verbose:
            print(name, element_name)
        k_expansion.update({element_name: copy.deepcopy(json_dict[name])})
        k_expansion[element_name]['base_addr'] = json_dict[name]['base_addr'] + 4
        k_expansion[element_name]['addr_width'] = 2
        json_dict[name]['addr_width'] = 2
    json_dict.update(k_expansion)
 Special-case to separate out quench-detection parameters from detuning
    
Special-case to separate out quench-detection parameters from detuning
Special - case to separate out quench - detection parameters from detuning
def split_digaree(json_dict, verbose=False):
    k_expansion = {}
    names = [k for k in json_dict if 'piezo_sf_consts' in k]
    for name in names:
        if json_dict[name]['addr_width'] != 3:
            print("split_digaree is confused")
            continue
        element_name = name[:-15] + "quench_sf_consts"
        if verbose:
            print(name, element_name)
        k_expansion.update({element_name: copy.deepcopy(json_dict[name])})
        k_expansion[element_name]['base_addr'] = json_dict[name]['base_addr'] + 4
        k_expansion[element_name]['addr_width'] = 2
        json_dict[name]['addr_width'] = 2
    json_dict.update(k_expansion)
def split_digaree ( json_dict , verbose = False ) : k_expansion = { } names = [ k for k in json_dict if 'piezo_sf_consts' in k ] for name in names : if json_dict [ name ] [ 'addr_width' ] != 3 : print ( "split_digaree is confused" ) continue element_name = name [ : - 15 ] + "quench_sf_consts" if verbose : print ( name , element_name ) k_expansion . update ( { element_name : copy . deepcopy ( json_dict [ name ] ) } ) k_expansion [ element_name ] [ 'base_addr' ] = json_dict [ name ] [ 'base_addr' ] + 4 k_expansion [ element_name ] [ 'addr_width' ] = 2 json_dict [ name ] [ 'addr_width' ] = 2 json_dict . update ( k_expansion )
Special-case to separate out quench-detection parameters from detuning
Special - case to separate out quench - detection parameters from detuning
''' Special-case to separate out quench-detection parameters from detuning
    '''
json_dict
verbose