Skip to content

Commit

Permalink
fill check
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed Dec 20, 2023
1 parent e1350b0 commit 8cbaf71
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 23 deletions.
110 changes: 88 additions & 22 deletions examples/quality-assessment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 15,
"id": "de240c3b-c4bd-4d04-94b7-d042029b618b",
"metadata": {},
"outputs": [
Expand All @@ -50,7 +50,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 16,
"id": "391def64-3415-43a0-a6b5-dc99450a4576",
"metadata": {},
"outputs": [
Expand All @@ -59,12 +59,12 @@
"output_type": "stream",
"text": [
"Collecting git+https://github.com/worldbank/blackmarblepy@fill-value\n",
" Cloning https://github.com/worldbank/blackmarblepy (to revision fill-value) to /private/var/folders/m1/8h14xfm56hd6qfgz6btm1rd80000gn/T/pip-req-build-9pngijzw\n",
" Running command git clone --filter=blob:none --quiet https://github.com/worldbank/blackmarblepy /private/var/folders/m1/8h14xfm56hd6qfgz6btm1rd80000gn/T/pip-req-build-9pngijzw\n",
" Cloning https://github.com/worldbank/blackmarblepy (to revision fill-value) to /private/var/folders/m1/8h14xfm56hd6qfgz6btm1rd80000gn/T/pip-req-build-fim_z2wv\n",
" Running command git clone --filter=blob:none --quiet https://github.com/worldbank/blackmarblepy /private/var/folders/m1/8h14xfm56hd6qfgz6btm1rd80000gn/T/pip-req-build-fim_z2wv\n",
" Running command git checkout -b fill-value --track origin/fill-value\n",
" Switched to a new branch 'fill-value'\n",
" Branch 'fill-value' set up to track remote branch 'fill-value' from 'origin'.\n",
" Resolved https://github.com/worldbank/blackmarblepy to commit a041c815ca9766fa27e407f1b2d0fb4c752d8871\n",
" Resolved https://github.com/worldbank/blackmarblepy to commit e1350b0379bf25153412ff7e12315ba92948fd1d\n",
" Installing build dependencies ... \u001b[?25ldone\n",
"\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n",
"\u001b[?25h Installing backend dependencies ... \u001b[?25ldone\n",
Expand Down Expand Up @@ -138,8 +138,8 @@
"Requirement already satisfied: pure-eval in /Users/robmarty/opt/anaconda3/envs/jupyterlab/lib/python3.11/site-packages (from stack-data->ipython>=6.1.0->ipywidgets<9->blackmarblepy==0.2.2) (0.2.2)\n",
"Building wheels for collected packages: blackmarblepy\n",
" Building wheel for blackmarblepy (pyproject.toml) ... \u001b[?25ldone\n",
"\u001b[?25h Created wheel for blackmarblepy: filename=blackmarblepy-0.2.2-py3-none-any.whl size=24238 sha256=b0670ecfdebf8930aaaab92d21736f883e1cfbfa96f3f5f6ae9cb8cdb3c0e8fd\n",
" Stored in directory: /private/var/folders/m1/8h14xfm56hd6qfgz6btm1rd80000gn/T/pip-ephem-wheel-cache-ezor_ru8/wheels/69/92/76/a5f5520f9b2c6aca3ed52b04dcc802937b955f09b0ae2e0f45\n",
"\u001b[?25h Created wheel for blackmarblepy: filename=blackmarblepy-0.2.2-py3-none-any.whl size=24248 sha256=63d9663193d081a8f926aee4dbf408404d44312fe43ceacda49cd939e079cf7c\n",
" Stored in directory: /private/var/folders/m1/8h14xfm56hd6qfgz6btm1rd80000gn/T/pip-ephem-wheel-cache-o6h8jsvp/wheels/69/92/76/a5f5520f9b2c6aca3ed52b04dcc802937b955f09b0ae2e0f45\n",
"Successfully built blackmarblepy\n",
"Installing collected packages: blackmarblepy\n",
"Successfully installed blackmarblepy-0.2.2\n"
Expand All @@ -152,7 +152,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 17,
"id": "312f1929-0ef8-44ae-904a-38408149ab8b",
"metadata": {
"editable": true,
Expand All @@ -163,7 +163,16 @@
"hide-input"
]
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"import datetime\n",
"import glob\n",
Expand Down Expand Up @@ -192,7 +201,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 18,
"id": "0f81655a-5476-49e3-b57e-40a3fbd63810",
"metadata": {},
"outputs": [],
Expand All @@ -202,7 +211,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 19,
"id": "72c4977e-793d-4eed-8462-59d312e79d6d",
"metadata": {
"editable": true,
Expand All @@ -220,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 20,
"id": "985e4bbb-00df-4ba4-b7d7-dcc89c873481",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -587,14 +596,14 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 21,
"id": "1ca02421-c2a3-4649-aef2-f1cf4b3997cb",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cd10707115cb4a639bae6047f3fe21d3",
"model_id": "bdb18b22dbeb4e9a92fc0b1c95d2e2f4",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -605,10 +614,17 @@
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[2023-12-20 18:09:27 - backoff:105 - INFO] Backing off get_url(...) for 0.8s (httpx.ConnectTimeout)\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7ab8ba2408514a5889a24cad9075c052",
"model_id": "c36c1ed803e6430ca4880ca1ffdea040",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -622,7 +638,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "48c61ee17f4c4f53bf0546fc84164fd2",
"model_id": "0e8acfb6e077449b904b34c5e1551fca",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -664,7 +680,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d6a03c6e75c0470aa9d8050b1b4c2029",
"model_id": "c9095ff0573c452cb470d2a1ec6daafb",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -678,7 +694,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "12194d31f1bd4f4ba64a8c4318ecc2ca",
"model_id": "607f5bcf1223422c9d92f1b802b86026",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -688,6 +704,14 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"9999999\n",
"9999999\n"
]
}
],
"source": [
Expand All @@ -702,7 +726,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 22,
"id": "d255c7c8-5eb8-4b88-b1f1-79b4e05757a4",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -2733,7 +2757,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"id": "4b55ebf1-24e5-41c4-a03b-b105e7caca6e",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -2782,7 +2806,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b6ede2fb45fe4e349b93dc4277f9deae",
"model_id": "",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -2792,6 +2816,48 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0.00/25.2M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "273aebad4ec44994b7a60c436a665202",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"COLLECTING RESULTS | Downloading...: 0%| | 0/2 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ed25995b080546d89b5d8ce5a40dffd0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"COLLATING RESULTS | Processing...: 0%| | 0/1 [00:00<?, ?it/s]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
Expand All @@ -2806,7 +2872,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 14,
"id": "3a404739-4bbf-4338-9069-0c6ad664564e",
"metadata": {
"editable": true,
Expand Down
2 changes: 1 addition & 1 deletion src/blackmarble/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def h5_to_geotiff(
]

# Extract data and attributes
fill_value = dataset.attrs.get("fill_value", 9999999) # default to large value that no dataset will have
fill_value = dataset.attrs.get("fill_value") # default to large value that no dataset will have
scale_factor = dataset.attrs.get("scale_factor", 1)
offset = dataset.attrs.get("offset", 0)

Expand Down

0 comments on commit 8cbaf71

Please sign in to comment.