""" __author__ = "John Kirkham <*****@*****.**>" __date__ = "$May 01, 2014 14:23:45 EDT$" import numpy # Need in order to have logging information no matter what. from nanshe.util import prof # Get the logger trace_logger = prof.getTraceLogger(__name__) @prof.log_call(trace_logger) def estimate_noise(input_array, significance_threshold=3.0): """ Estimates the noise in the given array. Using the array finds what the standard deviation is of some values in the array, which are within the standard deviation of the whole array times the significance threshold. Args: input_array(numpy.ndarray): the array to estimate noise of. significance_threshold(float): the number of standard deviations (of the whole
import warnings import numpy import vigra from nanshe.io import hdf5 from nanshe.util.iters import irange from nanshe.util.xnumpy import binomial_coefficients # Need in order to have logging information no matter what. from nanshe.util import prof # Get the logger trace_logger = prof.getTraceLogger(__name__) @prof.log_call(trace_logger) def binomial_1D_array_kernel(i, n=4): """ Generates a 1D numpy array used to make the kernel for the wavelet transform. Args: i(int): which scaling to use. n(int): which row of Pascal's triangle to return. Returns: r(numpy.ndarray): a 1D numpy array to use as the wavelet transform kernel.