Visualization (radionets.plotting.visualization)#

Visualization submodule of radionets.plotting.

Reference/API#

radionets.plotting.visualization Module#

Functions#

calc_dr(ifft_truth, ifft_pred)

check_vmin_vmax(inp)

Check wether the absolute of the maxmimum or the minimum is bigger.

compute_area_ratio(CS_pred, CS_truth)

Compute the ratio of the areas of truth and prediction.

get_boxsize(num_corners[, num_pixel])

make_axes_locatable(axes)

make_axes_nice(fig, ax, im, title[, phase, ...])

Create nice colorbars with bigger label size for every axis in a subplot.

ms_ssim(X, Y[, data_range, size_average, ...])

interface of ms-ssim Args: X (torch.Tensor): a batch of images, (N,C,[T,]H,W) Y (torch.Tensor): a batch of images, (N,C,[T,]H,W) data_range (float or int, optional): value range of input images. (usually 1.0 or 255) size_average (bool, optional): if size_average=True, ssim of all images will be averaged as a scalar win_size: (int, optional): the size of gauss kernel win_sigma: (float, optional): sigma of normal distribution win (torch.Tensor, optional): 1-D gauss kernel. if None, a new kernel will be created according to win_size and win_sigma weights (list, optional): weights for different levels K (list or tuple, optional): scalar constants (K1, K2). Try a larger K2 constant (e.g. 0.4) if you get a negative or NaN results. Returns: torch.Tensor: ms-ssim results.

plot_box(ax, num_boxes, corners)

plot_contour(ifft_pred, ifft_truth, out_path, i)

plot_data(x, path[, rows, cols, save, ...])

Plotting image of the dataset

plot_fitgaussian(data, fit_list, ...[, ...])

Plotting the sky image with the fitted gaussian distributian and the related parameters.

plot_inp_tar(h5_dataset[, fourier, amp_phase])

plot_jet_components_results(inp, pred, ...)

Plot input images, prediction and true image.

plot_jet_results(inp, pred, truth, path[, ...])

Plot input images, prediction, true and diff image of the overall prediction.

plot_length_point(length, vals, mask, out_path)

plot_target(h5_dataset[, log])

reshape_2d(array)

Reshape 1d arrays into 2d ones.

visualize_sampled_unc(i, mean, std, ...)

visualize_source_reconstruction(ifft_pred, ...)

visualize_uncertainty(i, img_pred, ...[, ...])

visualize_with_fourier(i, img_input, ...[, ...])

Visualizes how the target variables are displayed in fourier space.

visualize_with_fourier_diff(i, img_pred, ...)

Visualizing, if the target variables are displayed in fourier space.