eisfabian / PACEtomo

Parallel cryo electron tomography via beam image shift
GNU General Public License v3.0
27 stars 6 forks source link

X-axis inverted when refining positions from a group of points #15

Closed cdienem closed 4 months ago

cdienem commented 1 year ago

Dear Fabian,

there is a little bug in

https://github.com/eisfabian/PACEtomo/blob/68e0e0b5de84b5000cedc570a36f2c5135eb38f9/PACEtomo_selectTargets.py#L1029

The X-coordinate to be refined should be defined by

point[1]-firstPoint[1]

The result of the current calculation is an inversion of the X coordinate so it sets the image shifts flipped around the Y-axis.

Best, Chris

eisfabian commented 1 year ago

Hi Chris,

This is curious. Typically, the IS in specimen coordinates is defined as the inverse of the stage coords. That's why the coords are inverted here. What kind of setup do you have?

Either way, in my dev version I already changed it to use the conversion matrix from SerialEM directly, so it should not be an issue. I think it's time to release my updated scripts...

Thanks and best wishes. Fabian

cdienem commented 1 year ago

Hi Fabian,

that's interesting! I am running PACEtomo on a Krios G2 with Bioquantum-K3. Let me know, if you want to have a look at the properties file as well.

As I understood from the SerialEM manual, ImageShiftByMicrons uses specimen coordinates (translating to image shift units under the hood), so the signs should correspond to standard X/Y axis directions of the image (positive is upwards/to the right).

Best, Chris

eisfabian commented 1 year ago

Here is the source I was looking at: https://bio3d.colorado.edu/SerialEM/SerialEM/Docs/coordinates.doc

It does talk about an X-axis inversion on some scopes and I did encounter that on our JEOLs, which is why I switched to using the conversion matrix in my scripts. But I hadn't seen it on a Krios. I will upload my new scripts to the beta directory soon!

eisfabian commented 1 year ago

I did upload the new scripts to the beta folder. I'll keep the issue open until these scripts make it out of beta.