Module Expr Str Import alias identifier ImportFrom alias identifier ImportFrom alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num Num NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr IfExp CompareIsNot NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Num BinOpDiv NameLoad Num Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad TryExcept body Assign AttributeStore NameLoad attr Call SubscriptLoad AttributeLoad NameLoad attr Index Str NameLoad handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr orelse Assign NameStore Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num orelse Assign NameStore Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Str orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str AugAssignAdd NameStore BinOpAdd BinOpAdd Str NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body Expr Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr IfExp CompareIsNot NameLoad NameLoad NameLoad BinOpMult ListLoad NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str NameLoad body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index AttributeLoad NameLoad attr Slice Slice keyword SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str NameLoad body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str TryExcept body Expr Call NameLoad AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Assert CompareIsNot NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index AttributeLoad NameLoad attr Slice Slice keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr CompareIs AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr CompareIs AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index AttributeLoad NameLoad attr Slice Slice Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index AttributeLoad NameLoad attr Slice Slice Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign NameStore Call Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad NameLoad body Assign NameStore NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignDiv NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword AttributeLoad NameLoad attr keyword NameLoad orelse Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Return TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice Index AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword NameLoad If BoolOpOr CompareIs NameLoad NameLoad NameLoad body Assign NameStore NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad AugAssignDiv NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword AttributeLoad NameLoad attr keyword NameLoad orelse Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Return TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index AttributeLoad NameLoad attr Slice Slice AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad If BoolOpOr CompareIs NameLoad NameLoad NameLoad body Assign NameStore NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad NameLoad AugAssignDiv NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword AttributeLoad NameLoad attr keyword NameLoad orelse Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Return TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign TupleStore NameStore NameStore NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call NameLoad Num BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice Index NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Index AttributeLoad NameLoad attr Slice Slice Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Slice Slice Slice Index NameLoad Call Call NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign TupleStore NameStore NameStore TupleLoad NameLoad BinOpSub BinOpAdd NameLoad NameLoad Num Assign SubscriptStore NameLoad Index NameLoad BoolOpAnd CompareGtE NameLoad SubscriptLoad NameLoad Index Num CompareLtE NameLoad SubscriptLoad NameLoad Index Num If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Slice Slice Index NameLoad keyword Num keyword NameLoad AugAssignSub NameStore NameLoad If BoolOpOr CompareIs NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore BinOpAdd BinOpDiv BinOpMult Num NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpSub BinOpDiv SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num AttributeLoad NameLoad attr BinOpDiv BinOpMult Num NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad NameLoad If CompareEq NameLoad Str body Assign NameStore ListLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword ListLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword ListLoad NameLoad NameLoad keyword Num keyword AttributeLoad NameLoad attr keyword NameLoad orelse Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq NameLoad Str body If CompareEq NameLoad Num body For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign SubscriptStore NameLoad ExtSlice Index NameLoad Index NameLoad Slice Slice Num Assign NameStore ListLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword ListLoad NameLoad NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Return TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad NameLoad body Assign NameStore NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Num orelse If CompareIs AttributeLoad NameLoad attr Str body Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword AttributeLoad NameLoad attr keyword NameLoad orelse Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Return TupleLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If BoolOpAnd CompareIs AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body ImportFrom alias Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If CompareIs AttributeLoad NameLoad attr NameLoad body ImportFrom alias Assign AttributeStore NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If BoolOpAnd NameLoad UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore IfExp CompareIsNot AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore IfExp CompareIsNot AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn NameLoad ListLoad Str Str Str Str body Return Call AttributeLoad NameLoad attr NameLoad orelse If CompareIn NameLoad ListLoad Str Str body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad decorator_list
N/A N/A 
Summary
-------
Object oriented API to SCoT.

