Code Monkey home page Code Monkey logo

zeffiro_interface's Introduction

Zeffiro Interface

© 2018- Sampsa Pursiainen & ZI Development Team

View Zeffiro Forward and Inverse Interface for Complex Geometries on File Exchange

Zeffiro Interface Logo

Introduction

Zeffiro Interface (ZI) is an open source code package constituting an accessible tool for multidisciplinary finite element (FE) based forward and inverse simulations in complex geometries. Developed for MATLAB, ZI aims to streamline the process of analyzing brain activity and make it accessible to researchers and clinicians alike. With ZI, one can generate a volumetric finite element mesh for a realistic multilayer geometry, such as human brain or an asteroid.

A suitable surface segmentation can be produced, for example, using the FreeSurfer software suite ( Copyright © FreeSurfer, 2013). ZI allows importing a parcellation created with FreeSurfer to enable distinguishing different brain regions and, thereby, analysing the sub-cortical structures and connectivity of the brain function over a time series. In each compartment, the orientation of the activity can be either normally constrained or unconstrained. The main routines of ZI can be accelerated significantly in a computer equipped with a graphics computing unit (GPU). It is especially recommendable to perform the forward simulation process, i.e., to generate the finite element mesh, the lead field matrix and to interpolate between different point sets, utilizing a GPU. After the forward simulation phase, the model can be processed also without GPU acceleration.

Requirements

  • MATLAB >= r2019a
  • Toolboxes
    • Signal Processing Toolbox
    • Optimization toolbox
    • Parallel Computing Toolbox
    • Statistics and Machine Learning Toolbox
  • GPU (optional)

Installation

Zeffiro Interface relies on the external repositories, such as SDPT3, SeDuMi and others, that will be fetched automatically when cloning with --recurse-submodules. See the installation wiki page for instructions on how to install Zeffiro Interface.

Getting Started

To start ZI, open Matlab, navigate to the project directory and run the following command:

zeffiro_interface()

To learn more about startup options, run one of the following commands in Matlab:

help zeffiro_interface
% or
doc zeffiro_interface

Read the wiki pages for more information.

Contributing

See CONTRIBUTING.md for details on how to contribute to the project.

License

Zeffiro Interface is licensed under the GNU GPLv3. See the LICENSE file for details.

Submodules from external directory are licensed as follows:

  • CVX: GNU GPLv3
  • fieldtrip: GNU GPLv3
  • OSQP: Apache v2.0
  • SDPT3: GNU GPLv2
  • SeDuMi: GNU GPLv2
  • SESAME: unknown
  • spm12: GNU GPLv2

Related papers

The interface itself has been introduced in:

  • He, Q., Rezaei, A. & Pursiainen, S. (2019). Zeffiro User Interface for Electromagnetic Brain Imaging: a GPU Accelerated FEM Tool for Forward and Inverse Computations in Matlab. Neuroinformatics, https://doi.org/10.1007/s12021-019-09436-9

Recent papers:

  • Galaz Prieto, F., Rezaei, A., Samavaki, M., & Pursiainen, S. (2022). L1-norm vs. L2-norm fitting in optimizing focal multi-channel tES stimulation: linear and semidefinite programming vs. weighted least squares. Computer Methods and Programs in Biomedicine, 226, 107084, https://doi.org/10.1016/j.cmpb.2022.107084

  • Lahtinen, J., Koulouri, A., Rezaei, A., & Pursiainen, S. (2022). Conditionally Exponential Prior in Focal Near-and Far-Field EEG Source Localization via Randomized Multiresolution Scanning ( RAMUS). Journal of Mathematical Imaging and Vision, 1-22. https://doi.org/10.1007/s10851-022-01081-3

  • Rezaei, A., Lahtinen, J., Neugebauer, F., Antonakakis, M., Piastra, M. C., Koulouri, A., Wolters, C. H., & Pursiainen, S. (2021). Reconstructing subcortical and cortical somatosensory activity via the RAMUS inverse source analysis technique using median nerve SEP data. NeuroImage, 245, 118726. https://doi.org/10.1016/j.neuroimage.2021.118726

  • Rezaei, A., Koulouri, A., & Pursiainen, S. (2020). Randomized multiresolution scanning in focal and fast E/MEG sensing of brain activity with a variable depth. Brain Topography, 33(2), 161-175. https://doi.org/10.1007/s10548-020-00755-8

The essential mathematical techniques used in the interface have been reviewed and validated in:

The IAS MAP (iterative alternating sequential maximum a posteriori) inversion method and the hierarchical Bayesian sampler are based on:

  • Calvetti, D., Hakula, H., Pursiainen, S., & Somersalo, E. (2009). Conditionally Gaussian hypermodels for cerebral source localization. SIAM Journal on Imaging Sciences, 2(3), 879-909. https://doi.org/10.1137/080723995

It has been applied for a realistic brain geometry, e.g., in:

  • Lucka, F., Pursiainen, S., Burger, M., & Wolters, C. H. (2012). Hierarchical Bayesian inference for the EEG inverse problem using realistic FE head models: depth localization and source separation for focal primary currents. Neuroimage, 61(4), 1364-1382. https://doi.org/10.1016/j.neuroimage.2012.04.017

The current preserving source model combines linear (face-intersecting) and quadratic (edgewise) elements via the Position Based Optimization (PBO) method and the 10-source stencil in which 4 face sources and 6 edge sources are applied for each tetrahedral element containing a source:

  • Bauer, M., Pursiainen, S., Vorwerk, J., Köstler, H., & Wolters, C. H. (2015). Comparison study for Whitney (Raviart–Thomas)-type source models in finite-element-method-based EEG forward modeling. IEEE Transactions on Biomedical Engineering, 62(11), 2648-2656. https://doi.org/10.1109/TBME.2015.2439282

  • Pursiainen, S., Vorwerk, J., & Wolters, C. H. (2016). Electroencephalography (EEG) forward modeling via H (div) finite element sources with focal interpolation. Physics in Medicine & Biology, 61(24), 8502. https://doi.org/10.1088/0031-9155/61/24/8502


Zeffiro Interface is not intended for use in clinical applications. The authors do not assume responsibility for the results obtained with ZI when using clinical data.

zeffiro_interface's People

Contributors

alexanderfrankwwu avatar anddiiih avatar atenarezaei avatar frank-neugebauer avatar gitfernandogalaz avatar joonasjl avatar kolorun avatar maltehoel avatar maryamsamavaki avatar mshavliuk avatar paavor avatar sampsapursiainen avatar sesodesa avatar tfarenc avatar yusuf-oluwatoki avatar

Stargazers

 avatar  avatar  avatar  avatar  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

zeffiro_interface's Issues

Turn external/ libraries into Git submodules

This would make their installation much more effortless with a simple

git clone --recurse-submodules https://github.com/sampsapursiainen/zeffiro_interface.git

or

git clone --recursive https://github.com/sampsapursiainen/zeffiro_interface.git

The addition of the external libraries as Git submodules could be done with (for example)

git submodule add https://github.com/cvxr/CVX.git external/CVX

in the case of the CVX module. The file .gitignore allowlist also needs to be updated to allow the .gitmodules file for this to work.

`zeffiro_plugins.ini` does not work as expected

Description

I am not totally sure what profile/multicompartment_head/zeffiro_plugins.ini file suppose to do, but when I removed from it everything besides a ES Workbench,inverse_tools,zef_ES_optimization line, the list of Inverse Tools in the menu still included pretty much the same options even after restart. Although, the order of available options has changed, so the file has some impact.

I would suggest to validate if everything works as expected or that's some sort of outdated functionality that isn't really working. In such case the zeffiro_plugins.ini files should be removed

