Skip to content

Commit

Permalink
associated false
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilax committed Nov 24, 2023
1 parent 6166487 commit 30d02ec
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions xmipptomo/protocols/protocol_resolution_local_monotomo.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,26 @@ def __init__(self, **args):
def _defineParams(self, form):
form.addSection(label='Input')

form.addParam('useIndependentOddEven', BooleanParam,
form.addParam('useAssociatedOddEven', BooleanParam,
default=True,
label="Are odd-even associated to the Tomograms?",
help=" .")
form.addParam('tomo', PointerParam,
pointerClass='SetOfTomograms',
condition='not useIndependentOddEven',
condition='useAssociatedOddEven',
label='Tomograms',
important=True,
help='Set of tomograms reconstructed from the even frames of the tilt'
'series movies.')
form.addParam('oddTomograms', PointerParam, pointerClass='SetOfTomograms',
label="Odd tomogram", important=True,
condition='useIndependentOddEven',
condition='not useAssociatedOddEven',
help='Select the odd tomogram for determining the '
'local resolution tomogram.')

form.addParam('evenTomograms', PointerParam, pointerClass='SetOfTomograms',
label="Even Tomogram", important=True,
condition='useIndependentOddEven',
condition='not useAssociatedOddEven',
help='Select the even tomogram for determining the '
'local resolution tomogram.')

Expand Down Expand Up @@ -130,7 +130,7 @@ def _insertAllSteps(self):
self.min_res_init = Float(self.minRes.get())
self.max_res_init = Float(self.maxRes.get())

if self.useIndependentOddEven.get():
if not self.useAssociatedOddEven.get():
for tom_odd, tom_even in zip(self.oddTomograms.get(), self.evenTomograms.get()):
if tom_odd.getObjId() == tom_even.getObjId():
tomId = tom_odd.getObjId()
Expand Down Expand Up @@ -165,7 +165,7 @@ def resolutionMonoTomoStep(self, tomId, inputTomos=None, oddTomos=None, evenTomo
the input is not updated during the execution.
'''

if self.useIndependentOddEven.get():
if not self.useAssociatedOddEven.get():
self.vol1Fn = oddTomos[tomId].getFileName()
self.vol2Fn = evenTomos[tomId].getFileName()
ts = self.oddTomograms.get()[tomId]
Expand Down Expand Up @@ -209,7 +209,7 @@ def resolutionMonoTomoStep(self, tomId, inputTomos=None, oddTomos=None, evenTomo
outputLocalResolutionSetOfTomograms = self.getOutputLocalResolutionSetOfTomograms()

newTomogram = Tomogram()
if self.useIndependentOddEven.get():
if not self.useAssociatedOddEven.get():
tomo = self.oddTomograms.get()[tomId]
else:
tomo = self.tomo.get()[tomId]
Expand Down Expand Up @@ -239,7 +239,7 @@ def createHistrogram(self, tomId):
The histogram of local resolution values of the output tomogram is computed
'''

if self.useIndependentOddEven.get():
if not self.useAssociatedOddEven.get():
ts = self.oddTomograms.get()[tomId]
else:
ts = self.tomo.get()[tomId]
Expand Down Expand Up @@ -282,7 +282,7 @@ def getOutputLocalResolutionSetOfTomograms(self):
self.outputLocalResolutionSetOfTomograms.enableAppend()
else:
outputLocalResolutionSetOfTomograms = self._createSetOfTomograms(suffix='LocalResolution')
if self.useIndependentOddEven.get():
if not self.useAssociatedOddEven.get():
outputLocalResolutionSetOfTomograms.copyInfo(self.oddTomograms.get())
samplingRate = self.oddTomograms.get().getSamplingRate()
else:
Expand All @@ -291,7 +291,7 @@ def getOutputLocalResolutionSetOfTomograms(self):
outputLocalResolutionSetOfTomograms.setSamplingRate(samplingRate)
outputLocalResolutionSetOfTomograms.setStreamState(Set.STREAM_OPEN)
self._defineOutputs(outputLocalResolutionSetOfTomograms=outputLocalResolutionSetOfTomograms)
if self.useIndependentOddEven.get():
if not self.useAssociatedOddEven.get():
self._defineSourceRelation(self.evenTomograms, outputLocalResolutionSetOfTomograms)
self._defineSourceRelation(self.oddTomograms, outputLocalResolutionSetOfTomograms)
else:
Expand Down

0 comments on commit 30d02ec

Please sign in to comment.