Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent 1438e72 commit 30696a1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/ArtificialInformation_Filter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"# selecting water vapor mixing ratio at 2 meters\n",
"data = ds[\"Q2\"]\n",
"# select subset of data for demonstration purposes\n",
"chunk = data.isel(time=slice(0,9), y=slice(0,525), x=slice(0,525))\n",
"chunk = data.isel(time=slice(0, 9), y=slice(0, 525), x=slice(0, 525))\n",
"chunk"
]
},
Expand Down Expand Up @@ -130,12 +130,18 @@
"source": [
"# original dataset without artificial information\n",
"orig_info = xb.get_bitinformation(\n",
" xr.Dataset({\"w/o artif. info\": chunk}), dim=\"x\", implementation=\"julia\", masked_value=None\n",
" xr.Dataset({\"w/o artif. info\": chunk}),\n",
" dim=\"x\",\n",
" implementation=\"julia\",\n",
" masked_value=None,\n",
")\n",
"\n",
"# dataset with artificial information\n",
"arti_info = xb.get_bitinformation(\n",
" xr.Dataset({'w artif. info': dec}), dim=\"x\", implementation=\"julia\", masked_value=None\n",
" xr.Dataset({\"w artif. info\": dec}),\n",
" dim=\"x\",\n",
" implementation=\"julia\",\n",
" masked_value=None,\n",
")\n",
"\n",
"# plotting distribution of bitwise information content\n",
Expand All @@ -159,7 +165,9 @@
"outputs": [],
"source": [
"keepbits = xb.get_keepbits(info, inflevel=[0.99])\n",
"print(f\"The number of keepbits increased from {keepbits['w/o artif. info'].item(0)} bits in the original dataset to {keepbits['w artif. info'].item(0)} bits in the dataset with artificial information.\")"
"print(\n",
" f\"The number of keepbits increased from {keepbits['w/o artif. info'].item(0)} bits in the original dataset to {keepbits['w artif. info'].item(0)} bits in the dataset with artificial information.\"\n",
")"
]
},
{
Expand Down

0 comments on commit 30696a1

Please sign in to comment.