InitiallyAfter changes
Screenshot 2023-05-08 at 21 18 09 Screenshot 2023-05-08 at 21 16 22

Allow importing electrodes to an existing project

Description

Currently, the only way of importing electrodes into a project is during the import of a segmentation, by placing an electrodes.dat file into the same folder with the segmentation to be imported, and then going to Menu tool > Import > Import data to a new project, and choosing the import_segmentation.zef script in the same folder. It would be beneficial, if electrodes could be imported into an existing project after the segmentation has already been imported, so that different electrode configurations could be used in simulations with the same head model more effortlessly.

Expected behavior

One would expect there to be a working button Menu tool > Import > Import electrodes, that would allow one to select a file of electrode positions and labels, which would then get imported to the project.

Context

Name Value
Version f958de8 Merge pull request #193 from sampsapursiainen/192-fs2zefsh-improvements
OS Any and all
Shell Any and all

Error when selecting the last script in Mesh Tool

Description

When I select the zef_tes_make_all; script in Mesh tool, an error occurs.

Steps to reproduce

  1. Open ZI, load a multicompartment head project
  2. Select the zef_tes_make_all; script in Mesh tool

See the error:

Index in position 1 exceeds array bounds.

Error in zef_forward_simulation_table_selection (line 4)
forward_simulation_column_selected = eventdata.Indices(1,2);
 
Error using matlab.ui.internal.controller.uitable.WebMWTableController/handleEvent (line 747)
Error while evaluating Table CellSelectionCallback.

When the last script selected second time, it usually does not provide similar errors. Although, after a while selecting the last script throws an error again, see the screencast below. There's no clear sequence of actions that make it happen.

Expected behavior

Errors do not occur

Screenshots

2023-05-08-12.47.16.mp4

Context

Name Value
Version 6cb2537 zef_import_parcellation_colortable: load fields from color table file order-agnostically
OS MacOS
Shell N/A

Stable release

(Check the Milestones for the DLs)!

We would need to release a stable version where the recent contributions have been debugged and some example scripts for understanding the usage would be provided.

The parts to be checked include:

  • Finite element mesh creator
  • Stimulation tool
  • Inverse source localization scripts (including Kalman filter)
  • Deployment tests and usage examples would be provided in tests and scripts folder, respectively.

I would request that each contributor would (1) debug tools they have developed, (2) that the tools can be opened using zef_tool_start.m function, (3) check that those can be run both in graphical user interface mode and on command line in terminal (without the java interface or any graphics available), and (4) The scripts folder includes a self-supported demonstrator that (a) starts the interface, (b) imports or opens a project, (c) runs the tool with test data (numerical simulations if available, a small set can be uploaded in the repository, if needed and if it is ok to do so regaring any IPRs, alternatively an online dataset can be downloaded for the deployment run, if it is not applicable otherwise).

3D model gets corrupted when Zoomed-in

Description

When I zoom-in the 3D model in Figure tool, it gets corrupted so different parts of it get cut off.

Steps to reproduce

  1. Load the model
  2. Visualize Surfaces
  3. Use Zoom-in tool

See the issue.

Expected behavior

I would suggest not to use zoom-in tools if it causes so much troubles and leave the users to manipulate only the distance parameter.

Screenshots

See the demo on both Linux (via VNC) and MacOS

ouput.mp4

Context

Name Value
Version 6cb2537 zef_import_parcellation_colortable: load fields from color table file order-agnostically
OS MacOS and Linux
Shell N/A

FEM matrices for PDE operators

A library with FEM matrices for the most essential PDE operators will be developed, including, e.g., scripts for parsing a stiffness matrix and mass matrix (volume + area implementations).

Uninitialized variable in scripts/zef_KalmanDemo

I noticed this while working on #141, but project_struct in the script scripts/zef_KalmanDemo is currently not initialized properly:

% Create project
project_struct = zef_

I guess zef_ should be followed by something, but I don't know what. Could somebody look into this? Latest edit was by Sampsa, so I am adding him as an assignee as well.

Figure tool does not re-render when compartments are updated

Description

When I check/uncheck “Visualize” in the segmentation tool, the “Compartments” section in Figure tool gets updated right away, but the 3D model doesn’t change

2023-04-22-09.34.21.mp4

Expected behavior

I would expect consistency. Either the figure tool does not change and wait until I click "Visualize surfaces" or it updates the Compartments AND the model view simultaneously.

Puhti seems to have issues with line continuations in ZefSourceModel

The class file m/ZefSourceModel.m currently contains commas , and line continuation operators ... in its enumeration block. Local installations of Matlab don't seem to mind these, but Puhti of CSC fame certainly does. Removing the lines gets rid of the syntax error warning (that's right, an error-warning)

An END might be missing before METHODS on line 16, possibly matching ENUMERATION.

This should propbably be fixed (by me).

Negative conductivity in graph

Description

When the conductivity is plotted on a graph, it shows the negative values.

Steps to reproduce

  1. Load multicompartment head project
  2. Generate FEM Mesh
  3. In the mesh visualization tool, select "Electrical conductivity"
  4. Click "Plot graph"

Expected behavior

Screenshots

Screenshot 2023-05-13 at 20 00 49

Context

Name Value
Version 0afb932 Merge pull request #195 from bug-report-template
OS MacOS
Shell N/A

The menu tool ignores first couple clicks

Description

When I click any button of the Menu tool, it doesn't open the menu but make the window itself focused. After I click a second time it expands the window, but doesn't open the menu, so I have to click third time to finally see the options.

Expected behavior

Opening a menu requires less clicks.

Screenshots

Screen.Recording.2023-05-06.at.11.32.21.mov

Context

Name Value
Version 2241fdd zef_nse_sigma: fix indentations with Matlab's smart indent tool
OS MacOS
Shell N/A

Distribution visualization leads to errors

Description

When I try to visualize surfaces or volume with Visualization type "Distribution" I'm getting errors

Steps to reproduce

  1. Load the project (mine already had computed FEM meshes and tES lead field)
  2. In Mesh visualization tool select Visualization type: "Distribution (Surface)"
  3. Click Visualize surfaces

See the error:

Unrecognized function or variable 's_i_ind_2'.

Error in zef_plot_meshes (line 147)
        reconstruction = sum(reconstruction(s_i_ind_2),2)/size(s_i_ind_2,2);

Error in zef_visualize_surfaces (line 3)
zef_update_fig_details;zef_plot_meshes([]);
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

OR, clicking Visualize Volume with Visualization type: "Distribution (Volume)" gives me another error

Unrecognized function or variable 's_i_ind'.

Error in zef_plot_volume (line 449)
reconstruction = sum(reconstruction(s_i_ind),2)/size(s_i_ind,2);

Error in zef_visualize_volume (line 4)
zef_plot_volume;
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

Expected behavior

I expect to see the visualization and not get errors

Screenshots

2023-05-08-14.41.09.mp4

Context

Name Value
Version 6cb2537 zef_import_parcellation_colortable: load fields from color table file order-agnostically
OS MacOS
Shell N/A

Program will not start on master branch

Hi there.

I've tried starting up ZEFFIRO Interface from the Matlab console with

zeffiro_interface

on the master branch, but the program refuses to start and prints out the error message

Error using evalin
Unrecognized function or variable 'zef_assign_data'.

Error in zeffiro_interface (line 34)
evalin('base','zef_assign_data;');

Switching over to main_development_branch and running the same command starts the program without any issues. Shutting ZEFFIRO down, switching back to the master branch and then trying the command again also has it start without issues. It is then a cold start that is problematic.

The file m/zef_assign_data.m exists on master, so that is not the issue. Clearly the function symbol is then not added to the current context (or workspace) as it should be. Or maybe I am just trying to start the program in a way that is not intended?

