From 7721c824ce48cb3cf325672bd4757f90db5eb6ff Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Wed, 11 Jun 2014 16:00:09 -0500 Subject: [PATCH] Omaha #3090 - Added files missed from merging omaha_14.3.1 into omaha_14.4.1 (b6055725) Former-commit-id: 2ebf11a1ad4bc331759ccadbeef28de830a3cb05 [formerly 975bfdf38628d745cae2301e868ea45b6e862163] [formerly 6d58f3944e3bccf2963d7900ce8a10ac4e42b1b4] [formerly 2ebf11a1ad4bc331759ccadbeef28de830a3cb05 [formerly 975bfdf38628d745cae2301e868ea45b6e862163] [formerly 6d58f3944e3bccf2963d7900ce8a10ac4e42b1b4] [formerly fbc6c6c31b9bb6fd35e69a2dbc713e8b61ae54ce [formerly 6d58f3944e3bccf2963d7900ce8a10ac4e42b1b4 [formerly 81aab5e7001eca87d4d8889ae96367eee433ee88]]]] Former-commit-id: fbc6c6c31b9bb6fd35e69a2dbc713e8b61ae54ce Former-commit-id: ddf01284849525bca888b6c4d7d6bb39d4a0fe6d [formerly 1abf5019f193b0eb3fc7bd37b495d46625a2f115] [formerly 936b80481f070cf450636512b5f21ef49e152eb4 [formerly e53dfdfdca79c76c51574947daabade58887894c]] Former-commit-id: 9acc80e3bc040b90876d4ffc60fa68f9cc36af74 [formerly 22841c139e7322ae1c3711885596da030444d59c] Former-commit-id: b4de28ee62a04ba9e4d61b5171979dc8aea5301f --- .../definitions/poesDif11u3_7uIR.xml | 26 +++++++++++ .../definitions/satDif11u12uIR.xml | 26 +++++++++++ .../definitions/satDif11u13uIR.xml | 26 +++++++++++ .../definitions/satDif11u3_9uIR.xml | 26 +++++++++++ .../definitions/satDivWVIR.xml | 26 +++++++++++ .../functions/satDif11u3_9uIR.py | 28 ++++++++++++ .../functions/satDifference.py | 40 +++++++++++++++++ .../derivedParameters/functions/satDivWVIR.py | 45 +++++++++++++++++++ 8 files changed, 243 insertions(+) create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/poesDif11u3_7uIR.xml create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u12uIR.xml create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u13uIR.xml create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u3_9uIR.xml create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDivWVIR.xml create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDif11u3_9uIR.py create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDifference.py create mode 100644 edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDivWVIR.py diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/poesDif11u3_7uIR.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/poesDif11u3_7uIR.xml new file mode 100644 index 0000000000..63d336de85 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/poesDif11u3_7uIR.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u12uIR.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u12uIR.xml new file mode 100644 index 0000000000..e2607addb8 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u12uIR.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u13uIR.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u13uIR.xml new file mode 100644 index 0000000000..f31c3ef789 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u13uIR.xml @@ -0,0 +1,26 @@ + + + + + + + + \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u3_9uIR.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u3_9uIR.xml new file mode 100644 index 0000000000..4ae657a5fd --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDif11u3_9uIR.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDivWVIR.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDivWVIR.xml new file mode 100644 index 0000000000..7f9d5c9c1c --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/definitions/satDivWVIR.xml @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDif11u3_9uIR.py b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDif11u3_9uIR.py new file mode 100644 index 0000000000..e2a88926b7 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDif11u3_9uIR.py @@ -0,0 +1,28 @@ +## +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +## +from Difference import execute as Difference +from numpy import logical_and, where + +# Calculate Satellite 11u-3.9u, basicall does difference with some fancy flagging +def execute(arg1, arg2): + # if both args are 0, the result will be -128 otherwise it is the Difference + # The idea is that the args treat 0 as NaN so we treat -128 as NaN + # Byte data and NaN don't mix any better than this. + return where(logical_and(arg1 == 0, arg2 == 0), -128, Difference(arg1, arg2)) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDifference.py b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDifference.py new file mode 100644 index 0000000000..fcf51a4b92 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDifference.py @@ -0,0 +1,40 @@ +## +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +## + +# ---------------------------------------------------------------- +# +# +# ---------------------------------------------------------------- +import numpy + +## +# Calculate the difference between the 11u and 12u IR. +# This function accepts numpy arrays of the appropriate values. +# +# @param physicalElement1 +# @param physicalElement2 +# @return: The difference of the two sat imagers +# @rtype: numpy array or scalar +# +def execute(physicalElement1, physicalElement2): + + result = physicalElement2 - physicalElement1 + result = numpy.where(result < 0, physicalElement1 - physicalElement2, result) + return result \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDivWVIR.py b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDivWVIR.py new file mode 100644 index 0000000000..0742331d33 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.satellite/utility/common_static/base/derivedParameters/functions/satDivWVIR.py @@ -0,0 +1,45 @@ +## +# This software was developed and / or modified by Raytheon Company, +# pursuant to Contract DG133W-05-CQ-1067 with the US Government. +# +# U.S. EXPORT CONTROLLED TECHNICAL DATA +# This software product contains export-restricted data whose +# export/transfer/disclosure is restricted by U.S. law. Dissemination +# to non-U.S. persons whether in the United States or abroad requires +# an export license or other authorization. +# +# Contractor Name: Raytheon Company +# Contractor Address: 6825 Pine Street, Suite 340 +# Mail Stop B8 +# Omaha, NE 68106 +# 402.291.0100 +# +# See the AWIPS II Master Rights File ("Master Rights File.pdf") for +# further licensing information. +## + +# ---------------------------------------------------------------- +# Calculate the derived parameter WV/IR +# +# ---------------------------------------------------------------- +import numpy + +## +# Calculate the derived parameter WV/IR +# This function accepts numpy arrays of the appropriate values. +# +# @param Imager_6pp7hh6pp5_micron_IR_ooWVcc: Water Vapor +# @param Imager_11_micron_IR : Imager 11 micron IR +# @return: +# @rtype: numpy array or scalar +# +def execute(Imager_6pp7hh6pp5_micron_IR_ooWVcc, Imager_11_micron_IR): + + uWV = Imager_6pp7hh6pp5_micron_IR_ooWVcc.astype(numpy.uint8) + WV = (uWV * 0.708).astype(numpy.uint8) + uIR = Imager_11_micron_IR.astype(numpy.uint8) + IR = numpy.where(uIR < 180, 0, uIR) + result = numpy.where(IR == 0, WV, IR) + return result.astype(numpy.int8) + +