User Tools

Site Tools


cryosparc

This is an old revision of the document!


Generate a defect file for cryoSPARC

Gain/defect files coming from Glacios must be flipped along Y axis when imported in cryoSPARC.

Gain file is by default named CountRef…mrc (with a pixel size of 1)

Defect file is by default a text file

When importing the movies you should give a defect map file as well as the gain reference file.

Load IMOD

module load imod (on cbi-... servers)
setimod (on xtallo machines)

You can make a defect map from the text file with 'clip defect' in IMOD 4.10.7 or higher:

clip defect -D defects...txt  fileWithFrames  defects...mrc

where the fileWithFrames is used only to set the size of the output and can be any file of the right X and Y size.

If the defect text file is not recognized by cryoSPARC, the Gain file has to be modified to put a value of 0 on defective pixels (because any pixels that have a value of 0 in the gain reference file are treated as defects).

In the Gain file, the defective pixels have a value of 1, so you need to subtract the defects…mrc file from the Gain…mrc file

subimage Gain...mrc defects...mrc Gain_subimage...mrc

The pixel size will messed-up and has to be fixed to get back to a value of 1

alterheader -fixpixel Gain_subimage...mrc

Now the Gain_substracted…mrc file has a zero value for defective pixels instead of 1.

Remark: the defect file generated by the Glacios now (2021-10-27) is a map mode 2 and has a pixel spacing of 0.9372, but the images have a pixel spacing of 0.901. It might be better to change the last command by

alterheader -del 0.901,0.901,0.901 Gain_subimage...mrc 
subimage CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1.mrc defects_40S_ScVdelta_03939_Oct27_11.34.51.mrc CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc

 RO image file on unit   2 : defects_40S_ScVdelta_03939_Oct27_11.34.51.mrc     Size=      13906 K

 Number of columns, rows, sections .....    3838    3710       1
 Map mode ..............................    2   (32-bit real)
 Start cols, rows, sects, grid x,y,z ...    0     0     0    3838   3710      1
 Pixel spacing (Angstroms)..............  0.9372     0.9372     0.9372
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................  0.85517E-01
 Maximum density .......................   4.5518
 Mean density ..........................   1.0010
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

     1 Titles :
Digital Micrograph(TM), GMS v 3.32


 Number of columns, rows, sections .....    3838    3710       1
 Map mode ..............................    0   (byte)
 Start cols, rows, sects, grid x,y,z ...    0     0     0    3838   3710     40
 Pixel spacing (Angstroms)..............  0.9010     0.9010     0.9010
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................   0.0000
 Maximum density .......................   1.0000
 Mean density ..........................  0.70932E-05
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

     4 Titles :
SerialEMCCD: Dose frac. image, scaled by 1.00  r/f 0
  CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1.dm4
  defects_40S_ScVdelta_03939_Oct27_11.34.51.txt
clip defectmap: Map of defective pixels in image        28-Oct-21  11:40:50


 NEW image file on unit   3 : CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc
 Section      Min            Max            Mean           S.D.
    0         0.0000         4.5518         1.0010         0.0327
    
 alterheader -fixpixel CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc

 OLD image file on unit   2 : CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc     Size=      55622 K

 Number of columns, rows, sections .....    3838    3710       1
 Map mode ..............................    2   (32-bit real)
 Start cols, rows, sects, grid x,y,z ...    0     0     0    3838   3710      1
 Pixel spacing (Angstroms)..............  0.9372     0.9372     0.9372
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................   0.0000
 Maximum density .......................   4.5518
 Mean density ..........................   1.0010
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

     2 Titles :
Digital Micrograph(TM), GMS v 3.32
SUBIMAGE: Subtract section B from section A.            28-Oct-21  11:42:19

 Changing sample and cell sizes to match image size,
 which will make pixel spacing be 1.0 1.0 1.0.

 RO image file on unit   3 : CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc     Size=      55622 K

 Number of columns, rows, sections .....    3838    3710       1
 Map mode ..............................    2   (32-bit real)
 Start cols, rows, sects, grid x,y,z ...    0     0     0    3838   3710      1
 Pixel spacing (Angstroms)..............   1.000      1.000      1.000
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................   0.0000
 Maximum density .......................   4.5518
 Mean density ..........................   1.0010
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

     2 Titles :
Digital Micrograph(TM), GMS v 3.32
SUBIMAGE: Subtract section B from section A.            28-Oct-21  11:42:19


alterheader -del 0.901,0.901,0.901 CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc

 OLD image file on unit   2 : CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc     Size=      55622 K

 Number of columns, rows, sections .....    3838    3710       1
 Map mode ..............................    2   (32-bit real)
 Start cols, rows, sects, grid x,y,z ...    0     0     0    3838   3710      1
 Pixel spacing (Angstroms)..............   1.000      1.000      1.000
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................   0.0000
 Maximum density .......................   4.5518
 Mean density ..........................   1.0010
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

     2 Titles :
Digital Micrograph(TM), GMS v 3.32
SUBIMAGE: Subtract section B from section A.            28-Oct-21  11:42:19


 RO image file on unit   3 : CountRef_9AR3_00001_Oct27_15.55.18_X+0Y+0-1_subimage.mrc     Size=      55622 K

 Number of columns, rows, sections .....    3838    3710       1
 Map mode ..............................    2   (32-bit real)
 Start cols, rows, sects, grid x,y,z ...    0     0     0    3838   3710      1
 Pixel spacing (Angstroms)..............  0.9010     0.9010     0.9010
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................   0.0000
 Maximum density .......................   4.5518
 Mean density ..........................   1.0010
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0

     2 Titles :
Digital Micrograph(TM), GMS v 3.32
SUBIMAGE: Subtract section B from section A.            28-Oct-21  11:42:19
cryosparc.1683187121.txt.gz · Last modified: (external edit)