def legacy(**kwargs):
    """
    Compute options for using the PHOEBE 1.0 legacy backend (must be
    installed).

    Generally, this will be used as an input to the kind argument in
    :meth:`phoebe.frontend.bundle.Bundle.add_compute`

    Please see :func:`phoebe.backend.backends.legacy` for a list of sources to
    cite when using this backend.

    :parameter **kwargs: defaults for the values of any of the parameters
    :return: a :class:`phoebe.parameters.parameters.ParameterSet` of all newly
        created :class:`phoebe.parameters.parameters.Parameter`s
    """
    params = []

    params += [BoolParameter(qualifier='enabled', copy_for={'context': 'dataset', 'kind': ['lc', 'rv', 'mesh'], 'dataset': '*'}, dataset='_default', value=kwargs.get('enabled', True), description='Whether to create synthetics in compute/fitting run')]

    # TODO: the kwargs need to match the qualifier names!
    # TODO: include MORE meshing options
    params += [ChoiceParameter(copy_for = {'kind': ['star'], 'component': '*'}, component='_default', qualifier='atm', value=kwargs.get('atm', 'extern_atmx'), choices=['extern_atmx', 'extern_planckint'], description='Atmosphere table')]
#    params += [ChoiceParameter(copy_for = {'kind': ['star'], 'component': '*'}, component='_default', qualifier='atm', value=kwargs.get('atm', 'kurucz'), choices=['kurucz', 'blackbody'], description='Atmosphere table')]
#    params += [ChoiceParameter(qualifier='morphology', value=kwargs.get('morphology','Detached binary'), choices=['Unconstrained binary system', 'Detached binary', 'Overcontact binary of the W UMa type', 'Overcontact binary not in thermal contact'], description='System type constraint')]
#    params += [BoolParameter(qualifier='cindex', value=kwargs.get('cindex', False), description='Color index constraint')]
#    params += [IntParameter(visible_if='cindex_switch:True', qualifier='cindex', value=kwargs.get('cindex', np.array([1.0])), description='Number of reflections')]
#    params += [BoolParameter(qualifier='heating', value=kwargs.get('heating', True), description='Allow irradiators to heat other components')]
    params += [IntParameter(copy_for={'kind': ['star'], 'component': '*'}, component='_default', qualifier='gridsize', value=kwargs.get('gridsize', 60), limits=(10,None), description='Number of meshpoints for WD')]

    params += [ChoiceParameter(qualifier='irrad_method', value=kwargs.get('irrad_method', 'wilson'), choices=['none', 'wilson'], description='Which method to use to handle irradiation/reflection effects')]
    params += [IntParameter(visible_if='irrad_method:wilson', qualifier='refl_num', value=kwargs.get('refl_num', 1), limits=(0,None), description='Number of reflections')]

#    params += [BoolParameter(qualifier='msc1', value=kwargs.get('msc1', False), description='Mainsequence Constraint for star 1')]
#    params += [BoolParameter(qualifier='msc2', value=kwargs.get('msc2', False), description='Mainsequence Constraint for star 2')]


    # TODO: can we come up with a better qualifier for reddening (and be consistent when we enable in phoebe2)
    params += [BoolParameter(qualifier='ie', value=kwargs.get('ie', False), description='Should data be de-reddened')]

    # TODO: can we change this to rv_method = ['flux_weighted', 'dynamical'] to be consistent with phoebe2?
    # TODO: can proximity_rv (rv_method) be copied for each dataset (see how this is done for phoebe2)?  This would probably mean that the wrapper would need to loop and make separate calls since PHOEBE1 can't handle different settings per-RV dataset
    params += [ChoiceParameter(qualifier='rv_method', copy_for = {'kind': ['rv'], 'component': '*', 'dataset': '*'}, component='_default', dataset='_default',
                               value=kwargs.get('rv_method', 'flux-weighted'), choices=['flux-weighted', 'dynamical'], description='Method to use for computing RVs (must be flux-weighted for Rossiter-McLaughlin)')]

    return ParameterSet(params)
def legacy ( ** kwargs ) : params = [ ] params += [ BoolParameter ( qualifier = 'enabled' , copy_for = { 'context' : 'dataset' , 'kind' : [ 'lc' , 'rv' , 'mesh' ] , 'dataset' : '*' } , dataset = '_default' , value = kwargs . get ( 'enabled' , True ) , description = 'Whether to create synthetics in compute/fitting run' ) ] params += [ ChoiceParameter ( copy_for = { 'kind' : [ 'star' ] , 'component' : '*' } , component = '_default' , qualifier = 'atm' , value = kwargs . get ( 'atm' , 'extern_atmx' ) , choices = [ 'extern_atmx' , 'extern_planckint' ] , description = 'Atmosphere table' ) ] params += [ IntParameter ( copy_for = { 'kind' : [ 'star' ] , 'component' : '*' } , component = '_default' , qualifier = 'gridsize' , value = kwargs . get ( 'gridsize' , 60 ) , limits = ( 10 , None ) , description = 'Number of meshpoints for WD' ) ] params += [ ChoiceParameter ( qualifier = 'irrad_method' , value = kwargs . get ( 'irrad_method' , 'wilson' ) , choices = [ 'none' , 'wilson' ] , description = 'Which method to use to handle irradiation/reflection effects' ) ] params += [ IntParameter ( visible_if = 'irrad_method:wilson' , qualifier = 'refl_num' , value = kwargs . get ( 'refl_num' , 1 ) , limits = ( 0 , None ) , description = 'Number of reflections' ) ] params += [ BoolParameter ( qualifier = 'ie' , value = kwargs . get ( 'ie' , False ) , description = 'Should data be de-reddened' ) ] params += [ ChoiceParameter ( qualifier = 'rv_method' , copy_for = { 'kind' : [ 'rv' ] , 'component' : '*' , 'dataset' : '*' } , component = '_default' , dataset = '_default' , value = kwargs . get ( 'rv_method' , 'flux-weighted' ) , choices = [ 'flux-weighted' , 'dynamical' ] , description = 'Method to use for computing RVs (must be flux-weighted for Rossiter-McLaughlin)' ) ] return ParameterSet ( params )
Compute options for using the PHOEBE 1.0 legacy backend (must be
    installed).

    Generally, this will be used as an input to the kind argument in
    :meth:`phoebe.frontend.bundle.Bundle.add_compute`

    Please see :func:`phoebe.backend.backends.legacy` for a list of sources to
    cite when using this backend.

    :parameter **kwargs: defaults for the values of any of the parameters
    :return: a :class:`phoebe.parameters.parameters.ParameterSet` of all newly
        created :class:`phoebe.parameters.parameters.Parameter`s