Skip to content

Commit

Permalink
updated cells to PEP8 standards v5
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Baines committed May 2, 2024
1 parent f24eca2 commit f144cf0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions notebooks/NIRISS/01_niriss_soss_detector1_reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@
"uncals = Observations.filter_products(\n",
" data_products, \n",
" productType='SCIENCE',\n",
" productSubGroupDescription='UNCAL')"
" productSubGroupDescription='UNCAL'\n",
")"
]
},
{
Expand Down Expand Up @@ -714,7 +715,7 @@
" bps = datamodels.dqflags.dqflags_to_mnemonics(\n",
" nis_seg1_dqinit.pixeldq[row, column], \n",
" mnemonic_map=datamodels.dqflags.pixel\n",
" )\n",
" )\n",
"\n",
" # Iterate through the possible flags (it can be more than one!):\n",
" for bp in bps:\n",
Expand Down Expand Up @@ -871,7 +872,7 @@
" bps = datamodels.dqflags.dqflags_to_mnemonics(\n",
" saturation_results.groupdq[integration, group, row, column], \n",
" mnemonic_map=datamodels.dqflags.pixel\n",
" )\n",
" )\n",
" \n",
" # Check if pixel is saturated; if it is...\n",
" if 'SATURATED' in bps:\n",
Expand Down Expand Up @@ -914,7 +915,7 @@
"plt.plot(np.arange(saturation_results.data.shape[1])+1, \n",
" saturation_results.data[integration, :, pixel_row, pixel_column], \n",
" 'o-', color='tomato'\n",
" )\n",
")\n",
"\n",
"plt.xlim(0.5, saturation_results.data.shape[1]+1.5)\n",
"plt.xlabel('Group number', fontsize=16)\n",
Expand All @@ -925,7 +926,7 @@
"plt.plot(np.arange(saturation_results.data.shape[1])+1, \n",
" saturation_results.groupdq[integration, :, pixel_row, pixel_column], \n",
" 'o-', color='cornflowerblue'\n",
" )\n",
")\n",
"\n",
"plt.xlim(0.5, saturation_results.data.shape[1]+1.5)\n",
"plt.ylabel('Group Data-quality', fontsize=16, color='cornflowerblue')\n",
Expand Down Expand Up @@ -1254,7 +1255,7 @@
" bps = datamodels.dqflags.dqflags_to_mnemonics(\n",
" saturation_results2.groupdq[integration, group, row, column], \n",
" mnemonic_map=datamodels.dqflags.pixel\n",
" )\n",
" )\n",
" \n",
" # Check if pixel is saturated; if it is...\n",
" if 'SATURATED' in bps:\n",
Expand Down Expand Up @@ -1468,7 +1469,7 @@
" bps = datamodels.dqflags.dqflags_to_mnemonics(\n",
" superbias_results.pixeldq[row, column], \n",
" mnemonic_map=datamodels.dqflags.pixel\n",
" )\n",
" )\n",
"\n",
" if 'REFERENCE_PIXEL' in bps:\n",
"\n",
Expand Down Expand Up @@ -1774,7 +1775,7 @@
"ax1, ax2 = axes.ravel()\n",
"\n",
"# plot ramp samples\n",
"ax1.set_title(f'Same as above, linearity-corrected')\n",
"ax1.set_title('Same as above, linearity-corrected')\n",
"ax1.plot(group, linearity_results.data[10, :, i1, i2], 'o-', color='black', mfc='white', label='Up-the-ramp samples')\n",
"ax1.plot(group, np.polyval(coeff, group), 'r--', label='Linear fit to first ' + str(first_groups) + ' groups')\n",
"ax1.set_xlabel('Group number', fontsize=16)\n",
Expand Down

0 comments on commit f144cf0

Please sign in to comment.