PlotPropertiesVFP

class sapphireppplot.plot_properties_vfp.PlotPropertiesVFP(series_names=<factory>, labels=<factory>, data_type='POINTS', representation_type='UnstructuredGridRepresentation', use_legacy_pvtu_reader=True, preview_size_1d=<factory>, preview_size_2d=<factory>, camera_view_2d=<factory>, preview_size_3d=<factory>, camera_view_3d=<factory>, background_color=<factory>, screenshot_transparent_background=True, animation_transparent_background=False, animation_frame_stride=1, extracts_frame_stride=1, extracts_compressor='ZLib', extracts_compression_level=5, font_family='Arial', text_color=<factory>, label_size=18, text_size=24, title_size=30, line_colors=<factory>, line_styles=<factory>, line_widths=<factory>, default_line_width=2.0, legend_location='TopRight', legend_symbol_width=30, left_axis_labels=<factory>, bottom_axis_labels=<factory>, show_grid=False, grid_labels=<factory>, grid_color=<factory>, color_map='Viridis (matplotlib)', color_bar_label_format='', color_bar_range_labels=True, color_bar_range_label_format='%-#6.1e', color_bar_orientation='Vertical', color_bar_position='Lower Right Corner', color_bar_length=0.25, color_bar_thickness=16, axes_scale=<factory>, axes_stretch=<factory>, axes_ticks=<factory>, time_format='$t = {time:.2f}$', time_location='Upper Left Corner', sampling_pattern='center', sampling_resolution=None, stream_tracer_maximum_error=1e-06, stream_tracer_minimum_step=0.01, stream_tracer_initial_step=0.2, stream_tracer_maximum_step=0.5, export_precision=5, dimension=2, momentum=True, dim_ps=2, dim_cs=1, logarithmic_p=True, scaled_distribution_function=False, lms_indices=<factory>, debug_input_functions=False, prefix_numeric=False, project=False, interpol=False, annotation_project_interpol='exact', p_label='$p$', _spectral_index=None)

Bases: PlotProperties

Specialized plot properties for VFP plots.

dimension: int = 2

Dimensionality of the results.

momentum: bool = True

Does the solution have a momentum dependence?

dim_ps: int = 2

Dimension of the reduced phase space.

dim_cs: int = 1

Spatial dimension of the results.

logarithmic_p: bool = True

Does the solution uses logarithmic momentum?

scaled_distribution_function: bool = False

Is the distribution function scaled in Sapphire++ as \(g = p^s f\)?

lms_indices: Sequence[tuple[int, int, int]]

List of lms_indices to display. If left empty it will be set automatically at loading.

debug_input_functions: bool = False

Show user defined input functions.

prefix_numeric: bool = False

Use numeric prefix for results?

project: bool = False

Show projected exact solution?

interpol: bool = False

Show interpolated exact solution?

annotation_project_interpol: str = 'exact'

Label annotation for exact solution.

p_label: str = '$p$'

Label for the \(p\) axis in LineChartView.

static create_lms_indices(expansion_order)

Create mapping between system index \(i\) and spherical harmonic indices \((l,m,s)\).

Parameters:

expansion_order (int) – Expansion order l_max.

Return type:

list[tuple[int, int, int]]

Returns:

lms_indices (list[tuple[int, int, int]]) – Mapping lms_indices[i] = (l,m,s).

f_lms_name(lms_index, prefix='', base_name=None)

Look up of ParaView series names for specific lms_index.

Parameters:
  • lms_index (tuple[int, int, int]) – The index (l,m,s).

  • prefix (str) – Prefix.

  • base_name (Optional[str]) – Base name for variable. Defaults to “f”, “g” or “p^s f”.

Return type:

str

Returns:

quantity_name (str) – The ParaView Series name for the lms_index.

f_lms_label(lms_index, annotation='', variable_name=None)

Look up of label for lms_index.

Parameters:
  • lms_index (tuple[int | str, int | str, int | str]) – The index (l,m,s).

  • annotation (str) – Postfix annotation of quantity.

  • variable_name (Optional[str]) – Name of the variable. Defaults to “f”, “g” or “p^s f”.

Return type:

str

Returns:

quantity_label (str) – The label for the lms_index.

set_lms_indices(lms_indices)

Set the series_names and labels activating only the lms_indices.

Parameters:

lms_indices (Sequence[tuple[int, int, int]]) – The lms_indices to activate. Will deactivate all other series names.

Return type:

None

set_expansion_order(expansion_order)

Set the series_names and labels using the expansion order.

Parameters:

expansion_order (int) – Maximum expansion order l_max to display.

Return type:

None

scale_by_spectral_index(spectral_index, lms_indices)

Set properties to a scaled distribution function with spectral index \(s\).

Parameters:
  • spectral_index (float) – Spectral index \(s\).

  • lms_indices (Sequence[tuple[int, int, int]]) – The lms_indices to activate. Will deactivate all other and unscaled series names.

Return type:

None

convert_lnp_to_log10p()

Display the momentum axes as \(\log_{10}(p)\) instead of \(\ln(p)\) in RenderView.

This only affects the display, it does not rescale the underlying data.

Note

This function only works for RenderView. For LineChartView options see convert_lnp_to_p().

Return type:

None

convert_lnp_to_p(p_min=1e-15, p_max=1000000000000000.0, num=31, num_subdivisions=10, show_label_subdivisions=False)

Convert the axes labels for the LineChartView to from \(\ln(p)\) to \(p\).

Note

This function only works for LineChartViews. For RenderView options see convert_lnp_to_log10p().

If more control on the label format is desired, directly modify the bottom_axis_labels instead.

Parameters:
  • p_min (float) – Minimum momentum to label.

  • p_max (float) – Maximum momentum to label.

  • num (int) – Number of labelled divisions, logarithmically spaced.

  • num_subdivisions (int) – Number of unlabelled subdivisions, linearly spaced.

  • show_label_subdivisions (bool) – Show the label on the subdivision markers as well?

Return type:

None