Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/csv_output.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@
"proj_dir = Path.cwd().parent\n",
"\n",
"# Replace this path/to/MFILE.DAT with your target file:\n",
"mfilename = proj_dir / 'examples/csv_output_large_tokamak_MFILE.DAT'\n",
"mfilename = proj_dir / \"examples/csv_output_large_tokamak_MFILE.DAT\"\n",
"\n",
"# Either replace this with your own path/to/file.json target, \n",
"# Either replace this with your own path/to/file.json target,\n",
"# or add your required variables into the identified file:\n",
"varfilename = proj_dir / 'process/io/mfile_to_csv_vars.json'\n",
"# This routine attempts to find every variable in the given list and \n",
"varfilename = proj_dir / \"process/io/mfile_to_csv_vars.json\"\n",
"# This routine attempts to find every variable in the given list and\n",
"# writes the variable name, description and value to the output csv.\n",
"# Any listed variable that isn't in that MFILE will be skipped.\n",
"\n",
"# call to function:\n",
"mfile_to_csv.main(args=[\"-f\", str(mfilename), \"-v\", str(varfilename)])\n"
"mfile_to_csv.main(args=[\"-f\", str(mfilename), \"-v\", str(varfilename)])"
]
},
{
Expand Down
22 changes: 10 additions & 12 deletions examples/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
" copy(input_abs_path, temp_dir_path)\n",
" temp_input_path = temp_dir_path / input_abs_path.name\n",
"\n",
" return temp_dir, temp_input_path\n"
" return temp_dir, temp_input_path"
]
},
{
Expand Down Expand Up @@ -190,7 +190,7 @@
"pages = convert_from_path(summary_pdf)\n",
"for page_no, page_image in enumerate(pages):\n",
" png_path = PROJ_DIR / f\"examples/plot_proc_{page_no + 1}.png\"\n",
" page_image.save(png_path, \"PNG\")\n"
" page_image.save(png_path, \"PNG\")"
]
},
{
Expand Down Expand Up @@ -232,9 +232,9 @@
"from PIL import Image\n",
"from IPython.display import display\n",
"\n",
"img1 = Image.open('plot_proc_1.png')\n",
"img1 = Image.open(\"plot_proc_1.png\")\n",
"display(img1)\n",
"img2 = Image.open('plot_proc_2.png')\n",
"img2 = Image.open(\"plot_proc_2.png\")\n",
"display(img2)"
]
},
Expand All @@ -245,7 +245,7 @@
"outputs": [],
"source": [
"# Delete temp dir\n",
"temp_dir.cleanup()\n"
"temp_dir.cleanup()"
]
},
{
Expand Down Expand Up @@ -344,10 +344,8 @@
],
"source": [
"# Print some values on the CostModel instance\n",
"print(\n",
" f\"Heat transport system: {single_run.models.costs.c226:.3e} M$\"\n",
")\n",
"print(f\"Electrical plant equipment: {single_run.models.costs.c24:.3e} M$\")\n"
"print(f\"Heat transport system: {single_run.models.costs.c226:.3e} M$\")\n",
"print(f\"Electrical plant equipment: {single_run.models.costs.c24:.3e} M$\")"
]
},
{
Expand All @@ -357,7 +355,7 @@
"outputs": [],
"source": [
"# Clean up\n",
"temp_dir.cleanup()\n"
"temp_dir.cleanup()"
]
},
{
Expand Down Expand Up @@ -466,7 +464,7 @@
"vary_run = VaryRun(str(temp_input_path))\n",
"os.chdir(cwd)\n",
"\n",
"temp_dir.cleanup()\n"
"temp_dir.cleanup()"
]
},
{
Expand Down Expand Up @@ -528,7 +526,7 @@
" ]\n",
")\n",
"\n",
"temp_dir.cleanup()\n"
"temp_dir.cleanup()"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion examples/scan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
" \"--outputdir\",\n",
" str(output_dir),\n",
" ]\n",
")\n"
")"
]
}
],
Expand Down
127 changes: 0 additions & 127 deletions process/io/ndscan_funcs.py

This file was deleted.

Loading