Explore modules

All functions listed in this page can be used to do a variety of operations. We have separated the functions into multiple modules.

Standard I/O routines

hdf5read (fname[, key])

Read input raw DAS file.

load_model (fname, model)

Load saved model's parameter dictionary to initialized model.

save_data (data, dir_dst, fname)

Save raw data region as JPG image.

load_image (data[, rgb, to_numpy, squeeze])

Load input data as tensor image.

load_bulk (dname, size[, rgb, to_numpy, labeled])

Load multiple images from directory.

DAS data loader

set_from_file (filename[, img_size, stride, ...])

Create set of images out of single DAS data file.

mean_shift (data[, loops])

Shit all values from input 2D array to match mean value of 0.5.

set_creation (datapath[, img_size, stride, ...])

Create PyTorch tensor training set of single-channel data images.

prepare_loader (datapath, img_size, stride, ...)

Create custom data loader with unlabeled, single-channel, data images directly extracted from raw data files.

Data Distribution

gauss_single (x, a, b, c)

gauss_double (x, a, b, c, d, e, f)

distfit (ax, data, ngauss[, amp, mu, sig, ...])

Fit gaussian to 2D patch distribution.

Evaluation

decode_plot (model, datapath[, img_size, ...])

Show original and decoded images for 5 random images.

embedding_plot (model, datapath[, img_size, ...])

Display latent representation in 2D space.

epoch_recon (models, datapath[, img_size, ...])

Display image reconstruction accuracy across epochs.

label_2d_latent (model, data_loader[, embeddings])

Scatter plot of 2D latent space with label-based color schemme.

success_rate (model, target, img_size, ...[, ...])

Number of reconstructed images for which 70% (or the percentage defined by the success_threshold argument) of the pixels are 90% similar.

Figures

plot_prob_map (data, prob[, xmin, xmax, ...])

Comparative plots between raw data and corresponding probability map.

plot_map_stage (data, NeuralNet, loss_hist, ...)

Plot stage of probability map.

Mapping

minute_prob (data_path, model_file, depth[, ...])

Get surface wave probabilities for every consecutive square regions.

minute_prob_test (hdf5_file, model_file, depth)

Get surface wave probabilities for every consecutive square regions.

extract_prob_map (data, model[, img_size, ...])

Calculate probability map using fed raw data and training model.

Cross-correlation

avg_fft (data[, fs])

xcorr_freq (data, xcorr[, lag_range, threshold])

Phase-weighted stack

phase_weight_stack (fpath, idx[, weight, path])

ts_weighting (fname, data, map_path)

Single

suplearn_simple (model, criterion, optimizer, ...)

Simple, non-optimized, supervised training with validation step performed at regular intervals during batch iteration for single node, single processor execution.