Git Product home page Git Product logo

moss's People

Contributors

mwaskom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moss's Issues

mosaic issue

I am getting an "ValueError: operands could not be broadcast together with shapes (64,64,30) (64,30,64) " error when using Mosaic:

m = Mosaic(orig,mask,mask, step = 1)

What's strange is that

print nib.load(orig).shape
print nib.load(mask).shape

returns (64,64,30) for both.

And

m = Mosaic(orig,mask, step = 1)

works fine.

This issue is coming up in the report for the functional mask step of the lyman preproc workflow.

wonky double gamma HRF

Hi Michael,

I was playing around the with DesignMatrix class and I am a little confused by the HRFs. They don't come out looking quite like the canonical HRF. It looks like perhaps the code is not adjusting for different TRs, although I am having trouble tracking down the source of the issue:

from moss import glm
import pandas as pd
import seaborn as sns
%matplotlib inline

design = pd.DataFrame({'condition':['test'],
'onset': [0],
'duration': [2],
})

#convolve
hrf = glm.GammaDifferenceHRF()
model = glm.DesignMatrix(design = design, tr = 1.0, ntp = 14,
hrf_model = hrf, hpf_cutoff = 128)
sns.tsplot(model.design_matrix.values.flatten())

double_gamma

Contributing

@mwaskom I just discovered this. I was thinking for quite some time about doing something similar to prevent myself from copying my utils manually from project to project...
How would you feel about contributions mostly related to visualization, stats and dealing with reaction time data and a few MEG specific utils.

AssertionError: Series are different

======================================================================
FAIL: moss.tests.test_statistical.TestRemoveUnitVariance.test_remove_by_group
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/moss-0.3.4/moss/tests/test_statistical.py", line 559, in test_remove_by_group
    pdt.assert_series_equal(grp.value.mean(), grp.value_within.mean())
  File "/usr/lib64/python2.7/site-packages/pandas/util/testing.py", line 929, in assert_series_equal
    assert_attr_equal('name', left, right, obj=obj)
  File "/usr/lib64/python2.7/site-packages/pandas/util/testing.py", line 708, in assert_attr_equal
    left_attr, right_attr)
  File "/usr/lib64/python2.7/site-packages/pandas/util/testing.py", line 798, in raise_assert_detail
    raise AssertionError(msg)
AssertionError: Series are different

Attribute "name" are different
[left]:  value
[right]: value_within

FIR oversampling

small issue with default parameter values (I think this is unexpected behavior). The FIR class sets oversampling = 1, but if you don't set oversampling = 1 in the DesignMatrix call, then the frame times get messed up and FIR convolution doesn't work as expected. Because the default value is 16 in DesignMatrix, the FIR convolution doesn't work unless without this parameter set properly.

Create eyelink file for testing

It would be good to have ~30 seconds of eyelink data with a few known saccades and blinks for testing the moss.eyelink module.

Issues relating to Design Matrix

Here are some issues I have run into and want to think more about:

  • Downsampled timeseries are shifted with respect to the hires timeseries. This is because the downsampling also shifts the predicted response forward to correspond to the middle of the TR. This makes some sense but also might be surprising. I want to rethink whether this should be done and whether it is being done in the most obvious way. Further, need to think about this in the context of an FIR model.

  • Should the default oversampling over the design matrix/hrf kernel be changed? It inherited 16x oversampling from FSL but that means it is hard to specify very short events with a given duration. I think it might make sense to change the parameterization to give a hires time bin (not relative to TR) and make the default 60 to correspond to the refresh rate of a typical monitor. Stimulus events will generally be limited by that resolution.

  • Needing to give the HRF functions a hires stimulus to get a simple predicted response is confusing outside of the context of a DesignMatrix.

  • A DesignMatrix with high-pass filtering but demean=False will have a zero mean because the filter removes a constant trend. This is confusing. Do we want to add the column means back in after filtering and then allow the presence of a constant trend be determined by demean?

use mosaic to plot one image, no overlay

Hi Michael,

I was wondering whether mosaic would allow plotting one image only, not in an overlay setting, yet with the ability to control the color range etc.

I was playing around a bit, but could not get it to what I wanted.

image

Second request: is there a possibility to switch from neurological to radiological convention?

Thanks!
Maarten

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.