leginon-org / leginon-redmine-archive

1 stars 0 forks source link

Corrector client clip makes image value to 0 when not normalized #480

Closed leginonbot closed 7 months ago

leginonbot commented 7 months ago

Author Name: Anchi Cheng (@anchi2c) Original Redmine Issue: 480, https://emg.nysbc.org/redmine/issues/480 Original Date: 2010-05-14 Original Assignee: Jim Pulokas


I added imagearray.astype(numpy.float32) before the clip and catch some error in r13954. Do you think it will slow things down? Should a check be done first? The try in correctCameraImageData only catches the exception when the file does not exist not when database query gives no result.

leginonbot commented 7 months ago

Original Redmine Comment Author Name: Jim Pulokas (Jim Pulokas) Original Date: 2010-05-17T15:05:40Z


changed in source:trunk/leginon/correctorclient.py@13966#L211 to use numpy.asarray which is almost the same as astype, but it will not copy the array if it is already float32.