f4enix.output.rssa.rssa_plotting.RSSASpectraPlot#
- class f4enix.output.rssa.rssa_plotting.RSSASpectraPlot(tracks: DataFrame, rssa_parameters: FileParameters)#
Bases:
PlottingFunctionsMethods
__init__(tracks, rssa_parameters)It adds a new column to the tracks DataFrame called 'perimeter_pos' that takes the X and Y coordinates and calculates the position as a perimeter coordinate.
Combine the current spectra plot with other spectra for comparison.
get_plot()Returns the Matplotlib figure and axes of the plot for further manual customization.
Calculate and return the spectra information.
save_figure(out_path)Save the figure to the specified path.
set_energy_bins(energy_bins)Set the energy bins for the spectra plot.
set_particle(particle_type)Set the particle type to filter the tracks.
set_perimeter_limits(vmin, vmax)Set the limits for the perimeter positions.
set_plot_parameters(plot_parameters)Set the plot parameters for the spectra plot.
set_surface_ids(surface_ids)Set the surface IDs to filter the tracks.
set_z_limits(vmin, vmax)Set the z limits for the plot.
show()Show the plot.
Attributes
tracksrssa_parameters- calculate_perimeter_positions() None#
It adds a new column to the tracks DataFrame called ‘perimeter_pos’ that takes the X and Y coordinates and calculates the position as a perimeter coordinate. The perimeter position is calculated as theta * r, where theta is the angle in radians and r is the radius of each track.
The theta is calculated using the arctan2 function, which gives the angle between the positive X-axis and the point (x, y). In that calculation, the X coordinate is multiplied by -1 to “flip” the plot, this way it looks as a cylinder observed from the inside.
- get_combined_plot_with_other_spectras(*other_spectra_info: SpectraInfo) tuple[Figure, Axes]#
Combine the current spectra plot with other spectra for comparison.
- get_plot() tuple[Figure, Axes]#
Returns the Matplotlib figure and axes of the plot for further manual customization.
- get_spectra_info() SpectraInfo#
Calculate and return the spectra information.
- save_figure(out_path: Path | str) RSSASpectraPlot#
Save the figure to the specified path.
- set_energy_bins(energy_bins: Sequence[float]) RSSASpectraPlot#
Set the energy bins for the spectra plot.
- set_particle(particle_type: Literal['n', 'p']) RSSASpectraPlot#
Set the particle type to filter the tracks.
- set_perimeter_limits(vmin: float, vmax: float) RSSASpectraPlot#
Set the limits for the perimeter positions.
- set_plot_parameters(plot_parameters: SpectraPlotParameters) RSSASpectraPlot#
Set the plot parameters for the spectra plot.
- set_surface_ids(surface_ids: list[int]) RSSASpectraPlot#
Set the surface IDs to filter the tracks.
- set_z_limits(vmin: float, vmax: float) RSSASpectraPlot#
Set the z limits for the plot.
- show() RSSASpectraPlot#
Show the plot.