Base
check_neighbour_intensity(image, spot_yxz, thresh=0)
Checks whether a neighbouring pixel to those indicated in spot_yxz
has intensity less than thresh
.
The idea is that if pixel has very low intensity right next to it, it is probably a spurious spot.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
np.ndarray
|
|
required |
spot_yxz |
np.ndarray
|
|
required |
thresh |
float
|
Spots are indicated as |
0
|
Returns:
Type | Description |
---|---|
np.ndarray
|
|
Source code in coppafish/find_spots/base.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
get_isolated(image, spot_yxz, thresh, radius_inner, radius_xy, radius_z=None)
Determines whether each spot in spot_yxz
is isolated by getting the value of image after annular filtering
at each location in spot_yxz
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
np.ndarray
|
|
required |
spot_yxz |
np.ndarray
|
|
required |
thresh |
float
|
Spots are isolated if annulus filtered image at spot location less than this. |
required |
radius_inner |
float
|
Inner radius of annulus filtering kernel within which values are all zero. |
required |
radius_xy |
float
|
Outer radius of annulus filtering kernel in xy direction. |
required |
radius_z |
Optional[float]
|
Outer radius of annulus filtering kernel in z direction.
If |
None
|
Returns:
Type | Description |
---|---|
np.ndarray
|
|
Source code in coppafish/find_spots/base.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
get_isolated_points(spot_yxz, isolation_dist)
Get the isolated points in a point cloud as those whose neighbour is far.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spot_yxz |
np.ndarray
|
|
required |
isolation_dist |
float
|
Spots are isolated if nearest neighbour is further away than this. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
|
Source code in coppafish/find_spots/base.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
spot_yxz(spot_details, tile, round, channel, return_isolated=False)
Function which gets yxz positions (and whether isolated) of spots on a particular tile
, round
, channel
from spot_details
in find_spots notebook page.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
spot_details |
np.ndarray
|
|
required |
tile |
int
|
Tile of desired spots. |
required |
round |
int
|
Round of desired spots. |
required |
channel |
int
|
Channel of desired spots. |
required |
return_isolated |
bool
|
Whether to return isolated status of each spot. |
False
|
Returns:
Type | Description |
---|---|
Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]
|
|
Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]
|
|
Source code in coppafish/find_spots/base.py
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 |
|