Beispiel #1
0
 def _compute_object_count(self, raw):
     data = raw.data()[:, :, 0]
     data = skimage.exposure.equalize_adapthist(data)
     lm = skimage.feature.peak_local_max(data,
                                         threshold_abs=np.percentile(
                                             data, 95),
                                         min_distance=10)
     return len(lm)
Beispiel #2
0
 def _compute_shape(self, raw):
     x, y = np.mgrid[:raw.data().shape[0], :raw.data().shape[1]]
     initial = astropy.modeling.models.Gaussian2D(x_stddev=1, y_stddev=1)
     fitter = astropy.modeling.fitting.LevMarLSQFitter()
     fit = fitter(initial, x, y, raw.data()[:, :, 0])
     return fit.x_stddev / fit.y_stddev
Beispiel #3
0
 def _compute_percentile_95(self, raw):
     return np.percentile(raw.data(), 95)
Beispiel #4
0
 def _compute_mean(self, raw):
     return raw.data().mean()
Beispiel #5
0
 def _compute_shape(self, raw):
     x, y = np.mgrid[:raw.data().shape[0], :raw.data().shape[1]]
     initial = astropy.modeling.models.Gaussian2D(x_stddev=1, y_stddev=1)
     fitter = astropy.modeling.fitting.LevMarLSQFitter()
     fit = fitter(initial, x, y, raw.data()[:, :, 0])
     return fit.x_stddev / fit.y_stddev
Beispiel #6
0
 def _compute_percentile_95(self, raw):
     return np.percentile(raw.data(), 95)
Beispiel #7
0
 def _compute_object_count(self, raw):
     data = raw.data()[:, :, 0]
     data = skimage.exposure.equalize_adapthist(data)
     lm = skimage.feature.peak_local_max(data, threshold_abs=np.percentile(data, 95), min_distance=10)
     return len(lm)
Beispiel #8
0
 def _compute_mean(self, raw):
     return raw.data().mean()