Skip to content

Remove energy spectra for TAC cut by default - #221

Merged
ckierans merged 3 commits into
cositools:develop/emfrom
ckierans:TAC_spectra_plotting
Oct 9, 2026
Merged

ckierans merged 3 commits into
cositools:develop/emfrom
ckierans:TAC_spectra_plotting

Conversation

@ckierans

Copy link
Copy Markdown
Collaborator

There is a tab in the Nuclearizer GUI for an energy spectra intended to be used before and after the TAC cut; however, the standard operation is to run the TACCalibration module before the EnergyCalibration module, so these spectra are empty.

Screenshot 2026-09-28 at 11 22 02 PM

In this PR, I've added a boolean to chose whether or not to have this additional spectra tab in the Nuclearizer GUI. Right now I have this hardcoded in the module construct, but I can be more clever about have this option accessible if people see a use-case. I think people are only going to want to use this plotting option when doing non-standard things and it's not clear how often that would be.

I did start to explore an option to only make this TAC Cut Spectra appear in the GUI if the EnergyCalibration module comes before the TAC Calibration module by iterating through the active modules in MSupervisor. So that's a possibility, but I erred on the side of simplicity today.

@fhagemann

Copy link
Copy Markdown

Is there any way we can have this appear, once both energy and TAC calibration module are run, no matter their order?

@fhagemann
fhagemann requested a review from robin4730 September 29, 2026 10:00
@ckierans

Copy link
Copy Markdown
Collaborator Author

Just to be clear, there is also an equivalent ExpoPlotSpectrum panel that comes along with the EnergyCalibration module - see the second image below. The tab/plots I'm suggesting to remove are the unpopulated ones in the from just the before/after TAC Calibration in the first image below.

Screenshot 2026-09-29 at 9 35 08 AM Screenshot 2026-09-29 at 9 35 15 AM

@fhagemann

Copy link
Copy Markdown

Is the standard to do TAC before energy?
I always do energy before TAC 😇
I guess this ties back to #207

@ckierans
ckierans marked this pull request as draft October 6, 2026 17:31
@ckierans

ckierans commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

I'm marking this as a draft so I can add the automatic checker as to whether or not the energy calibration is run first. Since I think we want this ExpoPlotSpectrum panel showing the before/after spectrum for the TAC cut if the energy calibration is running first. Right @NicoleRodriguezCavero ?

@ckierans
ckierans force-pushed the TAC_spectra_plotting branch from cd41f5c to d88e6b3 Compare October 7, 2026 02:07
@ckierans
ckierans marked this pull request as ready for review October 7, 2026 02:11
@ckierans

ckierans commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

Okay, now in the TACCalibration Module, I check whether or not the energy calibration has run, and therefore whether it makes sense to show a spectra. If the TAC Cal comes first, we only get a spectra after the ECal. If the ECal comes first, we get a spectra after the ECal, and then a second spectra after the TACCal. I think this provide the right level of flexibility for different users.

@fhagemann fhagemann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the way it is now: removing the expo plot if energy have not been calibrated, but keeping the current behavior if they have been :)

@fhagemann

fhagemann commented Oct 7, 2026 •

Copy link
Copy Markdown

I also verified (on FM data 🎉) that I'm only getting the Energy Spectrum (TAC cuts) expo when running energy calibration BEFORE TAC calibration:

Screenshot from 2026-10-07 06-22-59 Screenshot from 2026-10-07 06-24-19

@ckierans
ckierans merged commit 3a3cc91 into cositools:develop/em Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants