diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cfa874..5b9fecb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: shell: bash -el {0} run: | conda install -c conda-forge "openmc>=0.15.2" jupyter - python -m pip install pypact + python -m pip install git+https://github.com/fispact/pypact python download_fns_fusion_decay.py mkdir -p ~/nuclear_data wget -q -O - https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz | tar -C ~/nuclear_data -xJ diff --git a/compare.ipynb b/compare.ipynb index 6eaf19e..9c7edf9 100644 --- a/compare.ipynb +++ b/compare.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -21,8 +21,7 @@ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import openmc\n", - "import openmc.deplete\n", - "import pypact as pp # can be installed with pip install pypact\n", + "import pypact as pp # needs latest version which can be installed with pip install git+https://github.com/fispact/pypact\n", "\n", "from openmc_activator import OpenmcActivator" ] @@ -182,7 +181,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -238,16 +237,10 @@ " mass_dict = {k:v/tot * mass for k,v in comp_dict.items()}\n", " return mass_dict\n", "\n", - "# TODO consider replacing with pypact\n", "def read_density(filepath):\n", - " lines = open(filepath).readlines()\n", - " for line in lines:\n", - " spl = line.strip().split()\n", - " if 'DENSITY' in line:\n", - " assert('DENSITY' == spl[0])\n", - " return float(spl[1])\n", - " raise ValueError('Density not found')\n", - "\n", + " ff = pp.InputData()\n", + " pp.from_file(ff, filepath)\n", + " return ff._density\n", "\n", "setup_dict = {'days': {}, 'flux_mag': {}, 'mass': {}, 'density': {}}\n", "for k,l in experiments.items():\n",