Commit 997aef50 authored by Andrew Quinn's avatar Andrew Quinn
Browse files

conclude merge

parents 71756371 fdde367c
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
#!/usr/bin/python
usr/bin/python

# vim: set expandtab ts=4 sw=4:

@@ -480,6 +480,8 @@ def _proc_spectrum_mode(pxx, mode, axis=-1):
        pxx = np.abs(pxx)
    elif mode == 'psd':
        pxx = (np.conjugate(pxx) * pxx).real
    elif mode == 'log_psd':
        pxx = np.log((np.conjugate(pxx) * pxx).real)
    elif mode in ['angle', 'phase']:
        pxx = np.angle(pxx)
        if mode == 'phase':
@@ -821,7 +823,7 @@ def _set_mode(mode):
        If non-valid mode is specified

    """
    modelist = ['psd', 'complex', 'magnitude', 'angle', 'phase']
    modelist = ['psd', 'log_psd', 'complex', 'magnitude', 'angle', 'phase']
    if mode not in modelist:
        raise ValueError("Invalid value ('{}') for mode, must be one of {}"
                         .format(mode, modelist))
@@ -1691,7 +1693,8 @@ def _glm_fit_glmtools(pxx, reg_categorical, reg_ztrans, reg_unitmax,
        DC.add_regressor(name='Constant', rtype='Constant')
    for key in reg_categorical.keys():
        logging.debug('Adding Condition : {0}'.format(key))
        DC.add_regressor(name=key, rtype='Categorical', datainfo=key, codes=[1])
        #DC.add_regressor(name=key, rtype='Categorical', datainfo=key, codes=[1])
        DC.add_regressor(name=key, rtype='Parametric', datainfo=key, preproc=None)
    for key in reg_ztrans.keys():
        logging.debug('Adding Covariate : {0}'.format(key))
        DC.add_regressor(name=key, rtype='Parametric', datainfo=key, preproc='z')