### cosmetics

parent 8f2f7a17
 ... @@ -118,20 +118,20 @@ class LOSResponse(LinearOperator): ... @@ -118,20 +118,20 @@ class LOSResponse(LinearOperator): has dimensions. The second dimensions must be identical for both arrays has dimensions. The second dimensions must be identical for both arrays and indicated the total number of lines of sight. and indicated the total number of lines of sight. sigmas: numpy.ndarray(float) (optional) sigmas: numpy.ndarray(float) (optional) If this is not None, the inverse of the lengths of the LOSs are assumed to be If this is not None, the inverse of the lengths of the LOSs are assumed Gaussian diastributed with these sigmas. The start point will remain the same, to be Gaussian distributed with these sigmas. The start point will but the endpoint is assumed to be unknown. remain the same, but the endpoint is assumed to be unknown. This is a typical statistical model for astrophysical parallaxes. This is a typical statistical model for astrophysical parallaxes. The LOS response then returns the expected integral The LOS response then returns the expected integral over the input given that the length of the LOS is unknown and therefore the over the input given that the length of the LOS is unknown and result is averaged over different endpoints. therefore the result is averaged over different endpoints. default: None default: None truncation: float (optional) truncation: float (optional) Use only if the sigmas keyword argument is used! Use only if the sigmas keyword argument is used! This truncates the probability of the endpoint lying more sigmas away than This truncates the probability of the endpoint lying more sigmas away the truncation. Used to speed up computation and to avoid negative distances. than the truncation. Used to speed up computation and to avoid negative It should hold that 1./(1./length-sigma*truncation)>0 for all lengths of the distances. It should hold that `1./(1./length-sigma*truncation)>0` LOSs and all corresponding sigma of sigmas. for all lengths of the LOSs and all corresponding sigma of sigmas. If unsure, leave blank. If unsure, leave blank. default: 3. default: 3. ... @@ -173,8 +173,9 @@ class LOSResponse(LinearOperator): ... @@ -173,8 +173,9 @@ class LOSResponse(LinearOperator): difflen = np.linalg.norm(diffs, axis=0) difflen = np.linalg.norm(diffs, axis=0) diffs /= difflen diffs /= difflen real_distances = 1./(1./difflen - truncation*sigmas) real_distances = 1./(1./difflen - truncation*sigmas) if np.any(real_distances<0): if np.any(real_distances < 0): raise ValueError("parallax error truncation to high: getting negative distances") raise ValueError("parallax error truncation to high: " "getting negative distances") real_ends = starts + diffs*real_distances real_ends = starts + diffs*real_distances lzp = local_zero_point.reshape((-1, 1)) lzp = local_zero_point.reshape((-1, 1)) dist = np.array(self.domain.distances).reshape((-1, 1)) dist = np.array(self.domain.distances).reshape((-1, 1)) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!