DC-analysis / dclab

Python library for the post-measurement analysis of real-time deformability cytometry (RT-DC) data sets
https://dclab.readthedocs.io
Other
10 stars 12 forks source link

LUT "LE-2D-FEM-19" is partially extrapolated for large deformations #191

Closed paulmueller closed 1 year ago

paulmueller commented 1 year ago

The LUT "LE-2D-FEM-19" was not correctly computed from the simulation data for large deformations. The simulation data is sparse for large deformations, which, in combination with linear interpolation, resulted in a skewed Young's modulus. This can be seen in the output of scripts/fem2lutiso_std.py:

Old approach of computing the LUT and isoelasticity lines: Figure_1 In the left-most plot, the bright dots are simulations and the greenish part is the support for the Young's modulus LUT. It seems like someone was really smart and added one single simulation at the right hand side to increase the overall size of the LUT. However, this introduced a skewing of the isoelastics for large deformations in the areas were simulations are sparse (right plots).

Here is the new approach, which removes areas of sparse simulations: Figure_2

This removes the skewedness in the isoelastics, but it also makes the LUT smaller...

paulmueller commented 1 year ago

Commits 5c1697bf6e8958a85a191df31642c41ce47e421b and 33923ce2237f9e3723b8b5389379d2dd5f34f25b introduce the new LUT extraction with sparsity-removal.

In order to be compatible with previous versions of dclab, we should still extrapolate, but smarter, to the original LUT size...

paulmueller commented 1 year ago

It is possible to compute isoelasticity lines from the LUT where it is dense using 3rd order polynomials and then extrapolate those up to the convex hull of the LUT:

Figure_IsoelExtrapolate

Adding the found values of the isoelasticity lines back to the LUT yields a less sparse LUT from which cleaner isoelasticity lines can be computed:

Figure_5

paulmueller commented 1 year ago

And here the same plots for volume (affects isoelasticity lines only) old_volume old_volume_2

paulmueller commented 1 year ago

The improved LUT and isoelasticity lines will be available in dclab 0.46.0

paulmueller commented 1 year ago

I changed it again.

area_um - deform:

LE-2D-FEM-19_1 LE-2D-FEM-19_2 LE-2D-FEM-19_3

volume - deform:

LE-2D-FEM-19_volume_1 LE-2D-FEM-19_volume_2 LE-2D-FEM-19_volume_3

paulmueller commented 1 year ago

Some points at the boundary were missing:

area_um - deform LE-2D-FEM-19_area_1 LE-2D-FEM-19_area_2 LE-2D-FEM-19_area_3

volume - deform LE-2D-FEM-19_volume_1 LE-2D-FEM-19_volume_2 LE-2D-FEM-19_volume_3

paulmueller commented 1 year ago

The convex hull was not properly updated after adding the analytical isoelastics (resulted in LUT where small deformations were missing).

area: LE-2D-FEM-19_area_1 LE-2D-FEM-19_area_2 LE-2D-FEM-19_area_3

volume: LE-2D-FEM-19_volume_1 LE-2D-FEM-19_volume_2 LE-2D-FEM-19_volume_3