Commit 052e74fad5b47d4b9edb118168bfef6ff995224a
1 parent
e16a7863
Limit displayed PSF values in show_image.py to [0,0.5]
Showing
1 changed file
with
1 additions
and
7 deletions
examples/show_irf.py
| @@ -190,12 +190,6 @@ def plot_psf(sub, psf, emin=None, emax=None, tmin=None, tmax=None, | @@ -190,12 +190,6 @@ def plot_psf(sub, psf, emin=None, emax=None, tmin=None, tmax=None, | ||
| 190 | value = psf.containment_radius(0.68, logenergy, theta*gammalib.deg2rad) * \ | 190 | value = psf.containment_radius(0.68, logenergy, theta*gammalib.deg2rad) * \ |
| 191 | gammalib.rad2deg | 191 | gammalib.rad2deg |
| 192 | 192 | ||
| 193 | - # Limit containment radius values to [0.0,0.5] | ||
| 194 | - if value < 0.0: | ||
| 195 | - value = 0.0 | ||
| 196 | - if value > 0.5: | ||
| 197 | - value = 0.5 | ||
| 198 | - | ||
| 199 | # Append value | 193 | # Append value |
| 200 | row.append(value) | 194 | row.append(value) |
| 201 | 195 | ||
| @@ -203,7 +197,7 @@ def plot_psf(sub, psf, emin=None, emax=None, tmin=None, tmax=None, | @@ -203,7 +197,7 @@ def plot_psf(sub, psf, emin=None, emax=None, tmin=None, tmax=None, | ||
| 203 | image.append(row) | 197 | image.append(row) |
| 204 | 198 | ||
| 205 | # Plot image | 199 | # Plot image |
| 206 | - sub.imshow(image, extent=[emin,emax,tmin,tmax], aspect=0.5) | 200 | + sub.imshow(image, extent=[emin,emax,tmin,tmax], aspect=0.5, vmin=0.0, vmax=0.5) |
| 207 | 201 | ||
| 208 | # Show boundary contours | 202 | # Show boundary contours |
| 209 | contours = sub.contour(logenergies, thetas, image, [0.0], colors=('white')) | 203 | contours = sub.contour(logenergies, thetas, image, [0.0], colors=('white')) |