ptyrad.plotting.basic#
Plotting functions for basic outputs including probe modes, loss curves, positions, etc.
Functions
|
|
|
Unified dashboard of all scalar time-series in a fixed 2x4 grid. |
|
Plots the learning rate schedule for each optimizable parameter group over iterations. |
|
|
|
Plot the obj tilts given the probe position and pos-dependent tilts |
|
|
|
|
|
|
|
Plot the scan positions given an array of (N,2) |
|
Plot a sigmoid mask overlay on img with a line profile |
|
- ptyrad.plotting.basic.plot_sigmoid_mask(Npix, relative_radius, relative_width, img=None, show_circles=False)[source]#
Plot a sigmoid mask overlay on img with a line profile
- ptyrad.plotting.basic.plot_obj_tilts_avg(avg_tilt_iters, last_n_iters=2, show_fig=True, pass_fig=False)[source]#
- ptyrad.plotting.basic.plot_obj_tilts(pos, tilts, figsize=(16, 16), show_fig=True, pass_fig=False)[source]#
Plot the obj tilts given the probe position and pos-dependent tilts
- ptyrad.plotting.basic.plot_scan_positions(pos, init_pos=None, img=None, offset=None, figsize=(16, 16), dot_scale=0.001, show_arrow=True, show_fig=True, pass_fig=False)[source]#
Plot the scan positions given an array of (N,2)
- ptyrad.plotting.basic.plot_pos_grouping(pos, batches, circle_diameter=False, diameter_type='90%', figsize=(16, 8), dot_scale=1, show_fig=True, pass_fig=False)[source]#
- ptyrad.plotting.basic.plot_loss_curves(loss_iters, last_n_iters=10, show_fig=True, pass_fig=False)[source]#
- ptyrad.plotting.basic.plot_learning_rates_schedule(lr_iters, log=True, show_fig=True, pass_fig=False)[source]#
Plots the learning rate schedule for each optimizable parameter group over iterations.
- ptyrad.plotting.basic.plot_slice_thickness(dz_iters, last_n_iters=10, show_fig=True, pass_fig=False)[source]#
- ptyrad.plotting.basic.plot_probe_modes(init_probe=None, opt_probe=None, amp_or_phase='amplitude', real_or_fourier='real', phase_cmap=None, amplitude_cmap=None, dpi=200, show_fig=True, pass_fig=False)[source]#
- ptyrad.plotting.basic.plot_convergence_dashboard(loss_iters, lr_iters, dz_iters, avg_tilt_iters, convergence_iters, iter_offset=None, show_fig=True, pass_fig=False)[source]#
Unified dashboard of all scalar time-series in a fixed 2x4 grid.
Layout:
Row 0: Loss | obja | objp | Object tilts Row 1: LR | Probe amplitude | Probe position shifts | Slice thickness
Panels with no data show a blank placeholder so the layout stays fixed across save cycles.
iter_offsetsets the starting iteration for all panels; if None, each panel determines its own start via the smart Kneedle router. Because panels have different logging strides (e.g. loss every iter, convergence metrics every 50 iters), each panel independently converts the iteration number to its own array index.