Example #1
0
    def test_sets_match_function(self):

        from HMpTy.htm import sets
        xmatcher = sets(log=log,
                        ra=raList,
                        dec=decList,
                        radius=old_div(10, (60. * 60.)),
                        sourceList=transientList)
        allMatches = xmatcher.match
Example #2
0
    def test_sets_function_exception(self):

        from HMpTy.htm import sets
        try:
            this = sets(log=log, settings=settings, fakeKey="break the code")
            this.get()
            assert False
        except Exception as e:
            assert True
            print(str(e))
Example #3
0
    def test_sets_match_function(self):

        from HMpTy.htm import sets
        xmatcher = sets(
            log=log,
            ra=raList,
            dec=decList,
            radius=10 / (60. * 60.),
            sourceList=transientList
        )
        allMatches = xmatcher.match
Example #4
0
    def test_sets_all_extract_function(self):

        from HMpTy.htm import sets
        xmatcher = sets(log=log,
                        ra=raList,
                        dec=decList,
                        radius=old_div(10, (60. * 60.)),
                        sourceList=transientList)
        allMatches = xmatcher._extract_all_sets_from_list()
        for i, m in enumerate(allMatches):
            pass
Example #5
0
    def test_sets_all_extract_function(self):

        from HMpTy.htm import sets
        xmatcher = sets(
            log=log,
            ra=raList,
            dec=decList,
            radius=10 / (60. * 60.),
            sourceList=transientList
        )
        allMatches = xmatcher._extract_all_sets_from_list()
        for i, m in enumerate(allMatches):
            print i, m
Example #6
0
    def test_sets_function_exception(self):

        from HMpTy.htm import sets
        try:
            this = sets(
                log=log,
                settings=settings,
                fakeKey="break the code"
            )
            this.get()
            assert False
        except Exception, e:
            assert True
            print str(e)
Example #7
0
    def test_sets_single_extract_function(self):

        from HMpTy.htm import sets
        xmatcher = sets(log=log,
                        ra=raList,
                        dec=decList,
                        radius=10 / (60. * 60.),
                        sourceList=transientList)
        matches, ra, dec, sourceList = xmatcher._extract_one_set_from_list(
            ra=raList,
            dec=decList,
            radius=10 / (60. * 60.),
            sourceList=transientList)
        print(matches)
        print(len(ra))
        print(len(dec))
        print(len(sourceList))
Example #8
0
    def test_sets_single_extract_function(self):

        from HMpTy.htm import sets
        xmatcher = sets(
            log=log,
            ra=raList,
            dec=decList,
            radius=10 / (60. * 60.),
            sourceList=transientList
        )
        matches, ra, dec, sourceList = xmatcher._extract_one_set_from_list(
            ra=raList,
            dec=decList,
            radius=10 / (60. * 60.),
            sourceList=transientList
        )
        print matches
        print len(ra)
        print len(dec)
        print len(sourceList)