Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ dependencies = [
"tqdm>=4.66.5",
]

[project.urls]
Documentation = "https://rascalsoftware.github.io/RAT/"
Repository = "https://github.com/RascalSoftware/python-RAT"

[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
Expand Down
28 changes: 13 additions & 15 deletions ratapi/utils/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def _extract_plot_data(event_data: PlotEventData, q4: bool, show_error_bar: bool
for j in range(len(sld)):
results["sld"][-1].append([sld[j][:, 0], sld[j][:, 1]])

results["sld_resample"].append([])
if event_data.resample[i] == 1 or event_data.modelType == "custom xy":
layers = event_data.resampledLayers[i][0]
results["sld_resample"].append([])
for j in range(len(event_data.resampledLayers[i])):
layer = event_data.resampledLayers[i][j]
if layers.shape[1] == 4:
Expand Down Expand Up @@ -198,15 +198,14 @@ def plot_ref_sld_helper(
sld_min, sld_max = confidence_intervals["sld"][i][j]
sld_plot.fill_between(plot_data["sld"][i][j][0], sld_min, sld_max, alpha=0.6, color="grey")

if plot_data["sld_resample"]:
for j in range(len(plot_data["sld_resample"][i])):
sld_plot.plot(
plot_data["sld_resample"][i][j][0],
plot_data["sld_resample"][i][j][1],
color=color,
linewidth=1,
animated=animated,
)
for j in range(len(plot_data["sld_resample"][i])):
sld_plot.plot(
plot_data["sld_resample"][i][j][0],
plot_data["sld_resample"][i][j][1],
color=color,
linewidth=1,
animated=animated,
)

# Format the axis
ref_plot.set_yscale("log")
Expand Down Expand Up @@ -544,11 +543,10 @@ def update_foreground(self, data):
self.figure.axes[1].draw_artist(self.figure.axes[1].lines[i])
i += 1

if plot_data["sld_resample"]:
for resampled in plot_data["sld_resample"][j]:
self.figure.axes[1].lines[i].set_data(resampled[0], resampled[1])
self.figure.axes[1].draw_artist(self.figure.axes[1].lines[i])
i += 1
for resampled in plot_data["sld_resample"][j]:
self.figure.axes[1].lines[i].set_data(resampled[0], resampled[1])
self.figure.axes[1].draw_artist(self.figure.axes[1].lines[i])
i += 1

for i, container in enumerate(self.figure.axes[0].containers):
self.adjust_error_bar(
Expand Down
6 changes: 0 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ def build_libraries(self, libraries):

setup(
name=PACKAGE_NAME,
author="",
author_email="",
url="https://github.com/RascalSoftware/python-RAT",
description="Python extension for the Reflectivity Analysis Toolbox (RAT)",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
packages=find_packages(exclude=("tests",)),
include_package_data=True,
package_data={"": [get_shared_object_name(libevent[0])], "ratapi.examples": ["data/*.dat"]},
Expand Down