Post-Processing


sigmoid_falloff_jax(u, amplitude, width)

Applies a sigmoid to the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • amplitude (scalar_like_type) –

    Maximum value of the transformed scalar field.

  • width (scalar_like_type) –

    Width of the sigmoid.

Returns:
  • ndarray

    Transformed scalar field.

positive_sigmoid_falloff_jax(u, amplitude, width)

Applies a sigmoid, shifted to the positive values by the value of the width parameter, to the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • amplitude (scalar_like_type) –

    Maximum value of the transformed scalar field.

  • width (scalar_like_type) –

    Width of the sigmoid.

Returns:
  • ndarray

    Transformed scalar field.

capped_exponential_jax(u, amplitude, width)

Applies a decreasing exponential functon to the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • amplitude (scalar_like_type) –

    Maximum value of the transformed scalar field.

  • width (scalar_like_type) –

    Range at which the value of the transformed scalar field drops to almost zero.

Returns:
  • ndarray

    Transformed scalar field.

hard_binarization_jax(u, threshold)

Binarizes the Signed Distance field/pattern based on a threshold. Values below the threshold are 1 and values above are 0.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • threshold (scalar_like_type) –

    Binarization threshold.

Returns:
  • ndarray

    Binarized scalar field.

linear_falloff_jax(u, amplitude, width)

Applies a decreasing linear function to the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • amplitude (scalar_like_type) –

    Maximum value of the transformed scalar field.

  • width (scalar_like_type) –

    Range at which the value of the transformed scalar field drops to zero.

Returns:
  • ndarray

    Transformed scalar field.

relu_jax(u, width=1)

Applies the ReLU function to the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • width (scalar_like_type, default: 1 ) –

    Range at which the value of the transformed field reaches one.

Returns:
  • ndarray

    Transformed scalar field.

smooth_relu_jax(u, smooth_width, width=1, threshold=0.01)

Applies the "squareplus" function to the scalar (Signed Distance Function) field. https://en.wikipedia.org/wiki/Rectifier_(neural_networks)

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • smooth_width (scalar_like_type) –

    Distance from the origin at which the Smooth ReLU function is greater than ReLU for less than the value of the threshold parameter.

  • width (scalar_like_type, default: 1 ) –

    Range at which the value of the transformed field reaches one.

  • threshold (scalar_like_type, default: 0.01 ) –

    At smooth_width distance from the origin the value of the Smooth ReLU function is greater than ReLU for the value of the threshold parameter. at smooth_width distance from the origin.

Returns:
  • ndarray

    Transformed scalar field.

slowstart_jax(u, smooth_width, width=1, threshold=0.01, ground=True)

Applies the SlowStart function to the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • smooth_width (scalar_like_type) –

    Distance from the origin at which the SlowStart function is greater than ReLU for less than the value of the threshold parameter.

  • width (scalar_like_type, default: 1 ) –

    Range at which the value of the transformed field reaches one.

  • threshold (scalar_like_type, default: 0.01 ) –

    At smooth_width distance from the origin the value of the SlowStart function is greater than ReLU for the value of the threshold parameter.

  • ground (bool, default: True ) –

    if True the value of the function is zero at zero.

Returns:
  • ndarray

    Transformed scalar field.

gaussian_boundary_jax(u, amplitude, width)

Applies the Gaussian to the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • amplitude (scalar_like_type) –

    Maximum value of the transformed scalar field.

  • width (scalar_like_type) –

    Range at which the value of the transformed scalar field drops to almost zero.

Returns:
  • ndarray

    Transformed scalar field.

gaussian_falloff_jax(u, amplitude, width)

Applies the Gaussian to the positive values of the scalar (Signed Distance Function) field.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • amplitude (scalar_like_type) –

    Maximum value of the transformed scalar field (and points at which the scalar field was < 0).

  • width (scalar_like_type) –

    Range at which the value of the transformed scalar field drops to almost zero.

Returns:
  • ndarray

    Transformed scalar field.

conv_multiple_jax(u, filter_kernel, iterations)

Averages the field using an averaging convolutional kernel of the specified size.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

  • filter_kernel (array_like_type) –

    Convolutional kernel of appropriate dimensions.

  • iterations (int) –

    Number of times the convolutional averaging is applied to the input scalar field.

Returns:
  • ndarray

    Transformed scalar field.

conv_edge_detection_jax(u)

Edge detection with a 3x3 convolutional kernel.

Parameters:
  • u (array_like_type) –

    Signed Distance field or any scalar field.

Returns:
  • ndarray

    Transformed scalar field.