mmt_multipole_inversion.plot_tools
#
Module Contents#
Functions#
Helper function to return a tuple with 5 objects from a multipole |
|
|
Plot the magnetic scan grid signal stored in the Bz_array variable |
|
Plot the inverted field Bz and the positions of the particles |
|
Plot the residual field and the positions of the particles |
- mmt_multipole_inversion.plot_tools.get_inversion_plot_objects(inv)#
Helper function to return a tuple with 5 objects from a multipole inversion instance, to be used with the plot functions
- Parameters
- inv
Instance of MultipoleInversion
- Returns
- tuple
(Sx_range, Sy_range, Sdx, Sdy, particle_positions) from inv
- mmt_multipole_inversion.plot_tools.plot_sample(ax, MultInvInst, contourf_args={'levels': 50}, contour_args={}, scatter_args={'c': 'k', 's': 1}, imshow_args=None, dimension_scale=1.0, data_scale=1.0)#
Plot the magnetic scan grid signal stored in the Bz_array variable
- Parameters
- ax
Matplotlib axis object
- MultInvInst
An instance of the MultipoleInversion class. This function uses the attributes Bz_array Sx_range, Sy_range, Sdx, Sdy and particle_positions.
- contourf_args,
Plots Bz using a colormap and filled contour levels. This options is a dict passed to the corresponding matplotlib function.
- contour_args,
Plots the line profile of the contour levels. Can be deactivated by setting this as None instead of a dict
- scatter_args
Plots the particle positions as data points. Can be deactivated by setting this as None instead of a dict
- imshow_args
If specified, use imshow instead of contourf for the colourmap. In this case all the contourf args are ignored
- dimension_scale, data_scale
Scaling for the spatial and field data
- Returns
- tuple
(contourf/imshow, scatter, contours) plot objects
- mmt_multipole_inversion.plot_tools.plot_inversion_Bz(ax, MultInvInst, contourf_args={'cmap': 'RdYlBu', 'levels': 10}, contour_args={'colors': 'k', 'linewidths': 0.2, 'levels': 10}, scatter_args={'c': 'k'}, imshow_args=None, dimension_scale=1.0, data_scale=1.0)#
Plot the inverted field Bz and the positions of the particles
- Parameters
- ax
Matplotlib axis object
- MultInvInst
An instance of the MultipoleInversion class. This function uses the attributes inv_Bz_array, Sx_range, Sy_range, Sdx, Sdy and particle_positions.
- contourf_args,
Plots Bz using a colormap and filled contour levels. This options is a dict passed to the corresponding matplotlib function.
- contour_args,
Plots the line profile of the contour levels. Can be deactivated by setting this as None instead of a dict
- scatter_args
Plots the particle positions as data points. Can be deactivated by setting this as None instead of a dict
- imshow_args
If specified, use imshow instead of contourf for the colourmap. In this case all the contourf args are ignored
- dimension_scale, data_scale
Scaling for the spatial and field data
- Returns
- tuple
(contourf/imshow, scatter, contours) plot objects
- mmt_multipole_inversion.plot_tools.plot_difference_Bz(ax, MultInvInst, contourf_args={'cmap': 'RdYlBu', 'levels': 50}, scatter_args={'c': 'k', 's': 1}, imshow_args=None, dimension_scale=1.0, data_scale=1.0)#
Plot the residual field and the positions of the particles
- Parameters
- ax
Matplotlib axis object
- MultInvInst
An instance of the MultipoleInversion class. This function uses the attributes Bz_array, inv_Bz_array, Sx_range, Sy_range, Sdx, Sdy and particle_positions.
- contourf_args,
Plots Bz using a colormap and filled contour levels. This options is a dict passed to the corresponding matplotlib function.
- contour_args,
Plots the line profile of the contour levels. Can be deactivated by setting this as None instead of a dict
- scatter_args
Plots the particle positions as data points. Can be deactivated by setting this as None instead of a dict
- imshow_args
If specified, use imshow instead of contourf for the colourmap. In this case all the contourf args are ignored
- dimension_scale, data_scale
Scaling for the spatial and field data
- Returns
- tuple
(contourf/imshow, scatter) plot objects