antonbarty / cheetah-2017

Snapshot of Cheetah repository from 2017 (no longer updated)
http://www.desy.de/~barty/cheetah/Cheetah/Welcome.html
8 stars 8 forks source link

hitfinder1 ignores saturated pixels #18

Closed sellberg closed 9 years ago

sellberg commented 9 years ago

I recently realized that if one uses hitfinder1 (number of pixels above threshold), the fact that it ignores saturated pixels (that are definitely lit) makes it fail for really intense hits, such as the one below.

masked screen shot 2015-03-13 at 11 21 03

unmasked screen shot 2015-03-13 at 11 21 46

This is easily fixed by removing PIXEL_IS_SATURATED from L310 in hitfinders.cpp:

uint16_t pixel_options = PIXEL_IS_IN_PEAKMASK | PIXEL_IS_OUT_OF_RESOLUTION_LIMITS | PIXEL_IS_HOT | PIXEL_IS_BAD | PIXEL_IS_SATURATED | PIXEL_IS_MISSING;

but this makes the hitfinder not backwards compatible. Unless you have any strong reasons why we should not change this although it brakes backwards compatability, we will update so that saturated pixels are not ignored in the testing branch.

mhantke commented 9 years ago

Fixed with commit https://github.com/antonbarty/cheetah/commit/498ef2015ce1be8d90592ce438a2434ecff92a4f

antonbarty commented 9 years ago

Hi Jonas

Saturated pixels should be counted as lit pixels for the purposes of hit finding - so I have no problem with this change. (dead and saturated-because-broken pixels are taken care of elsewhere)

A.


Anton Barty Centre for Free Electron Laser Science DESY, Notkestrasse 85, 22607 Hamburg, Germany phone: +49 (0)40 8998 5783 PhD positions available: http://desy.cfel.de/cid/education/doctoralstudies/ http://desy.cfel.de/cid/education/doctoralstudies/

On 13 Mar 2015, at 11:27 am, Jonas Sellberg notifications@github.com wrote:

I recently realized that if one uses hitfinder1 (number of pixels above threshold), the fact that it ignores saturated pixels (that are definitely lit) makes it fail for really intense hits, such as the one below.

masked https://cloud.githubusercontent.com/assets/683516/6636765/7cf3a9cc-c973-11e4-8eed-22fa437abab0.png unmasked https://cloud.githubusercontent.com/assets/683516/6636769/81255e82-c973-11e4-890f-caa12324ae42.png This is easily fixed by removing PIXEL_IS_SATURATED from L310 in hitfinders.cpp:

uint16_t pixel_options = PIXEL_IS_IN_PEAKMASK | PIXEL_IS_OUT_OF_RESOLUTION_LIMITS | PIXEL_IS_HOT | PIXEL_IS_BAD | PIXEL_IS_SATURATED | PIXEL_IS_MISSING;

but this makes the hitfinder not backwards compatible. Unless you have any strong reasons why we should not change this although it brakes backwards compatability, we will update so that saturated pixels are not ignored in the testing branch.

— Reply to this email directly or view it on GitHub https://github.com/antonbarty/cheetah/issues/18.

mhantke commented 9 years ago

Good! This was also our opinion. The reason why we were hesitant first was that the change is not backwards compatible and might make it necessary for some users to readjust their hitfinding parameters after this. /M

On Mon, Mar 16, 2015 at 9:44 AM, Anton Barty notifications@github.com wrote:

Hi Jonas

Saturated pixels should be counted as lit pixels for the purposes of hit finding - so I have no problem with this change. (dead and saturated-because-broken pixels are taken care of elsewhere)

A.


Anton Barty Centre for Free Electron Laser Science DESY, Notkestrasse 85, 22607 Hamburg, Germany phone: +49 (0)40 8998 5783 PhD positions available: http://desy.cfel.de/cid/education/doctoralstudies/ < http://desy.cfel.de/cid/education/doctoralstudies/>

On 13 Mar 2015, at 11:27 am, Jonas Sellberg notifications@github.com wrote:

I recently realized that if one uses hitfinder1 (number of pixels above threshold), the fact that it ignores saturated pixels (that are definitely lit) makes it fail for really intense hits, such as the one below.

masked < https://cloud.githubusercontent.com/assets/683516/6636765/7cf3a9cc-c973-11e4-8eed-22fa437abab0.png

unmasked < https://cloud.githubusercontent.com/assets/683516/6636769/81255e82-c973-11e4-890f-caa12324ae42.png

This is easily fixed by removing PIXEL_IS_SATURATED from L310 in hitfinders.cpp:

uint16_t pixel_options = PIXEL_IS_IN_PEAKMASK | PIXEL_IS_OUT_OF_RESOLUTION_LIMITS | PIXEL_IS_HOT | PIXEL_IS_BAD | PIXEL_IS_SATURATED | PIXEL_IS_MISSING;

but this makes the hitfinder not backwards compatible. Unless you have any strong reasons why we should not change this although it brakes backwards compatability, we will update so that saturated pixels are not ignored in the testing branch.

— Reply to this email directly or view it on GitHub < https://github.com/antonbarty/cheetah/issues/18>.

— Reply to this email directly or view it on GitHub https://github.com/antonbarty/cheetah/issues/18#issuecomment-81507201.

Max Felix Hantke Ph.D. student Laboratory of Molecular Biophysics Uppsala University

www.lmb.icm.uu.se