def testLogTransform(self): list1 = [1,10,100,0,10000] list2 = [1,10,0,1000,10000] (log_list1, log_list2) = \ RHESSysCalibratorPostprocess.logTransform(list1, list2) self.assertTrue(len(log_list1) > 0) self.assertTrue(len(log_list2) > 0) self.assertTrue(len(log_list1) == len(log_list2)) self.assertTrue(len(list1) > len(log_list1)) self.assertTrue(len(list2) > len(log_list2)) self.assertTrue(0 == log_list1[0] and 0 == log_list2[0]) self.assertTrue(1 == log_list1[1] and 1 == log_list2[1]) self.assertTrue(4 == log_list1[2] and 4 == log_list2[2])
def testLogTransform(self): list1 = [1, 10, 100, 0, 10000] list2 = [1, 10, 0, 1000, 10000] (log_list1, log_list2) = \ RHESSysCalibratorPostprocess.logTransform(list1, list2) self.assertTrue(len(log_list1) > 0) self.assertTrue(len(log_list2) > 0) self.assertTrue(len(log_list1) == len(log_list2)) self.assertTrue(len(list1) > len(log_list1)) self.assertTrue(len(list2) > len(log_list2)) self.assertTrue(0 == log_list1[0] and 0 == log_list2[0]) self.assertTrue(1 == log_list1[1] and 1 == log_list2[1]) self.assertTrue(4 == log_list1[2] and 4 == log_list2[2])
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @author Brian Miles <*****@*****.**> Old revision history: --------------------- Revisions: 20110626: 1.0.3: Updated for refactor of CalibrationRunnerDB to ModelRunnerDB 20120327: 1.0.4: Added initial support for fitness period in ModelRunnerDB; Added add_streamflow_and_gw flag """ import sys from rhessyscalibrator.postprocess import RHESSysCalibratorPostprocess if __name__ == "__main__": clusterCalibratorPost = RHESSysCalibratorPostprocess() # main's return value will be the exit code sys.exit(clusterCalibratorPost.main(sys.argv))