1818)
1919from sourcefinder .utility import coordinates
2020from sourcefinder .utility .uncertain import Uncertain
21- from . import measuring
21+ from . import measure
2222from . import utils
2323from .config import Conf , ImgConf
2424from .gaussian import gaussian
@@ -812,18 +812,11 @@ def _error_bars_from_moments(self, noise, correlation_lengths, threshold):
812812 if errortheta > np .pi / 2.0 :
813813 errortheta = np .pi / 2.0
814814
815- # The peak from "moments" is just the value of the maximum pixel
816- # times a correction, fudge_max_pix, for the fact that the
817- # centre of the Gaussian is not at the centre of the pixel.
818- # This correction is performed in measuring.py. The maximum pixel
819- # method introduces a peak dependent error corresponding to the last
820- # term in the expression below for errorpeaksq.
821- # To this, we add, in quadrature, the errors corresponding
822- # to the first and last term of the rhs of equation 37 of the
823- # NVSS paper. The middle term in that equation 37 is heuristically
824- # replaced by noise**2 since the threshold should not affect
825- # the error from the (corrected) maximum pixel method,
826- # while it is part of the expression for rho_sq above.
815+ # Basically, this is equation 37 of the NVSS paper, with the middle
816+ # term of the rhs of that equation heuristically replaced by
817+ # noise**2 since the threshold is not expected to affect the error
818+ # on peak brightnesses from tweaked moments, while it is part of the
819+ # expression for rho_sq above.
827820 errorpeaksq = (
828821 (frac_flux_cal_error * peak ) ** 2 + clean_bias_error ** 2 + noise ** 2
829822 )
@@ -1105,7 +1098,7 @@ def source_profile_and_errors(
11051098 # Moments can only be computed if no parameters are fixed.
11061099 try :
11071100 param .update (
1108- measuring .moments (
1101+ measure .moments (
11091102 data ,
11101103 fudge_max_pix_factor ,
11111104 beam ,
@@ -1122,7 +1115,7 @@ def source_profile_and_errors(
11221115 except ValueError :
11231116 logger .warning ("Moments computations failed, use defaults." )
11241117 try :
1125- gaussian_soln = measuring .fitgaussian (
1118+ gaussian_soln = measure .fitgaussian (
11261119 data , param , fixed = fixed , bounds = param .bounds
11271120 )
11281121 param .update (gaussian_soln )
@@ -1173,7 +1166,7 @@ def source_profile_and_errors(
11731166 gauss_island_filled = gauss_island_masked
11741167 gauss_resid_filled = gauss_resid_masked
11751168
1176- param .chisq , param .reduced_chisq = measuring .goodness_of_fit (
1169+ param .chisq , param .reduced_chisq = measure .goodness_of_fit (
11771170 gauss_resid_masked , rms , correlation_lengths
11781171 )
11791172
@@ -2307,7 +2300,7 @@ def source_measurements_vectorised(
23072300 # array. In this way Numba can infer the shape of the output array.
23082301 with np .errstate (invalid = "ignore" ):
23092302 # Context manager added to fix issue #165.
2310- measuring .moments_enhanced (
2303+ measure .moments_enhanced (
23112304 sources ,
23122305 noises ,
23132306 chunk_positions ,
0 commit comments