pycbc icon indicating copy to clipboard operation
pycbc copied to clipboard

page_snrifar try/except prevents diagnosis of missing foreground

Open tdent opened this issue 7 years ago • 4 comments

There are foreground events in an hdf file I am trying to plot but the 'cumulative' plot can't find them: see eg https://www.atlas.aei.uni-hannover.de/~tdent/LSC/o2/rates/catalog/H1L1-SNRIFAR_CUMULATIVE_O2.png . However because there is a try-except around the code that gets the foreground triggers I can't see why it doesn't find them. I don't see why the try-except is needed anyway.

Also (what I suspect is causing the issue) there is an unused variable 'fap_end' defined in the cumulative case foreground trigger retrieval. Why is this 'fap_end' here at all?

tdent avatar May 29 '18 13:05 tdent

Also, the ymax that is plotted is 10 times the specified maximum : pylab.ylim(plot_ymin, plot_ymax * 10.0). This is inappropriate if the user specifies ymax.

tdent avatar May 29 '18 14:05 tdent

@tdent Yep, I agree with your last point. I think the line you refer to is also a holdover from when the dimensions where more automatically guessed.

ahnitz avatar May 29 '18 14:05 ahnitz

I think it is reasonable for the code to automatically put some headroom above the maximum plotted value if not otherwise specified ..

tdent avatar May 29 '18 14:05 tdent

page_snrifar looks like it finds foreground events in 'cumulative' mode now (from looking at a recent O4 open box)

However I think that this is the try/except statement here that was causing the problems.

I think that should be checking for KeyErrors in lines 135-138, but wanted to check before implementing that

GarethCabournDavies avatar Jul 30 '24 15:07 GarethCabournDavies