arohl / gdis

A visualization program for the display, manipulation, and analysis of isolated molecules and periodic structures
GNU General Public License v2.0
43 stars 17 forks source link

gui_diffract: FIX the selection of peak from baseline or top value. #30

Closed ovhpa closed 5 years ago

ovhpa commented 5 years ago

This should fix the problem of peak selection. The problem was a combination of the highly pack diffraction data (900 points for a graph drawn on a comparable number of pixels). This results, for a 5-pixels selection sensitivity, in the following selection left shift: trouble

Additionally, the ~1 pixel window for selection was unreachable, as reported by Prof. Rohl.

In this fix, I kept both way of selecting a peak: from baseline or from top value. The reason is that in some few occasions, selecting by top proved to be a fast way to separate 2 very close peaks. In any case, using the graph interface to change the x axis limits would work equally well.

BTW, I removed the unnecessary selection of ~zero background.