Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to configure ObjectModel - function "model" not found #38

Closed
nhazwulf opened this issue Sep 19, 2021 · 2 comments
Closed

Unable to configure ObjectModel - function "model" not found #38

nhazwulf opened this issue Sep 19, 2021 · 2 comments
Labels

Comments

@nhazwulf
Copy link

nhazwulf commented Sep 19, 2021

Hi. First of all, thanks for writing and maintaining this tool. Disclaimer - I'm completely new to programming so please excuse any blatant errors, inaccuracies and misconceptions I might make writing this. I'll try to describe my issue as straightforwardly as possible:

I'm trying to use btrack for particle tracking and assessing of colocalization. For that, I have written a script that simulates random walks of an arbitrary number of particles of 2 types. When particles of different types are within a certain radius of each other, they may associate and travel along a common trajectory until they dissociate by stochastic principle. I need to run btrack on the simulated trajectories and have it recognize the stretches where particles are colocalized (assign the points belonging to those stretches a different state). To do that, from what I read I need to configure an object model.

I tried doing so simply by filling in the OrdededDict as shown in btypes.py:

  "ObjectModel":
    {
      "name": "coloc_model",
      "states": 3,
      "emission": {
        "matrix": [1,0,0,
                   0,1,0,
                   0,0,1]
      },
      "transition": {
        "matrix": [1,0,0,
                   0,1,0,
                   0,0,1]
      },
      "start": {
        "matrix": [1,0,0,
                   0,1,0,
                   0,0,1]
      }
    },

The size of the matrices seems to be correct (no idea about the values), but then I got an error in core.py:

AttributeError: function 'model' not found

I found that this function was to be called from (please excuse me if I'm using the wrong term or misunderstanding the situation) libtracker.dll and have the OrderedDict elements passed on to it. I opened the .dll with Dependency Walker to see what's inside and found that the name "model" was not there although there were some references to an "ObjectModel". By analogy, the function "motion", which seems to be the one taking care of the motion model, was there and therefore the arguments from the MotionModel OrderedDict were successfully passed on to it. Am I correct to assume that the function needs to be included into the DLL for the ObjectModel parameters to be used?

Is there a way to enable the configuring of the object model and how would that work with particles? I'd be grateful for any answers.

@nhazwulf nhazwulf changed the title Unable to congigure ObjectModel - function "model" not found Unable to configure ObjectModel - function "model" not found Sep 19, 2021
@quantumjot
Copy link
Owner

Hi @nhazwulf - the object model is used (in principle) to allow the tracker to understand different types of state transitions for a single object type. However, the implementation is currently incomplete. For your application, I would run the tracker on each object type separately, then do some post tracking analysis to measure colocalization, rather than trying to build explicit hypotheses during the tracking.

@quantumjot quantumjot added the bug label Nov 4, 2021
@paddyroddy paddyroddy moved this to 🗒 Backlog in btrack-napari Mar 8, 2023
paddyroddy added a commit that referenced this issue Mar 22, 2023
@quantumjot
Copy link
Owner

I'm going to close this

@github-project-automation github-project-automation bot moved this from 🗒 Backlog to ✅ Done in btrack-napari Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants