Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/f4enix/output/rssa/rssa.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""This module is related to the parsing of D1S-UNED meshinfo files."""

from collections.abc import Sequence
from pathlib import Path

import polars as pl
Expand Down Expand Up @@ -140,9 +138,6 @@ def histories(self) -> pl.Series:
"""Returns the history numbers of the tracks."""
return self.tracks["a"]

def get_energy_spectra(self, energy_bins: Sequence[float]) -> pl.DataFrame:
raise NotImplementedError()

def plot_plane(self) -> RSSAPlot:
"""Returns an instance of RSSAPlot to plot data assuming an XY plane."""
return RSSAPlot(self.tracks, self.parameters)
Expand Down
4 changes: 2 additions & 2 deletions src/f4enix/output/rssa/rssa_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def calculate_perimeter_positions(self) -> 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
The perimeter position is calculated as -theta * r, where theta is the angle in
radians and r is the radius of each track.
"""
radius = (pl.col("x").pow(2) + pl.col("y").pow(2)).sqrt()
thetas = pl.arctan2(pl.col("y"), pl.col("x"))
perimeter_pos = (thetas * radius).alias("perimeter_pos")
perimeter_pos = (thetas * radius * -1).alias("perimeter_pos")
self.tracks = self.tracks.with_columns(perimeter_pos)

@abstractmethod
Expand Down