Empty electrodes set breaks visualization

Description

Steps to reproduce

I'm getting error if I check "Visible" checkbox of an empty electrode set and click "Visualize surfaces". The electrodes set was created automatically for a new project, even though the import_segmentation.zef did not have a type,sensors line.

  1. Create a new project without electrodes, by importing the segmentation without electrodes
  2. Click "visible" checkbox for an empty electrodes set in Segmentation tool
  3. Click "Visualize surface" in Mesh Visualization tool

The following error occur:

Brace indexing is not supported for variables of this type.

Error in zef_plot_meshes (line 531)
                    h_text = text(sensors(i,1),sensors(i,2),sensors(i,3),sensors_name{i});

Error in zef_visualize_surfaces (line 3)
zef_update_fig_details;zef_plot_meshes([]);
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

Interestingly, it doesn't happen when any of the clipping planes is enabled.

Expected behavior

  1. I would expect the empty electrodes set not to be created for no reason
  2. Whenever an empty set of electrodes is visible, it shouldn't break the program

Screenshots

bug.mp4

Context

Name Value
Version 0aa7664
OS MacOS
Shell N/A

`import_to_existing_project` does not work properly

Description

Starting ZI with 'import_to_existing_project', 'scripts/scripts_for_importing/multicompartment_head_project/import_segmentation.zef' parameters does not import the project, but only opens a file explorer allowing to select the file for import.
That option seems to work only along with 'start_mode','nodisplay' as specified in https://github.com/sampsapursiainen/zeffiro_interface/blob/master/scripts/zef_import_example.m

Steps to reproduce

  1. execute project_struct = zeffiro_interface('import_to_existing_project','scripts/scripts_for_importing/multicompartment_head_project/import_segmentation.zef');
  2. Nothing gets imported, the file picker is open

Expected behavior

The project gets imported and ZI tool opens

Screenshots

Context

Name Value
Version 2241fdd zef_nse_sigma: fix indentations with Matlab's smart indent tool
OS MacOS
Shell N/A

Simplify main function zeffiro_interface argument parsing

Currently the zeffiro_interface main function's way of handling key–value arguments does not follow Matlab's best practices, which involves using an arguments ... end block to declare key–value argument pairs as follows:

function output = f(args)

    arguments
        args.arg1 (sizes...) type {validators...} = default_value;
        args.arg2 (sizes...) type {validators...} = default_value;
        ...
        args.argn (sizes...) type {validators...} = default_value;
    end

    output = function_of(args);

end

This allows calling the function f with

output = f("arg1", value1, "arg2", value2, ..., "argn", valuen);

or from Matlab r2021a onwards with

output = f(arg1=value1, arg2=value2, ..., argn=valuen);

No need to use a loop or increment a counter / index with this method.

Reduce repository size

At it's current state, installation of the ZI takes a lot of network bandwidth and thus a lot of time to download. Below are my suggestions to fix this problem and clean up the repository, making it easier to navigate around for the new users.

  • Remove entire documentation directory (-40Mb)
    My suggestion is to remove the entire directory and focus on more conventional ways of maintaining the documentation, such as writing README.md and wiki pages.
    Using latex documents requires installing and learning how to use another complex tool to simply read the documentation. Moreover, the process of compiling the documentation requires the documentation on its own.
    Also, this directory includes fonts. They take 40mb of space during project installation (with my internet speed it adds an additional minute of downloading) and also have distinct license (OFL-1.1 license) which is not mentioned anywhere

  • Extract the demo projects into another repository (-111Mb)
    The set of example projects deserve its own documentation, which would include the explanation of the data sources, the use cases, screenshots etc. At the moment, the /data directory which contains only the demo project and some screenshots adds 111mb to the repository size, (out of 256mb)

`fs2zef.sh` improvements

Suggestions

  1. The import_segmentation.zef has a legacy format and I didn’t manage to use it for import. Let’s replace it with a new one - I would suggest to use the import_segmentation.zef but without the first line importing electrodes.dat since electrodes are not generated by the script.
  2. Also, let’s add the cp import_segmentation.zef $OUT_DIR/ to the fs2zef.sh so it produces a ready-to-import directory.
  3. Why the project has 3 different fs2zef.sh files? For me it is very confusing even though I spent many hours converting different MRI scans. If we absolutely need to have so many let's at least use different names for them. I would suggest to keep only on and rename it to freeSurfer2zeffiro.sh
  4. It looks like previously the fs2zef.sh was performing the reconstruction with recon-all based on this code fragment
    #Reconstructing the data out of T1-weighted data including subcortical
    #structures.
    # Command 1:
    # recon-all
    # -i <one slice in the anatomical dicom series>
    # -s <subject id that you make up> \
    # -sd <directory to put the subject folder in> \
    # -all
    #recon-all -i -s $SUBJECT -sd $SUBJECT_DIR/$SUBJECT -all

    Why that code was disabled? Do we want to make the convertation process more difficult and require users to run recon-all manually? This may lead to unwanted problems and mistakes.

Sensors/electrodes can't be deleted

Description

Nothing happens when I click "Delete sensor set(s)".

Steps to reproduce

  1. Load multicompartment_head project
  2. Open Segmentation tool
  3. Toggle controls
  4. Select sensors set
  5. Right click -> "Delete sensor set(s)"

Nothing happens

Expected behavior

I would expect the "Delete sensor set(s)" option to delete sensor set.

Screenshots

Screen.Recording.2023-05-19.at.9.10.01.mov

Context

Name Value
Version 0aa7664
OS MacOS
Shell N/A

Code style and indentations

Description

Most of the Matlab source files in the project currently do not follow good indentation style. Either there is no indentation at all to signify which blocks of code are within others, but we even have cases like

    if outer_conditional_block
if inner_conditional_block
do_stuff()
end
    end

where the inner block is less indented than the outer one. This should be fixed programmatically via the function

matlab.desktop.editor.openDocument

so that the code could be made sense of more easily. The Document object that the function returns contains a method smartIndentContents, which allows programmatic access to the smart indentation tool of Matlab.

Steps to reproduce

  1. Open almost any file in the project
  2. Observe the lack of proper indentation.

Expected behavior

The files should be properly indented, so that the code were readable.

Context

Name Value
Version f958de8 Merge pull request #193 from sampsapursiainen/192-fs2zefsh-improvements
OS Any and all
Shell N/A

Allow negative coordinates as arguments to zef_waitbar > init_figure

It was assumed that negative coordinates couldn't occur when writing the local function but according to Matlab documentation, negative coordinates indicate a distance from the right edge of given a screen or another graphical element. Negative coordinates then need to be allowed in the function zef_waitbar > init_figure.

Create FEM mesh error

Description

Cannot compute the FEM mesh for the multicompartment_head_project with some specific resolutions.

Steps to reproduce

  1. Import the scripts/scripts_for_importing/multicompartment_head_project/import_segmentation.zef
  2. Go to the mesh tool
  3. Set Mesh Resolution to 10
  4. See the error
Error using zef_point_in_compartment (line 128)
Arrays have incompatible sizes for this operation.

Error in zef_mesh_labeling_step (line 31)
I_1 = zef_point_in_compartment(zef,reuna_p{i_labeling},reuna_t_aux,nodes(I_2,:),[compartment_counter n_compartments]);

Error in zef_create_fem_mesh (line 148)
zef_mesh_labeling_step;

Error in zef_create_finite_element_mesh (line 11)
zef = zef_create_fem_mesh(zef);

Related documentation
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

This never happens for some other resolutions, for example 3mm. Also, on the screenshot it can be seen, that the error occurred during "Labeling of compartment 8/35", so some of them were processed successfully.

