|
44 | 44 | },
|
45 | 45 | {
|
46 | 46 | "cell_type": "code",
|
47 |
| - "execution_count": 1, |
| 47 | + "execution_count": null, |
48 | 48 | "id": "c715463a",
|
49 | 49 | "metadata": {
|
50 | 50 | "pycharm": {
|
|
67 | 67 | },
|
68 | 68 | {
|
69 | 69 | "cell_type": "code",
|
70 |
| - "execution_count": 2, |
| 70 | + "execution_count": null, |
71 | 71 | "id": "c3c82074",
|
72 | 72 | "metadata": {
|
73 | 73 | "pycharm": {
|
|
91 | 91 | },
|
92 | 92 | {
|
93 | 93 | "cell_type": "code",
|
94 |
| - "execution_count": 3, |
| 94 | + "execution_count": null, |
95 | 95 | "id": "0f07e2b9",
|
96 | 96 | "metadata": {
|
97 | 97 | "pycharm": {
|
|
139 | 139 | },
|
140 | 140 | {
|
141 | 141 | "cell_type": "code",
|
142 |
| - "execution_count": 4, |
| 142 | + "execution_count": null, |
143 | 143 | "id": "5e0b928a",
|
144 | 144 | "metadata": {
|
145 | 145 | "pycharm": {
|
|
208 | 208 | },
|
209 | 209 | {
|
210 | 210 | "cell_type": "code",
|
211 |
| - "execution_count": 5, |
| 211 | + "execution_count": null, |
212 | 212 | "id": "351f79c3",
|
213 | 213 | "metadata": {
|
214 | 214 | "pycharm": {
|
|
224 | 224 | },
|
225 | 225 | {
|
226 | 226 | "cell_type": "code",
|
227 |
| - "execution_count": 6, |
| 227 | + "execution_count": null, |
228 | 228 | "id": "fb118cb5",
|
229 | 229 | "metadata": {
|
230 | 230 | "pycharm": {
|
|
240 | 240 | },
|
241 | 241 | {
|
242 | 242 | "cell_type": "code",
|
243 |
| - "execution_count": 7, |
| 243 | + "execution_count": null, |
244 | 244 | "id": "f15954c7",
|
245 | 245 | "metadata": {
|
246 | 246 | "pycharm": {
|
|
256 | 256 | },
|
257 | 257 | {
|
258 | 258 | "cell_type": "code",
|
259 |
| - "execution_count": 8, |
| 259 | + "execution_count": null, |
260 | 260 | "id": "feb04898",
|
261 | 261 | "metadata": {
|
262 | 262 | "pycharm": {
|
|
273 | 273 | },
|
274 | 274 | {
|
275 | 275 | "cell_type": "code",
|
276 |
| - "execution_count": 9, |
| 276 | + "execution_count": null, |
277 | 277 | "id": "122fdbf8",
|
278 | 278 | "metadata": {
|
279 | 279 | "pycharm": {
|
|
291 | 291 | },
|
292 | 292 | {
|
293 | 293 | "cell_type": "code",
|
294 |
| - "execution_count": 10, |
| 294 | + "execution_count": null, |
295 | 295 | "id": "e1c4a155",
|
296 | 296 | "metadata": {
|
297 | 297 | "pycharm": {
|
|
306 | 306 | },
|
307 | 307 | {
|
308 | 308 | "cell_type": "code",
|
309 |
| - "execution_count": 11, |
| 309 | + "execution_count": null, |
310 | 310 | "id": "7cd3640c",
|
311 | 311 | "metadata": {
|
312 | 312 | "pycharm": {
|
|
321 | 321 | },
|
322 | 322 | {
|
323 | 323 | "cell_type": "code",
|
324 |
| - "execution_count": 12, |
| 324 | + "execution_count": null, |
325 | 325 | "id": "bbaa5bf4",
|
326 | 326 | "metadata": {
|
327 | 327 | "pycharm": {
|
|
336 | 336 | },
|
337 | 337 | {
|
338 | 338 | "cell_type": "code",
|
339 |
| - "execution_count": 13, |
| 339 | + "execution_count": null, |
340 | 340 | "id": "3d7343d9",
|
341 | 341 | "metadata": {
|
342 | 342 | "pycharm": {
|
|
352 | 352 | },
|
353 | 353 | {
|
354 | 354 | "cell_type": "code",
|
355 |
| - "execution_count": 14, |
| 355 | + "execution_count": null, |
356 | 356 | "id": "6f2c3cbc",
|
357 | 357 | "metadata": {
|
358 | 358 | "pycharm": {
|
|
373 | 373 | "metadata": {},
|
374 | 374 | "outputs": [],
|
375 | 375 | "source": []
|
| 376 | + }, |
| 377 | + { |
| 378 | + "cell_type": "markdown", |
| 379 | + "id": "e4fd53d4", |
| 380 | + "metadata": {}, |
| 381 | + "source": [ |
| 382 | + "## Note\n", |
| 383 | + "#### The code below produces the example SEVIRI image shown in the `pycoxmunk` documentation.\n", |
| 384 | + "\n", |
| 385 | + "It applies the land / sea mask to the data, showing SEVIRI data over land and the Cox-Munk reflectance over sea." |
| 386 | + ] |
| 387 | + }, |
| 388 | + { |
| 389 | + "cell_type": "code", |
| 390 | + "execution_count": null, |
| 391 | + "id": "9f571cc5", |
| 392 | + "metadata": {}, |
| 393 | + "outputs": [], |
| 394 | + "source": [ |
| 395 | + "# Load the RGB composite for the land component\n", |
| 396 | + "pcm.scn.load(['natural_color'])\n", |
| 397 | + "land_b1 = pcm.scn['natural_color'].data[0, :, :]\n", |
| 398 | + "land_b2 = pcm.scn['natural_color'].data[1, :, :]\n", |
| 399 | + "land_b3 = pcm.scn['natural_color'].data[2, :, :]\n", |
| 400 | + "\n", |
| 401 | + "# The sea component from Cox-Munk\n", |
| 402 | + "sea_b1 = pcm.scn['cox_munk_refl_VIS006'].data\n", |
| 403 | + "sea_b2 = pcm.scn['cox_munk_refl_VIS008'].data\n", |
| 404 | + "sea_b3 = pcm.scn['cox_munk_refl_IR_016'].data\n", |
| 405 | + "\n", |
| 406 | + "# Apply the land / sea mask\n", |
| 407 | + "lsm = pcm.pixmask.mask\n", |
| 408 | + "out_b1 = np.where(lsm == 1, land_b1, sea_b1)\n", |
| 409 | + "out_b2 = np.where(lsm == 1, land_b2, sea_b2)\n", |
| 410 | + "out_b3 = np.where(lsm == 1, land_b3, sea_b3)\n", |
| 411 | + "\n", |
| 412 | + "# Apply the result to the Scene and save to disk.\n", |
| 413 | + "pcm.scn['natural_color'].data = np.moveaxis(np.dstack((out_b3, out_b2, out_b1)), 2, 0)\n", |
| 414 | + "pcm.scn.save_dataset('natural_color', base_dir='D:/sat_data/SEV/out2/', fill_value=0, writer='simple_image')" |
| 415 | + ] |
| 416 | + }, |
| 417 | + { |
| 418 | + "cell_type": "code", |
| 419 | + "execution_count": null, |
| 420 | + "id": "273caf29", |
| 421 | + "metadata": {}, |
| 422 | + "outputs": [], |
| 423 | + "source": [] |
376 | 424 | }
|
377 | 425 | ],
|
378 | 426 | "metadata": {
|
|
0 commit comments