snoplusuk / echidna

MIT License
4 stars 12 forks source link

Limit debug #143

Closed jwaterfield closed 8 years ago

jwaterfield commented 8 years ago

Fixes the limit setting for the fixed background case.

ashleyrback commented 8 years ago

A couple of docs build errors, but mainly in my code:

/home/ashley/snoplus/software/echidna/echidna-pr/echidna/scripts/klz_majoron_limits.py:docstring of echidna.scripts.klz_majoron_limits.main:13: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/ashley/snoplus/software/echidna/echidna-pr/echidna/scripts/tutorials/getting_started.py:docstring of echidna.scripts.tutorials.getting_started:17: WARNING: Literal block ends without a blank line; unexpected unindent.

Would it be easier for me to update these and for @EdLeming to review?

EdLeming commented 8 years ago

Can do. Lemme know when it's ready

EdLeming commented 8 years ago

I'll try and do this later today, it might have to wait until tomorrow, though

ashleyrback commented 8 years ago

@EdLeming, no worries, that's fine. Can we try and get it merged by lunch time tomorrow please as @arushanova is waiting on this to test her pile-up limit analysis.

EdLeming commented 8 years ago

Unit tests are failing for the test statistics, looks like a float is passed instead of a np.ndarry

ashleyrback commented 8 years ago

@EdLeming can you post the exceptions raised please, I'll take a look

EdLeming commented 8 years ago

FAIL: test_extended_log_likelihood (test_test_statistic.TestTestStatistic)

Test the :class:echidna.limit.test_statistic.ExtendedLL

Traceback (most recent call last): File "/lustre/scratch/epp/neutrino/el230/echidna/echidna/test/test_test_statistic.py", line 174, in test_extended_log_likelihood self.assertIsInstance(result, numpy.ndarray) AssertionError: -20.894859736843834 is not an instance of <type 'numpy.ndarray'>

FAIL: test_log_likelihood (test_test_statistic.TestTestStatistic)

Test the :class:echidna.limit.test_statistic.BakerCousinLL

Traceback (most recent call last): File "/lustre/scratch/epp/neutrino/el230/echidna/echidna/test/test_test_statistic.py", line 123, in test_log_likelihood self.assertIsInstance(result, numpy.ndarray) AssertionError: 1.570103887847224 is not an instance of <type 'numpy.ndarray'>

FAIL: test_neyman (test_test_statistic.TestTestStatistic)

Test the Neyman chi-squared class

Traceback (most recent call last): File "/lustre/scratch/epp/neutrino/el230/echidna/echidna/test/test_test_statistic.py", line 97, in test_neyman self.assertIsInstance(result, numpy.ndarray) AssertionError: 1.0000000000000002e+32 is not an instance of <type 'numpy.ndarray'>

FAIL: test_pearson (test_test_statistic.TestTestStatistic)

Test the Pearson chi-squared class

Traceback (most recent call last): File "/lustre/scratch/epp/neutrino/el230/echidna/echidna/test/test_test_statistic.py", line 74, in test_pearson self.assertIsInstance(result, numpy.ndarray) AssertionError: 4.0000000000000006e+30 is not an instance of <type 'numpy.ndarray'>

FAIL: test_poisson_likelihood_chi (test_test_statistic.TestTestStatistic)

Test the :class:echidna.limit.test_statistic.BakerCousinChi

Traceback (most recent call last): File "/lustre/scratch/epp/neutrino/el230/echidna/echidna/test/test_test_statistic.py", line 148, in test_poisson_likelihood_chi self.assertIsInstance(result, numpy.ndarray) AssertionError: 3.140207775694448 is not an instance of <type 'numpy.ndarray'>