Skip to content

Commit

Permalink
fix filename consistency for lstcal
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Aug 6, 2024
1 parent 665c23d commit e98444c
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions hera_notebook_templates/notebooks/lststack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,23 @@
"print(f\"This data {'is' if data_is_redundantly_averaged else 'is not'} redundantly averaged.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6bc8380a-775c-4d77-9049-60e308e246db",
"metadata": {},
"outputs": [],
"source": [
"# A partial function that makes it simpler to create files of the correct format.\n",
"get_fname = partial(\n",
" lstbin.io.format_outfile_name,\n",
" lst=stackconf.lst_grid_edges[0],\n",
" pols=stackconf.pols,\n",
" inpaint_mode=True,\n",
" lst_branch_cut=stackconf.properties[\"lst_branch_cut\"],\n",
")"
]
},
{
"cell_type": "markdown",
"id": "8dcb2696",
Expand Down Expand Up @@ -795,13 +812,9 @@
" all_calibration_parameters[stackconf.lst_grid[i]] = calibration_parameters\n",
" \n",
" # Get the calibration filename\n",
" cal_fname = lstbin.io.format_outfile_name(\n",
" lst=stackconf.lst_grid_edges[0],\n",
" pols=stackconf.pols,\n",
" fname_format=fname_format.replace(\"sum.uvh5\", \"lstcal.pkl\"),\n",
" inpaint_mode=True,\n",
" lst_branch_cut=stackconf.properties[\"lst_branch_cut\"],\n",
" kind=\"LST\"\n",
" cal_fname = get_fname(\n",
" fname_format=fname_format.replace(\"{blchunk}\", \"{blchunk:03}\").replace(\".sum.uvh5\", \".pkl\"),\n",
" kind='LSTCAL',\n",
" )\n",
" outfile = outdir / cal_fname\n",
" \n",
Expand Down Expand Up @@ -1356,17 +1369,8 @@
"\n",
"create_file = partial(\n",
" lstbin.io.create_lstbin_output_file,\n",
"# uvd_template=uvd_template,\n",
" outdir=outdir,\n",
" overwrite=overwrite,\n",
")\n",
"\n",
"get_fname = partial(\n",
" lstbin.io.format_outfile_name,\n",
" lst=stackconf.lst_grid_edges[0],\n",
" pols=stackconf.pols,\n",
" inpaint_mode=True,\n",
" lst_branch_cut=stackconf.properties[\"lst_branch_cut\"],\n",
")"
]
},
Expand Down

0 comments on commit e98444c

Please sign in to comment.