Expected behavior

The FEM Mesh generation is completed without errors.

Screenshots

Screenshot 2023-05-07 at 9 45 15

Context

Name Value
Version 2241fdd zef_nse_sigma: fix indentations with Matlab's smart indent tool
OS e.g. MacOS
Shell N/A

Recursive search does not work

Description

Steps to reproduce

  1. Open ES workbench
  2. Click "Find currents"

The following error occur:

Unrecognized function or variable 'zef_ES_find_currents_recursive'.
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

Expected behavior

The form does not set an invalid combination of solver/method.

Screenshots

Context

Name Value
Version 6cb2537 zef_import_parcellation_colortable: load fields from color table file order-agnostically
OS MacOS
Shell N/A

Add CONTRIBUTING instructions

The file CONTRIBUTING.md should be created in the repository root, explaining to possible project participants the practices that the project uses. These include

  1. creating new branches when working on new features or fixes,
  2. squashing a (copy of a) branch into a single commit, if the branch contains multiple commits during a pull request,
  3. using proper indentation in code files submitted,
  4. removing unnecessary trailing whitespace from code files before submitting and
  5. using Matlab function argument validation in functions whenever possible,

at the very least.

Mesh creation didn't converge

Description

This may occur not as often, but during FEM mesh creation the app was fixing negatives and didn't seem to have any progress - there were always at least 2 more negatives to fix. I have killed the task after about an hour of waiting. Let's keep track of such incidents and see if they are common.

See full app logs:
zeffiro_interface_38.log

