Exemple #1
0
 def test_invalidMinMaxStartTraj(self):
     options = FakeOptions()
     options.efficiencyofile = "effs.txt"
     options.pbfile = "aver.prb"
     options.configfilename = "wrongminmaxstart2.conf"
     options.expbfile = "expbursts.bst"
     self.assertRaises(ValueError, runMCFRET, options)
Exemple #2
0
 def test_invalidPhotongenerator(self):
     options = FakeOptions()
     options.efficiencyofile = "effs.txt"
     options.pbfile = "step.prb"
     options.configfilename = "invalid_photongenerator.conf"
     options.expbfile = "expbursts.bst"
     self.assertRaises(ValueError, runMCFRET, options)
Exemple #3
0
 def test_cannotAssignClass(self):
     options = FakeOptions()
     options.efficiencyofile = "effs.txt"
     options.pbfile = "invalid.prb"
     options.configfilename = "expbstcorr.conf"
     options.expbfile = "expbursts.bst"
     self.assertRaises(ValueError, runMCFRET, options)
Exemple #4
0
 def test_invalidTrajFormat(self):
     options = FakeOptions()
     options.efficiencyofile = "effs.txt"
     options.trajformat = "inv"
     options.pbfile = "step.prb"
     options.configfilename = "stepreject.conf"
     options.expbfile = "expbursts.bst"
     self.assertRaises(ValueError, runMCFRET, options)
Exemple #5
0
 def test_stepFunctionBelowReject(self):
     options = FakeOptions()
     options.efficiencyofile = "effs.txt"
     options.pbfile = "step.prb"
     options.configfilename = "stepreject.conf"
     options.expbfile = "expbursts.bst"
     runMCFRET(options)
     self.assertAlmostEqual(numpy.loadtxt("effs.txt").mean(), 0.5, delta = 0.05)
Exemple #6
0
 def test_rejectPhotonTest(self):
     for i in ("trajectory", "same-species", "all"):
         options = FakeOptions()
         options.efficiencyofile = "effs.txt"
         options.pbfile = "aver.prb"
         options.configfilename = "rejecttest-%s.conf" % i
         options.expbfile = "expbursts.bst"
         self.assertRaises(ValueError, runMCFRET, options)
Exemple #7
0
 def test_expBurstCorrected(self):
     options = FakeOptions()
     options.efficiencyofile = "effs.txt"
     options.pbfile = "aver.prb"
     options.configfilename = "expbstcorr.conf"
     options.expbfile = "expbursts.bst"
     runMCFRET(options)
     self.assertAlmostEqual(numpy.loadtxt("effs.txt").mean(), 0.5, delta = 0.05)
Exemple #8
0
    def test_cextensionPhotongenerator(self):
        options = FakeOptions()
        options.efficiencyofile = "effs.txt"
        options.pbfile = "step.prb"
        options.configfilename = "cextension.conf"
        options.expbfile = "expbursts.bst"
        try:
#            from FRETUtils.PhotonGenerator import tryGetCPhoton #@UnusedImport
            runMCFRET(options)
            self.assertAlmostEqual(numpy.loadtxt("effs.txt").mean(), 0.5, delta = 0.05)
        except ImportError:
            pass