Extended Summary
----------------
The object oriented API provides a the `Workspace` class, which provides high-level functionality and serves as an
example usage of the low-level API.
 N/A numpy np N/A backend global_backend varica mvarica cspvarica plainica plainica datatools dot_special atleast_3d connectivity Connectivity connectivity_statistics surrogate_connectivity bootstrap_connectivity test_bootstrap_difference connectivity_statistics significance_fdr Workspace N/A object N/A N/A SCoT Workspace

    This class provides high-level functionality for source identification, connectivity estimation, and visualization.

    Parameters
    ----------
    var : {:class:`~scot.var.VARBase`-like object, dict}
        Vector autoregressive model (VAR) object that is used for model fitting.
        This can also be a dictionary that is passed as `**kwargs` to backend['var']() in order to
        construct a new VAR model object.
    locations : array_like, optional
        3D Electrode locations. Each row holds the x, y, and z coordinates of an electrode.
    reducedim : {int, float, 'no_pca'}, optional
        A number of less than 1 in interpreted as the fraction of variance that should remain in the data. All
        components that describe in total less than `1-reducedim` of the variance are removed by the PCA step.
        An integer number of 1 or greater is interpreted as the number of components to keep after applying the PCA.
        If set to 'no_pca' the PCA step is skipped.
    nfft : int, optional
        Number of frequency bins for connectivity estimation.
    backend : dict-like, optional
        Specify backend to use. When set to None the backend configured in config.backend is used.

    Attributes
    ----------
    `unmixing_` : array
        Estimated unmixing matrix.
    `mixing_` : array
        Estimated mixing matrix.
    `plot_diagonal` : str
        Configures what is plotted in the diagonal subplots.
        **'topo'** (default) plots topoplots on the diagonal,
        **'S'** plots the spectral density of each component, and
        **'fill'** plots connectivity on the diagonal.
    `plot_outside_topo` : bool
        Whether to place topoplots in the left column and top row.
    `plot_f_range` : (int, int)
        Lower and upper frequency limits for plotting. Defaults to [0, fs/2].
     __init__ N/A N/A self var locations reducedim nfft fs backend N/A None None 512 2 None N/A N/A N/A self data_ None N/A N/A self cl_ None N/A N/A self fs_ fs N/A N/A self time_offset_ 0 N/A N/A self unmixing_ None N/A N/A self mixing_ None N/A N/A self premixing_ None N/A N/A self activations_ None N/A N/A self connectivity_ None N/A N/A self locations_ locations N/A N/A self reducedim_ reducedim N/A N/A self nfft_ nfft N/A N/A self backend_ N/A N/A backend None backend global_backend N/A N/A self trial_mask_ N/A N/A N/A self topo_ None N/A N/A self mixmaps_ N/A N/A N/A self unmixmaps_ N/A N/A N/A self var_multiclass_ None N/A N/A self var_model_ None N/A N/A self var_cov_ None N/A N/A self plot_diagonal topo N/A N/A self plot_outside_topo False N/A N/A self plot_f_range N/A 0 N/A fs 2 N/A N/A self topo_clipping electrodes N/A N/A self _plotting None N/A N/A N/A N/A self var_ N/A N/A N/A self backend_ N/A var var N/A N/A N/A TypeError N/A N/A N/A self var_ var N/A __str__ N/A N/A self N/A N/A N/A N/A N/A self data_ None N/A N/A datastr N/A %d trials, %d channels, %d samples N/A N/A self data_ shape N/A N/A datastr None N/A N/A N/A self cl_ None N/A N/A clstr N/A str N/A N/A np unique N/A self cl_ N/A N/A clstr None N/A N/A N/A self unmixing_ None N/A N/A sourcestr N/A str N/A N/A N/A self unmixing_ shape N/A 1 N/A N/A sourcestr None N/A N/A N/A self var_ None N/A N/A varstr None N/A N/A varstr N/A str N/A self var_ N/A s Workspace:
 N/A s N/A N/A   Data      :  datastr N/A s N/A N/A   Classes   :  clstr N/A s N/A N/A   Sources   :  sourcestr N/A s N/A N/A   VAR models:  varstr N/A s N/A set_locations N/A N/A self locations N/A N/A N/A  Set sensor locations.

        Parameters
        ----------
        locations : array_like
            3D Electrode locations. Each row holds the x, y, and z coordinates of an electrode.

        Returns
        -------
        self : Workspace
            The Workspace object.
         N/A N/A self locations_ locations N/A self N/A set_premixing N/A N/A self premixing N/A N/A N/A  Set premixing matrix.

        The premixing matrix maps data to physical channels. If the data is actual channel data,
        the premixing matrix can be set to identity. Use this functionality if the data was pre-
        transformed with e.g. PCA.

        Parameters
        ----------
        premixing : array_like, shape = [n_signals, n_channels]
            Matrix that maps data signals to physical channels.

        Returns
        -------
        self : Workspace
            The Workspace object.
         N/A N/A self premixing_ premixing N/A self N/A set_data N/A N/A self data cl time_offset N/A None 0 N/A N/A  Assign data to the workspace.

        This function assigns a new data set to the workspace. Doing so invalidates currently fitted VAR models,
        connectivity estimates, and activations.

        Parameters
        ----------
        data : array-like, shape = [n_trials, n_channels, n_samples] or [n_channels, n_samples]
            EEG data set
        cl : list of valid dict keys
            Class labels associated with each trial.
        time_offset : float, optional
            Trial starting time; used for labelling the x-axis of time/frequency plots.

        Returns
        -------
        self : Workspace
            The Workspace object.
         N/A N/A self data_ N/A atleast_3d data N/A N/A self cl_ N/A N/A np asarray N/A N/A cl None cl N/A N/A None N/A N/A N/A self data_ shape N/A 0 N/A N/A self time_offset_ time_offset N/A N/A self var_model_ None N/A N/A self var_cov_ None N/A N/A self connectivity_ None N/A N/A self trial_mask_ N/A N/A np ones N/A N/A self cl_ size dtype bool N/A N/A N/A self unmixing_ None N/A N/A N/A self activations_ N/A dot_special N/A N/A self unmixing_ T N/A self data_ N/A self N/A set_used_labels N/A N/A self labels N/A N/A N/A  Specify which trials to use in subsequent analysis steps.

        This function masks trials based on their class labels.

        Parameters
        ----------
        labels : list of class labels
            Marks all trials that have a label that is in the `labels` list for further processing.

        Returns
        -------
        self : Workspace
            The Workspace object.
         N/A mask N/A N/A np zeros N/A N/A self cl_ size dtype bool N/A l labels N/A N/A mask N/A N/A np logical_or mask N/A N/A self cl_ l N/A N/A self trial_mask_ mask N/A self N/A do_mvarica N/A N/A self varfit random_state N/A ensemble None N/A N/A  Perform MVARICA

        Perform MVARICA source decomposition and VAR model fitting.

        Parameters
        ----------
        varfit : string
            Determines how to calculate the residuals for source decomposition.
            'ensemble' (default) fits one model to the whole data set,
            'class' fits a different model for each class, and
            'trial' fits a different model for each individual trial.

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain data.

        See Also
        --------
        :func:`mvarica` : MVARICA implementation
         N/A N/A N/A self data_ None N/A N/A N/A RuntimeError MVARICA requires data to be set N/A result N/A mvarica x N/A N/A self data_ N/A N/A N/A self trial_mask_ N/A N/A cl N/A N/A self cl_ N/A N/A self trial_mask_ var N/A self var_ reducedim N/A self reducedim_ backend N/A self backend_ varfit varfit random_state random_state N/A N/A self mixing_ N/A result mixing N/A N/A self unmixing_ N/A result unmixing N/A N/A self var_ N/A result b N/A N/A self connectivity_ N/A Connectivity N/A N/A result b coef N/A N/A result b rescov N/A self nfft_ N/A N/A self activations_ N/A dot_special N/A N/A self unmixing_ T N/A self data_ N/A N/A self mixmaps_ N/A N/A N/A self unmixmaps_ N/A N/A self N/A do_cspvarica N/A N/A self varfit random_state N/A ensemble None N/A N/A  Perform CSPVARICA

        Perform CSPVARICA source decomposition and VAR model fitting.

        Parameters
        ----------
        varfit : string
            Determines how to calculate the residuals for source decomposition.
            'ensemble' (default) fits one model to the whole data set,
            'class' fits a different model for each class, and
            'trial' fits a different model for each individual trial.

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain data.

        See Also
        --------
        :func:`cspvarica` : CSPVARICA implementation
         N/A N/A N/A self data_ None N/A N/A N/A RuntimeError CSPVARICA requires data to be set N/A N/A N/A N/A sorted N/A self cl_ N/A c N/A self cl_ N/A N/A N/A c None N/A N/A N/A N/A TypeError AssertionError N/A N/A N/A RuntimeError CSPVARICA requires orderable and hashable class labels that are not None N/A result N/A cspvarica x N/A self data_ var N/A self var_ cl N/A self cl_ reducedim N/A self reducedim_ backend N/A self backend_ varfit varfit random_state random_state N/A N/A self mixing_ N/A result mixing N/A N/A self unmixing_ N/A result unmixing N/A N/A self var_ N/A result b N/A N/A self connectivity_ N/A Connectivity N/A N/A self var_ coef N/A N/A self var_ rescov N/A self nfft_ N/A N/A self activations_ N/A dot_special N/A N/A self unmixing_ T N/A self data_ N/A N/A self mixmaps_ N/A N/A N/A self unmixmaps_ N/A N/A self N/A do_ica N/A N/A self random_state N/A None N/A N/A  Perform ICA

        Perform plain ICA source decomposition.

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain data.
         N/A N/A N/A self data_ None N/A N/A N/A RuntimeError ICA requires data to be set N/A result N/A plainica x N/A N/A self data_ N/A N/A N/A self trial_mask_ N/A N/A reducedim N/A self reducedim_ backend N/A self backend_ random_state random_state N/A N/A self mixing_ N/A result mixing N/A N/A self unmixing_ N/A result unmixing N/A N/A self activations_ N/A dot_special N/A N/A self unmixing_ T N/A self data_ N/A N/A self var_model_ None N/A N/A self var_cov_ None N/A N/A self connectivity_ None N/A N/A self mixmaps_ N/A N/A N/A self unmixmaps_ N/A N/A self N/A remove_sources N/A N/A self sources N/A N/A N/A  Remove sources from the decomposition.

        This function removes sources from the decomposition. Doing so invalidates currently fitted VAR models and
        connectivity estimates.

        Parameters
        ----------
        sources : {slice, int, array of ints}
            Indices of components to remove.

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain a source decomposition.
         N/A N/A N/A N/A self unmixing_ None N/A N/A self mixing_ None N/A N/A N/A RuntimeError No sources available (run do_mvarica first) N/A N/A self mixing_ N/A N/A np delete N/A self mixing_ sources 0 N/A N/A self unmixing_ N/A N/A np delete N/A self unmixing_ sources 1 N/A N/A N/A self activations_ None N/A N/A N/A self activations_ N/A N/A np delete N/A self activations_ sources 1 N/A N/A self var_model_ None N/A N/A self var_cov_ None N/A N/A self connectivity_ None N/A N/A self mixmaps_ N/A N/A N/A self unmixmaps_ N/A N/A self N/A keep_sources N/A N/A self keep N/A N/A N/A Keep only the specified sources in the decomposition.
         N/A N/A N/A N/A self unmixing_ None N/A N/A self mixing_ None N/A N/A N/A RuntimeError No sources available (run do_mvarica first) N/A n_sources N/A N/A N/A self mixing_ shape N/A 0 N/A N/A N/A self remove_sources N/A N/A np setdiff1d N/A N/A np arange n_sources N/A N/A np array keep N/A self N/A fit_var N/A N/A self N/A N/A N/A  Fit a VAR model to the source activations.

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain source activations.
         N/A N/A N/A self activations_ None N/A N/A N/A RuntimeError VAR fitting requires source activations (run do_mvarica first) N/A N/A N/A N/A self var_ fit data N/A N/A self activations_ N/A N/A N/A self trial_mask_ N/A N/A N/A N/A self connectivity_ N/A Connectivity N/A N/A self var_ coef N/A N/A self var_ rescov N/A self nfft_ N/A self N/A optimize_var N/A N/A self N/A N/A N/A  Optimize the VAR model's hyperparameters (such as regularization).

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain source activations.
         N/A N/A N/A self activations_ None N/A N/A N/A RuntimeError VAR fitting requires source activations (run do_mvarica first) N/A N/A N/A N/A self var_ optimize N/A N/A self activations_ N/A N/A N/A self trial_mask_ N/A N/A N/A self N/A get_connectivity N/A N/A self measure_name plot N/A False N/A N/A  Calculate spectral connectivity measure.

        Parameters
        ----------
        measure_name : str
            Name of the connectivity measure to calculate. See :class:`Connectivity` for supported measures.
        plot : {False, None, Figure object}, optional
            Whether and where to plot the connectivity. If set to **False**, nothing is plotted. Otherwise set to the
            Figure object. If set to **None**, a new figure is created.

        Returns
        -------
        measure : array, shape = [n_channels, n_channels, nfft]
            Values of the connectivity measure.
        fig : Figure object
            Instance of the figure in which was plotted. This is only returned if `plot` is not **False**.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain a fitted VAR model.
         N/A N/A N/A self connectivity_ None N/A N/A N/A RuntimeError Connectivity requires a VAR model (run do_mvarica or fit_var first) N/A cm N/A N/A getattr N/A self connectivity_ measure_name N/A cm N/A N/A N/A np any N/A N/A np iscomplex cm N/A N/A np abs cm cm N/A N/A N/A plot None plot N/A N/A fig plot N/A N/A N/A self plot_diagonal fill N/A N/A diagonal 0 N/A N/A N/A N/A self plot_diagonal S N/A N/A diagonal -1 N/A sm N/A N/A np abs N/A N/A N/A self connectivity_ S N/A sm N/A N/A np max sm N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum sm fs N/A self fs_ freq_range N/A self plot_f_range diagonal 1 border N/A self plot_outside_topo fig fig N/A N/A diagonal -1 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum cm fs N/A self fs_ freq_range N/A self plot_f_range diagonal diagonal border N/A self plot_outside_topo fig fig N/A N/A cm fig N/A cm N/A get_surrogate_connectivity N/A N/A self measure_name repeats plot random_state N/A 100 False None N/A N/A  Calculate spectral connectivity measure under the assumption of no actual connectivity.

        Repeatedly samples connectivity from phase-randomized data. This provides estimates of the connectivity
        distribution if there was no causal structure in the data.

        Parameters
        ----------
        measure_name : str
            Name of the connectivity measure to calculate. See :class:`Connectivity` for supported measures.
        repeats : int, optional
            How many surrogate samples to take.

        Returns
        -------
        measure : array, shape = [`repeats`, n_channels, n_channels, nfft]
            Values of the connectivity measure for each surrogate.

        See Also
        --------
        :func:`scot.connectivity_statistics.surrogate_connectivity` : Calculates surrogate connectivity
         N/A cs N/A surrogate_connectivity measure_name N/A N/A self activations_ N/A N/A N/A N/A N/A self trial_mask_ N/A self var_ N/A self nfft_ repeats random_state random_state N/A N/A N/A plot None plot N/A N/A fig plot N/A N/A N/A self plot_diagonal fill N/A N/A diagonal 0 N/A N/A N/A N/A self plot_diagonal S N/A N/A diagonal -1 N/A sb N/A N/A self get_surrogate_connectivity absS repeats N/A sb N/A N/A np max sb N/A su N/A N/A np percentile sb 95 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A su fs N/A self fs_ freq_range N/A self plot_f_range diagonal 1 border N/A self plot_outside_topo fig fig N/A N/A diagonal -1 N/A cu N/A N/A np percentile cs 95 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A cu fs N/A self fs_ freq_range N/A self plot_f_range diagonal diagonal border N/A self plot_outside_topo fig fig N/A N/A cs fig N/A cs N/A get_bootstrap_connectivity N/A N/A self measure_names repeats num_samples plot random_state N/A 100 None False None N/A N/A  Calculate bootstrap estimates of spectral connectivity measures.

        Bootstrapping is performed on trial level.

        Parameters
        ----------
        measure_names : {str, list of str}
            Name(s) of the connectivity measure(s) to calculate. See :class:`Connectivity` for supported measures.
        repeats : int, optional
            How many bootstrap estimates to take.
        num_samples : int, optional
            How many samples to take for each bootstrap estimates. Defaults to the same number of trials as present in
            the data.

        Returns
        -------
        measure : array, shape = [`repeats`, n_channels, n_channels, nfft]
            Values of the connectivity measure for each bootstrap estimate. If `measure_names` is a list of strings a
            dictionary is returned, where each key is the name of the measure, and the corresponding values are
            ndarrays of shape [`repeats`, n_channels, n_channels, nfft].

        See Also
        --------
        :func:`scot.connectivity_statistics.bootstrap_connectivity` : Calculates bootstrap connectivity
         N/A N/A num_samples None N/A N/A num_samples N/A N/A np sum N/A self trial_mask_ N/A cb N/A bootstrap_connectivity measure_names N/A N/A self activations_ N/A N/A N/A self trial_mask_ N/A N/A N/A self var_ N/A self nfft_ repeats num_samples random_state random_state N/A N/A N/A plot None plot N/A N/A fig plot N/A N/A N/A self plot_diagonal fill N/A N/A diagonal 0 N/A N/A N/A N/A self plot_diagonal S N/A N/A diagonal -1 N/A sb N/A N/A self get_bootstrap_connectivity absS repeats num_samples N/A sb N/A N/A np max sb N/A sm N/A N/A np median sb axis 0 N/A sl N/A N/A np percentile sb 2.5 axis 0 N/A su N/A N/A np percentile sb 97.5 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A sm sl su fs N/A self fs_ freq_range N/A self plot_f_range diagonal 1 border N/A self plot_outside_topo fig fig N/A N/A diagonal -1 N/A cm N/A N/A np median cb axis 0 N/A cl N/A N/A np percentile cb 2.5 axis 0 N/A cu N/A N/A np percentile cb 97.5 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A cm cl cu fs N/A self fs_ freq_range N/A self plot_f_range diagonal diagonal border N/A self plot_outside_topo fig fig N/A N/A cb fig N/A cb N/A get_tf_connectivity N/A N/A self measure_name winlen winstep plot baseline crange N/A False None default N/A N/A  Calculate estimate of time-varying connectivity.

        Connectivity is estimated in a sliding window approach on the current data set. The window is stepped
        `n_steps` = (`n_samples` - `winlen`) // `winstep` times.

        Parameters
        ----------
        measure_name : str
            Name of the connectivity measure to calculate. See :class:`Connectivity` for supported measures.
        winlen : int
            Length of the sliding window (in samples).
        winstep : int
            Step size for sliding window (in samples).
        plot : {False, None, Figure object}, optional
            Whether and where to plot the connectivity. If set to **False**, nothing is plotted. Otherwise set to the
            Figure object. If set to **None**, a new figure is created.
        baseline : [int, int] or None
            Start and end of the baseline period in samples. The baseline is subtracted from the connectivity. It is
            computed as the average of all windows that contain start or end, or fall between start and end.
            If set to None no baseline is subtracted.

        Returns
        -------
        result : array, shape = [n_channels, n_channels, nfft, n_steps]
            Values of the connectivity measure.
        fig : Figure object, optional
            Instance of the figure in which was plotted. This is only returned if `plot` is not **False**.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain a fitted VAR model.
         N/A N/A N/A self activations_ None N/A N/A N/A RuntimeError Time/Frequency Connectivity requires activations (call set_data after do_mvarica) N/A N/A _ m n N/A N/A self activations_ shape N/A steps N/A list N/A range 0 N/A n winlen winstep N/A nstep N/A len steps N/A result N/A N/A np zeros N/A m m N/A self nfft_ nstep N/A np complex64 N/A N/A i j N/A enumerate steps N/A N/A win N/A N/A N/A np arange winlen j N/A data N/A N/A self activations_ N/A N/A N/A N/A win N/A data N/A data N/A N/A N/A self trial_mask_ N/A N/A N/A N/A N/A N/A self var_ fit data N/A con N/A Connectivity N/A N/A self var_ coef N/A N/A self var_ rescov N/A self nfft_ N/A N/A result N/A N/A N/A N/A N/A i N/A N/A getattr con measure_name N/A baseline N/A N/A inref N/A N/A np zeros nstep bool N/A N/A i j N/A enumerate steps N/A N/A N/A a b N/A j N/A N/A j winlen 1 N/A N/A inref N/A i N/A N/A b N/A baseline N/A 0 N/A a N/A baseline N/A 1 N/A N/A N/A np any inref N/A N/A ref N/A N/A np mean N/A result N/A N/A N/A N/A N/A inref axis 3 keepdims True N/A result ref N/A N/A N/A plot None plot N/A N/A fig plot N/A t0 N/A N/A N/A 0.5 winlen N/A self fs_ N/A self time_offset_ N/A t1 N/A N/A N/A N/A N/A N/A self data_ shape N/A 2 N/A self fs_ N/A N/A 0.5 winlen N/A self fs_ N/A self time_offset_ N/A N/A N/A self plot_diagonal fill N/A N/A diagonal 0 N/A N/A N/A N/A self plot_diagonal S N/A N/A diagonal -1 N/A s N/A N/A np abs N/A N/A self get_tf_connectivity S winlen winstep N/A N/A crange default N/A N/A crange N/A N/A N/A np min s N/A N/A np max s N/A fig N/A N/A N/A self plotting plot_connectivity_timespectrum s fs N/A self fs_ crange N/A N/A N/A np min s N/A N/A np max s freq_range N/A self plot_f_range time_range N/A t0 t1 diagonal 1 border N/A self plot_outside_topo fig fig N/A N/A diagonal -1 N/A tfc N/A N/A self _clean_measure measure_name result N/A N/A crange default N/A N/A N/A diagonal -1 N/A N/A m N/A range N/A N/A tfc shape N/A 0 N/A N/A N/A tfc N/A N/A m N/A m N/A N/A 0 N/A crange N/A N/A N/A np min tfc N/A N/A np max tfc N/A fig N/A N/A N/A self plotting plot_connectivity_timespectrum tfc fs N/A self fs_ crange crange freq_range N/A self plot_f_range time_range N/A t0 t1 diagonal diagonal border N/A self plot_outside_topo fig fig N/A N/A result fig N/A result N/A compare_conditions N/A N/A self labels1 labels2 measure_name alpha repeats num_samples plot random_state N/A 0.01 100 None False None N/A N/A  Test for significant difference in connectivity of two sets of class labels.

        Connectivity estimates are obtained by bootstrapping. Correction for multiple testing is performed by
        controlling the false discovery rate (FDR).

        Parameters
        ----------
        labels1, labels2 : list of class labels
            The two sets of class labels to compare. Each set may contain more than one label.
        measure_name : str
            Name of the connectivity measure to calculate. See :class:`Connectivity` for supported measures.
        alpha : float, optional
            Maximum allowed FDR. The ratio of falsely detected significant differences is guaranteed to be less than
            `alpha`.
        repeats : int, optional
            How many bootstrap estimates to take.
        num_samples : int, optional
            How many samples to take for each bootstrap estimates. Defaults to the same number of trials as present in
            the data.
        plot : {False, None, Figure object}, optional
            Whether and where to plot the connectivity. If set to **False**, nothing is plotted. Otherwise set to the
            Figure object. If set to **None**, a new figure is created.

        Returns
        -------
        p : array, shape = [n_channels, n_channels, nfft]
            Uncorrected p-values.
        s : array, dtype=bool, shape = [n_channels, n_channels, nfft]
            FDR corrected significance. True means the difference is significant in this location.
        fig : Figure object, optional
            Instance of the figure in which was plotted. This is only returned if `plot` is not **False**.
         N/A N/A N/A self set_used_labels labels1 N/A ca N/A N/A self get_bootstrap_connectivity measure_name repeats num_samples random_state random_state N/A N/A N/A self set_used_labels labels2 N/A cb N/A N/A self get_bootstrap_connectivity measure_name repeats num_samples random_state random_state N/A p N/A test_bootstrap_difference ca cb N/A s N/A significance_fdr p alpha N/A N/A N/A plot None plot N/A N/A fig plot N/A N/A N/A self plot_diagonal topo N/A N/A diagonal -1 N/A N/A N/A N/A self plot_diagonal fill N/A N/A diagonal 0 N/A N/A N/A N/A self plot_diagonal S N/A N/A diagonal -1 N/A N/A N/A self set_used_labels labels1 N/A sa N/A N/A self get_bootstrap_connectivity absS repeats num_samples N/A sm N/A N/A np median sa axis 0 N/A sl N/A N/A np percentile sa 2.5 axis 0 N/A su N/A N/A np percentile sa 97.5 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A sm sl su fs N/A self fs_ freq_range N/A self plot_f_range diagonal 1 border N/A self plot_outside_topo fig fig N/A N/A N/A self set_used_labels labels2 N/A sb N/A N/A self get_bootstrap_connectivity absS repeats num_samples N/A sm N/A N/A np median sb axis 0 N/A sl N/A N/A np percentile sb 2.5 axis 0 N/A su N/A N/A np percentile sb 97.5 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A sm sl su fs N/A self fs_ freq_range N/A self plot_f_range diagonal 1 border N/A self plot_outside_topo fig fig N/A p_s N/A test_bootstrap_difference ca cb N/A s_s N/A significance_fdr p_s alpha N/A N/A N/A N/A self plotting plot_connectivity_significance s_s fs N/A self fs_ freq_range N/A self plot_f_range diagonal 1 border N/A self plot_outside_topo fig fig N/A N/A diagonal -1 N/A cm N/A N/A np median ca axis 0 N/A cl N/A N/A np percentile ca 2.5 axis 0 N/A cu N/A N/A np percentile ca 97.5 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A cm cl cu fs N/A self fs_ freq_range N/A self plot_f_range diagonal diagonal border N/A self plot_outside_topo fig fig N/A cm N/A N/A np median cb axis 0 N/A cl N/A N/A np percentile cb 2.5 axis 0 N/A cu N/A N/A np percentile cb 97.5 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A cm cl cu fs N/A self fs_ freq_range N/A self plot_f_range diagonal diagonal border N/A self plot_outside_topo fig fig N/A N/A N/A N/A self plotting plot_connectivity_significance s fs N/A self fs_ freq_range N/A self plot_f_range diagonal diagonal border N/A self plot_outside_topo fig fig N/A N/A p s fig N/A N/A p s N/A show_plots N/A N/A self N/A N/A N/A Show current plots.

        This is only a convenience wrapper around :func:`matplotlib.pyplot.show_plots`.

         N/A N/A N/A N/A self plotting show_plots N/A plot_source_topos N/A N/A self common_scale N/A None N/A N/A  Plot topography of the Source decomposition.

        Parameters
        ----------
        common_scale : float, optional
            If set to None, each topoplot's color axis is scaled individually. Otherwise specifies the percentile
            (1-99) of values in all plot. This value is taken as the maximum color scale.
         N/A N/A N/A N/A self unmixing_ None N/A N/A self mixing_ None N/A N/A N/A RuntimeError No sources available (run do_mvarica first) N/A N/A N/A self _prepare_plots True True N/A N/A N/A N/A self plotting plot_sources N/A self topo_ N/A self mixmaps_ N/A self unmixmaps_ common_scale N/A plot_connectivity_topos N/A N/A self fig N/A None N/A N/A  Plot scalp projections of the sources.

        This function only plots the topos. Use in combination with connectivity plotting.

        Parameters
        ----------
        fig : {None, Figure object}, optional
            Where to plot the topos. f set to **None**, a new figure is created. Otherwise plot into the provided
            figure object.

        Returns
        -------
        fig : Figure object
            Instance of the figure in which was plotted.
         N/A N/A N/A self _prepare_plots True False N/A N/A self plot_outside_topo N/A N/A fig N/A N/A N/A self plotting plot_connectivity_topos outside N/A self topo_ N/A self mixmaps_ fig N/A N/A N/A N/A self plot_diagonal topo N/A N/A fig N/A N/A N/A self plotting plot_connectivity_topos diagonal N/A self topo_ N/A self mixmaps_ fig N/A fig N/A plot_connectivity_surrogate N/A N/A self measure_name repeats fig N/A 100 None N/A N/A  Plot spectral connectivity measure under the assumption of no actual connectivity.

        Repeatedly samples connectivity from phase-randomized data. This provides estimates of the connectivity
        distribution if there was no causal structure in the data.

        Parameters
        ----------
        measure_name : str
            Name of the connectivity measure to calculate. See :class:`Connectivity` for supported measures.
        repeats : int, optional
            How many surrogate samples to take.
        fig : {None, Figure object}, optional
            Where to plot the topos. f set to **None**, a new figure is created. Otherwise plot into the provided
            figure object.

        Returns
        -------
        fig : Figure object
            Instance of the figure in which was plotted.
         N/A cb N/A N/A self get_surrogate_connectivity measure_name repeats N/A N/A N/A self _prepare_plots True False N/A cu N/A N/A np percentile cb 95 axis 0 N/A fig N/A N/A N/A self plotting plot_connectivity_spectrum N/A cu N/A self fs_ freq_range N/A self plot_f_range fig fig N/A fig N/A plotting N/A N/A self N/A N/A N/A N/A N/A self _plotting N/A N/A plotting N/A N/A self _plotting plotting N/A N/A self _plotting N/A property _prepare_plots N/A N/A self mixing unmixing N/A False False N/A N/A N/A N/A self locations_ None N/A N/A N/A RuntimeError Need sensor locations for plotting N/A N/A N/A self topo_ None N/A scot.eegtopo.topoplot Topoplot N/A N/A self topo_ N/A Topoplot clipping N/A self topo_clipping N/A N/A N/A N/A self topo_ set_locations N/A self locations_ N/A N/A mixing N/A N/A self mixmaps_ N/A N/A premix N/A N/A N/A self premixing_ None N/A self premixing_ N/A N/A np eye N/A N/A N/A self mixing_ shape N/A 1 N/A N/A self mixmaps_ N/A N/A N/A self plotting prepare_topoplots N/A self topo_ N/A N/A np dot N/A self mixing_ premix N/A N/A unmixing N/A N/A self unmixmaps_ N/A N/A preinv N/A N/A N/A self premixing_ None N/A N/A N/A np linalg pinv N/A self premixing_ N/A N/A np eye N/A N/A N/A self unmixing_ shape N/A 0 N/A N/A self unmixmaps_ N/A N/A N/A self plotting prepare_topoplots N/A self topo_ N/A N/A N/A np dot preinv N/A self unmixing_ T N/A _clean_measure N/A N/A measure a N/A N/A N/A N/A measure N/A a H COH pCOH N/A N/A N/A N/A np abs a N/A N/A N/A measure N/A S g N/A N/A N/A N/A np log N/A N/A np abs a N/A N/A N/A N/A np real a N/A staticmethod N/A