Last few lines of the logs, demonstrating the lack of convergence:
Task ID; 12; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 119; CPU usage; 171; Ready; 08-May-2023 10:21:26; Total CPU time; -734864;
Task ID; 12; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 124; CPU usage; 175; Ready; 08-May-2023 10:21:36; Total CPU time; -734854;
Task ID; 12; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 130; CPU usage; 175; Ready; 08-May-2023 10:21:47; Total CPU time; -734845;
Task ID; 12; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 135; CPU usage; 174; Ready; 08-May-2023 10:24:13; Total CPU time; -734835;
Task ID; 12; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 141; CPU usage; 173; Ready; 08-May-2023 10:22:10; Total CPU time; -734825;
Task ID; 13; Progress; 0; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 0; CPU usage; 96; Ready; ; Total CPU time; -734810;
Task ID; 13; Progress; 25; File; zef_fix_negatives.m; Message; Fix 4 negatives.; Workspace size; 652; Task time; 7; CPU usage; 168; Ready; 08-May-2023 10:20:24; Total CPU time; -734799;
Task ID; 13; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 13; CPU usage; 170; Ready; 08-May-2023 10:20:35; Total CPU time; -734789;
Task ID; 13; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 19; CPU usage; 165; Ready; 08-May-2023 10:20:54; Total CPU time; -734779;
Task ID; 13; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 24; CPU usage; 170; Ready; 08-May-2023 10:21:11; Total CPU time; -734769;
Task ID; 13; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 30; CPU usage; 173; Ready; 08-May-2023 10:20:58; Total CPU time; -734759;
Task ID; 13; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 36; CPU usage; 167; Ready; 08-May-2023 10:21:46; Total CPU time; -734749;
Task ID; 13; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 42; CPU usage; 169; Ready; 08-May-2023 10:22:04; Total CPU time; -734739;
Task ID; 13; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 48; CPU usage; 171; Ready; 08-May-2023 10:21:33; Total CPU time; -734730;
Task ID; 13; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 53; CPU usage; 168; Ready; 08-May-2023 10:21:44; Total CPU time; -734720;
Task ID; 13; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 59; CPU usage; 163; Ready; 08-May-2023 10:22:56; Total CPU time; -734710;
Task ID; 13; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 67; CPU usage; 145; Ready; 08-May-2023 10:22:11; Total CPU time; -734700;
Task ID; 13; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 72; CPU usage; 169; Ready; 08-May-2023 10:22:22; Total CPU time; -734690;
Task ID; 13; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 78; CPU usage; 172; Ready; 08-May-2023 10:22:34; Total CPU time; -734680;
Task ID; 13; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 84; CPU usage; 171; Ready; 08-May-2023 10:22:45; Total CPU time; -734670;
Task ID; 14; Progress; 0; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 0; CPU usage; 108; Ready; ; Total CPU time; -734656;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 6; CPU usage; 170; Ready; 08-May-2023 10:21:48; Total CPU time; -734646;
Task ID; 14; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 12; CPU usage; 170; Ready; 08-May-2023 10:21:53; Total CPU time; -734636;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 17; CPU usage; 172; Ready; 08-May-2023 10:22:21; Total CPU time; -734627;
Task ID; 14; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 23; CPU usage; 170; Ready; 08-May-2023 10:22:16; Total CPU time; -734617;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 28; CPU usage; 172; Ready; 08-May-2023 10:22:55; Total CPU time; -734608;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 34; CPU usage; 170; Ready; 08-May-2023 10:23:12; Total CPU time; -734598;
Task ID; 14; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 40; CPU usage; 171; Ready; 08-May-2023 10:22:50; Total CPU time; -734588;
Task ID; 14; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 46; CPU usage; 172; Ready; 08-May-2023 10:23:01; Total CPU time; -734578;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 51; CPU usage; 173; Ready; 08-May-2023 10:24:03; Total CPU time; -734568;
Task ID; 14; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 57; CPU usage; 169; Ready; 08-May-2023 10:23:24; Total CPU time; -734559;
Task ID; 14; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 63; CPU usage; 160; Ready; 08-May-2023 10:23:36; Total CPU time; -734549;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 69; CPU usage; 173; Ready; 08-May-2023 10:24:57; Total CPU time; -734538;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 75; CPU usage; 166; Ready; 08-May-2023 10:25:16; Total CPU time; -734528;
Task ID; 14; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 81; CPU usage; 166; Ready; 08-May-2023 10:25:34; Total CPU time; -734518;
Task ID; 15; Progress; 0; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 0; CPU usage; 90; Ready; ; Total CPU time; -734504;
Task ID; 15; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 6; CPU usage; 169; Ready; 08-May-2023 10:23:18; Total CPU time; -734494;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 12; CPU usage; 172; Ready; 08-May-2023 10:23:23; Total CPU time; -734485;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 17; CPU usage; 169; Ready; 08-May-2023 10:23:34; Total CPU time; -734475;
Task ID; 15; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 23; CPU usage; 171; Ready; 08-May-2023 10:24:08; Total CPU time; -734466;
Task ID; 15; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 29; CPU usage; 168; Ready; 08-May-2023 10:24:25; Total CPU time; -734456;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 34; CPU usage; 168; Ready; 08-May-2023 10:24:08; Total CPU time; -734446;
Task ID; 15; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 40; CPU usage; 170; Ready; 08-May-2023 10:24:59; Total CPU time; -734437;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 45; CPU usage; 168; Ready; 08-May-2023 10:24:30; Total CPU time; -734427;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 51; CPU usage; 172; Ready; 08-May-2023 10:24:42; Total CPU time; -734418;
Task ID; 15; Progress; 25; File; zef_fix_negatives.m; Message; Fix 4 negatives.; Workspace size; 652; Task time; 56; CPU usage; 172; Ready; 08-May-2023 10:26:45; Total CPU time; -734409;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 62; CPU usage; 171; Ready; 08-May-2023 10:25:04; Total CPU time; -734399;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 68; CPU usage; 166; Ready; 08-May-2023 10:25:15; Total CPU time; -734389;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 74; CPU usage; 169; Ready; 08-May-2023 10:25:26; Total CPU time; -734380;
Task ID; 15; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 79; CPU usage; 170; Ready; 08-May-2023 10:25:38; Total CPU time; -734370;
Task ID; 16; Progress; 0; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 0; CPU usage; 83; Ready; ; Total CPU time; -734356;
Task ID; 16; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 8; CPU usage; 161; Ready; 08-May-2023 10:24:50; Total CPU time; -734343;
Task ID; 16; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 14; CPU usage; 172; Ready; 08-May-2023 10:24:55; Total CPU time; -734333;
Task ID; 16; Progress; 25; File; zef_fix_negatives.m; Message; Fix 4 negatives.; Workspace size; 652; Task time; 20; CPU usage; 175; Ready; 08-May-2023 10:25:46; Total CPU time; -734322;
Task ID; 16; Progress; 33; File; zef_fix_negatives.m; Message; Fix 3 negatives.; Workspace size; 652; Task time; 25; CPU usage; 167; Ready; 08-May-2023 10:25:43; Total CPU time; -734313;
Task ID; 16; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 40; CPU usage; 169; Ready; 08-May-2023 10:25:47; Total CPU time; -734288;
Task ID; 16; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 45; CPU usage; 171; Ready; 08-May-2023 10:25:58; Total CPU time; -734279;
Task ID; 16; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 56; CPU usage; 176; Ready; 08-May-2023 10:26:19; Total CPU time; -734260;
Task ID; 16; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 67; CPU usage; 178; Ready; 08-May-2023 10:26:40; Total CPU time; -734242;
Task ID; 16; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 75; CPU usage; 173; Ready; 08-May-2023 10:26:57; Total CPU time; -734227;
Task ID; 17; Progress; 0; File; zef_fix_negatives.m; Message; Fix 1 negatives.; Workspace size; 652; Task time; 0; CPU usage; 145; Ready; ; Total CPU time; -734203;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 5; CPU usage; 174; Ready; 08-May-2023 10:26:07; Total CPU time; -734194;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 11; CPU usage; 178; Ready; 08-May-2023 10:26:17; Total CPU time; -734184;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 16; CPU usage; 169; Ready; 08-May-2023 10:26:28; Total CPU time; -734175;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 21; CPU usage; 173; Ready; 08-May-2023 10:26:39; Total CPU time; -734166;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 29; CPU usage; 174; Ready; 08-May-2023 10:26:53; Total CPU time; -734153;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 34; CPU usage; 174; Ready; 08-May-2023 10:27:04; Total CPU time; -734144;
Task ID; 17; Progress; 100; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 39; CPU usage; 172; Ready; 08-May-2023 10:26:35; Total CPU time; -734136;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 53; CPU usage; 176; Ready; 08-May-2023 10:27:42; Total CPU time; -734110;
Task ID; 17; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 70; CPU usage; 177; Ready; 08-May-2023 10:28:15; Total CPU time; -734081;
Task ID; 18; Progress; 0; File; zef_fix_negatives.m; Message; Fix 1 negatives.; Workspace size; 652; Task time; 0; CPU usage; 61; Ready; ; Total CPU time; -734067;
Task ID; 18; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 10; CPU usage; 187; Ready; 08-May-2023 10:27:34; Total CPU time; -734048;
Task ID; 18; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 16; CPU usage; 179; Ready; 08-May-2023 10:27:45; Total CPU time; -734039;
Task ID; 18; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 33; CPU usage; 187; Ready; 08-May-2023 10:28:19; Total CPU time; -734007;
Task ID; 18; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 55; CPU usage; 178; Ready; 08-May-2023 10:29:03; Total CPU time; -733968;
Task ID; 18; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 60; CPU usage; 176; Ready; 08-May-2023 10:29:13; Total CPU time; -733959;
Task ID; 18; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 65; CPU usage; 176; Ready; 08-May-2023 10:29:23; Total CPU time; -733950;
Task ID; 18; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 70; CPU usage; 174; Ready; 08-May-2023 10:29:34; Total CPU time; -733941;
Task ID; 19; Progress; 0; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 0; CPU usage; 109; Ready; ; Total CPU time; -733928;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 5; CPU usage; 175; Ready; 08-May-2023 10:28:42; Total CPU time; -733918;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 15; CPU usage; 178; Ready; 08-May-2023 10:29:02; Total CPU time; -733900;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 21; CPU usage; 175; Ready; 08-May-2023 10:29:12; Total CPU time; -733891;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 26; CPU usage; 175; Ready; 08-May-2023 10:29:22; Total CPU time; -733883;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 35; CPU usage; 178; Ready; 08-May-2023 10:29:42; Total CPU time; -733865;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 48; CPU usage; 177; Ready; 08-May-2023 10:30:07; Total CPU time; -733843;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 62; CPU usage; 178; Ready; 08-May-2023 10:30:36; Total CPU time; -733817;
Task ID; 19; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 70; CPU usage; 176; Ready; 08-May-2023 10:30:51; Total CPU time; -733804;
Task ID; 20; Progress; 0; File; zef_fix_negatives.m; Message; Fix 1 negatives.; Workspace size; 652; Task time; 0; CPU usage; 116; Ready; ; Total CPU time; -733791;
Task ID; 20; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 27; CPU usage; 180; Ready; 08-May-2023 10:30:43; Total CPU time; -733742;
Task ID; 20; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 32; CPU usage; 178; Ready; 08-May-2023 10:30:53; Total CPU time; -733733;
Task ID; 20; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 37; CPU usage; 179; Ready; 08-May-2023 10:31:04; Total CPU time; -733723;
Task ID; 20; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 47; CPU usage; 180; Ready; 08-May-2023 10:31:24; Total CPU time; -733705;
Task ID; 20; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 55; CPU usage; 179; Ready; 08-May-2023 10:31:39; Total CPU time; -733692;
Task ID; 20; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 60; CPU usage; 178; Ready; 08-May-2023 10:31:49; Total CPU time; -733683;
Task ID; 20; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 68; CPU usage; 174; Ready; 08-May-2023 10:32:05; Total CPU time; -733668;
Task ID; 20; Progress; 100; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 73; CPU usage; 173; Ready; 08-May-2023 10:31:02; Total CPU time; -733660;
Task ID; 21; Progress; 0; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 0; CPU usage; 106; Ready; ; Total CPU time; -733652;
Task ID; 21; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 5; CPU usage; 175; Ready; 08-May-2023 10:31:17; Total CPU time; -733643;
Task ID; 21; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 24; CPU usage; 178; Ready; 08-May-2023 10:31:54; Total CPU time; -733610;
Task ID; 21; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 33; CPU usage; 176; Ready; 08-May-2023 10:32:13; Total CPU time; -733593;
Task ID; 21; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 40; CPU usage; 174; Ready; 08-May-2023 10:32:27; Total CPU time; -733581;
Task ID; 21; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 54; CPU usage; 176; Ready; 08-May-2023 10:32:55; Total CPU time; -733556;
Task ID; 21; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 64; CPU usage; 174; Ready; 08-May-2023 10:33:15; Total CPU time; -733539;
Task ID; 22; Progress; 0; File; zef_fix_negatives.m; Message; Fix 1 negatives.; Workspace size; 652; Task time; 0; CPU usage; 100; Ready; ; Total CPU time; -733522;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 6; CPU usage; 173; Ready; 08-May-2023 10:32:31; Total CPU time; -733513;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 13; CPU usage; 178; Ready; 08-May-2023 10:32:46; Total CPU time; -733500;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 31; CPU usage; 178; Ready; 08-May-2023 10:33:23; Total CPU time; -733467;
Task ID; 22; Progress; 100; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 36; CPU usage; 176; Ready; 08-May-2023 10:32:57; Total CPU time; -733458;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 46; CPU usage; 178; Ready; 08-May-2023 10:33:53; Total CPU time; -733441;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 51; CPU usage; 175; Ready; 08-May-2023 10:34:03; Total CPU time; -733432;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 56; CPU usage; 173; Ready; 08-May-2023 10:34:13; Total CPU time; -733423;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 62; CPU usage; 170; Ready; 08-May-2023 10:34:24; Total CPU time; -733414;
Task ID; 22; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 67; CPU usage; 173; Ready; 08-May-2023 10:34:34; Total CPU time; -733405;
Task ID; 23; Progress; 0; File; zef_fix_negatives.m; Message; Fix 1 negatives.; Workspace size; 652; Task time; 0; CPU usage; 122; Ready; ; Total CPU time; -733388;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 5; CPU usage; 173; Ready; 08-May-2023 10:33:47; Total CPU time; -733380;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 10; CPU usage; 173; Ready; 08-May-2023 10:33:57; Total CPU time; -733371;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 18; CPU usage; 172; Ready; 08-May-2023 10:34:13; Total CPU time; -733357;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 23; CPU usage; 170; Ready; 08-May-2023 10:34:24; Total CPU time; -733348;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 38; CPU usage; 174; Ready; 08-May-2023 10:34:52; Total CPU time; -733323;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 46; CPU usage; 174; Ready; 08-May-2023 10:35:08; Total CPU time; -733309;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 58; CPU usage; 174; Ready; 08-May-2023 10:35:33; Total CPU time; -733287;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 64; CPU usage; 183; Ready; 08-May-2023 10:35:45; Total CPU time; -733277;
Task ID; 23; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 70; CPU usage; 179; Ready; 08-May-2023 10:35:57; Total CPU time; -733266;
Task ID; 24; Progress; 0; File; zef_fix_negatives.m; Message; Fix 1 negatives.; Workspace size; 652; Task time; 0; CPU usage; 112; Ready; ; Total CPU time; -733246;
Task ID; 24; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 6; CPU usage; 182; Ready; 08-May-2023 10:35:09; Total CPU time; -733236;
Task ID; 24; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 16; CPU usage; 178; Ready; 08-May-2023 10:35:30; Total CPU time; -733217;
Task ID; 24; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 28; CPU usage; 178; Ready; 08-May-2023 10:35:54; Total CPU time; -733196;
Task ID; 24; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 33; CPU usage; 177; Ready; 08-May-2023 10:36:04; Total CPU time; -733187;
Task ID; 24; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 38; CPU usage; 180; Ready; 08-May-2023 10:36:14; Total CPU time; -733177;
Task ID; 24; Progress; 50; File; zef_fix_negatives.m; Message; Fix 2 negatives.; Workspace size; 652; Task time; 46; CPU usage; 180; Ready; 08-May-2023 10:36:30; Total CPU time; -733164;

