Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

IndexError in lin_mix_mod.py line 511 #248

Closed
paulmueller opened this issue Aug 2, 2019 · 6 comments
Closed

IndexError in lin_mix_mod.py line 511 #248

paulmueller opened this issue Aug 2, 2019 · 6 comments
Labels

Comments

@paulmueller
Copy link
Member

This error happens when performing an lmm analysis for volume in ShapeOut for some sample combinations (for some others it works).

Error_lmm_volume-1

The data are located at MPL guck\Members\Marta\Vimentin\lmm_analysis\Wt_VimKO_Filtered\Wt_VimKO.zmso

@paulmueller paulmueller added the bug label Aug 2, 2019
@paulmueller
Copy link
Member Author

@maikherbig Maik, did see this type of error before?
It looks like R does not return the correct number of coefficients. The line affected is: https://github.com/ZELLMECHANIK-DRESDEN/ShapeOut/blob/0.9.5/shapeout/lin_mix_mod.py#L511

Could this be a nan-value issue?

@paulmueller
Copy link
Member Author

Subscribe @MartaUrb

@maikherbig
Copy link
Member

Yes, this is a nan issue.
For example look at
\20170825_Marta_DC_VimKO_d11\02_VimKO_cnt\Online\M2_0.320000ul_s.tdms
->Cell track->time: the first entry is 119, the second 166
Then look into the contours file and you will see that it starts like this:
Contour in frame 166
( 157 , 32 )
( 156 , 33 )
...
Apparently, the first conotur (time 119) is missing. Hence, no volume or principal inertia ratio can be calculated. Five of Martas files are affected.
One can circument the issue in ShapeOut by using a filter for volume from -999999999 to 9999999. Then, the filter throws out the nan-event and lmm runs nicely :)

@paulmueller
Copy link
Member Author

paulmueller commented Aug 3, 2019

OK, so a fix in lin_mix_mod.py would be to remove all nan/inf values in the arrays given to linmixmod(xs=..)?

@MartaUrb
Copy link

MartaUrb commented Aug 3, 2019 via email

@paulmueller
Copy link
Member Author

Thank you for your help. This will be fixed in the next release of Shape-Out.

@paulmueller paulmueller mentioned this issue Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants