Project

General

Profile

Normalization correct after image rotation?

Added by @Maria Janssen almost 10 years ago

Hi!

Our DMS is set up as to have no flip and a 90 degrees rotation (post-gif k2 set-up). This gave some problems when recording frames: normalization failed because of a mismatch. So we first tried to set isDM230 in dmsem.py to true instead of false, this didn't solve the problem. So, instead we changed the last line in the file text of dmsem.py:

  1. workaround dose fractionation image rotate-flip not applied problem
    if self.save_frames or self.align_frames:
    image_shape = image.shape # assume number of columns is less than rows
    image_dtype = image.dtype
    image = numpy.flipud(image)

This ensures that the flip and orientation is now similar between the saved frames and the image stored in the leginon database. I realize the original command rotates the image 90 degrees (image = numpy.fliplr(numpy.rot90(image,1)). My question is, since we take out this rotation, does normalization happen correctly?


Replies (2)

RE: Normalization correct after image rotation? - Added by Anchi Cheng almost 10 years ago

Hi Mendy,

You have DM 2.31. From what I found in our recent installation of the same, it has similar problem. Meaning DM 2.30 and DM 2.31 with combination with SerialEMCCD behaves differently. See rotation and flip between images from Leginon and DM

It is easy enough to check. Take a long exposure that gives you >= 100 mean counts at your normal counting dose rate. This dose is enough to reveal the growth zone on the chip. Try it in three configurations:

1. without gain correction, without saving frames
2. with gain correction, without saving frames
3. with gain correction, with frames saved

The first condition should be the only one showing growth zone.

RE: Normalization correct after image rotation? - Added by @Maria Janssen almost 10 years ago

Hi Anchi,

Thanks for your help last Friday! I think I solved the problem we had:

1) The squares we see in the leginon image database are indeed from compression, png images look fine.

2) Normalization was off because of the flip/rotation in the dose fractionated images. I removed the 90 degrees orientation and flip. The saved frames now have a similar orientation as the non-dose fractionated image in leginon, and the same orientation as an image taken in DM and flu screen!

  1. workaround dose fractionation image rotate-flip not applied problem
    if self.save_frames or self.align_frames:
    image_shape = image.shape # assume number of columns is less than rows
    image_dtype = image.dtype # image = numpy.fliplr(numpy.rot90(image,1))

Thanks again,
Mandy

    (1-2/2)