Miscelaneous Utilities (pysit.util)

Note

This section of the documentation is under construction. The source, however, is documented and you can access that via the Reference/API sections.

Introduction

A pile of utility routines

util Submodules

More details

Image Processing

Reference/API

pysit.util.image_processing Module

Functions

gaussian_kernel(size, sigma[, mesh_deltas]) Returns a normalized gauss kernel array for convolutions.
blur_image(im[, sigma, freq, mesh_deltas, …]) Returns a blurred image by convolving with a gaussian kernel.
resample_array(arr, new_size[, mode]) Returns a resampled array at new resolution.

Implicit Surfaces

Reference/API

pysit.util.implicit_surfaces Module

Classes

ImplicitSurface()
ImplicitCollection(*items)
ImplicitPlane(p, n)
ImplicitSphere([c, r])
ImplicitXAlignedCylinder([c, length, r])
ImplicitEllipse([c, a, r])
ImplicitIntersection(*items)
ImplicitUnion(*items)
ImplicitDifference(base, *items)
ImplicitComplement(base)
GridMapBase()
GridMap(funcs)
GridSlip(p, n)

IO

Reference/API

pysit.util.io Module

Functions

read_model(fname) Reads a model in segy format and returns it as an array.

Parallel

Reference/API

pysit.util.parallel Module

Classes

ParallelWrapShotNull(*args, **kwargs)
ParallelWrapShot([comm])

Matrix Helpers

Reference/API

pysit.util.matrix_helpers Module

Functions

build_sigma(mesh, dim)
make_diag_mtx(vec)

Networking

Reference/API

pysit.util.net Module

Functions

download_file(url, destination)

Utilities

Reference/API

pysit.util.util Module

Functions

bspline(x)
quadratic(x)

Classes

ConstructableDict(func) A ConstructableDict returns the value mapped to a key.
Bunch(**kwargs) An implementation of the Bunch pattern.

Iteration History

Configuring History

Retrieving History

Adding History Item

Outer and Inner Loops

Extending optimization

Define the required interface:

  • _select_step
  • inner_loop
  • _compute_alpha0

Reference/API

pysit.optimization Package

Classes

ConjugateGradient(objective[, reset_length, …])
GaussNewton(objective[, krylov_maxiter])
GradientDescent(objective, *args, **kwargs)
LBFGS(objective[, memory_length, …])