Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion glmsingle/ols/glm_estimatemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def glm_estimatemodel(design, data, stimdur, tr, hrfmodel, hrfknobs,
opt['maxpolydeg'] = [
np.arange(
alt_round(
((data[r].shape[-1]*tr)/60)/2) + 1
((data[r].shape[-1]*tr)/60)/2)
) for r in range(numruns)]

if 'seed' not in opt:
Expand Down
9 changes: 7 additions & 2 deletions glmsingle/ols/make_poly_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ def make_polynomial_matrix(n, degrees):

Args:
n (int): number of points
degrees (array): vector of polynomial degrees
degrees (array or int): vector of polynomial degrees or single degree

Returns:
polynomials: array of n x len(degrees)
polynomials: array of n x len(degrees) if degrees is array, or n x (degree+1) if degrees is int
"""
time_points = np.linspace(-1, 1, n)[np.newaxis].T

# Convert single integer to array of degrees from 0 to degrees
if isinstance(degrees, (int, np.integer)):
degrees = np.arange(degrees + 1)

polynomials = np.zeros((n, len(degrees)))

# Loop over degrees
Expand Down
1 change: 1 addition & 0 deletions matlab/GLMestimatesingletrial.m
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@

% short-circuit all of the work
HRFindex = ones(nx,ny,nz); % easy peasy
HRFindexrun = ones(nx,ny,nz,nh); % easy peasy

else

Expand Down