garnet.plots package#

Submodules#

garnet.plots.base module#

class BasePlot[source]#

Bases: object

Methods

save_plot(filename)

Save plot.

close

close()[source]#
save_plot(filename)[source]#

Save plot.

Parameters:
filenamestr

Path to file.

class Pages(filename)[source]#

Bases: object

Methods

add_plot

close

add_plot(fig)[source]#
close()[source]#

garnet.plots.colors module#

Atom color map for plotting (shared module).

garnet.plots.crystal module#

class CrystalStructurePlot(sites, cell, space_group=None)[source]#

Bases: object

Methods

get_crystal_structure

matrices

params

plot

wrap

get_crystal_structure()[source]#
matrices()[source]#
params(a, b, c, alpha, beta, gamma)[source]#
plot(filename)[source]#
wrap(val)[source]#

garnet.plots.peaks module#

class PeakCentroidPlot(c0, c1, c2, Q, r_cut, d_min)[source]#

Bases: BasePlot

Methods

save_plot(filename)

Save plot.

close

class PeakEstimatePlot(zs, yns, ens)[source]#

Bases: BasePlot

Methods

save_plot(filename)

Save plot.

close

plot_peak_bins

plot_peak_bins(ax, z, yn)[source]#
class PeakPlot[source]#

Bases: BasePlot

Methods

add_ellipsoid(c, S)

Draw ellipsoid envelopes.

add_ellipsoid_fit(xye_fit)

Three-dimensional ellipsoids.

add_estimated_ellipsoid(c, S)

Draw estimated ellipsoid envelopes on ROI views.

add_peak_info(hkl, d, wavelength, angles, gon)

Add peak information.

add_peak_stats(reddev, intensity, sigma)

Add peak statistics.

save_plot(filename)

Save the current peak figure without rebuilding it.

update_envelope(x0, x1, x2, pk, bkg)

Draw region-of-interest.

add_data_norm_fit

add_filter

add_integral_fit

add_profile_bkg

add_profile_fit

add_projection_fit

close

add_data_norm_fit(xye, params)[source]#
add_ellipsoid(c, S)[source]#

Draw ellipsoid envelopes.

Parameters:
c1d-array

3 component center.

S2d-array

3x3 covariance matrix.

add_ellipsoid_fit(xye_fit)[source]#

Three-dimensional ellipsoids.

Parameters:
x0, x1, x2, y, e, fit3d-array

Bins, signal, error, and fit.

add_estimated_ellipsoid(c, S)[source]#

Draw estimated ellipsoid envelopes on ROI views.

Parameters:
c1d-array

3 component center.

S2d-array

3x3 covariance matrix.

add_filter(result)[source]#
add_integral_fit(xye_fit)[source]#
add_peak_info(hkl, d, wavelength, angles, gon)[source]#

Add peak information.

Parameters:
hkllist

Miller indices.

dfloat,

Interplanar d-spacing.

wavelengthfloat

Wavelength.

angleslist

Scattering and azimuthal angles.

gonlist

Goniometer Euler angles.

add_peak_stats(reddev, intensity, sigma)[source]#

Add peak statistics.

Parameters:
reddevlist

Reduced Poisson deviance D/dof per mode.

intensitylist

Integrated intensity.

sigmalist

Integrated intensity uncertainty.

add_profile_bkg(bkg_prof)[source]#
add_profile_fit(xye_fit)[source]#
add_projection_fit(xye_fit)[source]#
save_plot(filename)[source]#

Save the current peak figure without rebuilding it.

PeakPlot mutators update existing artists in place, so repeated saves can reuse the same figure instead of recreating the entire layout for each peak.

update_envelope(x0, x1, x2, pk, bkg)[source]#

Draw region-of-interest. mask =

Parameters:
pk3d-array

Peak region.

bkg3d-array

Background shell.

class PeakProfilePlot(x, y, e, vol, r, r_cut)[source]#

Bases: BasePlot

Methods

save_plot(filename)

Save plot.

close

draw_boundary

plot_peak_bins

plot_peaks

draw_boundary(res, params)[source]#
plot_peak_bins(x0, x1, x2, y0, y1, y2, e0, e1, e2)[source]#
plot_peaks(x0, x1, x2, y0, y1, y2, e0, e1, e2, r_cut)[source]#
class ScanPlot(thresholds, max_peaks, indexed_peaks, cutoff)[source]#

Bases: BasePlot

Methods

save_plot(filename)

Save plot.

close

garnet.plots.volume module#

class SlicePlot(UB, W)[source]#

Bases: BasePlot

Methods

save_plot(filename)

Save plot.

calculate_transforms

close

make_slice

calculate_transforms(axes, labels, normal)[source]#
make_slice(signal, value)[source]#

Module contents#