This is an automated email from the ASF dual-hosted git repository.

rkk pushed a commit to branch tmp-stv
in repository https://gitbox.apache.org/repos/asf/sdap-nexus.git

commit 2b7b6cce1a90a8b97a6c0115650645f3a02fc8e3
Author: rileykk <[email protected]>
AuthorDate: Thu Sep 21 08:15:30 2023 -0700

    SDAP-492 - Added dependencies + alg classes
---
 analysis/conda-requirements.txt            |  3 +-
 analysis/webservice/algorithms/Tomogram.py | 48 ++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/analysis/conda-requirements.txt b/analysis/conda-requirements.txt
index e27bdea..7bfe957 100644
--- a/analysis/conda-requirements.txt
+++ b/analysis/conda-requirements.txt
@@ -33,4 +33,5 @@ gdal==3.2.1
 mock==4.0.3
 importlib_metadata==4.11.4
 #singledispatch==3.4.0.3
-
+matplotlib
+xarray
diff --git a/analysis/webservice/algorithms/Tomogram.py 
b/analysis/webservice/algorithms/Tomogram.py
new file mode 100644
index 0000000..14d3883
--- /dev/null
+++ b/analysis/webservice/algorithms/Tomogram.py
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import logging
+from typing import Dict, Literal
+import numpy as np
+import xarray as xr
+import matplotlib.pyplot as plt
+from webservice.NexusHandler import nexus_handler
+from webservice.algorithms.NexusCalcHandler import NexusCalcHandler
+
+logger = logging.getLogger(__name__)
+
+
+class TomogramBaseClass(NexusCalcHandler):
+    def __int__(self, tile_service_factory, slice_bounds: Dict[Literal['lat', 
'lon', 'elevation'], slice], **kwargs):
+        NexusCalcHandler.__init__(self, tile_service_factory)
+        self.__slice_bounds = slice_bounds
+
+        # slice bounds: dict relating dimension names to desired slicing
+        # When dealing with multi-var tiles, optional parameter to pick 
variable to plot, otherwise issue warning and pick the first one
+
+
+@nexus_handler
+class LatitudeTomogramImpl(TomogramBaseClass):
+    pass
+
+
+@nexus_handler
+class LongitudeTomogramImpl(TomogramBaseClass):
+    pass
+
+
+@nexus_handler
+class ElevationTomogramImpl(TomogramBaseClass):
+    pass

Reply via email to