Context

Name Value
Version 2241fdd zef_nse_sigma: fix indentations with Matlab's smart indent tool
OS MacOS
Shell N/A

Changing UI elements

Description

In the app there are some buttons that do nothing useful for a current state of the project or inevitable lead to an error after clicking them. Disabling and hiding them will improve the app usability and declutter the interface a little bit. Below is the list of such buttons I found:

Mesh Visualization tool

  • Visualize volume

    Problem: This button is always active, even though the project might not have a FEM mesh, thus no volume to display. Clicking this button in such case will lead to an error:

    Error
      Index in position 2 exceeds array bounds.
      Error in zef_plot_volume (line 319)
      tetra_c = (1/4)*(nodes(tetra(:,1),:) + nodes(tetra(:,2),:) + nodes(tetra(:,3),:) + nodes(tetra(:,4),:));
      
      Error in zef_visualize_volume (line 4)
      zef_plot_volume;
       
      Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
      Error while evaluating Button PrivateButtonPushedFcn.
    

    Solution: Disable this button whenever the FEM mesh does not exist. Also, It would be awesome to add an explanation for disabled button in a tooltip.

    Solution example
      zef.h_pushbutton31.Enable = 'off'
      zef.h_pushbutton31.TooltipString = 'You should create FEM Mesh first'
    
  • Frame / Movie

    Problem: presumably, this button only makes sense in case if the model has more than one frame.
    Solution: Disable this button when there is no more than 1 frame in current model

  • Cutting plane mode

    Problems:

    1. It looks like it relates to clipping planes, but it uses another term "cutting plane" which is a little bit confusing
    2. It stays active even though the clipping planes are deactivated

    Solution: Disable when all clipping planes are deactivated. Rename to "clipping plane mode"

  • Plot graph button

    Problem: This button seems to work only after the FEM mesh is generated. Otherwise it causes the following error

    Error
      Error using matlab.ui.control.UIAxes/set
      Value must be a 1x2 vector of numeric type in which the second element is greater than the first element or is Inf.
      
      Error in zef_histogram (line 15)
      set(gca,'ylim',[min(hist_y) max(hist_y)]);
      
      Error in zef_plot_graph (line 9)
      eval([g_list{2}{g_ind} '(' v_name ');']);
       
      Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
      Error while evaluating Button PrivateButtonPushedFcn.
    

    Solution: Disable this button whenever the FEM mesh does not exist. Also, It would be awesome to add an explanation for disabled button in a tooltip.

Figure tool

  • Reset/Play/Stop/Pause buttons and "Loop on count" checkbox
    Problem: these controls do nothing for a single frame project

  • Many sliders are not having any effect in certain context. They might be hidden or disabled

    • Time is only used when there is more than 1 frame
    • Transp. rec, Transp. surf, Transp. sens, Transp. cones, Transp. add are always shown and active even though the Figure Tool might not even show surfaces, cones or sensors at a given moment. This often leads to confusion when the wrong slider is used mistakenly.

Mesh tool

  • Meshing accuracy control
    In practice this value should always be 1. Changing this parameter leads to degrading accuracy.
    Solution: Remove this input field
  • Downsample surfaces
    Solution: Rename this checkbox to Resample surfaces

tES Lead Field Error (commit b7d41a2)

When running the script m/forward_scripts/brain/lead_field_tes_fem.m via the Mesh Tool, the following error is printed in the Matlab console:

Index exceeds the number of array elements. Index must not exceed 35174.

Error in lead_field_tes_fem (line 803)
        L_tes(3*(i-1)+1,:) = L_tes(3*(i-1)+1,:)/dof_count(i);

Error in lead_field_matrix (line 119)
[zef.L, zef.S, zef.source_positions, zef.source_directions, zef.eit_ind, zef.eit_count] = lead_field_tes_fem(zef.nodes_aux, zef.tetra,zef.sigma(:,1),zef.sensors_aux,zef.brain_ind,zef.source_ind,zef.lf_param);

Error in zef_tes_lead_field (line 7)
lead_field_matrix;

Error in zef_run_forward_simulation (line 1)
eval(zef.h_forward_simulation_table.Data{zef.forward_simulation_selected(1),3});

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

The steps to reproduce this are as follows:

  1. start Zeffiro Interface,

  2. open up a test project,

  3. select the script zef_tes_lead_field in the Mesh Tool, but do not make any changes to the settings

  4. press Run Script in the Mesh Tool window and

  5. wait for the error to appear.

This happends when the read–write HEAD is pointed at commit b7d41a2.

Figure transparancy does not get set

Description

When I click the "Visualize surface/volume" button, the distance and rotation parameters of the Figure tool get reset to the values specified in Mesh Visualization tool. At the same time, the values from "Transparency rec/surf" input field gets ignored, so the figure tool preserves the previous positions of the corresponding sliders

Steps to reproduce

  1. Load the multicompartment head project
  2. Click "Visualize surface"
  3. In the figure tool manipulate the "transp. surf." slider
  4. Click "Visualize surface" again, pay attention to the Transparency rec/surf" input field values

See the issue: the figure tool does not use provided configs and instead maintain its previous state.

Expected behavior

Either

  • the mesh visualization tool does not provide transparency controls
    OR
  • the transparency slider of the figure tool respect them.

Context

Name Value
Version f958de8 Merge pull request #193 from sampsapursiainen/192-fs2zefsh-improvements
OS MacOS
Shell N/A

Unrecognized function or variable 'ft_defaults'.

When I run zeffiro_interface I get the following error:

Error using evalc
Unrecognized function or variable 'ft_defaults'.

Error in zef_start_config (line 7)
if isequal(zef.zeffiro_restart, 0), evalc('ft_defaults'); end

Error in zeffiro_interface (line 283)
  zef_start_config;

Version: 2241fdd (main_development_branch) zef_nse_sigma: fix indentations with Matlab's smart indent tool

EIT Lead Field Error (commit b7d41a2)

When running the script m/forward_scripts/brain/lead_field_eit_fem.m via the Mesh Tool, the following error is printed in the Matlab console:

Error using  *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the
first matrix matches the number of rows in the second matrix. To perform elementwise
multiplication, use '.*'.

Error in lead_field_eit_fem (line 619)
bg_data = Aux_mat*Current_pattern;

Error in lead_field_matrix (line 108)
[zef.L, zef.inv_bg_data, zef.source_positions, zef.source_directions, zef.eit_ind, zef.eit_count] = lead_field_eit_fem(zef.nodes_aux,zef.tetra,zef.sigma(:,1),zef.sensors_aux,zef.brain_ind,zef.source_ind,zef.lf_param);

Error in zef_eit_lead_field (line 6)
lead_field_matrix;

Error in zef_run_forward_simulation (line 1)
eval(zef.h_forward_simulation_table.Data{zef.forward_simulation_selected(1),3});

Related documentation

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

The steps to reproduce this are as follows:

  1. start Zeffiro Interface,

  2. open up a project with the model that we have been using,

  3. select the script zef_eit_lead_field in the Mesh Tool, but do not make any changes to the settings

  4. press Run Script in the Mesh Tool window and

  5. wait for the error to appear.

This happends when the read–write HEAD is pointed at commit b7d41a2.

"Update & Visualize" button does not update Figure details

Description

When I click "Update & Visualize" button in the ES Workbench tool, the Figure toot starts showing me the surface visualization, although the Details of the plot does not get updated and migth keep showing "Visualization: Volume"

Steps to reproduce

  1. Load the project
  2. Visualize volume
  3. See the visualization type in the Figure tool is "Volume" ☑️
  4. Open ES workbench tool
  5. Click "Update & Visualize"

See the visualization type in the Figure tool is still "Volume" ❌

Expected behavior

The visualization should either keep it's type or update the details.

Screenshots

2023-05-08-14.31.31.mp4

Context

Name Value
Version 6cb2537 zef_import_parcellation_colortable: load fields from color table file order-agnostically
OS MacOS
Shell N/A

zef_transfer_matrix broken by missing variable definition

When trying to run the EEG routine, the following error is thrown in the CPU branch of zef_transfer_matrix:

>> zef_eeg_lead_field
Unrecognized function or variable 'n_parallel'.

Error in zef_transfer_matrix (line 243)
            parpool(n_parallel);

