def get_default_settings(sub_scripts, script_order, script_execution_freq, iterator_type):
        def populate_sweep_param(scripts, parameter_list, trace=''):
            '''
            Args:
                scripts: a dict of {'class name': <class object>} pairs
            Returns: A list of all parameters of the input scripts
            '''
            def get_parameter_from_dict(trace, dic, parameter_list, valid_values=None):
                if valid_values is None and isinstance(dic, Parameter):
                    valid_values = dic.valid_values
                for key, value in dic.items():
                    if isinstance(value, dict):
                        parameter_list = get_parameter_from_dict(trace + '.' + key, value, parameter_list,
                                                                 dic.valid_values[key])
                    elif (valid_values[key] in (float, int)) or \
                            (isinstance(valid_values[key], list) and valid_values[key][0] in (float, int)):
                        parameter_list.append(trace + '.' + key)
                    else:
                        print(('ignoring sweep parameter', key))
                return parameter_list
            for script_name in list(scripts.keys()):
                from pylabcontrol.core import ScriptIterator
                script_trace = trace
                if script_trace == '':
                    script_trace = script_name
                else:
                    script_trace = script_trace + '->' + script_name
                if issubclass(scripts[script_name], ScriptIterator):
                    populate_sweep_param(vars(scripts[script_name])['_SCRIPTS'], parameter_list=parameter_list,
                                         trace=script_trace)
                else:
                    for setting in \
                    [elem[1] for elem in inspect.getmembers(scripts[script_name]) if elem[0] == '_DEFAULT_SETTINGS'][0]:
                        parameter_list = get_parameter_from_dict(script_trace, setting, parameter_list)
            return parameter_list
        if iterator_type == 'loop':
            script_default_settings = [
                Parameter('script_order', script_order),
                Parameter('script_execution_freq', script_execution_freq),
                Parameter('num_loops', 0, int, 'times the subscripts will be executed'),
                Parameter('run_all_first', True, bool, 'Run all scripts with nonzero frequency in first pass')
            ]
        elif iterator_type == 'sweep':
            sweep_params = populate_sweep_param(sub_scripts, [])
            script_default_settings = [
                Parameter('script_order', script_order),
                Parameter('script_execution_freq', script_execution_freq),
                Parameter('sweep_param', sweep_params[0], sweep_params, 'variable over which to sweep'),
                Parameter('sweep_range',
                          [Parameter('min_value', 0, float, 'min parameter value'),
                           Parameter('max_value', 0, float, 'max parameter value'),
                           Parameter('N/value_step', 0, float,
                                     'either number of steps or parameter value step, depending on mode')]),
                Parameter('stepping_mode', 'N', ['N', 'value_step'],
                          'Switch between number of steps and step amount'),
                Parameter('run_all_first', True, bool, 'Run all scripts with nonzero frequency in first pass')
            ]
        else:
            print(('unknown iterator type ' + iterator_type))
            raise TypeError('unknown iterator type ' + iterator_type)
        return script_default_settings