Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lillythomas committed Jun 28, 2024
1 parent 33dbafb commit 13a1b4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions nbs/v1-inference-simsearch-naip-stacchip.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@
" Returns:\n",
" tuple: Normalized latitude and longitude values.\n",
" \"\"\"\n",
" lat_ = lat * np.pi / 180\n",
" lon_ = lon * np.pi / 180\n",
" lat = lat * np.pi / 180\n",
" lon = lon * np.pi / 180\n",
"\n",
" return (math.sin(lat_), math.cos(lat_)), (math.sin(lon_), math.cos(lon_))"
" return (math.sin(lat), math.cos(lat)), (math.sin(lon), math.cos(lon))"
]
},
{
Expand Down Expand Up @@ -683,8 +683,8 @@
" fig, axs = plt.subplots(1, cols, figsize=(20, 10))\n",
" i = 0\n",
" for ax, (_, row) in zip(axs.flatten(), df.iterrows()):\n",
" row_ = df.iloc[i]\n",
" chip = np.array(row_[\"image\"]).reshape(256,256,4)\n",
" # row = df.iloc[i]\n",
" chip = np.array(row[\"image\"]).reshape(256,256,4)\n",
" chip = chip[:, :, :3]\n",
" ax.imshow(chip)\n",
" ax.set_title(f\"{row['idx']}\")\n",
Expand Down
6 changes: 3 additions & 3 deletions nbs/v1-inference-simsearch-naip.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@
" centroid_x = (tile.x * tile).sum() / tile.sum()\n",
" centroid_y = (tile.y * tile).sum() / tile.sum()\n",
" \n",
" lon = centroid_x.item()\n",
" lat = centroid_y.item()\n",
" # lon = centroid_x.item()\n",
" # lat = centroid_y.item()\n",
"\n",
" tile = tile.assign_coords(band=['red','green','blue','nir'])\n",
" tile_save = tile\n",
Expand Down Expand Up @@ -661,7 +661,7 @@
" fig, axs = plt.subplots(1, cols, figsize=(20, 10))\n",
" i = 0\n",
" for ax, (_, row) in zip(axs.flatten(), df.iterrows()):\n",
" row = df.iloc[i]\n",
" # row = df.iloc[i]\n",
" path = row[\"path\"]\n",
" chip = rioxarray.open_rasterio(f\"{save_dir}/{path}.tif\").sel(band=['red', 'green', 'blue'])\n",
" chip = chip.squeeze().transpose('x', 'y', 'band')\n",
Expand Down

0 comments on commit 13a1b4a

Please sign in to comment.