Skip to content

Commit

Permalink
New test case added (apply alignment check)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHerreros authored and DStrelak committed Oct 22, 2021
1 parent 1dfa6e3 commit 9012e04
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/xmipp/tests/test_programs_xmipp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,19 +1054,19 @@ def getProgram(cls):
return 'xmipp_transform_add_noise'

def test_case1(self):
''' Test to check if noise is properly simulated '''
self.runCase("-i input/cleanImage.spi --type gaussian 10 5 -o %o/noisyGaussian.spi",
outputs=["noisyGaussian.spi"], random=True)


class TransformAdjustVolumeGreyLevels(XmippProgramTest):
_owner = RM
@classmethod
def getProgram(cls):
return 'xmipp_transform_adjust_volume_grey_levels'

def test_case1(self):
self.runCase("-i input/phantomBacteriorhodopsin.vol -m input/projectionsBacteriorhodopsin.xmd -o %o/adjusted.vol",
outputs=["adjusted.vol"])
def test_case2(self):
''' Test to check if particle alignment is not applied '''
self.runCase("-i input/projectionsBacteriorhodopsin.xmd --type gaussian 0 0 -o %o/notNoisyGaussian.stk",
outputs=["notNoisyGaussian.stk"], random=True, validate=self.validate_case2)

def validate_case2(self):
import filecmp
output = os.path.join(self.outputDir, "notNoisyGaussian.stk")
self.assertTrue(filecmp.cmp(output, "input/projectionsBacteriorhodopsin.stk"))


class TransformCenterImage(XmippProgramTest):
Expand Down

0 comments on commit 9012e04

Please sign in to comment.