Exemplo n.º 1
0
    def test_EN_std_level_bkg_and_buddy_real_profiles_3(self):
        '''
        Make sure EN_std_level_background_check is flagging temperature excursions - ensure that level reinstating is working.
        '''

        main.fakerow('unit',
                     raw='x',
                     truth=0,
                     uid=2,
                     year=2000,
                     month=1,
                     day=10,
                     time=0,
                     lat=-30.229,
                     longitude=2.658,
                     cruise=2,
                     probe=2)
        main.fakerow('unit',
                     raw='x',
                     truth=0,
                     uid=3,
                     year=2000,
                     month=1,
                     day=10,
                     time=0.1895833,
                     lat=-28.36,
                     longitude=-0.752,
                     cruise=3,
                     probe=2)
        qc = qctests.EN_std_lev_bkg_and_buddy_check.test(
            realProfile2, self.parameters)
        assert numpy.all(
            qc == False), 'mismatch between qc results and expected values'
 def setUp(self):
     # this qc test will go looking for the profile in question in the db, needs to find something sensible
     main.faketable('unit')
     main.fakerow('unit')
     main.catchFlags = dummycatchflagsfunc
     main.get_profile_from_db = dummy_get_profile_from_db
     # need to re-do this every time to refresh the enspikeandstep table
     qctests.EN_spike_and_step_check.loadParameters(self.parameters)
 def setUp(self):
     # this qc test will go looking for the profile in question in the db, needs to find something sensible
     main.faketable('unit')
     main.fakerow('unit')
     main.catchFlags = dummycatchflagsfunc
     main.get_profile_from_db = dummy_get_profile_from_db
     # need to re-do this every time to refresh the enspikeandstep table
     qctests.EN_spike_and_step_check.loadParameters(self.parameters)
    def test_EN_std_level_bkg_and_buddy_real_profiles_1(self):
        '''
        Make sure EN_std_level_background_check is flagging temperature excursions
        '''

        main.fakerow('unit', raw='x', truth=0, uid=1, year=2000, month=1, day=15, time=12, lat=-39.889, longitude=17.650000, cruise=1, probe=2)
        qc = qctests.EN_std_lev_bkg_and_buddy_check.test(realProfile1, self.parameters)

        assert numpy.array_equal(qc, truthQC1), 'mismatch between qc results and expected values'
    def test_EN_std_level_bkg_and_buddy_real_profiles_3(self):
        '''
        Make sure EN_std_level_background_check is flagging temperature excursions - ensure that level reinstating is working.
        '''

        main.fakerow('unit', raw='x', truth=0, uid=2, year=2000, month=1, day=10, time=0, lat=-30.229, longitude=2.658, cruise=2, probe=2)
        main.fakerow('unit', raw='x', truth=0, uid=3, year=2000, month=1, day=10, time=0.1895833, lat=-28.36, longitude=-0.752, cruise=3, probe=2)
        qc = qctests.EN_std_lev_bkg_and_buddy_check.test(realProfile2, self.parameters)
        assert numpy.all(qc == False), 'mismatch between qc results and expected values'
    def test_EN_std_level_bkg_and_buddy_real_profiles_1(self):
        '''
        Make sure EN_std_level_background_check is flagging temperature excursions
        '''

        main.fakerow('unit', raw='x', truth=0, uid=1, year=2000, month=1, day=15, time=12, lat=-39.889, longitude=17.650000, cruise=1, probe=2)
        qc = qctests.EN_std_lev_bkg_and_buddy_check.test(realProfile1, self.parameters)

        assert numpy.array_equal(qc, truthQC1), 'mismatch between qc results and expected values'
 def setUp(self):
     # this qc test will go looking for the profile in question in the db, needs to find something sensible
     main.faketable('unit')
     main.fakerow('unit')
 def setUp(self):
     # this qc test will go looking for the profile in question in the db, needs to find something sensible
     main.faketable('unit')
     main.fakerow('unit')