Skip to content

Commit

Permalink
[update] dockerfile, notebook and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hfmartinez committed Feb 26, 2024
1 parent 2a0bcc4 commit 7135c3f
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 32 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN pip install -e .
WORKDIR /app

COPY Tutorial.ipynb /app
COPY Explore_Data.ipynb /app
COPY *.py /app/

EXPOSE 8989 5000
Expand Down
94 changes: 94 additions & 0 deletions Explore_Data.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "250ef129-c335-4f6c-97ea-afc865ca2fda",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "860bbfe3-fe43-4a7a-b937-e801b3fd437e",
"metadata": {},
"outputs": [],
"source": [
"data=np.load('data3.npz')\n",
"data"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5cf68811-44dc-4bb4-8ff7-03275a167ff7",
"metadata": {},
"outputs": [],
"source": [
"actual_data=data['data']\n",
"metadata=data['lon_lat']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3e6f6b65-5cb4-4515-b163-67229880b966",
"metadata": {},
"outputs": [],
"source": [
"cmap_instance = plt.get_cmap(\"inferno\")\n",
"lat_min=metadata[0][0]\n",
"lat_max=metadata[0][1]\n",
"lon_min=metadata[1][0]\n",
"lon_max=metadata[1][1]\n",
"fig, axs = plt.subplots(1, 1, figsize=(10, 8))\n",
"axs.set_xlim(lat_min, lat_max)\n",
"axs.set_ylim(lon_min, lon_max)\n",
"axs.set_title(\"Selected Sub-Region Of Interest\")\n",
"axs.set_xlabel(\"Longitude (Degrees)\")\n",
"axs.set_ylabel(\"Latitude (Degrees)\")\n",
"data_fig = axs.imshow(\n",
" actual_data,\n",
" cmap=cmap_instance,\n",
" origin=\"lower\",\n",
" vmin=30,\n",
" vmax=1999,\n",
" extent=(lat_min, lat_max, lon_min, lon_max),\n",
")\n",
"\n",
"cbar = fig.colorbar(\n",
" data_fig,\n",
" fraction=0.046 * actual_data.shape[0] / actual_data.shape[1],\n",
" pad=0.04,\n",
")\n",
"cbar_ticks = np.linspace(30, 1999, 8)\n",
"cbar.set_ticks(cbar_ticks)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ This tutorial follows the steps in Figure 1.

## Prerequisites

> :bulb: **Note:** To follow this tutorial you must have a computer with minimum **8 GB of RAM** and **5 GB of free disk**
Before starting this tutorial, ensure you have installed Git and Docker Desktop on your computer.

* **To install Git**: Follow the [installation instructions](https://github.com/git-guides/install-git) for your operating system (Linux, Windows, or Mac).
* **To install Docker Desktop**: Follow the [installation instructions](https://docs.docker.com/engine/install/) for your operating system (Linux, Windows, or Mac).
* **To install Docker Desktop**: Follow the [installation instructions](https://docs.docker.com/engine/install/) for your operating system (Linux, Windows, or Mac). ***Be sure you are running the most recent version of Docker! Previous versions to 4.15.10 may not work.***

After installation, confirm that both tools are correctly set up by executing the following commands in your terminal.

Expand Down Expand Up @@ -84,13 +86,15 @@ Server:
Stopped: 120
Images: 48
```
> :bulb: **Note**: The specific numbers in the output might vary based on your installation details and additional information may also appear.
> :bulb: **Note:** The specific numbers in the output might vary based on your installation details and additional information may also appear.
## Running the Tutorial with Docker

To run this tutorial, we have prepared a Docker container named [`globalcomputinglab/somospie_openvisus`](https://hub.docker.com/repository/docker/globalcomputinglab/somospie_openvisus/general) that includes all necessary software. Ensure you have installed Docker Desktop as outlined in the [Prerequisites](#prerequisites) and have it open on your computer.
To run this tutorial, we have prepared a Docker container named [`globalcomputinglab/somospie_openvisus`](https://hub.docker.com/repository/docker/globalcomputinglab/somospie_openvisus/general) that includes all necessary software. Ensure you have installed Docker Desktop as outlined in the [Prerequisites](#prerequisites).

**:bulb: Note: Before following the next steps, make sure to open the Docker Desktop Application.**

Follow these steps in your terminal to use the Docker container for the tutorial:
Now open the terminal and follow the next steps to deploy the tutorial in the Docker container:
```
# Clone the tutorial repository:
git clone https://github.com/nsdf-fabric/Openvisus_Tutorial.git
Expand Down Expand Up @@ -215,12 +219,16 @@ NSDF Resources:
- **Slack workspace**: [nsdf-workspace](https://nsdf-workspace.slack.com/).
- **Github Discussions**: [issues](https://github.com/nsdf-fabric/catalog-comparison-tool/issues): Discussions and Q&A.
- **Mailing list**: [https://groups.google.com/g/nsdf](https://groups.google.com/g/nsdf) - [email protected]
- **Twitter**: [@FabricNsdf](https://twitter.com/FabricNsdf).
- **Twitter**: [@FabricNsdf](https://twitter.com/FabricNsdf)

OpenVisus Resources:
- **Github:** [Open Source distribution of the ViSUS capabilities](https://github.com/sci-visus/openvisus)
- **Webpage:** [VISUS - High performance Big Data Analysis and Visualization Solutions](https://visus.org/)

SOMOSPIE Resources:
- **GitHub:** [SOMOSPIE software](https://github.com/TauferLab/SOMOSPIE)
- **Webpage:** [SOMOSPIE overview](https://globalcomputing.group/somospie)
- **Questions:** Michela Taufer [[email protected]](email:[email protected]).
- **Questions:** Michela Taufer [[email protected]](email:[email protected])

## Related Publications

Expand All @@ -230,6 +238,12 @@ SOMOSPIE Resources:

[3] D. Rorabaugh, M. Guevara, R. Llamas, J. Kitson, R. Vargas, and M. Taufer. SOMOSPIE: A modular SOil MOisture SPatial Inference Engine based on data-driven decisions. In Proceedings of the 2019 15th International Conference on eScience (eScience) (2019). [link](https://ieeexplore.ieee.org/document/9041768)

[4] V. Pascucci and R. J. Frank, "Global Static Indexing for Real-Time Exploration of Very Large Regular Grids," SC '01: Proceedings of the 2001 ACM/IEEE Conference on Supercomputing, Denver, CO, USA, 2001, pp. 45-45, [link](http://doi.org/10.1145/582034.582036)

[5] Pascucci, Valerio, et al. "The ViSUS visualization framework." High Performance Visualization. Chapman and Hall/CRC, 2012. 439-452. [link](https://www.taylorfrancis.com/chapters/edit/10.1201/b12985-32/visus-visualization-frame[…]a-gyulassy-cameron-christensen-sujin-philip-sidharth-kumar)

[6] Brian Summa, Giorgio Scorzelli, Ming Jiang, Peer-Timo Bremer, and Valerio Pascucci. 2011. Interactive editing of massive imagery made simple: Turning Atlanta into Atlantis. ACM Trans. Graph. 30, 2, Article 7 (April 2011), 13 pages. [link](https://doi.org/10.1145/1944846.1944847)

## Copyright and License

Copyright (c) 2024, Global Computing Lab
Expand Down
Loading

0 comments on commit 7135c3f

Please sign in to comment.