|
170 | 170 | " \"\"\"\n", |
171 | 171 | " return 1 - x % 2\n", |
172 | 172 | "\n", |
| 173 | + "\n", |
173 | 174 | "def single_value(x):\n", |
174 | 175 | " \"\"\"\n", |
175 | 176 | " Determine whether the input is a single integer or float.\n", |
|
186 | 187 | " \"\"\"\n", |
187 | 188 | " return isinstance(x, (int, float))\n", |
188 | 189 | "\n", |
| 190 | + "\n", |
189 | 191 | "def filter_table(full_table, **kwargs):\n", |
190 | 192 | " \"\"\"\n", |
191 | 193 | " Filters an Astropy Table based an arbitrary number of input column-value pairs.\n", |
|
662 | 664 | "metadata": {}, |
663 | 665 | "outputs": [], |
664 | 666 | "source": [ |
665 | | - "fig, ax = plt.subplots(figsize=(12,10))\n", |
| 667 | + "fig, ax = plt.subplots(figsize=(12, 10))\n", |
666 | 668 | "cmap = copy.deepcopy(mpl.colormaps['turbo'])\n", |
667 | 669 | "cmap.colors[0] = 1, 1, 1\n", |
668 | 670 | "extent = 0.5, nx+0.5, ny+0.5, 0.5 # origin=(1,1); range = 1..nx, 1..ny with +/-0.5 boundary on either side\n", |
669 | 671 | "im = plt.imshow(msa_image, aspect=nx/ny, interpolation='nearest', cmap=cmap, extent=extent)\n", |
670 | | - "plt.xlim(nx+1,0)\n", |
671 | | - "plt.ylim(ny+1,0)\n", |
| 672 | + "plt.xlim(nx+1, 0)\n", |
| 673 | + "plt.ylim(ny+1, 0)\n", |
672 | 674 | "plt.xlabel('shutter row (full MSA)')\n", |
673 | 675 | "plt.ylabel('shutter column (full MSA)')\n", |
674 | 676 | "ax.yaxis.tick_right()\n", |
|
1028 | 1030 | ], |
1029 | 1031 | "metadata": { |
1030 | 1032 | "kernelspec": { |
1031 | | - "display_name": "jwst_1.20.2", |
| 1033 | + "display_name": "Python 3 (ipykernel)", |
1032 | 1034 | "language": "python", |
1033 | 1035 | "name": "python3" |
1034 | 1036 | }, |
|
0 commit comments