Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Use of "isotope" instead of "nuclide" in code, comments, and docs #120

Open
yardasol opened this issue Feb 4, 2022 · 0 comments
Open

Comments

@yardasol
Copy link
Contributor

yardasol commented Feb 4, 2022

Expected behavior

When talking about U-238, we should refer to it as a nuclide. Note that U-238 is an isotope of the element uranium (U).

Describe the bug

There are several places in the code, comments, and docs where 'nuclide' or 'element' should be used, but 'isotope' is used instead.

To Reproduce

Steps to reproduce the behavior:

  1. Execute grep -n "iso" saltproc/*.py saltproc/tests/*.py saltproc/tests/integration_tests/*/*.py doc/*.rst
  2. Observe

Supporting Informatioon

Sample output from the above grep command is below.

depcode.py:339:        """Returns the isotopes map to transform isotope `zzaaam` code to
depcode.py:340:        Serpent2. Uses Serpent2 `*.out` file with list of all isotopes in
depcode.py:350:        isotope_map : dict of str to str
depcode.py:351:            Contains mapping for isotopes names from `zzaaam` to Serpent2 name
depcode.py:359:                isotope or 982510 for decay only isotope).
depcode.py:378:        self.iso_map = map_dict
depcode.py:439:        zai = list(map(int, dep['ZAI'][:-2]))  # zzaaam codes of isotopes
depcode.py:601:        47310 instead of 471101 for `Ag-110m1`. Metastable isotopes represented
depcode.py:715:                # Transforms iso name from zas to zzaaam and then to SERPENT
depcode.py:716:                iso_name_serpent = pyname.zzaaam(nuc_code)
depcode.py:718:                           (self.iso_map[iso_name_serpent],
materialflow.py:148:        temperature, mass flowrate, and masses of important isotopes:
materialflow.py:189:            Materialflow which is a sum of isotope masses from `x` and `y`.
materialflow.py:223:            Materialflow object which has mass of each isotope and
process.py:27:                element name for removal (not isotope)
process.py:29:                removal efficency for the isotope (weight fraction)
process.py:76:        """Updates Materialflow object `inflow` after removal target isotopes
process.py:83:            Target material stream to remove poisons from.
process.py:95:        for iso in inflow.comp.keys():
process.py:96:            el_name = pyname.serpent(iso).split('-')[0]
process.py:100:                out_nucvec[iso] = \
process.py:101:                    float(inflow.comp[iso]) * \
process.py:103:                waste_nucvec[iso] = \
process.py:104:                    float(inflow[iso]) * self.efficiency[el_name]
process.py:106:                out_nucvec[iso] = float(inflow.comp[iso])
process.py:107:                waste_nucvec[iso] = 0.0  # zeroes everywhere else
separator.py:109:        efficiency values of target isotopes calculated in eff() function.
separator.py:170:                Name of target isotope.
simulation.py:129:                # iso_idx[proc] = OrderedDict()
simulation.py:130:                iso_idx = OrderedDict()
simulation.py:131:                iso_wt_frac = []
simulation.py:133:                # Read isotopes from Materialflow
simulation.py:135:                    # Dictonary in format {isotope_name : index(int)}
simulation.py:136:                    iso_idx[self.sim_depcode.get_nuc_name(nuc)[0]] = coun
simulation.py:138:                    iso_wt_frac.append(wt_frac * waste_dict[mn][proc].mass)
simulation.py:148:                        shape=(0, len(iso_idx)),
simulation.py:150:                    # Save isotope indexes map and units in EArray attributes
simulation.py:152:                    earr.attrs.iso_map = iso_idx
simulation.py:153:                earr.append(np.asarray([iso_wt_frac], dtype=np.float64))
simulation.py:154:                del iso_wt_frac
simulation.py:155:                del iso_idx
simulation.py:191:        iso_idx = OrderedDict()
simulation.py:216:            iso_idx[key] = OrderedDict()
simulation.py:217:            iso_wt_frac = []
simulation.py:230:            # Read isotopes from Materialflow for material
simulation.py:232:                # Dictonary in format {isotope_name : index(int)}
simulation.py:233:                iso_idx[key][self.sim_depcode.get_nuc_name(nuc_code)[0]] = coun
simulation.py:235:                iso_wt_frac.append(wt_frac * mats[key].mass)
simulation.py:262:                    shape=(0, len(iso_idx[key])),
simulation.py:264:                # Save isotope indexes map and units in EArray attributes
simulation.py:266:                earr.attrs.iso_map = iso_idx[key]
simulation.py:277:            earr.append(np.array([iso_wt_frac], dtype=np.float64))
simulation.py:279:            del (iso_wt_frac)
sparger.py:13:            Name of target isotope.
sparger.py:25:            Name of target isotope.
sparger.py:55:        Evaluates gas removal efficiencies for target isotopes.
sparger.py:132:        efficiency values of target isotopes calculated in eff() function.
sparger.py:145:        isotope = self.eff()[el_name]
sparger.py:147:        return isotope
sparger.py:211:        """Evaluates gas removal efficiencies for target isotopes.
sparger.py:221:            Dictionary containing removal efficiency of each target isotope.
sparger.py:224:                Name of target isotope.
tests/test_depcode.py:37:    assert serpent.iso_map[380880] == '38088.09c'
tests/test_depcode.py:38:    assert serpent.iso_map[962400] == '96240.09c'
tests/test_depcode.py:39:    assert serpent.iso_map[952421] == '95342.09c'
tests/test_depcode.py:40:    assert serpent.iso_map[340831] == '340831'
tests/test_depcode.py:41:    assert serpent.iso_map[300732] == '300732'
tests/test_depcode.py:42:    assert serpent.iso_map[511262] == '511262'
tests/test_depcode.py:43:    assert serpent.iso_map[420931] == '420931'
tests/test_depcode.py:44:    assert serpent.iso_map[410911] == '410911'
tests/integration_tests/const_repr/test_const_reproc_run.py:35:        isomap = node.attrs.iso_map
tests/integration_tests/const_repr/test_const_reproc_run.py:38:        for iso in isomap:
tests/integration_tests/const_repr/test_const_reproc_run.py:39:            out_data[node._v_name][iso] = \
tests/integration_tests/const_repr/test_const_reproc_run.py:40:                np.array([row[isomap[iso]] for row in node])
tests/integration_tests/const_repr/test_const_reproc_run.py:49:def read_iso_m_h5(db_file):
tests/integration_tests/const_repr/test_const_reproc_run.py:53:    isomap = fuel_before.attrs.iso_map
tests/integration_tests/const_repr/test_const_reproc_run.py:58:    for iso in isomap:
tests/integration_tests/const_repr/test_const_reproc_run.py:59:        mass_b[iso] = np.array([row[isomap[iso]] for row in fuel_before])
tests/integration_tests/const_repr/test_const_reproc_run.py:60:        mass_a[iso] = np.array([row1[isomap[iso]] for row1 in fuel_after])
tests/integration_tests/const_repr/test_const_reproc_run.py:71:    isomap = waste_ni.attrs.iso_map
tests/integration_tests/const_repr/test_const_reproc_run.py:72:    isomap_f = feed_leu.attrs.iso_map
tests/integration_tests/const_repr/test_const_reproc_run.py:78:    for iso in isomap:
tests/integration_tests/const_repr/test_const_reproc_run.py:79:        mass_w_sprg[iso] = np.array([row[isomap[iso]] for row in waste_sprg])
tests/integration_tests/const_repr/test_const_reproc_run.py:80:        mass_w_s[iso] = np.array([row[isomap[iso]] for row in waste_s])
tests/integration_tests/const_repr/test_const_reproc_run.py:81:        mass_w_ni[iso] = np.array([row[isomap[iso]] for row in waste_ni])
tests/integration_tests/const_repr/test_const_reproc_run.py:82:    for iso in isomap_f:
tests/integration_tests/const_repr/test_const_reproc_run.py:83:        mass_feed_leu[iso] = np.array([row[isomap_f[iso]] for row in feed_leu])
tests/integration_tests/const_repr/test_const_reproc_run.py:101:def assert_iso_m_check_eq_h5(db, dbe):
tests/integration_tests/const_repr/test_const_reproc_run.py:102:    mass_b_e, mass_a_e = read_iso_m_h5(dbe)
tests/integration_tests/const_repr/test_const_reproc_run.py:103:    mass_b, mass_a = read_iso_m_h5(db)
tests/integration_tests/const_repr/test_const_reproc_run.py:115:        for iso, mass_arr in node.items():
tests/integration_tests/const_repr/test_const_reproc_run.py:116:            np.testing.assert_allclose(mass_arr, data[node_nm][iso], rtol=tol)
/doc/overview.rst:58:each target isotope defined in the object input file, Saltproc code now
/doc/overview.rst:60:various target isotopes (i.e., Xe, Kr, and H). To enable this feature, use

System Specifications:

  • Software version: saltproc v0.4.0-dev
  • Platform/OS: Ubuntu 21.04

How can this issue be closed?

This issue can be closed when a PR exists that fixes the erroneous use of 'isotope' and contractions of 'isotope' (like 'iso'). Note that there may be some places in the code/docs/comments where the use of 'isotope' may be correct, so each use should be looked at by a human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant