Dot Product
dot_product_score(spot_colors, bled_codes, norm_shift=0, weight_squared=None)
Computes sum(W**2(s * b) / W**2)
where s
is a spot_color
, b
is a bled_code
and W**2
is weight_squared
for a particular spot_color
. Sum is over all rounds and channels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spot_colors |
np.ndarray
|
|
required |
bled_codes |
np.ndarray
|
|
required |
norm_shift |
float
|
shift to apply to normalisation of spot_colors to limit boost of weak spots. |
0
|
weight_squared |
Optional[np.ndarray]
|
|
None
|
Returns:
Type | Description |
---|---|
np.ndarray
|
|
Source code in coppafish/call_spots/dot_product.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
dot_product_score_no_weight(spot_colors, bled_codes, norm_shift=0)
Computes sum((s * b))
where s
is a spot_color
, b
is a bled_code
.
Sum is over all rounds and channels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spot_colors |
np.ndarray
|
|
required |
bled_codes |
np.ndarray
|
|
required |
norm_shift |
float
|
shift to apply to normalisation of spot_colors to limit boost of weak spots. |
0
|
Returns:
Type | Description |
---|---|
np.ndarray
|
|
Source code in coppafish/call_spots/dot_product.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
Optimised
dot_product_score(spot_colors, bled_codes, norm_shift, weight_squared)
Computes sum(W**2(s * b) / W**2)
where s
is a spot_color
, b
is a bled_code
and W**2
is weight_squared
for a particular spot_color
. Sum is over all rounds and channels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spot_colors |
jnp.ndarray
|
|
required |
bled_codes |
jnp.ndarray
|
|
required |
norm_shift |
float
|
shift to apply to normalisation of spot_colors to limit boost of weak spots. |
required |
weight_squared |
jnp.ndarray
|
|
required |
Returns:
Type | Description |
---|---|
jnp.ndarray
|
|
Source code in coppafish/call_spots/dot_product_optimised.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
dot_product_score_no_weight(spot_colors, bled_codes, norm_shift)
Computes sum((s * b))
where s
is a spot_color
, b
is a bled_code
.
Sum is over all rounds and channels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spot_colors |
jnp.ndarray
|
|
required |
bled_codes |
jnp.ndarray
|
|
required |
norm_shift |
float
|
shift to apply to normalisation of spot_colors to limit boost of weak spots. |
required |
Returns:
Type | Description |
---|---|
jnp.ndarray
|
|
Source code in coppafish/call_spots/dot_product_optimised.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|