Skip to content

Commit

Permalink
fix: don't plot fully flagged data as bad
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed May 20, 2024
1 parent 3b7462f commit d0a1515
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hera_notebook_templates/notebooks/lststack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,11 @@
"outputs": [],
"source": [
"def get_biggest_inpaint_differences(band, n: int = 5):\n",
" diff = np.nanmax(np.abs(cross_lstavg[0]['data'][:, band] - np.where(cross_lstavg[0]['flags'][:, band], np.nan, original_data_mean[0][:, band])), axis=1).flatten()\n",
" inpdata = cross_lstavg[0]['data'][:, band]\n",
" flgdata = np.where(\n",
" cross_lstavg[0]['nsamples'][:, band] == 0, np.nan, original_data_mean[0][:, band]\n",
" )\n",
" diff = np.nanmax(np.abs(inpdata - flgdata), axis=1).flatten()\n",
" diff[np.isnan(diff)] = -1\n",
" idx = np.argsort(diff)\n",
"\n",
Expand Down

0 comments on commit d0a1515

Please sign in to comment.