Skip to content

Issue with FEM Analysis in pyTFM - ValueError in solidspy DME function #8

@MHL0411

Description

@MHL0411

Dear AndreasBauer,

I hope this message finds you well. I'm writing to seek your assistance with an issue I've encountered while using the pyTFM package for traction force microscopy analysis.

Problem Description:
During FEM analysis, I consistently get the following error:

text
ValueError: could not broadcast input array from shape (20) into shape (8)
This occurs in solidspy/assemutil.py, line 87, during the DME assembly process.

Current Setup:

Analyzing multiple frames (e.g., ['03', '10'] or ['04', '05'])

Parameters used:

python
sigma: 0.49
young: 49000.0
pixelsize: 0.201
window_size: 20.0
overlap: 18.0
TFM_mode: finite_thickness
FEM_mode: colony
min_obj_size: 1500
sigma_cells: 0.5
What I've Tried:

Verified that proper masks exist for both "Cell Boundary" and "Tractions"

Adjusted parameters (min_obj_size, sigma_cells, window_size)

Changed FEM_mode from "colony" to "single_cell"

Cleaned output directories between runs

Run complete analysis workflow (deformation → traction → colony properties → FEM)

Observations:

Deformation and traction calculations complete successfully

Colony properties analysis works (though sometimes reports missing masks)

The error specifically occurs during FEM_simulation in grid_setup_solids_py.py

The issue appears consistently across different datasets

Questions:

What could be causing this array shape mismatch in the DME assembly?

Is there a known compatibility issue between the mesh generation and solidspy solver?

Are there specific requirements for the cell boundary masks that might trigger this?

Would you recommend any specific parameter combinations or debugging steps?

The analysis works perfectly until the FEM stage, and I'd greatly appreciate any insights you might have on resolving this issue.

Thank you for your time and for developing this valuable tool.

Best regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions