fiji / Colocalisation_Analysis

Fiji's plugin for colocalization analysis
http://imagej.net/Coloc_2
GNU General Public License v3.0
25 stars 18 forks source link

Make auto threshold commutative #4

Closed tomka closed 9 years ago

tomka commented 9 years ago

This pull request includes two bug fixes. The first one makes sure new generic based variables are created correctly with createVariable() in all places that expect a completely new instance. The second fix makes the auto threshold regression commutative. This means it doesn't matter anymore if it operates on two images regardless if they are passed in as channel one and B or B and A. Birgit Möller noted some time ago on the ImageJ mailing list that Coloc 2 given different results if input channel order is reversed. This problem should be fixed with this pull request.

ctrueden commented 9 years ago

Beautiful! Very nice and well documented, so I merged it.

I would like to get Fiji to a place where each plugin author becomes curator of their own plugins. As such, I added you to the repository as an admin. I also invited @chalkie666 to join.

I am not qualified to review the mathematical aspects of these changes—if you feel you need that here, maybe @chalkie666 has time to take a quick look? Otherwise: :+1:!

ctrueden commented 9 years ago

Looks like this change broke the build. There is a failing unit test now:

Running tests.AutoThresholdRegressionTest
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.161 sec <<< FAILURE! - in tests.AutoThresholdRegressionTest
cummutativityTest(tests.AutoThresholdRegressionTest)  Time elapsed: 0.085 sec  <<< FAILURE!
java.lang.AssertionError: expected:<8.0> but was:<4.0>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at tests.AutoThresholdRegressionTest.cummutativityTest(AutoThresholdRegressionTest.java:63)

@tomka, can you please investigate and fix as you see fit? Thank you!

tomka commented 9 years ago

Oops, sorry about that failing test. I'll have a look at it today and push the fix directly to Coloc 2's master. Thanks for adding me to the admin group.

tomka commented 9 years ago

I just pushed a fix, the test pass again.

ctrueden commented 9 years ago

Thanks!