def calibrate_and_model_dpss(uvdata, horizon=1.0, min_dly=0.0, offset=0.0, include_autos=False, verbose=False, red_tol=1.0, notebook_progressbar=False, fg_model_comps_dict=None, **fitting_kwargs):
    "Simultaneously solve for gains and model foregrounds with DPSS vectors.\n\n    Parameters\n    ----------\n    uvdata: UVData object.\n        dataset to calibrate and filter.\n    horizon: float, optional\n        fraction of baseline delay length to model with dpss modes\n        unitless.\n        default is 1.\n    min_dly: float, optional\n        minimum delay to model with dpss models.\n        in units of ns.\n        default is 0.\n    offset: float optional\n        offset off of horizon wedge to include in dpss delay range.\n        in units of ns.\n        default is 0.\n    include_autos: bool, optional\n        if true, include autocorrelations in fitting.\n        default is False.\n    verbose: bool, optional\n        lots of text output\n        default is False.\n    red_tol: float, optional\n        tolerance for treating baselines as redundant (meters)\n        default is 1.0\n    notebook_progressbar: bool, optional\n        use progress bar optimized for notebook output.\n        default is False.\n    fg_model_comps_dict: dict, optional\n        dictionary containing precomputed foreground model components.\n        Currently only supported if use_redundancy is False.\n    fitting_kwargs: kwarg dict\n        additional kwargs for calibrate_and_model_pbl.\n        see docstring of calibrate_and_model_pbl.\n\n    Returns\n    -------\n    model: UVData object\n        uvdata object containing DPSS model of intrinsic foregrounds.\n    resid: UVData object\n        uvdata object containing residuals after subtracting model times gains and applying gains.\n    gains: UVCal object\n        uvcal object containing fitted gains.\n    fit_history:\n        dictionary containing fit history for each time-step and polarization in the data with fields:\n        'loss_history': list of values of the loss function in each minimization iteration.\n    "
    dpss_model_comps_dict = modeling.yield_pbl_dpss_model_comps(uvdata, horizon=horizon, min_dly=min_dly, offset=offset, include_autos=include_autos, red_tol=red_tol, notebook_progressbar=notebook_progressbar, verbose=verbose)
    (model, resid, gains, fitted_info) = calibrate_and_model_tensor(uvdata=uvdata, fg_model_comps_dict=dpss_model_comps_dict, include_autos=include_autos, verbose=verbose, notebook_progressbar=notebook_progressbar, **fitting_kwargs)
    return (model, resid, gains, fitted_info)
Simultaneously solve for gains and model foregrounds with DPSS vectors.

Parameters
----------
uvdata: UVData object.
    dataset to calibrate and filter.
horizon: float, optional
    fraction of baseline delay length to model with dpss modes
    unitless.
    default is 1.
min_dly: float, optional
    minimum delay to model with dpss models.
    in units of ns.
    default is 0.
offset: float optional
    offset off of horizon wedge to include in dpss delay range.
    in units of ns.
    default is 0.
include_autos: bool, optional
    if true, include autocorrelations in fitting.
    default is False.
verbose: bool, optional
    lots of text output
    default is False.
red_tol: float, optional
    tolerance for treating baselines as redundant (meters)
    default is 1.0
notebook_progressbar: bool, optional
    use progress bar optimized for notebook output.
    default is False.
fg_model_comps_dict: dict, optional
    dictionary containing precomputed foreground model components.
    Currently only supported if use_redundancy is False.
fitting_kwargs: kwarg dict
    additional kwargs for calibrate_and_model_pbl.
    see docstring of calibrate_and_model_pbl.

Returns
-------
model: UVData object
    uvdata object containing DPSS model of intrinsic foregrounds.
resid: UVData object
    uvdata object containing residuals after subtracting model times gains and applying gains.
gains: UVCal object
    uvcal object containing fitted gains.
fit_history:
    dictionary containing fit history for each time-step and polarization in the data with fields:
    'loss_history': list of values of the loss function in each minimization iteration.
def calibrate_and_model_dpss(uvdata, horizon=1.0, min_dly=0.0, offset=0.0, include_autos=False, verbose=False, red_tol=1.0, notebook_progressbar=False, fg_model_comps_dict=None, **fitting_kwargs):
    "Simultaneously solve for gains and model foregrounds with DPSS vectors.\n\n    Parameters\n    ----------\n    uvdata: UVData object.\n        dataset to calibrate and filter.\n    horizon: float, optional\n        fraction of baseline delay length to model with dpss modes\n        unitless.\n        default is 1.\n    min_dly: float, optional\n        minimum delay to model with dpss models.\n        in units of ns.\n        default is 0.\n    offset: float optional\n        offset off of horizon wedge to include in dpss delay range.\n        in units of ns.\n        default is 0.\n    include_autos: bool, optional\n        if true, include autocorrelations in fitting.\n        default is False.\n    verbose: bool, optional\n        lots of text output\n        default is False.\n    red_tol: float, optional\n        tolerance for treating baselines as redundant (meters)\n        default is 1.0\n    notebook_progressbar: bool, optional\n        use progress bar optimized for notebook output.\n        default is False.\n    fg_model_comps_dict: dict, optional\n        dictionary containing precomputed foreground model components.\n        Currently only supported if use_redundancy is False.\n    fitting_kwargs: kwarg dict\n        additional kwargs for calibrate_and_model_pbl.\n        see docstring of calibrate_and_model_pbl.\n\n    Returns\n    -------\n    model: UVData object\n        uvdata object containing DPSS model of intrinsic foregrounds.\n    resid: UVData object\n        uvdata object containing residuals after subtracting model times gains and applying gains.\n    gains: UVCal object\n        uvcal object containing fitted gains.\n    fit_history:\n        dictionary containing fit history for each time-step and polarization in the data with fields:\n        'loss_history': list of values of the loss function in each minimization iteration.\n    "
    dpss_model_comps_dict = modeling.yield_pbl_dpss_model_comps(uvdata, horizon=horizon, min_dly=min_dly, offset=offset, include_autos=include_autos, red_tol=red_tol, notebook_progressbar=notebook_progressbar, verbose=verbose)
    (model, resid, gains, fitted_info) = calibrate_and_model_tensor(uvdata=uvdata, fg_model_comps_dict=dpss_model_comps_dict, include_autos=include_autos, verbose=verbose, notebook_progressbar=notebook_progressbar, **fitting_kwargs)
    return (model, resid, gains, fitted_info)