Skip to content

158 multi channel option for parameter timescan #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

verenamh
Copy link
Contributor

Added a multi-channel option to the parameter timescan function, in order to study the ADC linearity for multiple channels simultaneously. It adds a column to the csv saving the channel number, and applies the same parameters to all 72 channels.

@@ -26,7 +26,7 @@
parser.add_argument('-ex', '--extra_csv_files', type=Path, nargs='+', help='time scan data, if you want to plot data from multiple csv files. Can be used to compare different parameter settings on the same plot. Adds a legend that takes the parameter settings.')
parser.add_argument('-o','--output', type=Path, help='file to which to print, default is input file with extension changed to ".png"')
plot_types = ['SCATTER', 'HEATMAP']
plot_funcs = ['ADC-TIME', 'TOT-TIME', 'TOT', 'TOT-EFF', 'PARAMS']
plot_funcs = ['ADC-TIME', 'TOT-TIME', 'TOT', 'TOT-EFF', 'PARAMS', 'HR_CORR']
Copy link
Member

Choose a reason for hiding this comment

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

This PR has the same changes as #178 which is fine, we'll just merge them one-by-one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was accidental, my bad!

Comment on lines +493 to +494
}
else {
Copy link
Member

Choose a reason for hiding this comment

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

Style, not a big deal but helpful for readability

Suggested change
}
else {
} else {

Comment on lines +489 to +490
bool tmp = pftool::readline_bool("Pulse into channel 61 (N) or all channels (Y)?", false);
if (tmp) {
Copy link
Member

Choose a reason for hiding this comment

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

No reason to manually create a tmp variable when the compiler can do it for you!

Suggested change
bool tmp = pftool::readline_bool("Pulse into channel 61 (N) or all channels (Y)?", false);
if (tmp) {
if (pftool::readline_bool("Pulse into channel 61 (N) or all channels (Y)?", false)) {

Comment on lines -553 to +570
(param_names[i_param].first == "REFERENCEVOLTAGE_0" ? refvol_page :
param_names[i_param].first == "REFERENCEVOLTAGE_1" ? refvol_page :
param_names[i_param].first),
"REFERENCEVOLTAGE_0",
Copy link
Member

Choose a reason for hiding this comment

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

This change breaks the ability for a parameter in the input parameter points file to be from a page that isn't REFERENCEVOLTAGE (0 or 1). Why did you make this change? What was the motivation?

If you need to only be changing the RV page parameters, then maybe you should make a new command instead of trying to make this (already pretty complicated) command work for your purposes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand, it takes away the flexibility. I mainly changed it to this, because I'm not using refvol_page as a variable anymore. I tried incorporating that originally, but I could not make the link variable work in the multi-channel case, and right now we were indeed just changing the RV page parameters. I don't want to take this into a separate command in case we maybe need the multi-channel option in combination with the TOT or TOA in the future, but I will think of something to make this more general.

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