2.1.4.1.4. sf_tools.math.misc module

MISCELLANOUS MATH ROUTINES

This module contains methods for various mathematical operations.

Author:Samuel Farrens <samuel.farrens@gmail.com>
Version:1.1
Date:20/10/2017
sf_tools.math.misc.factor(n)[source]

Factors of n

This method finds factors of a number (n).

Parameters:n (int) – Whole number
Returns:
Return type:np.ndarray factors of n
sf_tools.math.misc.mfactor(n)[source]

Middle factors of n

This method finds the middle factor(s) of a number (n).

Parameters:n (int) – Whole number
Returns:
Return type:np.ndarray middle factors of n
sf_tools.math.misc.k_val(n, L)[source]

Spatial frequency

This method returns k-values in the range L.

Parameters:
Returns:

Return type:

float k value

Todo

Add equation and example

sf_tools.math.misc.fourier_derivative(func, k, order)[source]

Fourier derivative

This method returns the derivative of the specified function to the given order.

Parameters:
  • func (function) – Function
  • k (float) – k-value
  • order (int) – Oder of derivative
Returns:

Return type:

Float derivative

Todo

Add equation and example