Skip to content

Plotting options update#49

Open
YoannKermaidic wants to merge 4 commits intomainfrom
yoann_dev
Open

Plotting options update#49
YoannKermaidic wants to merge 4 commits intomainfrom
yoann_dev

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