Error in zef_lead_field_eeg_fem (line 207)
[T, Schur_complement, ~] = zef_transfer_matrix(...

Error in zef_lead_field_matrix (line 158)
    [zef.L, zef.source_positions, zef.source_directions] = zef_lead_field_eeg_fem( ...

Error in zef_eeg_lead_field (line 13)
zef = zef_lead_field_matrix(zef);

I'm not sure where n_parallel is supposed to come from, but this is a blocker for the stable release. Looks like commit 47adc81 is the culprit behind this issue.

Note: Once this is fixed, please write the hash of the fixing commit here, so that the issue may be marked as resolved by that commit. Even better would be to create a branch for the fix and then merge it into main_development_branch once the fix is complete.

Document the core zef struct

Currently Zeffiro Interface contains at its core a god object or struct zef, which is responsible for storing most if not all of the information needed by the program. For a stable release, the names and types of the fields of this struct like zef.nodes and zef.tetra need to be documented and attached to the semantic version numbers (major.minor.patch) of Zeffiro Interface, to make users and developers aware of whether something has changed in a way that requires them to update their code or Zeffiro projects.

In practice this means that if a new field is added to zef, such that backwards compatibility is not broken, the minor version is incremented. If a field is added, modified or updated to be used with another field, such that backwards-compatibility is broken, then the major version is incremented. If a bug with existing fields is fixed, the patch version is incremented.

As a suggestion for a possible first implementation, a function zef_core_struct or similar could be written, that returns a default version of the struct with all possible fields initialized to some valid value. The validness could be enforced by using name–value arguments with default values via Matlab function argument validation. The fields of zef could then be documented in the documentation comment of this function.

This approach would allow a user or caller to modify individual fields during initialization if required, but leave them as-is, if there is no need to modify the default values.

Suggestion: show errors

Problem

At the moment, all of the validation errors in the app get printed to the Matlab command window and may be missed, although they should bring user's attention since they are the direct consequence of their actions and do not allow to continue the initiated operations.

Example:

  1. User starts Zeffiro Interface and loads Multicompartment head project
  2. Open ES Workbench, set desired parameters
  3. Click "Find currents"
  4. Confirm calculations

It looks like nothing happens at this point. Meanwhile there is an error printed to stderr:

Error using zef_ES_find_currents (line 108)
ZI: No discretized sources found. Perhaps you forgot to calculate or load them...?
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

So at the end, asking user if they absolutely want to perform computations attracts much more attention than the fact, that they cannot be performed due to an absence of tES lead field.

Suggestion

Using builtin tools for showing errors in GUI:

errordlg(sprintf('Error: %s', exception.message), 'Error');

Screenshot 2023-05-08 at 10 44 57

This would also make it possible to use ZI as a standalone app, which otherwise is impossible due to using command window as a communication channel.

MEG Grad Lead Field Error (commit b7d41a2)

When running the script m/forward_scripts/brain/lead_field_meg_grad_fem.m via the Mesh Tool, the following error is printed in the Matlab console:

Index in position 1 exceeds array bounds. Index must not exceed 6.

Error in lead_field_meg_grad_fem (line 58)
    sensors(7:9,:) = sensors(7:9,:)./repmat(sqrt(sum(sensors(7:9,:).^2)),3,1);

Error in lead_field_matrix (line 97)
[zef.L, zef.source_positions, zef.source_directions] = lead_field_meg_grad_fem(zef.nodes_aux,zef.tetra,zef.sigma(:,1),zef.sensors_aux,zef.brain_ind,zef.source_ind,zef.lf_param);

Error in zef_meg_gradiometers_lead_field (line 6)
lead_field_matrix;

Error in zef_run_forward_simulation (line 1)
eval(zef.h_forward_simulation_table.Data{zef.forward_simulation_selected(1),3});

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

The steps to reproduce this are as follows:

  1. start Zeffiro Interface,

  2. open up a project with a test model,

  3. select the script zef_meg_gradiometers_lead_field in the Mesh Tool, but do not make any changes to the settings

  4. press Run Script in the Mesh Tool window and

  5. wait for the error to appear.

This happens when the read–write HEAD is pointed at commit b7d41a2.

Tutorial & data examples for users

Hi Sampsa,

I'd like to try your toolbox,
do you have any tutorials or
any examples guidances for
first steps & examples data.

Thanks Bests regards

Error in mesh generation with volume refinement post-processing

When running the mesh generation routine on the open head model we have been using, with surface refinement (mesh generation) on in

  • active compartments
  • ventricles
  • singular cortex
  • skull and
  • scalp

and volumetric refinement (post-processing) on in

  • active compartments and
  • gray matter

the following error is raised during post-processing:

Error using vertcat
Dimensions of arrays being concatenated are not consistent.

Error in zef_postprocess_fem_mesh (line 157)
refinement_compartments = [refinement_compartments ; refinement_compartments_aux(:)];

Error in zef_create_finite_element_mesh (line 12)
zef = zef_postprocess_fem_mesh(zef);
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Button PrivateButtonPushedFcn.

The initial mesh resolution was set at 2 mm.

Saving profile modifies the source code

Description

Whenever I make any changes and click “Save Profile” in the Mesh tool, it updates the source code of the app, which is tracked by git so the git pull will not work anymore unless I stash or discard changes. This looks like a flaw and prevents from saving profiles while updating the project.

Suggestion

I would suggest to store changed profiles similarly, as we handle saving projects - suggest user to store them as a separate file or embed them inside the project .mat file

Screenshots

Screen.Recording.2023-05-08.at.20.57.01.mov

zef_meshing_example does not define zef.downsample_surfaces

Trying to run the example script zef_meshing_example with a freshly restarted Matlab results in the error

>> addpath(genpath("."))
>> zef_meshing_example
Unrecognized field name "downsample_surfaces".

Error in zef_create_finite_element_mesh (line 7)
if zef.downsample_surfaces == 1

Error in zef_meshing_example (line 16)
project_struct = zef_create_finite_element_mesh(project_struct);

As these are supposed to be standalone examples, the example function should set a valid value for the struct field with

project_struct.downsample_surfaces = true <or> false;

Which is more appropriate from the example's point of view, true or false, I am not sure.

Commit messages

Motivation

Making non-descriptive commit messages is generally considered a bad practice in software development. Here are a few reasons why:

  1. Lack of clarity: They provide insufficient context, making it difficult to understand the purpose of changes.
  2. Collaboration challenges: Team members struggle to review and comprehend others' changes, leading to misunderstandings and delays.
  3. Debugging and issue tracking: Identifying the cause of problems becomes harder without informative commit messages.
  4. Code maintenance and refactoring: Non-descriptive messages hinder understanding past decisions, causing inefficiencies during updates and refactoring.
  5. Knowledge transfer and onboarding: New team members face challenges in quickly grasping the project's history and development trajectory.

Problem

At the moment the project commit history gets populated by commits with non-descriptive messages. I personally experienced all of the described challenges while trying to understand the purpose of different fragments of code, since most of them didn't state their purpose. Here's the demo of such workflow:

  1. I see the source code which I try to understand
  2. Check the commit that added a certain piece of code
  3. See "commit message", along with hundreds other changes without hope to understand what's going on
commits.mp4

See also the screenshot of the commit history:

Screenshot 2023-05-19 at 13 21 04

💡 Solution

The solution to the problem would require several steps:

  1. Define a desired commit format
    We would need to decide what kind of information is necessary in the commit messages to have, what prefixes do we use etc. That information should then be introduce it into CONTRIBUTINB.md so all contributors can see it.
  2. Introduce automatic commit checkers
    It would be great to introduce a CI commit message checker that would block the pull requests and disallow merging non-descriptive commits to the protected branches (let's say master and dev).
    Existing options are options are:
  3. Protect the dev branch from direct pushes
  4. Add a commit message check to a default pull request template, so the reviewer remembers to read those messages and reject merge until they are fixed

I believe this would make working on a Zeffiro more productive and allow to introduce new developers much quicker 🙌

Cannot import `multicompartment_head_project`

Description

I can't import the multicompartment head project from this directory, even though it was possible recently

Steps to reproduce

Run via import example:

addpath scripts
zef_import_example

Gives me this error:

Check for incorrect argument data type or missing argument in call to function 'struct2cell'.

Error in zef_import_parcellation_colortable (line 39)
    parcellation_aux = {parcellation_aux{1:2}, struct2cell(parcellation_aux{3})};

Error in zef_import_segmentation (line 271)
        zef = zef_import_parcellation_colortable(zef,atlas_colortable_filename,compartment_tag,atlas_merge);

Error in zeffiro_interface (line 415)
        zef = zef_import_segmentation(zef);

Alternatively, when I try to import the same project manually, I get exactly the same error, although I can see that some parts of the project are successfully imported. See the screenshot below

Expected behavior

The project gets imported.

Screenshots

Screenshot 2023-05-06 at 17 56 07

Context

Name Value
Version 2241fdd zef_nse_sigma: fix indentations with Matlab's smart indent tool
OS MacOS
Shell N/A

error on unselecting transformation

Description

Error occurs when I unfocus selected transformation in the Segmentation tool

Steps to reproduce

  1. Open ZI, Load the project
  2. Open Segmentation tool
  3. Toggle controls to reveal electrodes and transformation sections
  4. Select any compartment
  5. Select the transformation
  6. Click on the empty space

The following error occur:

Index exceeds the number of array elements. Index must not exceed 0.

Error in zef_transform_table_selection (line 3)
transform_selected = eventdata.Indices(1);
 
Error using matlab.ui.internal.controller.uitable.WebMWTableController/handleEvent (line 747)
Error while evaluating Table CellSelectionCallback.

See the video for better understanding

Screenshots

output.mp4

Context

Name Value
Version 6cb2537 zef_import_parcellation_colortable: load fields from color table file order-agnostically
OS MacOS
Shell N/A

Wrong initial scale of 3D model

Description

When I visualize the imported head model for the first time it has wrong scale

Steps to reproduce

  1. Open ZI
  2. Import -> Import data to a new project
  3. Select proj_root/scripts/scripts_for_importing/multicompartment_head_project/import_segmentation.zef
  4. Wait for importing
  5. Click "Visualize surfaces"

Even though the Mesh Visualization tool has scale 5 and zef.cam_va parameter also has that same value, the model is displayed with a wrong scale. Usually, after clicking "Visualize surfaces" second time it gets fixed. This was reproduced on both Linux and MacOS

Expected behavior

Screenshots

MacOS

output.mp4

Linux

output.mp4

Context

Name Value
Version 6cb2537 zef_import_parcellation_colortable: load fields from color table file order-agnostically
OS Linux and MacOS
Shell N/A

The surfaces visualisation gets broken after plotting graph

Description

The surfaces visualisation gets broken after plotting graph

Steps to reproduce

  1. Import multicompartment_head_project
  2. Generate FEM mesh
  3. Generate Lead Field via zef_tes_lead_field; script
  4. Click "plot graph"
  5. Click "visualize surfaces"
  6. see the error
Property assignment is not allowed when the object is empty.  Use
subscripted assignment to create an array element.

Error in zef_update_colorscale (line 25)
    h.ColorScale = 'linear';

Error in zef_set_sliders_plot (line 6)
evalin('base','zef_update_colorscale;');

Error in zef_plot_meshes (line 1228)
        zef_set_sliders_plot(1);

Error in zef_visualize_surfaces (line 3)
zef_update_fig_details;zef_plot_meshes([]);
 
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 427)
Error while evaluating Button PrivateButtonPushedFcn.

Expected behavior

The figure tool shows a correct visualization for surface model, no errors occur.

Screenshots

2023-05-07-11.13.04.mp4

Context

Name Value
Version 2241fdd zef_nse_sigma: fix indentations with Matlab's smart indent tool
OS MacOS
Shell N/A

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.