Skip to content

Pin lalsuite to workaround regression in lal.rate

Pin lalsuite to <6.49.1.dev20181115 due a regression in lscsoft/lalsuite!569 (merged) that caused the unit tests to fail with this error message:

gwcelery/tests/test_tasks_p_astro_gstlal.py::test_get_ln_f_over_b FAILED [ 67%]

=================================== FAILURES ===================================
_____________________________ test_get_ln_f_over_b _____________________________

ranking_data_bytes = b'\x1f\x8b\x08\x08\x10\x00Q[\x02\x03ranking_data_G322589.xml\x00\xa4\xfd[\xb3G\xc7\x91\xdd\x07>\xb7?\xc51_\xf4B\x1e\xd...xc2\xa0\x03\xf3\xc7\r\xe2\xe0\xf0\x1e\x03\xb1\xee\xb7z\x9e\xef]\xb7\xebw\x1b\xae?\xff\x07\xb3\xf0\xec\xf9\x1ao\x04\x00'

    def test_get_ln_f_over_b(ranking_data_bytes):
        """Test to check :meth:`_get_ln_f_over_b` returns values
        which are not inf or nan for high ln_likelihood_ratio"""
        ln_f_over_b = p_astro_gstlal._get_ln_f_over_b(
>           ranking_data_bytes, [100., 200., 300.])

gwcelery/tests/test_tasks_p_astro_gstlal.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gwcelery/tasks/p_astro_gstlal.py:74: in _get_ln_f_over_b
    rankingstatpdf = _parse_likelihood_control_doc(ranking_data_xmldoc)
gwcelery/tasks/p_astro_gstlal.py:58: in _parse_likelihood_control_doc
    rankingstatpdf = _RankingStatPDF.from_xml(xmldoc, name)
gwcelery/tasks/p_astro_gstlal.py:48: in from_xml
    self.noise_lr_lnpdf = rate.BinnedLnPDF.from_xml(xml, "noise_lr_lnpdf")
venv/lib/python3.7/site-packages/lal/rate.py:2283: in from_xml
    self = super(BinnedLnPDF, cls).from_xml(elem, name)
venv/lib/python3.7/site-packages/lal/rate.py:1655: in from_xml
    self = cls(NDBins.from_xml(elem), array = ligolw_array.get_array(elem, u"array").array)
venv/lib/python3.7/site-packages/lal/rate.py:1328: in from_xml
    return cls([cls.xml_bins_name_mapping[Bins.xml_bins_name_dec(elem.Name)].from_xml(elem) for elem in params])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = (<lal.rate.ATanBins object at 0x11bdf3780>,)
binnings = [<lal.rate.ATanBins object at 0x11bdf3780>]

    def __init__(self, binnings):
    	self._getitems = tuple(binning.__getitem__ for binning in binnings)
    	# instances cannot define a .__call__() attribute to make
    	# themselves callable, Python always looks up .__call__()
    	# on the class.  so we define .__realcall__() here and then
    	# have .__call__() chain to it.
    	define__realcall__ = """def __realcall__(self, %s):
    _getitems = self._getitems
    return %s""" % (", ".join("x%d" % i for i in range(len(binnings))), ", ".join("_getitems[%d](x%d)" % (i, i) for i in range(len(binnings))))
    	exec(define__realcall__)
>   	self.__realcall__ = __realcall__.__get__(self)
E    NameError: name '__realcall__' is not defined

venv/lib/python3.7/site-packages/lal/rate.py:1109: NameError

Merge request reports