Skip to content

Commit

Permalink
rotational_spectra
Browse files Browse the repository at this point in the history
  • Loading branch information
albertmena committed Mar 28, 2023
1 parent 3f9333f commit d032963
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# **************************************************************************
# *
# * Authors: Josue Gomez Blanco ([email protected])
# *
Expand Down
1 change: 0 additions & 1 deletion xmipp3/protocols.conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ Protocols SPA = [
{"tag": "section", "text": "more", "openItem": "False", "children": [
{"tag": "protocol", "value": "XmippProtML2D", "text": "default"},
{"tag": "protocol", "value": "XmippProtKerdensom", "text": "default"},
{"tag": "protocol", "value": "XmippProtRotSpectra", "text": "default"}
]}
]}
]},
Expand Down
2 changes: 1 addition & 1 deletion xmipp3/protocols/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
from .protocol_resolution_deepres import XmippProtDeepRes
from .protocol_postProcessing_deepPostProcessing import XmippProtDeepVolPostProc
from .protocol_rotate_volume import XmippProtRotateVolume
from .protocol_rotational_spectra import XmippProtRotSpectra
#from .protocol_rotational_spectra import XmippProtRotSpectra
from .protocol_rotational_symmetry import XmippProtRotationalSymmetry
from .protocol_screen_particles import XmippProtScreenParticles
from .protocol_screen_deepConsensus import XmippProtScreenDeepConsensus, XmippProtDeepConsSubSet
Expand Down
27 changes: 0 additions & 27 deletions xmipp3/tests/test_protocols_xmipp_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,33 +1141,6 @@ def _checkTranslationScaling(self, protAssign, protParticles, shiftsAppliedBefor
[self.assertAlmostEqual(inT * scale, outT) for inT, outT in zip(inTranslation, outTranslation)]


class TestXmippRotSpectra(TestXmippBase):
"""This class check if the protocol to calculate the rotational spectra from particles in Xmipp works properly."""
@classmethod
def setUpClass(cls):
setupTestProject(cls)
TestXmippBase.setData('mda')
cls.protImport = cls.runImportParticles(cls.particlesFn, 3.5)
cls.align2D = cls.runCL2DAlign(cls.protImport.outputParticles)

def test_rotSpectra(self):
print("Run Rotational Spectra")
xmippProtRotSpectra = self.newProtocol(XmippProtRotSpectra, SomXdim=2, SomYdim=2)
xmippProtRotSpectra.inputParticles.set(self.align2D.outputParticles)
self.launchProtocol(xmippProtRotSpectra)
self.assertIsNotNone(xmippProtRotSpectra.outputClasses, "There was a problem with Rotational Spectra")

def test_rotSpectraMask(self):
print("Run Rotational Spectra with Mask")
protMask = self.runCreateMask(3.5, 100)
xmippProtRotSpectra = self.newProtocol(XmippProtRotSpectra, useMask=True, SomXdim=2, SomYdim=2)
xmippProtRotSpectra.inputParticles.set(self.align2D.outputParticles)
xmippProtRotSpectra.useMask.set(True)
xmippProtRotSpectra.Mask.set(protMask.outputMask)
self.launchProtocol(xmippProtRotSpectra)
self.assertIsNotNone(xmippProtRotSpectra.outputClasses, "There was a problem with Rotational Spectra")


class TestXmippKerdensom(TestXmippBase):
"""This class check if the protocol to calculate the kerdensom from particles in Xmipp works properly."""
@classmethod
Expand Down
12 changes: 1 addition & 11 deletions xmipp3/viewers/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from xmipp3.protocols import XmippProtKerdensom
from xmipp3.protocols import XmippParticlePickingAutomatic
from xmipp3.protocols import XmippProtParticlePickingPairs
from xmipp3.protocols import XmippProtRotSpectra
#from xmipp3.protocols import XmippProtRotSpectra
from xmipp3.protocols import XmippProtScreenParticles
from xmipp3.protocols import XmippProtCTFMicrographs
from xmipp3.protocols import XmippProtValidateNonTilt
Expand Down Expand Up @@ -70,7 +70,6 @@ class XmippViewer(DataViewer):
XmippProtExtractParticlesPairs,
XmippProtKerdensom,
XmippProtParticlePickingPairs,
XmippProtRotSpectra,
XmippProtScreenParticles,
XmippProtCTFMicrographs,
XmippProtValidateNonTilt,
Expand Down Expand Up @@ -187,15 +186,6 @@ def _visualize(self, obj, **kwargs):
# ratio2Value=4.5)
# self._views.append(MovieGainMonitorPlotter(movieGainMonitor))

elif issubclass(cls, XmippProtRotSpectra):
self._visualize(obj.outputClasses,
viewParams={'columns': obj.SomXdim.get(),
RENDER: ' spectraPlot._filename average._filename',
ZOOM: 30,
VISIBLE: 'enabled id _size average._filename '
'spectraPlot._filename',
'labels': 'id _size',
SORT_BY: 'id'})

elif issubclass(cls, XmippProtKerdensom):
self._visualize(obj.outputClasses, viewParams={'columns': obj.SomXdim.get(),
Expand Down
5 changes: 2 additions & 3 deletions xmipp3/wizards.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
XmippProtFilterParticles, XmippProtFilterVolumes, XmippProtMaskParticles,
XmippProtMaskVolumes, XmippProtAlignVolume, XmippProtCL2D,
XmippProtHelicalParameters, XmippProtConsensusPicking, XmippProtMonoRes,
XmippProtRotSpectra, XmippProtReconstructHighRes, XmippProtExtractUnit,
XmippProtReconstructHighRes, XmippProtExtractUnit,
XmippProtShiftParticles, XmippProtVolumeDeformZernike3D, XmippProtStructureMapZernike3D,
XmippProtSubtractProjection, XmippProtBoostParticles)

Expand Down Expand Up @@ -220,8 +220,7 @@ def show(self, form):


class XmippParticleMaskRadiiWizard(ParticlesMaskRadiiWizard):
_targets = [(XmippProtMaskParticles, ['innerRadius', 'outerRadius']),
(XmippProtRotSpectra, ['spectraInnerRadius', 'spectraOuterRadius'])]
_targets = [(XmippProtMaskParticles, ['innerRadius', 'outerRadius'])]

def _getParameters(self, protocol):

Expand Down

0 comments on commit d032963

Please sign in to comment.