Git Product home page Git Product logo

Comments (5)

arokem avatar arokem commented on September 6, 2024 1

My guess, based on this error, is that we have a bug that has to do with the b-value threshold being applied in some places, but not in others, so you get this kind of mismatch here. Unfortunately, I am not going to have time to look into this more closely before Friday at the very earliest.

from pyafq.

smeisler avatar smeisler commented on September 6, 2024

I am going to guess that it comes from the definition of mapping (

def mapping(base_fname, dwi_data_file, reg_subject, data_imap,
) which is used in the export_registered_b0 function (
def export_registered_b0(data_imap, mapping):
).

def mapping(base_fname, dwi_data_file, reg_subject, data_imap,
            mapping_definition=None):
    """
    mapping from subject to template space.

    Parameters
    ----------
    mapping_definition : instance of `AFQ.definitions.mapping`, optional
        This defines how to either create a mapping from
        each subject space to template space or load a mapping from
        another software. If creating a map, will register reg_subject and
        reg_template.
        If None, use SynMap()
        Default: None
    """
    reg_template = data_imap["reg_template"]
    if mapping_definition is None:
        mapping_definition = SynMap()
    if not isinstance(mapping_definition, Definition):
        raise TypeError(
            "mapping must be a mapping defined"
            + " in `AFQ.definitions.mapping`")
    return mapping_definition.get_for_subses(
        base_fname, data_imap["dwi"], dwi_data_file,
        reg_subject, reg_template)

Perhaps the DWI from data_imap["dwi"] becomes mismatched with dwi_data_file when the b_val thresholding is applied?

from pyafq.

36000 avatar 36000 commented on September 6, 2024

Yes, this is correct, in fact, dwi_data_file probably should not be used anywhere in the pimms system outside of its initial use where are the bval selections happen and the orientation happens. Afterwards it should just be dwi. I am going to review and change uses of them, then open a PR, and we'll see if that fixes it

from pyafq.

36000 avatar 36000 commented on September 6, 2024

I was able to reproduce and fix the bug. Its not in the mapping code as it just uses that file path as a reference for BIDS to find other files. But it was a similar idea in the calculation of the b0. Here is the PR, if it passes all tests we can merge it: #1158

from pyafq.

arokem avatar arokem commented on September 6, 2024

I believe this is closed by #1158, but please reopen if you see it again.

from pyafq.

Related Issues (20)

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.