Skip to content
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

Plotting options update #49

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

Plotting options update #49

wants to merge 4 commits into from

Conversation

YoannKermaidic
Copy link
Contributor

Uncomment plot commands and add if conditions based on analysis_parameters.json settings

@YoannKermaidic
Copy link
Contributor Author

in lardon.py, I removed the hard-coded plot settings by reading them from the analysis_parameter.json file.
However, I end-up with such function:

      plot.event_display_per_view(time_range=pars.plt_evt_disp_vch_yrange,
                                  adc_ind=pars.plt_evt_disp_vch_ind_zrange,
                                  adc_coll=pars.plt_evt_disp_vch_col_zrange,
                                  option='filtered', to_be_shown=True)

If prefered, we could move it to:

      plot.event_display_per_view(pars=pars,option='filtered', to_be_shown=True)

and treat the ranges intermally to the plot functions, such that lardon.py remains rather light.

@olantwin
Copy link
Contributor

olantwin commented Dec 15, 2021

in lardon.py, I removed the hard-coded plot settings by reading them from the analysis_parameter.json file. However, I end-up with such function:

      plot.event_display_per_view(time_range=pars.plt_evt_disp_vch_yrange,
                                  adc_ind=pars.plt_evt_disp_vch_ind_zrange,
                                  adc_coll=pars.plt_evt_disp_vch_col_zrange,
                                  option='filtered', to_be_shown=True)

If prefered, we could move it to:

      plot.event_display_per_view(pars=pars,option='filtered', to_be_shown=True)

and treat the ranges intermally to the plot functions, such that lardon.py remains rather light.

Why don't you use a kwargs dictionary and unpack it into the function call?

E.g.

plot.event_display_per_view(**kwargs)

Then there's no need to modify the plotting functions, but you still don't have to write out everything all the time.

@YoannKermaidic
Copy link
Contributor Author

Good point @olantwin. I'll look into that =)

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