Skip to content

Commit

Permalink
Merge branch 'devel' into monotomofixes
Browse files Browse the repository at this point in the history
  • Loading branch information
albertmena authored Oct 23, 2023
2 parents 6b92768 + 4f163d4 commit 906a10c
Show file tree
Hide file tree
Showing 4 changed files with 343 additions and 100 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Using the command line:
.. code-block::
git clone [email protected]:I2PC/scipion-em-xmipptomo.git
cd xmipptomo
cd scipion-em-xmipptomo
scipion installp -p local/path/to/scipion-em-xmipptomo --devel
13 changes: 3 additions & 10 deletions xmipptomo/protocols/protocol_extract_particlestacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@
import os
import glob
from pwem.emlib import lib
from pwem.objects import Particle, Volume, Transform, String, SetOfVolumes, SetOfParticles, ImageDim
from pwem.objects import Transform, ImageDim
from pwem.protocols import EMProtocol
from pwem import ALIGN_PROJ
import pwem.emlib.metadata as md
import pwem.emlib.image.image_handler as ih

from pyworkflow import BETA
from pyworkflow.protocol.params import PointerParam, IntParam, BooleanParam

from tomo.objects import SetOfCTFTomoSeries, SetOfTiltSeries, SetOfCoordinates3D, TomoAcquisition, MATRIX_CONVERSION
from ..objects import SetOfTiltSeriesParticle, TiltSeriesParticle
from ..utils import writeMdTiltSeries, calculateRotationAngleAndShiftsFromTM
from ..utils import writeMdTiltSeries, calculateRotationAngleAndShiftsFromTM, getCTFfromId
import tomo.constants as const

from tomo.protocols import ProtTomoBase
Expand Down Expand Up @@ -204,7 +203,7 @@ def writeMdTiltSeriesWithCTF(self, ts, tomoPath):
sorted_Idx_doseValueInTS = sorted(range(len(doseValueInTS)), key=lambda k: doseValueInTS[k])

doseValueInTSCTF = []
ctfTomo = self.getCTFfromId(self.ctfTomoSeries.get(), tsId)
ctfTomo = getCTFfromId(self.ctfTomoSeries.get(), tsId)
ctfList = []
tiltSeriesFromCTF = ctfTomo.getTiltSeries()

Expand Down Expand Up @@ -260,12 +259,6 @@ def writeMdTiltSeriesWithCTF(self, ts, tomoPath):
mdts.write(fnts)
return fnts

def getCTFfromId(self, setofctftomoseries, targetTsId):
for ctfts in setofctftomoseries:
ctfId = ctfts.getTsId()
if targetTsId == ctfId:
return ctfts

def extractStackStep(self, objId):
""" This function executes xmipp_tomo_extract_particlestacks. To do that
1) It defines the set of tiltseries to be used
Expand Down
Loading

0 comments on commit 906a10c

Please sign in to comment.