|
291 | 291 | "metadata": {},
|
292 | 292 | "outputs": [],
|
293 | 293 | "source": [
|
294 |
| - "fig,ax = plt.subplots(1,2,figsize=(6,4), layout='constrained')\n", |
| 294 | + "fig,ax = plt.subplots(1,2,figsize=(6,3), layout='constrained')\n", |
295 | 295 | "fig.suptitle(f\"Run {run_number}: W 4f, side bands\")\n",
|
296 | 296 | "res_corr.plot(robust=True, ax=ax[0], cmap='terrain')\n",
|
297 | 297 | "ax[0].set_title('raw')\n",
|
|
341 | 341 | "plt.show()\n",
|
342 | 342 | "\n",
|
343 | 343 | "## XPD plots\n",
|
344 |
| - "fig,ax = plt.subplots(2,2,figsize=(6,8), layout='constrained')\n", |
| 344 | + "fig,ax = plt.subplots(2,2,figsize=(6,6), layout='constrained')\n", |
345 | 345 | "res_kx_ky.sel(energy=slice(-30.3,-29.9)).mean('energy').plot(robust=True, ax=ax[0,0], cmap='terrain')\n",
|
346 | 346 | "ax[0,0].set_title(\"XPD of $1^{st}$ order sidebands\")\n",
|
347 | 347 | "res_kx_ky.sel(energy=slice(-31.4,-31.2)).mean('energy').plot(robust=True, ax=ax[0,1], cmap='terrain')\n",
|
|
381 | 381 | "## Apply Gaussian Blur to background image\n",
|
382 | 382 | "bgd_blur = xr.apply_ufunc(gaussian_filter, bgd, 15)\n",
|
383 | 383 | "\n",
|
384 |
| - "fig,ax = plt.subplots(1,2,figsize=(6,4), layout='constrained')\n", |
| 384 | + "fig,ax = plt.subplots(1,2,figsize=(6,3), layout='constrained')\n", |
385 | 385 | "bgd.plot(robust=True, cmap='terrain', ax=ax[0])\n",
|
386 | 386 | "ax[0].set_title('Background image')\n",
|
387 | 387 | "bgd_blur.plot(cmap='terrain', ax=ax[1])\n",
|
|
397 | 397 | "outputs": [],
|
398 | 398 | "source": [
|
399 | 399 | "## XPD normalized by background image\n",
|
400 |
| - "fig,ax = plt.subplots(2,2,figsize=(6,8), layout='constrained')\n", |
| 400 | + "fig,ax = plt.subplots(2,2,figsize=(6,6), layout='constrained')\n", |
401 | 401 | "(res_kx_ky/bgd).sel(energy=slice(-30.3,-29.9)).mean('energy').plot(robust=True, ax=ax[0,0], cmap='terrain')\n",
|
402 | 402 | "(res_kx_ky/bgd).sel(energy=slice(-31.4,-31.2)).mean('energy').plot(robust=True, ax=ax[0,1], cmap='terrain')\n",
|
403 | 403 | "(res_kx_ky/bgd).sel(energy=slice(-33.6,-33.4)).mean('energy').plot(robust=True, ax=ax[1,0], cmap='terrain')\n",
|
404 | 404 | "(res_kx_ky/bgd).sel(energy=slice(-37.0,-36.0)).mean('energy').plot(robust=True, ax=ax[1,1], cmap='terrain')\n",
|
405 | 405 | "fig.suptitle(f'Run {run_number}: XPD patterns after background normalization',fontsize='18')\n",
|
406 | 406 | "\n",
|
407 | 407 | "## XPD normalized by Gaussian-blurred background image\n",
|
408 |
| - "fig,ax = plt.subplots(2,2,figsize=(6,8), layout='constrained')\n", |
| 408 | + "fig,ax = plt.subplots(2,2,figsize=(6,6), layout='constrained')\n", |
409 | 409 | "(res_kx_ky/bgd_blur).sel(energy=slice(-30.3,-29.9)).mean('energy').plot(robust=True, ax=ax[0,0], cmap='terrain')\n",
|
410 | 410 | "(res_kx_ky/bgd_blur).sel(energy=slice(-31.4,-31.2)).mean('energy').plot(robust=True, ax=ax[0,1], cmap='terrain')\n",
|
411 | 411 | "(res_kx_ky/bgd_blur).sel(energy=slice(-33.6,-33.4)).mean('energy').plot(robust=True, ax=ax[1,0], cmap='terrain')\n",
|
412 | 412 | "(res_kx_ky/bgd_blur).sel(energy=slice(-37.0,-36.0)).mean('energy').plot(robust=True, ax=ax[1,1], cmap='terrain')\n",
|
413 | 413 | "fig.suptitle(f'Run {run_number}: XPD patterns after Gaussian-blurred background normalization',fontsize='18')\n",
|
414 | 414 | "\n",
|
415 | 415 | "## XPD normalized by Gaussian-blurred background image and blurred to improve contrast\n",
|
416 |
| - "fig,ax = plt.subplots(2,2,figsize=(9,7), layout='constrained')\n", |
| 416 | + "fig,ax = plt.subplots(2,2,figsize=(6,6), layout='constrained')\n", |
417 | 417 | "(xr.apply_ufunc(gaussian_filter, res_kx_ky/bgd_blur, 1)).sel(energy=slice(-30.3,-29.9)).mean('energy').plot(robust=True, ax=ax[0,0], cmap='terrain')\n",
|
418 | 418 | "(xr.apply_ufunc(gaussian_filter, res_kx_ky/bgd_blur, 1)).sel(energy=slice(-31.4,-31.2)).mean('energy').plot(robust=True, ax=ax[0,1], cmap='terrain')\n",
|
419 | 419 | "(xr.apply_ufunc(gaussian_filter, res_kx_ky/bgd_blur, 1)).sel(energy=slice(-33.6,-33.4)).mean('energy').plot(robust=True, ax=ax[1,0], cmap='terrain')\n",
|
|
451 | 451 | "W_5p_blur = xr.apply_ufunc(gaussian_filter, W_5p, 15)\n",
|
452 | 452 | "\n",
|
453 | 453 | "### Visualize results\n",
|
454 |
| - "fig,ax = plt.subplots(2,2,figsize=(6,8), layout='constrained')\n", |
| 454 | + "fig,ax = plt.subplots(2,2,figsize=(6,6), layout='constrained')\n", |
455 | 455 | "(SB/SB_blur).plot(robust=True, ax=ax[0,0], cmap='terrain')\n",
|
456 | 456 | "(W_4f_7/W_4f_7_blur).plot(robust=True, ax=ax[0,1], cmap='terrain')\n",
|
457 | 457 | "(W_4f_5/W_4f_5_blur).plot(robust=True, ax=ax[1,0], cmap='terrain')\n",
|
|
465 | 465 | "W_5p_norm = xr.apply_ufunc(gaussian_filter, W_5p/W_5p_blur, 1)\n",
|
466 | 466 | "\n",
|
467 | 467 | "### Visualize results\n",
|
468 |
| - "fig,ax = plt.subplots(2,2,figsize=(6,8), layout='constrained')\n", |
| 468 | + "fig,ax = plt.subplots(2,2,figsize=(6,6), layout='constrained')\n", |
469 | 469 | "SB_norm.plot(robust=True, ax=ax[0,0], cmap='terrain')\n",
|
470 | 470 | "W_4f_7_norm.plot(robust=True, ax=ax[0,1], cmap='terrain')\n",
|
471 | 471 | "W_4f_5_norm.plot(robust=True, ax=ax[1,0], cmap='terrain')\n",
|
|
0 commit comments