コード例 #1
0
    def test_flo_bback_total(self):
        """
        Test flo_bback_total function.

        Values based on those described in DPS as available on Alfresco:

        OOI (2012). Data Product Specification for Optical Backscatter (Red
            Wavelengths). Document Control Number 1341-00540.
            https://alfresco.oceanobservatories.org/ (See: Company Home >> OOI
            >> Controlled >> 1000 System Level >>
            1341-00540_Data_Product_SPEC_FLUBSCT_OOI.pdf)

        Implemented by Christopher Wingard, April 2013
        Modified by Russell Desiderio, October 26, 2015. Default values for theta,
            wlngth, and xfactor have been removed from the DPA argument list
            necessitating their inclusion in the call to flo_bback_total in the
            unit test.
        """
        counts_output = np.array([55, 57, 55, 56, 54, 54, 55, 54, 55, 56, 55])
        counts_dark = np.ones(11) * 47
        scale_factor = np.ones(11) * 3.058e-6
        beta = flofunc.flo_beta(counts_output, counts_dark, scale_factor)

        # set known outputs (adjusted to account for incorrect DPS wherein test
        # values were computed using different formula and Chi (X) Factor).
        bback = np.array([
            0.000171, 0.000213, 0.000171, 0.000192, 0.000151, 0.000151,
            0.000171, 0.000151, 0.000171, 0.000192, 0.000171
        ])

        # set default constants
        degC = np.ones(11) * 20.0
        psu = np.ones(11) * 32.0
        theta = np.ones(11) * 117.0
        wlngth = np.ones(11) * 700.0
        xfactor = np.ones(11) * 1.08

        # calculate the total optical backscatter
        bbout = flofunc.flo_bback_total(beta, degC, psu, theta, wlngth,
                                        xfactor)

        # How'd we do?
        np.testing.assert_allclose(bbout, bback, rtol=1e-6, atol=1e-6)
コード例 #2
0
    def test_flo_bback_total(self):
        """
        Test flo_bback_total function.

        Values based on those described in DPS as available on Alfresco:

        OOI (2012). Data Product Specification for Optical Backscatter (Red
            Wavelengths). Document Control Number 1341-00540.
            https://alfresco.oceanobservatories.org/ (See: Company Home >> OOI
            >> Controlled >> 1000 System Level >>
            1341-00540_Data_Product_SPEC_FLUBSCT_OOI.pdf)

        Implemented by Christopher Wingard, April 2013
        Modified by Russell Desiderio, October 26, 2015. Default values for theta,
            wlngth, and xfactor have been removed from the DPA argument list
            necessitating their inclusion in the call to flo_bback_total in the
            unit test.
        """
        counts_output = np.array([
            55, 57, 55, 56, 54, 54, 55, 54, 55, 56, 55
        ])
        counts_dark = np.ones(11) * 47
        scale_factor = np.ones(11) * 3.058e-6
        beta = flofunc.flo_beta(counts_output, counts_dark, scale_factor)

        # set known outputs (adjusted to account for incorrect DPS wherein test
        # values were computed using different formula and Chi (X) Factor).
        bback = np.array([0.000171, 0.000213, 0.000171, 0.000192,
                          0.000151, 0.000151, 0.000171, 0.000151,
                          0.000171, 0.000192, 0.000171])

        # set default constants
        degC = np.ones(11) * 20.0
        psu = np.ones(11) * 32.0
        theta = np.ones(11) * 117.0
        wlngth = np.ones(11) * 700.0
        xfactor = np.ones(11) * 1.08

        # calculate the total optical backscatter
        bbout = flofunc.flo_bback_total(beta, degC, psu, theta, wlngth, xfactor)

        # How'd we do?
        np.testing.assert_allclose(bbout, bback, rtol=1e-6, atol=1e-6)
コード例 #3
0
    def setUp(self):
        # set test inputs
        ### optical backscatter ###
        self.scat_counts = 55
        self.scat_dark = 47
        self.scat_scale = 3.058e-6
        self.beta = fl.flo_beta(self.scat_counts, self.scat_dark, self.scat_scale)
        self.degC = 20.0
        self.psu = 32.0

        ### chla ###
        self.chla_counts = 55
        self.chla_dark = 45
        self.chla_scale = 0.0121

        ### cdom ###
        self.cdom_counts = 55
        self.cdom_dark = 48
        self.cdom_scale = 0.0848
コード例 #4
0
    def setUp(self):
        # set test inputs
        ### optical backscatter ###
        self.scat_counts = 55
        self.scat_dark = 47
        self.scat_scale = 3.058e-6
        self.beta = fl.flo_beta(self.scat_counts, self.scat_dark,
                                self.scat_scale)
        self.degC = 20.0
        self.psu = 32.0

        ### chla ###
        self.chla_counts = 55
        self.chla_dark = 45
        self.chla_scale = 0.0121

        ### cdom ###
        self.cdom_counts = 55
        self.cdom_dark = 48
        self.cdom_scale = 0.0848