Skip to content

Commit

Permalink
Some small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles86 committed Aug 21, 2018
1 parent b69f9c9 commit 46b752e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions nideconv/regressors.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ def create_design_matrix(self, oversample=1):

L = self.get_basis_function(oversample)

effective_sample_rate = self.sample_rate * oversample

columns = pd.MultiIndex.from_product(([self.name], self.covariates.columns, L.columns),
names=['event_type', 'covariate', 'regressor'])
oversampled_timepoints = np.linspace(0,
Expand Down
6 changes: 5 additions & 1 deletion nideconv/response_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ def add_confounds(self, name, confound):
self._add_regressor(confound)


def _add_regressor(self, regressor, oversample=1):
def _add_regressor(self, regressor, oversample=None):

if oversample is None:
oversample = self.oversample_design_matrix

regressor.create_design_matrix(oversample=oversample)

if self.X.shape[1] == 0:
Expand Down

0 comments on commit 46b752e

Please sign in to comment.