fieldtrip icon indicating copy to clipboard operation
fieldtrip copied to clipboard

do not recompute lf if already existing

Open mcpiastra opened this issue 2 years ago • 9 comments
trafficstars

this relates to the issue #2188 after the dipole scan, the leadfield should be recomputed only if not already existing

mcpiastra avatar Nov 09 '23 11:11 mcpiastra

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_ft_dipolefitting, test_example_simulate_forward_dipolefit, test_pull1377b

When inside the DCCN, please also consider testing: test_bug3119, test_eeglab_ft_integration, test_pull1377b, test_bug2773

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Nov 09 '23 11:11 github-actions[bot]

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_ft_dipolefitting, test_example_simulate_forward_dipolefit, test_pull1377b

When inside the DCCN, please also consider testing: test_bug2773, test_eeglab_ft_integration, test_bug3119, test_pull1377b

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Nov 09 '23 13:11 github-actions[bot]

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_ft_dipolefitting, test_pull1377b, test_example_simulate_forward_dipolefit

When inside the DCCN, please also consider testing: test_bug2773, test_pull1377b, test_eeglab_ft_integration, test_bug3119

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Nov 09 '23 13:11 github-actions[bot]

you are right, sorry. I now modified the code so that the corresponding leadfield is copied along the dipole, and there is a check on the field of of dipole. does it make sense to you now? thanks.

mcpiastra avatar Nov 09 '23 13:11 mcpiastra

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_pull1377b, test_example_simulate_forward_dipolefit, test_ft_dipolefitting

When inside the DCCN, please also consider testing: test_pull1377b, test_bug2773, test_eeglab_ft_integration, test_bug3119

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Nov 09 '23 14:11 github-actions[bot]

Hi @mcpiastra, have you tried to run the suggested test functions on your end (given the changed code)? Let me know if those functions ran through without error, then I will merge.

schoffelen avatar Nov 13 '23 10:11 schoffelen

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_example_simulate_forward_dipolefit, test_pull1377b, test_ft_dipolefitting

When inside the DCCN, please also consider testing: test_bug3119, test_eeglab_ft_integration, test_pull1377b, test_bug2773

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Nov 13 '23 14:11 github-actions[bot]

hi @schoffelen, after the last commit, yes, all the suggested tests run with no error. thanks!

mcpiastra avatar Nov 13 '23 14:11 mcpiastra

Hi @mcpiastra I think that there is not much work to be done on this anymore. In other words, I think it can be merged, but it would be great if this PR also includes a snippet of test code added to a relevant test function (or a new test function altogether). Do you have some code lying around that allows for testing the functionality, or could you write some?

schoffelen avatar Apr 10 '24 08:04 schoffelen

Hi @mcpiastra what needs to be done to close/merge this?

schoffelen avatar Jun 14 '24 08:06 schoffelen

Hi @schoffelen , actually I was recently having the same question. What shall I do? Write a short script where this is used, with a dummy leadfield?

mcpiastra avatar Jun 14 '24 12:06 mcpiastra

Well, indeed it would be good to have a snippet of code (either in an appropriate already existing test function, or in a new test function), that just goes through the movements. This would mean a call to ft_dipolefitting with a precomputed leadfield, with gridsearch = 'yes', and without the nonlinear optimization step. If it runs through without error, you're done.

schoffelen avatar Jun 17 '24 07:06 schoffelen

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_pull1377b, test_example_simulate_forward_dipolefit, test_ft_dipolefitting

When inside the DCCN, please also consider testing: test_pull1377b, test_eeglab_ft_integration, test_bug3119, test_bug2773

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Jun 28 '24 11:06 github-actions[bot]

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_example_simulate_forward_dipolefit, test_pull1377b, test_ft_dipolefitting

When inside the DCCN, please also consider testing: test_eeglab_ft_integration, test_bug3119, test_pull1377b, test_bug2773

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Jun 28 '24 11:06 github-actions[bot]

You should test whether your modifications do not break anything. See https://www.fieldtriptoolbox.org/development/testing/

When outside the DCCN, please consider testing: test_example_simulate_forward_dipolefit, test_ft_dipolefitting, test_pull1377b

When inside the DCCN, please also consider testing: test_bug2773, test_bug3119, test_eeglab_ft_integration, test_pull1377b

Suggested tests outside the DCCN use public data or do not use data. Suggested tests inside the DCCN use private data.

github-actions[bot] avatar Jun 28 '24 11:06 github-actions[bot]