Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psct_event_visualizer.py

You can use the psct_event_visualizer.py to plot images/animations of a r0 or r1 file. Right now some hardcoded legend/labels assume r0.

the script has some flags. It requires however at minimum the file (-file) one or the run (-r) one.

-file: put the path of a r0, r1 file to fetch the event to be plotted. It will overwrite the -r and -sr flags

-r: put the number of a run. The config.txt file should have a default file name where run goes at the {0} spot, over formatting.

-sr: put the number of a subrun. The config.txt file should have a default file name where subrun goes at the {1} spot, over formatting. Default is 0

-ev: event to plot. If ev > number of events, it will do mod with the number of events, so it will plot something. Default is 0

-f: frame to plot. Only relevant for -type image. It will plot a frame at t = f of the event ev. It will do a mod with the number of samples so it will plot something even if it is out of range. Default is 0.

-type: type of image to plot. Use "ani" for animation (will automatically correct the format to .gif if the save file is not consistent). Use "img" for a frame at t = f of event ev. Use "time" for time-of-peak plot. Use "peak" for peak-amplitude plot. default is "ani". Do not use the quotation marks

-disp_type: Type of display. Currently can use "sector" or "camera". Don't use quotation marks. Default is camera

-nodisp: whether to show image/animation (CURRENTLY NOT WORKING)

-save: a path to save image/animation. Currently, just trying to plot and not save doesn't display anything so you should have some, at the very least, place to save so that you can see what you're plotting.

config.txt

Should exist in the same folder as the psct_event_visualizer.py

There are default values if this doesn't exist/if some entry is missing.

module_config_path: path to the module_config.csv. Not used for anything yet

run_file_path: path to standard run file. Use {0} for run number, {1} for subrun

pixel_grid: True or False to have outlines in pixels

module_grid: True or False to have outlines in modules

sector_grid: True or False to have outlines in sector

default_display: sector or camera. Default if not called as argument

default_image: peak, img, time, ani. Default if not called as argument

empty_modules_nans: True or False. If True, fills empty/non installed modules (that are accounted in the r0 file) with NaNs. Otherwise, fills with 0.0's

title_font: Title font

colorbar_legend_font: Colorbar legend font

colorbar_ticks_font: Colorbar ticks font

image_size: Image size

colorscheme: colorscheme for heatmap

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages