Git Product home page Git Product logo

Comments (5)

jessedmarshall avatar jessedmarshall commented on August 16, 2024 1

Hi Yuan,

You are right that the filtfilt was the problem. I added a simple masking in that section of the code (in the CAPTURE repo) to address this. I pushed the change to the capture demo and included the fix below. Did this work?

frames_to_mask = union(find(isnan(marker_velocity(ll,:,4))),find(isinf(marker_velocity(ll,:,4))));
marker_velocity(ll,frames_to_mask,4) = 0;
abs_velocity_antialiased(ll,:) = filtfilt(f1,f2, marker_velocity(ll,:,4));
marker_velocity(ll,frames_to_mask,4) = nan;
abs_velocity_antialiased(ll,frames_to_mask) = nan;

from dannce.

spoonsso avatar spoonsso commented on August 16, 2024

Can you please describe in more detail what exactly you are trying to run (i.e. the exact command) and with what data? and what version of Matlab are you using?

from dannce.

yuan0821 avatar yuan0821 commented on August 16, 2024

Hi, thank you very much for your reply!!
i just try to run the script of preprocess_dannce.mat as the demo page shows:

filename_in = 'predictions.mat';
filename_out = 'predictions_preprocessed.mat';
species_name = 'mouse'
preprocess_dannce(filename_in,filename_out,species_name, ' ')

the error is reported as below:

Error using filtfilt
Expected input to be finite.

Error in filtfilt>efiltfilt (line 114)
validateattributes(x,{'double'},{'finite','nonempty'},'filtfilt');

Error in filtfilt (line 89)
y=efiltfilt(b,a,x);

Error in compute_preprocessed_mocapstruct (line 44)
abs_velocity_antialiased(ll,:) = filtfilt(f1,f2, marker_velocity(ll,:,4));

Error in preprocess_ratception_struct_demo (line 43)
ratception_struct_temppreproc =
compute_preprocessed_mocapstruct(ratception_struct_temp,preprocessing_parameters);

Error in preprocess_dannce (line 107)
ratception_struct = preprocess_ratception_struct_demo(datahere,preprocessing_parameters,params);
############################################################################################
i think it is cased by the calculation of abs_velocity_antialiased value as it has infinite values.
So i wonder whether it is possible to ask how to fix the issue of infinite values? or is there any suggestions? thank you so so much for all!!! @spoonsso

from dannce.

yuan0821 avatar yuan0821 commented on August 16, 2024

Hi Jesse, thank you so so much for your update. yes!! it works smoothly !!! thanks a lot!

from dannce.

spoonsso avatar spoonsso commented on August 16, 2024

cool! Let us know if you need any other help.

from dannce.

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.