import math


def gauss_objective(x, amplitude, sigma, mu):
    """Gaussian distribution objective function.
        This differs from many normal distribution equations online but the amplitude is required to
        stretch the Gaussian upward to match your specific data size.
        
        This equation was adapted from: https://stackoverflow.com/questions/19206332/gaussian-fit-for-python,
        but also matches the first equation on the Gaussian function Wikipedia page: https://en.wikipedia.org/wiki/Gaussian_function,
        and can be found elsewhere in this form as well."""
    
    # return amplitude * (1 / (math.sqrt(2*math.pi*sigma**2))) * math.e**(-1 * (x-mu)**2 / 2*sigma**2)
    # return amplitude * np.exp(-(x - mu)**2 / (2 * sigma**2))
    return amplitude * math.e**(-(x - mu)**2 / (2 * sigma**2))