Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ <h1>Listing of /{% for bc in breadcrumbs %}<a href="/files/{{ bc.path }}">{{ bc.
function on_analysis_settings(fitModule='LatGaussFitFR'){
//console.log('about to reload')
togglePanel('#localization_form');
$('#localization_form').load('/localization/settings/' + fitModule,function () {
$('#localization_form').load('/localization/settings/' + fitModule + '/', function () {
//alert( "Load was performed." );
// $(this).unwrap();
//console.log('load performed')
Expand Down
2 changes: 1 addition & 1 deletion docs/Installation/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Installation

The best PYME installation method will depend on your background and whether you are already using python on your computer.

If you have an existing PYME installation, we recommend :ref:`removing it<Removing a PYME install>` before installing a new one.
If you have an existing PYME installation, we recommend :ref:`removing it<Removing a PYME install>`_ before installing a new one.

Executable installers (Windows and OSX)
=======================================
Expand Down
46 changes: 45 additions & 1 deletion tests/PYME/Analysis/points/test_clumps.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,48 @@ def test_coalesce_incomplete_nontrivial():
x = np.random.rand(len(assigned))
x_out = multiview.coalesce_dict_sorted({'x': x}, assigned, ['x', ], {}, discard_trivial=True)['x']

assert len(x_out) == len(np.unique(assigned[assigned >= 1]))
assert len(x_out) == len(np.unique(assigned[assigned >= 1]))

def test_pydeclump_findclumps_gap():
from PYME.Analysis.points.DeClump import pyDeClump
import numpy as np
x = np.array([0, 0, 0])
y = x
t = np.array([0, 1, 3], dtype=np.int32)
dist = 2 * np.ones(len(x))
assigned = pyDeClump.findClumps(t.astype(np.int32), x, y, dist, 1)
# should group all points as there is only a 1 frame gap
np.testing.assert_array_equal([1, 1, 1], assigned)

def test_declump_findclumps_gap():
from PYME.Analysis.points.DeClump import deClump
import numpy as np
x = np.array([0, 0, 0])
y = x
t = np.array([0, 1, 3], dtype=np.int32)
dist = 2 * np.ones(len(x))
assigned = deClump.findClumps(t.astype(np.int32), x.astype(np.float32), y.astype(np.float32), dist.astype(np.float32), 1)
# should group all points as there is only a 1 frame gap
np.testing.assert_array_equal([1, 1, 1], assigned)

def test_pydeclump_findclumps_same_frame():
from PYME.Analysis.points.DeClump import pyDeClump
import numpy as np
x = np.array([0, 0])
y = x
t = np.array([0, 0], dtype=np.int32)
dist = 2 * np.ones(2)
assigned = pyDeClump.findClumps(t.astype(np.int32), x, y, dist, 0)
# should not group any points because they are both on the same frame
np.testing.assert_array_equal([1, 2], assigned)

def test_declump_findclumps_same_frame():
from PYME.Analysis.points.DeClump import deClump
import numpy as np
x = np.array([0, 0])
y = x
t = np.array([0, 0], dtype=np.int32)
dist = 2 * np.ones(len(x))
assigned = deClump.findClumps(t.astype(np.int32), x.astype(np.float32), y.astype(np.float32), dist.astype(np.float32), 0)
# should not group any points because they are both on the same frame
np.testing.assert_array_equal([1, 2], assigned)