Skip to content

Commit

Permalink
Starfile annotation patch (#43)
Browse files Browse the repository at this point in the history
* updated star file header to contain extraction params and changed to _ptm prefix

* missed a comma in the column list'

* removed redundant unknown parameters
  • Loading branch information
McHaillet authored Sep 11, 2023
1 parent 696abb0 commit 8111fe9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/pytom_tm/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def extract_particles(
]
score_volume[tomogram_mask <= 0] = -1

sigma = job.job_stats['std']
if cut_off is None:
# formula rickgauer (2017) should be: 10**-13 = erfc( theta / ( sigma * sqrt(2) ) ) / 2
sigma = job.job_stats['std']
search_space = (
# wherever the score volume has not been explicitly set to -1 is the size of the search region
(score_volume > -1).sum() *
Expand Down Expand Up @@ -106,11 +106,11 @@ def extract_particles(
rotation[0], # AngleRot
rotation[1], # AngleTilt
rotation[2], # AnglePsi
# lcc_max, # LCCmax
lcc_max, # LCCmax
cut_off, # Extraction cut off
sigma, # Add sigma of template matching search, LCCmax can be divided by sigma to obtain SNR
pixel_size, # DetectorPixelSize
tomogram_id, # MicrographName
10000.0, # Magnification
0 # GroupNumber
))

# box out the particle
Expand All @@ -122,15 +122,15 @@ def extract_particles(
] *= cut_mask

return pd.DataFrame(data, columns=[
'rlnCoordinateX',
'rlnCoordinateY',
'rlnCoordinateZ',
'rlnAngleRot',
'rlnAngleTilt',
'rlnAnglePsi',
# 'ptmLCCmax',
'rlnDetectorPixelSize',
'rlnMicrographName',
'rlnMagnification',
'rlnGroupNumber'
'ptmCoordinateX',
'ptmCoordinateY',
'ptmCoordinateZ',
'ptmAngleRot',
'ptmAngleTilt',
'ptmAnglePsi',
'ptmLCCmax',
'ptmCutOff',
'ptmSearchStd',
'ptmDetectorPixelSize',
'ptmMicrographName',
]), scores

0 comments on commit 8111fe9

Please sign in to comment.