You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The lineup plan (apstools.plans.alignment.lineup) uses a best effort callback to capture results, either through the bec argument or from the ipython shell namespace. Either way, it calls bec.enable_plots(). This is a sensible default, but caused problems for me in using this plan in a CI environment.
I could see two remedies:
Add an argument to the plan that determines whether enable_plots gets called (e.g. def lineup(..., enable_plots=True))
Only call bec.enable_plots() if the bec comes from the ipython shell namespace, allowing me to use bec.disable_plots() before passing the bec as the bec argument to lineup().
The first one seems simpler to me, but happy to submit a PR for either one.
The text was updated successfully, but these errors were encountered:
Ah, gotcha. Strange that peakstats requires plotting to be enabled. I'm fine with using pysumreg, though I don't think I have time the bandwidth to implement that right now. I have a workaround for my tests so it's okay for now.
I believe that PeakStats relies on methods in BestEffortCallback to identify the plottable signals. To break the binding, those methods would have to be refactored out of BEC. Current rate of development suggests to me that is not likely in time frame of years.
Unless you disagree, I will close this issue as wontfix. For me, the apstools.plans.lineup2() plan is the replacement that works regardless of plotting support. It uses PySumReg.
The lineup plan (
apstools.plans.alignment.lineup
) uses a best effort callback to capture results, either through the bec argument or from the ipython shell namespace. Either way, it callsbec.enable_plots()
. This is a sensible default, but caused problems for me in using this plan in a CI environment.I could see two remedies:
def lineup(..., enable_plots=True)
)bec.enable_plots()
if the bec comes from the ipython shell namespace, allowing me to usebec.disable_plots()
before passing the bec as the bec argument tolineup()
.The first one seems simpler to me, but happy to submit a PR for either one.
The text was updated successfully, but these errors were encountered: