Before converting to STAR, put refined shifts in terms of blob apix#125
Before converting to STAR, put refined shifts in terms of blob apix#125PlethoraChutney wants to merge 3 commits intoasarnow:masterfrom
Conversation
|
@PlethoraChutney I added the missing |
|
Ah, great point. I've moved the apix check to |
|
Were those fields present before cryoSPARC v4.5? I guess we either have to put it there, and make --boxsize a no-op, or put it where --boxsize gets used in I want a user using old scripts that use --boxsize to do this conversion not to notice a change. |
|
Yes, the {dimension}/psize_A metadata fields have always been around, as far as I can tell (at least since v2). Let me know which of your two suggestions you prefer -- I could also add a check for whether |
This PR ensures that refined shifts are correct in STAR files created with
csparc2star.pyThis discussion in our forum led to us noticing that
csparc2star.pyuses the image pixel size to convert shifts from pixels to angstroms. However, the shifts inalignment{2D,3D}/shiftare in terms of the pixels inalignment{2D/3D}/psize_A, which may differ from the image pixel size if the job which refined these shifts performed on-the-fly downsampling. This results in shifts which are wrong by a factor of the ratio between the two pixel sizes.(the last 0.02 Å is from all the per-particle scales being reset to 1.0)
Since we don't care about the refinement pixel size in the final star file, I took what seemed the simplest route and just converted them immediately after loading the first
.csfile. I tested this with an exported.csfile and the passthrough.csfile from the job itself. Since it looks likecryosparc_2_cs_model_parameters()is never called on passthroughs I think this should always work...The change to
star.pyfixes a separate issue in which.starfiles produced by csparc2star.py never had particle shifts becausesync_origins_from_angst()didn't save the_rlnOrigin{X/Y}Angstcolumns and the_rlnOrigin{X/Y}columns were dropped as deprecated. The missing shifts then prevented CryoSPARC from importing the poses at all. Please do let me know if this isn't a bug and I missed a setting somewhere!Thanks, and please let me know if you have any more questions or if you need me to rework it some other way!