Esempio n. 1
0
def create_polynomial_drift(bold_shape, tr, drift_order, drift_var):
    p = buildPolyMat(drift_order, bold_shape[0], tr)
    nvox = bold_shape[1]
    coeff = drift_var**.5 * randn(p.shape[1], nvox)
    drift = np.dot(p, coeff)
    logger.info('Drift shape: %s', str(drift.shape))
    return drift
Esempio n. 2
0
def create_polynomial_drift(bold_shape, tr, drift_order, drift_var):
    p = buildPolyMat(drift_order, bold_shape[0], tr)
    nvox = bold_shape[1]
    coeff = drift_var ** 0.5 * randn(p.shape[1], nvox)
    drift = np.dot(p, coeff)
    logger.info("Drift shape: %s", str(drift.shape))
    return drift
Esempio n. 3
0
def create_polynomial_drift(bold_shape, tr, drift_order, drift_var):
    p = buildPolyMat(drift_order, bold_shape[0], tr)
    nvox = bold_shape[1]
    coeff = drift_var**.5 * randn(p.shape[1],nvox)
    drift = np.dot(p, coeff)
    pyhrf.verbose(3, 'Drift shape: %s' %str(drift.shape))
    return drift
Esempio n. 4
0
def create_polynomial_drift_from_coeffs(bold_shape, tr, drift_order, drift_coeffs, drift_mean=0.0, drift_amplitude=1.0):
    p = buildPolyMat(drift_order, bold_shape[0], tr)
    if 0:
        print "%%%%%%%%%%%%%%%%%%%%%%%%%"
        print "p:", p
        print "%%%%%%%%%%%%%%%%%%%%%%%%%"
        print "drift_coeffs:", drift_coeffs.shape
    drift = np.dot(p, drift_coeffs) * drift_amplitude + drift_mean
    logger.info("Drift shape: %s", str(drift.shape))
    return drift
Esempio n. 5
0
def create_polynomial_drift_from_coeffs(bold_shape, tr, drift_order,
                                        drift_coeffs, drift_mean=0.,
                                        drift_amplitude=1.):
    p = buildPolyMat(drift_order, bold_shape[0], tr)
    if 0:
        print '%%%%%%%%%%%%%%%%%%%%%%%%%'
        print 'p:', p
        print '%%%%%%%%%%%%%%%%%%%%%%%%%'
        print 'drift_coeffs:', drift_coeffs.shape
    drift = np.dot(p, drift_coeffs) * drift_amplitude + drift_mean
    logger.info('Drift shape: %s', str(drift.shape))
    return drift
Esempio n. 6
0
def create_polynomial_drift_from_coeffs(bold_shape,
                                        tr,
                                        drift_order,
                                        drift_coeffs,
                                        drift_mean=0.,
                                        drift_amplitude=1.):
    p = buildPolyMat(drift_order, bold_shape[0], tr)
    if 0:
        print '%%%%%%%%%%%%%%%%%%%%%%%%%'
        print 'p:', p
        print '%%%%%%%%%%%%%%%%%%%%%%%%%'
        print 'drift_coeffs:', drift_coeffs.shape
    drift = np.dot(p, drift_coeffs) * drift_amplitude + drift_mean
    logger.info('Drift shape: %s', str(drift.shape))
    return drift