PYME-extra 1.0.4.post0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- PYMEcs/Acquire/Actions/__init__.py +0 -0
- PYMEcs/Acquire/Actions/custom.py +167 -0
- PYMEcs/Acquire/Hardware/LPthreadedSimple.py +248 -0
- PYMEcs/Acquire/Hardware/LPthreadedSimpleSim.py +246 -0
- PYMEcs/Acquire/Hardware/NikonTiFlaskServer.py +45 -0
- PYMEcs/Acquire/Hardware/NikonTiFlaskServerT.py +59 -0
- PYMEcs/Acquire/Hardware/NikonTiRESTClient.py +73 -0
- PYMEcs/Acquire/Hardware/NikonTiSim.py +35 -0
- PYMEcs/Acquire/Hardware/__init__.py +0 -0
- PYMEcs/Acquire/Hardware/driftTrackGUI.py +329 -0
- PYMEcs/Acquire/Hardware/driftTrackGUI_n.py +472 -0
- PYMEcs/Acquire/Hardware/driftTracking.py +424 -0
- PYMEcs/Acquire/Hardware/driftTracking_n.py +433 -0
- PYMEcs/Acquire/Hardware/fakeCamX.py +15 -0
- PYMEcs/Acquire/Hardware/offsetPiezoRESTCorrelLog.py +38 -0
- PYMEcs/Acquire/__init__.py +0 -0
- PYMEcs/Analysis/MBMcollection.py +552 -0
- PYMEcs/Analysis/MINFLUX.py +280 -0
- PYMEcs/Analysis/MapUtils.py +77 -0
- PYMEcs/Analysis/NPC.py +1176 -0
- PYMEcs/Analysis/Paraflux.py +218 -0
- PYMEcs/Analysis/Simpler.py +81 -0
- PYMEcs/Analysis/Sofi.py +140 -0
- PYMEcs/Analysis/__init__.py +0 -0
- PYMEcs/Analysis/decSofi.py +211 -0
- PYMEcs/Analysis/eventProperties.py +50 -0
- PYMEcs/Analysis/fitDarkTimes.py +569 -0
- PYMEcs/Analysis/objectVolumes.py +20 -0
- PYMEcs/Analysis/offlineTracker.py +130 -0
- PYMEcs/Analysis/stackTracker.py +180 -0
- PYMEcs/Analysis/timeSeries.py +63 -0
- PYMEcs/Analysis/trackFiducials.py +186 -0
- PYMEcs/Analysis/zerocross.py +91 -0
- PYMEcs/IO/MINFLUX.py +851 -0
- PYMEcs/IO/NPC.py +117 -0
- PYMEcs/IO/__init__.py +0 -0
- PYMEcs/IO/darkTimes.py +19 -0
- PYMEcs/IO/picasso.py +219 -0
- PYMEcs/IO/tabular.py +11 -0
- PYMEcs/__init__.py +0 -0
- PYMEcs/experimental/CalcZfactor.py +51 -0
- PYMEcs/experimental/FRC.py +338 -0
- PYMEcs/experimental/ImageJROItools.py +49 -0
- PYMEcs/experimental/MINFLUX.py +1537 -0
- PYMEcs/experimental/NPCcalcLM.py +560 -0
- PYMEcs/experimental/Simpler.py +369 -0
- PYMEcs/experimental/Sofi.py +78 -0
- PYMEcs/experimental/__init__.py +0 -0
- PYMEcs/experimental/binEventProperty.py +187 -0
- PYMEcs/experimental/chaining.py +23 -0
- PYMEcs/experimental/clusterTrack.py +179 -0
- PYMEcs/experimental/combine_maps.py +104 -0
- PYMEcs/experimental/eventProcessing.py +93 -0
- PYMEcs/experimental/fiducials.py +323 -0
- PYMEcs/experimental/fiducialsNew.py +402 -0
- PYMEcs/experimental/mapTools.py +271 -0
- PYMEcs/experimental/meas2DplotDh5view.py +107 -0
- PYMEcs/experimental/mortensen.py +131 -0
- PYMEcs/experimental/ncsDenoise.py +158 -0
- PYMEcs/experimental/onTimes.py +295 -0
- PYMEcs/experimental/procPoints.py +77 -0
- PYMEcs/experimental/pyme2caml.py +73 -0
- PYMEcs/experimental/qPAINT.py +965 -0
- PYMEcs/experimental/randMap.py +188 -0
- PYMEcs/experimental/regExtraCmaps.py +11 -0
- PYMEcs/experimental/selectROIfilterTable.py +72 -0
- PYMEcs/experimental/showErrs.py +51 -0
- PYMEcs/experimental/showErrsDh5view.py +58 -0
- PYMEcs/experimental/showShiftMap.py +56 -0
- PYMEcs/experimental/snrEvents.py +188 -0
- PYMEcs/experimental/specLabeling.py +51 -0
- PYMEcs/experimental/splitRender.py +246 -0
- PYMEcs/experimental/testChannelByName.py +36 -0
- PYMEcs/experimental/timedSpecies.py +28 -0
- PYMEcs/experimental/utils.py +31 -0
- PYMEcs/misc/ExtraCmaps.py +177 -0
- PYMEcs/misc/__init__.py +0 -0
- PYMEcs/misc/configUtils.py +169 -0
- PYMEcs/misc/guiMsgBoxes.py +27 -0
- PYMEcs/misc/mapUtils.py +230 -0
- PYMEcs/misc/matplotlib.py +136 -0
- PYMEcs/misc/rectsFromSVG.py +182 -0
- PYMEcs/misc/shellutils.py +1110 -0
- PYMEcs/misc/utils.py +205 -0
- PYMEcs/misc/versionCheck.py +20 -0
- PYMEcs/misc/zcInfo.py +90 -0
- PYMEcs/pyme_warnings.py +4 -0
- PYMEcs/recipes/__init__.py +0 -0
- PYMEcs/recipes/base.py +75 -0
- PYMEcs/recipes/localisations.py +2380 -0
- PYMEcs/recipes/manipulate_yaml.py +83 -0
- PYMEcs/recipes/output.py +177 -0
- PYMEcs/recipes/processing.py +247 -0
- PYMEcs/recipes/simpler.py +290 -0
- PYMEcs/version.py +2 -0
- pyme_extra-1.0.4.post0.dist-info/METADATA +114 -0
- pyme_extra-1.0.4.post0.dist-info/RECORD +101 -0
- pyme_extra-1.0.4.post0.dist-info/WHEEL +5 -0
- pyme_extra-1.0.4.post0.dist-info/entry_points.txt +3 -0
- pyme_extra-1.0.4.post0.dist-info/licenses/LICENSE +674 -0
- pyme_extra-1.0.4.post0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
from PYME.recipes.base import register_module, ModuleBase, Filter
|
|
2
|
+
from PYME.recipes.traits import Input, Output, Float, Enum, CStr, Bool, Int, List, DictStrStr, DictStrList, ListFloat, ListStr, FileOrURI
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
from PYME.IO import tabular
|
|
6
|
+
|
|
7
|
+
import logging
|
|
8
|
+
logger = logging.getLogger(__file__)
|
|
9
|
+
|
|
10
|
+
from scipy.stats import binned_statistic
|
|
11
|
+
def mystd(vec):
|
|
12
|
+
return np.std(vec,ddof=0)
|
|
13
|
+
|
|
14
|
+
# note that we are using our manual implementation of stddev (mystd) rather than the builtin 'std'
|
|
15
|
+
# our tests showed that using 'std' can result in NaNs or other non-finite values
|
|
16
|
+
# hopfully this will be fixed at some stage
|
|
17
|
+
def get_stddev_property(ids, prop, use_builtin_std=False):
|
|
18
|
+
maxid = int(ids.max())
|
|
19
|
+
edges = -0.5+np.arange(maxid+2)
|
|
20
|
+
idrange = (0,maxid)
|
|
21
|
+
|
|
22
|
+
if use_builtin_std:
|
|
23
|
+
statistic = 'std'
|
|
24
|
+
else:
|
|
25
|
+
statistic = mystd
|
|
26
|
+
|
|
27
|
+
propstd, bin_edge, binno = binned_statistic(ids, prop, statistic=statistic, bins=edges, range=idrange)
|
|
28
|
+
propstd[np.isnan(propstd)] = 1000.0 # (mark as huge error_z)
|
|
29
|
+
std_events = propstd[ids]
|
|
30
|
+
binno_events = binno[ids]
|
|
31
|
+
return std_events, binno_events
|
|
32
|
+
|
|
33
|
+
def get_values_from_image(values_image, points, normalise=False, n0max=1.0):
|
|
34
|
+
"""
|
|
35
|
+
Function to extract values from a segmented image (2D or 3D) at given locations.
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
values_image: PYME.IO.image.ImageStack instance
|
|
40
|
+
an image containing object labels
|
|
41
|
+
points: tabular-like (PYME.IO.tabular, np.recarray, pandas DataFrame) containing 'x', 'y' & 'z' columns
|
|
42
|
+
locations at which to extract labels
|
|
43
|
+
|
|
44
|
+
Returns
|
|
45
|
+
-------
|
|
46
|
+
ids: Label number from image, mapped to each localization within that label
|
|
47
|
+
|
|
48
|
+
"""
|
|
49
|
+
from PYME.Analysis.points.coordinate_tools import pixel_index_of_points_in_image
|
|
50
|
+
|
|
51
|
+
pixX, pixY, pixZ = pixel_index_of_points_in_image(values_image, points)
|
|
52
|
+
|
|
53
|
+
values_data = values_image.data_xyztc
|
|
54
|
+
|
|
55
|
+
if values_data.shape[2] == 1:
|
|
56
|
+
# disregard z for 2D images
|
|
57
|
+
pixZ = np.zeros_like(pixX)
|
|
58
|
+
|
|
59
|
+
ind = (pixX < values_data.shape[0]) * (pixY < values_data.shape[1]) * (pixX >= 0) * (pixY >= 0) * (pixZ >= 0) * (
|
|
60
|
+
pixZ < values_data.shape[2])
|
|
61
|
+
|
|
62
|
+
vals = np.zeros_like(pixX)
|
|
63
|
+
imgdata = np.clip(values_data[:,:,:,0,0].squeeze(),0,None) # we assume no time sequence, only 1 colour
|
|
64
|
+
|
|
65
|
+
if normalise:
|
|
66
|
+
maxval = np.percentile(imgdata,97.5)
|
|
67
|
+
imgdata *= n0max/maxval
|
|
68
|
+
|
|
69
|
+
# assume there is only one channel
|
|
70
|
+
vals[ind] = np.atleast_3d(imgdata)[pixX[ind], pixY[ind], pixZ[ind]].astype('i')
|
|
71
|
+
|
|
72
|
+
return vals
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
@register_module('ClusterModes')
|
|
76
|
+
class ClusterModes(ModuleBase):
|
|
77
|
+
|
|
78
|
+
inputName = Input('dbscanClustered')
|
|
79
|
+
IDkey = CStr('dbscanClumpID')
|
|
80
|
+
outputName = Output('with_clusterModes')
|
|
81
|
+
PropertyKey = CStr('nPhotons')
|
|
82
|
+
|
|
83
|
+
def execute(self, namespace):
|
|
84
|
+
from PYMEcs.Analysis.Simpler import clusterModes
|
|
85
|
+
|
|
86
|
+
inp = namespace[self.inputName]
|
|
87
|
+
cmodes = tabular.MappingFilter(inp)
|
|
88
|
+
|
|
89
|
+
ids = inp[self.IDkey] # I imagine this needs to be an int type key
|
|
90
|
+
props = inp[self.PropertyKey]
|
|
91
|
+
|
|
92
|
+
cm, ce, ccx, ccy = clusterModes(inp['x'],inp['y'],ids,props)
|
|
93
|
+
cmodes.addColumn('clusterMode',cm)
|
|
94
|
+
cmodes.addColumn('clusterModeError',ce)
|
|
95
|
+
cmodes.addColumn('clusterCentroid_x',ccx)
|
|
96
|
+
cmodes.addColumn('clusterCentroid_y',ccy)
|
|
97
|
+
|
|
98
|
+
# propogate metadata, if present
|
|
99
|
+
try:
|
|
100
|
+
cmodes.mdh = inp.mdh
|
|
101
|
+
except AttributeError:
|
|
102
|
+
pass
|
|
103
|
+
|
|
104
|
+
namespace[self.outputName] = cmodes
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def _key_choices(self):
|
|
108
|
+
#try and find the available column names
|
|
109
|
+
try:
|
|
110
|
+
return sorted(self._parent.namespace[self.inputName].keys())
|
|
111
|
+
except:
|
|
112
|
+
return []
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def default_view(self):
|
|
116
|
+
from traitsui.api import View, Group, Item
|
|
117
|
+
from PYME.ui.custom_traits_editors import CBEditor
|
|
118
|
+
|
|
119
|
+
return View(Item('inputName', editor=CBEditor(choices=self._namespace_keys)),
|
|
120
|
+
Item('_'),
|
|
121
|
+
Item('IDkey', editor=CBEditor(choices=self._key_choices)),
|
|
122
|
+
Item('PropertyKey', editor=CBEditor(choices=self._key_choices)),
|
|
123
|
+
Item('_'),
|
|
124
|
+
Item('outputName'), buttons=['OK'])
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@register_module('N0FromImage')
|
|
128
|
+
class N0FromImage(ModuleBase):
|
|
129
|
+
"""
|
|
130
|
+
Maps each point in the input table to a pixel in a labelled image, and extracts the pixel value at that location to
|
|
131
|
+
use as a label for the point data.
|
|
132
|
+
|
|
133
|
+
Inputs
|
|
134
|
+
------
|
|
135
|
+
inputName: Input
|
|
136
|
+
name of tabular input containing positions ('x', 'y', and optionally 'z' columns should be present)
|
|
137
|
+
inputImage: Input
|
|
138
|
+
name of image input containing N0 data
|
|
139
|
+
|
|
140
|
+
Outputs
|
|
141
|
+
-------
|
|
142
|
+
outputName: Output
|
|
143
|
+
name of tabular output. A mapped version of the tabular input with one extra column
|
|
144
|
+
value_key_name : CStr
|
|
145
|
+
name of new column which will contain the label number from image, mapped to each localization within that label
|
|
146
|
+
|
|
147
|
+
"""
|
|
148
|
+
inputName = Input('input')
|
|
149
|
+
inputImage = Input('n0data')
|
|
150
|
+
normaliseN0 = Bool(False)
|
|
151
|
+
maxN0 = Float(1.0)
|
|
152
|
+
|
|
153
|
+
value_key_name = CStr('N0')
|
|
154
|
+
|
|
155
|
+
outputName = Output('with_N0')
|
|
156
|
+
|
|
157
|
+
def execute(self, namespace):
|
|
158
|
+
from PYME.IO import tabular
|
|
159
|
+
|
|
160
|
+
inp = namespace[self.inputName]
|
|
161
|
+
img = namespace[self.inputImage]
|
|
162
|
+
|
|
163
|
+
n0 = get_values_from_image(img, inp, normalise=self.normaliseN0, n0max=self.maxN0)
|
|
164
|
+
|
|
165
|
+
withN0 = tabular.MappingFilter(inp)
|
|
166
|
+
withN0.addColumn(self.value_key_name, n0)
|
|
167
|
+
|
|
168
|
+
# propagate metadata, if present
|
|
169
|
+
try:
|
|
170
|
+
withN0.mdh = namespace[self.inputName].mdh
|
|
171
|
+
except AttributeError:
|
|
172
|
+
pass
|
|
173
|
+
|
|
174
|
+
namespace[self.outputName] = withN0
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
@register_module('N0FromInterpolationMap')
|
|
179
|
+
class N0FromInterpolationMap(ModuleBase):
|
|
180
|
+
|
|
181
|
+
inputName = Input('filtered')
|
|
182
|
+
outputName = Output('with_N0')
|
|
183
|
+
# keywords inherited from FILE, see https://docs.enthought.com/traits/traits_user_manual/defining.html
|
|
184
|
+
# note that docs do not emphasize that filter keyword value must be an array of wildcard strings!
|
|
185
|
+
N0_map_file = FileOrURI(filter=['*.n0m'], exists=True)
|
|
186
|
+
normaliseN0 = Bool(False)
|
|
187
|
+
maxN0 = Float(1.0)
|
|
188
|
+
|
|
189
|
+
def execute(self, namespace):
|
|
190
|
+
inp = namespace[self.inputName]
|
|
191
|
+
mapped = tabular.MappingFilter(inp)
|
|
192
|
+
|
|
193
|
+
# we may want to cache the read! traits has a way to do this, see
|
|
194
|
+
# traits.has_traits.cached_property in https://docs.enthought.com/traits/traits_api_reference/has_traits.html
|
|
195
|
+
# but this may not be compatible with the recipes use of traits
|
|
196
|
+
# in that case will have to use one of the ways in which existing recipe modules achieve this
|
|
197
|
+
from six.moves import cPickle
|
|
198
|
+
with open(self.N0_map_file, 'rb') as fid:
|
|
199
|
+
n0m,bb,origin = cPickle.load(fid)
|
|
200
|
+
try:
|
|
201
|
+
N0 = n0m(inp['x'],inp['y'],grid=False) # this should ensure N0 is floating point type
|
|
202
|
+
except TypeError:
|
|
203
|
+
N0 = n0m(inp['x'],inp['y'])
|
|
204
|
+
|
|
205
|
+
if self.normaliseN0:
|
|
206
|
+
maxval = np.percentile(N0,97.5)
|
|
207
|
+
N0 *= self.maxN0/maxval
|
|
208
|
+
|
|
209
|
+
mapped.addColumn('N0', N0)
|
|
210
|
+
|
|
211
|
+
# propagate metadata, if present
|
|
212
|
+
try:
|
|
213
|
+
mapped.mdh = namespace[self.inputName].mdh
|
|
214
|
+
except AttributeError:
|
|
215
|
+
pass
|
|
216
|
+
|
|
217
|
+
namespace[self.outputName] = mapped
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
# here we process the data so that we keep one fixed N0max for each event and
|
|
221
|
+
# rescale all nPhotons values to reflect the local change in N0
|
|
222
|
+
# this is then more similar to what is described in the SIMPLER paper
|
|
223
|
+
# and allows us to pass the filtered events to our students for further processing!
|
|
224
|
+
@register_module('ScaleNPhotonsFromN0')
|
|
225
|
+
class ScaleNPhotonsFromN0(ModuleBase):
|
|
226
|
+
inputName = Input('with_N0')
|
|
227
|
+
outputName = Output('nPhotonsScaled')
|
|
228
|
+
|
|
229
|
+
def execute(self, namespace):
|
|
230
|
+
inp = namespace[self.inputName]
|
|
231
|
+
mapped = tabular.MappingFilter(inp)
|
|
232
|
+
|
|
233
|
+
N0 = inp['N0']
|
|
234
|
+
N0maxval = np.percentile(N0,97.5)
|
|
235
|
+
N0max = N0maxval * np.ones_like(N0, dtype='f')
|
|
236
|
+
nPhotonsScaled = inp['nPhotons'] * N0maxval / N0
|
|
237
|
+
|
|
238
|
+
mapped.addColumn('N0', N0max)
|
|
239
|
+
mapped.addColumn('nPhotons', nPhotonsScaled)
|
|
240
|
+
|
|
241
|
+
# propagate metadata, if present
|
|
242
|
+
try:
|
|
243
|
+
mapped.mdh = namespace[self.inputName].mdh
|
|
244
|
+
except AttributeError:
|
|
245
|
+
pass
|
|
246
|
+
|
|
247
|
+
namespace[self.outputName] = mapped
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
@register_module('SIMPLERzgenerator')
|
|
251
|
+
class SIMPLERzgenerator(ModuleBase):
|
|
252
|
+
|
|
253
|
+
inputName = Input('filtered')
|
|
254
|
+
outputName = Output('with_simpler_z')
|
|
255
|
+
df_in_nm = Float(88.0)
|
|
256
|
+
alphaf = Float(0.9)
|
|
257
|
+
N0_scale_factor = Float(1.0)
|
|
258
|
+
N0_is_uniform = Bool(False)
|
|
259
|
+
with_error_z = Bool(False)
|
|
260
|
+
use_builtin_std = Bool(True)
|
|
261
|
+
|
|
262
|
+
def execute(self, namespace):
|
|
263
|
+
inp = namespace[self.inputName]
|
|
264
|
+
mapped = tabular.MappingFilter(inp)
|
|
265
|
+
if self.N0_is_uniform:
|
|
266
|
+
N0 = np.ones_like(inp['x'])
|
|
267
|
+
else:
|
|
268
|
+
N0 = inp['N0']
|
|
269
|
+
N = inp['nPhotons']
|
|
270
|
+
NoverN0 = N/(N0*self.N0_scale_factor)
|
|
271
|
+
simpler_z = self.df_in_nm*np.log(self.alphaf/(NoverN0 - (1 - self.alphaf)))
|
|
272
|
+
simpler_z[np.isnan(simpler_z)] = -100.0
|
|
273
|
+
simpler_z[np.isinf(simpler_z)] = -100.0
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
mapped.addColumn('NoverN0', NoverN0)
|
|
277
|
+
mapped.addColumn('z', simpler_z)
|
|
278
|
+
if self.with_error_z:
|
|
279
|
+
error_z, ezn = get_stddev_property(inp['clumpIndex'], simpler_z,
|
|
280
|
+
use_builtin_std=self.use_builtin_std)
|
|
281
|
+
mapped.addColumn('error_z', error_z)
|
|
282
|
+
mapped.addColumn('error_zN', ezn)
|
|
283
|
+
|
|
284
|
+
# propogate metadata, if present
|
|
285
|
+
try:
|
|
286
|
+
mapped.mdh = inp.mdh
|
|
287
|
+
except AttributeError:
|
|
288
|
+
pass
|
|
289
|
+
|
|
290
|
+
namespace[self.outputName] = mapped
|
PYMEcs/version.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: PYME-extra
|
|
3
|
+
Version: 1.0.4.post0
|
|
4
|
+
Summary: Plugins and associated code for PYME
|
|
5
|
+
Author: Christian Soeller
|
|
6
|
+
Author-email: Christian Soeller <christian.soeller@unibe.ch>
|
|
7
|
+
License-Expression: GPL-3.0-or-later
|
|
8
|
+
Project-URL: Repository, https://github.com/csoeller/PYME-extra
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: python-microscopy
|
|
15
|
+
Requires-Dist: statsmodels
|
|
16
|
+
Requires-Dist: roifile
|
|
17
|
+
Requires-Dist: colorcet
|
|
18
|
+
Requires-Dist: zarr<3,>=2
|
|
19
|
+
Requires-Dist: seaborn
|
|
20
|
+
Requires-Dist: mrcfile
|
|
21
|
+
Requires-Dist: circle-fit
|
|
22
|
+
Requires-Dist: alphashape
|
|
23
|
+
Provides-Extra: opt
|
|
24
|
+
Requires-Dist: openpyxl; extra == "opt"
|
|
25
|
+
Requires-Dist: tabulate; extra == "opt"
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# README #
|
|
30
|
+
|
|
31
|
+
Plugins and associated code for PYME (AKA [python-microscopy](https://python-microscopy.org/)).
|
|
32
|
+
|
|
33
|
+
This is a mixed bag of extensions/additions to standard PYME and also used as a testbed/platform for
|
|
34
|
+
|
|
35
|
+
* recipe based processing of SMLM data
|
|
36
|
+
* implementing I/O for new formats
|
|
37
|
+
* new ideas for data processing
|
|
38
|
+
|
|
39
|
+
### Installation ###
|
|
40
|
+
|
|
41
|
+
#### PYME-test-env
|
|
42
|
+
|
|
43
|
+
These days we recommend for any development install of `PYME-extra` the installation as part of a [PYME-test-env](https://github.com/csoeller/PYME-test-env) controlled install. All further details please see there.
|
|
44
|
+
|
|
45
|
+
#### pip install
|
|
46
|
+
|
|
47
|
+
For users not interested in following development updates and mainly interested in the stable release for usage as is we now recommend a pip based install:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
# possibly install python-microscopy first and check that the install succeeds
|
|
51
|
+
pip install-python-microscopy
|
|
52
|
+
pip install PYME-extra # installation from PyPi
|
|
53
|
+
pymex_install_plugins # register the plugins systemwide
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### Installing from source
|
|
57
|
+
|
|
58
|
+
Still achieved with pip but from the source directory in which you unpacked PYME-extra (typically done when you cloned the git repository). A plain install from source is done with
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
pip install .
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
A development install can be achieved by requesting an install in "editable mode". When a package is installed in editable mode, edits to the project source code become effective without the need of a new installation step.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
pip install --no-build-isolation -e . # install in in “development mode”
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
In either case (plain or development install), you may need to register the various plugins to implement the extra functionality provided by `PYME-extra`. This is achieved with the plugin installer that will have been installed with PYME-extra. You register with the command
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
pymex_install_plugins
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
By default it registers the plugins systemwide but you can supply the `--user` option to register only for the current user:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
pymex_install_plugins --user # for further details see also pymex_install_plugins -h
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
#### Requirements
|
|
83
|
+
|
|
84
|
+
External modules required for full functionality currently include
|
|
85
|
+
|
|
86
|
+
python-microscopy
|
|
87
|
+
statsmodels # for FRC smoothing with the lowess filter
|
|
88
|
+
roifile # to allow using info from ImageJ/Fiji ROIs
|
|
89
|
+
colorcet # add some colorcet colour tables in PYME
|
|
90
|
+
circle-fit # needs pip install to get recent version; for 2D NPC analysis
|
|
91
|
+
alphashape # for cluster area and densities in clusters
|
|
92
|
+
zarr>=2,<3 # for MINFLUX I/O
|
|
93
|
+
seaborn # for some prettier plots
|
|
94
|
+
mrcfile # to output 3D data for FSC from a EM FSC server
|
|
95
|
+
|
|
96
|
+
These should be installed by the `pip` based install automatically.
|
|
97
|
+
|
|
98
|
+
We also often use a couple more dependencies in notebooks, but strictly speaking no functionality in `PYME-extra` depends directly on these:
|
|
99
|
+
|
|
100
|
+
openpyxl
|
|
101
|
+
tabulate
|
|
102
|
+
|
|
103
|
+
### Issues ###
|
|
104
|
+
|
|
105
|
+
Note that the showErrs modules rely on a mac installation which uses bash scripts and the [platypus app](https://sveinbjorn.org/platypus) app
|
|
106
|
+
to capture STDERR into a temporary file which these modules access.
|
|
107
|
+
|
|
108
|
+
Bottom line is that these two error display modules will likely not work on anything but a mac with my PYMEapps wrappers. On other systems they will just generate a message that this functionality is not supported.
|
|
109
|
+
|
|
110
|
+
The PYME mac app wrappers are available at the [PYME-apps repository](https://github.com/csoeller/PYME-apps).
|
|
111
|
+
|
|
112
|
+
### Author ###
|
|
113
|
+
|
|
114
|
+
Christian Soeller
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
PYMEcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
PYMEcs/pyme_warnings.py,sha256=xZiBgJFPpFvS2yavTM7xO1_wWTHNpa2BiWKwEyTBVVs,94
|
|
3
|
+
PYMEcs/version.py,sha256=1qYDs77CjsX-cwoSPjgY8DoUbGn_dPUxHHIqO6cy0NQ,74
|
|
4
|
+
PYMEcs/Acquire/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
PYMEcs/Acquire/Actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
PYMEcs/Acquire/Actions/custom.py,sha256=_LAMHU8AD787CI10FuJZ-Wf2sK6H25zwkb_GgmVgBpc,5712
|
|
7
|
+
PYMEcs/Acquire/Hardware/LPthreadedSimple.py,sha256=dq0ua5g_Anu1xos5PInpl_Ljblz0arl3OsHt451ZbgU,8321
|
|
8
|
+
PYMEcs/Acquire/Hardware/LPthreadedSimpleSim.py,sha256=bZmq62hmh2HmktpCvOxyGyahlOnLNUS_1VuZ9A98PSE,8191
|
|
9
|
+
PYMEcs/Acquire/Hardware/NikonTiFlaskServer.py,sha256=Lx6aH6pvtS10h9l9hDjAzf8m14GDlQR5S_AQZTW_0N4,1254
|
|
10
|
+
PYMEcs/Acquire/Hardware/NikonTiFlaskServerT.py,sha256=1Trgu7fbuKT0p48_HzutTKwIAUDuX5MiRWTx61oTHuo,1780
|
|
11
|
+
PYMEcs/Acquire/Hardware/NikonTiRESTClient.py,sha256=7Ks4ERAqDklO0Nqfe-ki174QKLA7NrM4fW4SKLjazgI,3093
|
|
12
|
+
PYMEcs/Acquire/Hardware/NikonTiSim.py,sha256=TpW4JYiqEclAcghcd7xhd5XZ7lpHEy2Qo1RBjKOk-4M,1016
|
|
13
|
+
PYMEcs/Acquire/Hardware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
PYMEcs/Acquire/Hardware/driftTrackGUI.py,sha256=NsZFbNn9x6ZlksqGJ4q6CYhAYs8ZDcLcl2F62wYzvpM,14106
|
|
15
|
+
PYMEcs/Acquire/Hardware/driftTrackGUI_n.py,sha256=iMWNiAszIiwlQgueQ-SnbGOJSiC3bxDgo9j4pcMnbt0,19260
|
|
16
|
+
PYMEcs/Acquire/Hardware/driftTracking.py,sha256=1hzem1724b6h08UOMfVx5Nr-Rs8tXwvi9JOq6IcgFfE,15325
|
|
17
|
+
PYMEcs/Acquire/Hardware/driftTracking_n.py,sha256=U6dUnZ_AjG7XaqPLFhBmXvAdZFBdKacfz8I4hGRHsF4,16829
|
|
18
|
+
PYMEcs/Acquire/Hardware/fakeCamX.py,sha256=xduEkR-LKT9IAol9qNIL49hrHpv-_hOM9QjU2_0AT1A,631
|
|
19
|
+
PYMEcs/Acquire/Hardware/offsetPiezoRESTCorrelLog.py,sha256=rbZeoU57cY5k-TV8KOMROJKxqENUQ6DD7HCI-jygT24,1792
|
|
20
|
+
PYMEcs/Analysis/MBMcollection.py,sha256=TZtmi4cVj499mtAgd6sRMJolzomBETxZ9ih3OdXvaIU,23626
|
|
21
|
+
PYMEcs/Analysis/MINFLUX.py,sha256=eI0Qpc59FSIYABmuG_fcL7ZPv5nAWKctPsjjpGIQkLA,14734
|
|
22
|
+
PYMEcs/Analysis/MapUtils.py,sha256=mfUK1WANGyCj249zQARI3GIhq4ec0CvT8532bXaMRh4,2453
|
|
23
|
+
PYMEcs/Analysis/NPC.py,sha256=C3UXG5WvMdgAGiC-vMoRWDjwmsCCDM1a-MkJ5fhlx6A,45297
|
|
24
|
+
PYMEcs/Analysis/Paraflux.py,sha256=CLBAEKgPZJ9KOcGVCTOf_gaU1CDYaSl4COfSo2PQOSk,10515
|
|
25
|
+
PYMEcs/Analysis/Simpler.py,sha256=358Z5Ts8lrG2Y9bPb8dJsu-x7w5296kXIUD4qYjrOAc,2637
|
|
26
|
+
PYMEcs/Analysis/Sofi.py,sha256=jtXbtBNUweQ3jmgDcwo-vYhnLogJYGELH2dtsGt-eqY,5026
|
|
27
|
+
PYMEcs/Analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
+
PYMEcs/Analysis/decSofi.py,sha256=YMBL7cZn3ZD6015qxN6qlhcgThwms9Zudm9XR5SXM18,5897
|
|
29
|
+
PYMEcs/Analysis/eventProperties.py,sha256=dqkfeEEvQmt08-wqkOa4OdOoCKFKUzBiopQ0mHJT82U,1499
|
|
30
|
+
PYMEcs/Analysis/fitDarkTimes.py,sha256=MFr6sxTuq2zJOewZXtOoAPN5471RM2MipW5eujP74DQ,21525
|
|
31
|
+
PYMEcs/Analysis/objectVolumes.py,sha256=iKHIXOAg5-4_maCn3UGEwAWJVZHaU_p6CKbaCSPC5Z8,597
|
|
32
|
+
PYMEcs/Analysis/offlineTracker.py,sha256=_x0xcAICNqfvnlQC_dc6dlmDpvFvCHwv5CKhyl9Eb8k,4034
|
|
33
|
+
PYMEcs/Analysis/stackTracker.py,sha256=_O142fBT0ahM5VO-4SBGzz2NAFkIcYTxU7QBPFCMKas,6533
|
|
34
|
+
PYMEcs/Analysis/timeSeries.py,sha256=H4lqXeF86PD5hLWx61P4JQKoHNkrAERbwII4Q9DRtMU,1824
|
|
35
|
+
PYMEcs/Analysis/trackFiducials.py,sha256=c9Yq4b6N7IMTIMHjNCcHic-GtzPo7yA7EjohWCkfty0,5789
|
|
36
|
+
PYMEcs/Analysis/zerocross.py,sha256=Xttz5eO93mz2A4rvqPFQmnZCjRYQZJBDddy9oZ--Jn8,3477
|
|
37
|
+
PYMEcs/IO/MINFLUX.py,sha256=_2q8Wi2tDwSKZNLCVjUeT_Tkh2rXDEu-5q7pZ2jInrc,39439
|
|
38
|
+
PYMEcs/IO/NPC.py,sha256=THjya2av3_UpKwjXT8U4UhzmxMFPKModXXsJyyrvjE4,4882
|
|
39
|
+
PYMEcs/IO/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
+
PYMEcs/IO/darkTimes.py,sha256=pCGhm6QJqaQtEqaom4gdBTVZF_GBRTE7WK58C8BL_NM,580
|
|
41
|
+
PYMEcs/IO/picasso.py,sha256=y5LkRt7SnBuIGSW2xdqAuIRLOolVAHYrD09YFqyRGYY,8172
|
|
42
|
+
PYMEcs/IO/tabular.py,sha256=QuUDov5UMdS9f9ynlHlg_LihtaRTwDRHBBoI4ivZhD8,310
|
|
43
|
+
PYMEcs/experimental/CalcZfactor.py,sha256=1u6vlMQtpHIRNtlihOm7KbGbd0j35wOFLig_Kg_tHBs,1971
|
|
44
|
+
PYMEcs/experimental/FRC.py,sha256=M3Md74pv8AloEu7WECd1HfQmfuvdY9uieCiojyA8R-M,13275
|
|
45
|
+
PYMEcs/experimental/ImageJROItools.py,sha256=PJPOrUHqQhyKMyPo0DiRTf-jA9Tfxk-L8GfrRdoC_9Q,2069
|
|
46
|
+
PYMEcs/experimental/MINFLUX.py,sha256=K0Rh_bBD2US3OYYEzGwwjuRQlhhp6Z2k69sFsFQDuLI,72761
|
|
47
|
+
PYMEcs/experimental/NPCcalcLM.py,sha256=Sg1VFwtUp1aKX-x130XkzWTEVuUFoGKruIWXT7DanS4,29659
|
|
48
|
+
PYMEcs/experimental/Simpler.py,sha256=AfUAsn7pgVe4pVlvES6H9ksLKTy_TL_HwdwuP1cAyUg,15488
|
|
49
|
+
PYMEcs/experimental/Sofi.py,sha256=j1Dl8xolSn_DuBF54n7wEFhnNfmQav6xSkUK7LCAZ10,3685
|
|
50
|
+
PYMEcs/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
|
+
PYMEcs/experimental/binEventProperty.py,sha256=iP3hF1KZNUwpgYxRdhw8-RYFsiixjVxtqAC6tNL02g0,6256
|
|
52
|
+
PYMEcs/experimental/chaining.py,sha256=7JMxJCMtMNH4ew05nlJb4EhygbAXdB27timu7848dD4,769
|
|
53
|
+
PYMEcs/experimental/clusterTrack.py,sha256=ys9Rg5u0Ht1_x1ArJAczYbZ8EUb51Lu_bM41XvTg33k,6701
|
|
54
|
+
PYMEcs/experimental/combine_maps.py,sha256=rNNieMhdxOq_mZ-avgNkuBlnbc1tZcysxr4jhcYsvXA,3735
|
|
55
|
+
PYMEcs/experimental/eventProcessing.py,sha256=zCHiYNwxKArPQXk6LEmsL6N6u3wWyqAZZ_sEdZujmw4,3420
|
|
56
|
+
PYMEcs/experimental/fiducials.py,sha256=0BStirZ9uPhAtHzmLAaK4MaCnrMUzwlOxkCgIz_bkHM,11662
|
|
57
|
+
PYMEcs/experimental/fiducialsNew.py,sha256=jdmJ0qZtKFD4PcpY-iyP6eYwhKdZkTdB35Ra4dp_XDE,16610
|
|
58
|
+
PYMEcs/experimental/mapTools.py,sha256=Ocw1yo91HQsbmkhCPOhKxDkK4FDzxWv2DBKjOEWcrt0,10213
|
|
59
|
+
PYMEcs/experimental/meas2DplotDh5view.py,sha256=fkJBS31sZ14CY5XQFUDvoVCOjpnvNSaknzfckWk6RcA,3634
|
|
60
|
+
PYMEcs/experimental/mortensen.py,sha256=aKmDdOhm269Tb-oRP_vSCOVEzkGR4CqXHUoD_IOst_k,6214
|
|
61
|
+
PYMEcs/experimental/ncsDenoise.py,sha256=XSQxFXs5ztuv-buoI3_52xRQeQiysxxYuP18pW41rOQ,6456
|
|
62
|
+
PYMEcs/experimental/onTimes.py,sha256=oLpHH80BAD2vp65bgLjuX8s-eOfcIXUkA0yYZCrXq1M,10901
|
|
63
|
+
PYMEcs/experimental/procPoints.py,sha256=_in7_XttNKojYFL_10Pwm5MlHVHV23G3q9AQDFL0aRs,2645
|
|
64
|
+
PYMEcs/experimental/pyme2caml.py,sha256=lg-MLBceVjIR43UxVQk4-_GliDlimkax3OEOTJKfE_Y,2514
|
|
65
|
+
PYMEcs/experimental/qPAINT.py,sha256=H4z8ANsWHQxZhWx1UDWLRuWV0W7jzIl41QQw97L31O8,42811
|
|
66
|
+
PYMEcs/experimental/randMap.py,sha256=LcNz_KWj5tDsy58Hf66roTLxrEPUtnKpZL4_LRAVSlM,8125
|
|
67
|
+
PYMEcs/experimental/regExtraCmaps.py,sha256=vl1mI0JAi1cOHIXa3bMdtbEPW28JSlJzOFamXi7t3gY,357
|
|
68
|
+
PYMEcs/experimental/selectROIfilterTable.py,sha256=zQw4SeSeirhGidmNr_N6cIq8qnPYLodoqhfbO3NMufA,2650
|
|
69
|
+
PYMEcs/experimental/showErrs.py,sha256=qufabdIdQWBCP-GK3c-pj4TbUCgHR5h4Y7KkQcCB4ds,1663
|
|
70
|
+
PYMEcs/experimental/showErrsDh5view.py,sha256=Hc6aJDBgQqIGoU4UHVADcP0BIqID2mT6aPppvuD1yDE,1860
|
|
71
|
+
PYMEcs/experimental/showShiftMap.py,sha256=gBdpkoKhwKPugCqhk3Y4L5jd3lbdxhXmPRq5mF_O3aw,2135
|
|
72
|
+
PYMEcs/experimental/snrEvents.py,sha256=PMBcziKTCV_-gSDeluwWr5Og9BiuZRJANdTlGU2nrtU,7955
|
|
73
|
+
PYMEcs/experimental/specLabeling.py,sha256=sLz-Oca1UbHszhMtUOQVwwo_CmMXRSpuBflpxXWifMs,2534
|
|
74
|
+
PYMEcs/experimental/splitRender.py,sha256=YyNrdPgiN44RYwQUwRXzPMc-Uqn51rtVlevS66DJ58M,9930
|
|
75
|
+
PYMEcs/experimental/testChannelByName.py,sha256=06-ylKxaxYnn-jzWO2XovMZLOToifeIXDM75Ioz5Qcc,1183
|
|
76
|
+
PYMEcs/experimental/timedSpecies.py,sha256=FxV8Jus_ls6ksNr12FysTDiuznUC42yA9bb1WNWCMZE,1117
|
|
77
|
+
PYMEcs/experimental/utils.py,sha256=jqDwa5nnvFgB9JIU21QHwQwl4dAjX093hjneKXeNzsg,1043
|
|
78
|
+
PYMEcs/misc/ExtraCmaps.py,sha256=WcNs76GT2_Z4TTk24YB_S3c8G9G_YIaJUMKjQqRm-vk,5660
|
|
79
|
+
PYMEcs/misc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
+
PYMEcs/misc/configUtils.py,sha256=V7NDw0NXww4mesmEfnW9wW_anizGh_gVQchOiJ4-LYA,5434
|
|
81
|
+
PYMEcs/misc/guiMsgBoxes.py,sha256=DRkfiyfHXCI2JdHC3vz6K5mq9B-7sBOnbA4e4thlERs,799
|
|
82
|
+
PYMEcs/misc/mapUtils.py,sha256=29SNw8QAuVBTjiCv3VjwDRItyIzSSpxD2zgRKIh-Gqg,7840
|
|
83
|
+
PYMEcs/misc/matplotlib.py,sha256=kXzoG1EESIewtXyWBK0UWeG02jTxhwVlKGVcwgE8tGk,6607
|
|
84
|
+
PYMEcs/misc/rectsFromSVG.py,sha256=MpDf5g0vphu7SJRB3SZHgNblcHbaZXGUUGnTZe2zwPs,6153
|
|
85
|
+
PYMEcs/misc/shellutils.py,sha256=FAxcLL0Bu7eFKFr9EVjLMqMItGVob5-K_iKSziOkkBI,35976
|
|
86
|
+
PYMEcs/misc/utils.py,sha256=Xf5gqnZLt1NbzMbjOTebG1PTL2ZF08XThrILZEq8cHI,7048
|
|
87
|
+
PYMEcs/misc/versionCheck.py,sha256=U0_EvxFyARgsXZEFqTFl_GGGMVHJjG65zMKsRNjOug4,774
|
|
88
|
+
PYMEcs/misc/zcInfo.py,sha256=4OcizQ0_Cbz5xmWlcpFI9-sBFqE9j-Tx3kHI7cNp9OM,2519
|
|
89
|
+
PYMEcs/recipes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
|
+
PYMEcs/recipes/base.py,sha256=N_B2StMwn6il4cjT01OcsdsSDAOApXAurtxwmEddl0M,2783
|
|
91
|
+
PYMEcs/recipes/localisations.py,sha256=LGeKosK-9TRyRka056Unit_rhv2wIPOUkw4wg6XwQw0,95335
|
|
92
|
+
PYMEcs/recipes/manipulate_yaml.py,sha256=bOQE6X8LdDoPZAzqOl39A9H_bu2R-2CPksIA7EzXI78,3044
|
|
93
|
+
PYMEcs/recipes/output.py,sha256=xmJfnYr4X1dZ0FACPZkoJnlDZCPB3i_JhlnyWAzPkmU,5489
|
|
94
|
+
PYMEcs/recipes/processing.py,sha256=6tmlmKITBxfX15y0Nn6xP1CjFJvZresSOfTW8sDT2qA,9509
|
|
95
|
+
PYMEcs/recipes/simpler.py,sha256=GAUplwKvaDWJzOUIjJjgfqXC12ikp6X6E6j-t5ENvv4,9852
|
|
96
|
+
pyme_extra-1.0.4.post0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
97
|
+
pyme_extra-1.0.4.post0.dist-info/METADATA,sha256=VaXkOfNvby3MAcjbNaXtAl7j0kGA7I3FBKBmJZ7vHaw,4287
|
|
98
|
+
pyme_extra-1.0.4.post0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
99
|
+
pyme_extra-1.0.4.post0.dist-info/entry_points.txt,sha256=b861SZHfQs4xFsRckWG--qWb68-FHIlPVAUOjhAyvSA,129
|
|
100
|
+
pyme_extra-1.0.4.post0.dist-info/top_level.txt,sha256=EPqiuGnIYT5DeTK201fnaJiS6k391TyGkHax3EE3YXg,7
|
|
101
|
+
pyme_extra-1.0.4.post0.dist-info/RECORD,,
|