lbl-anp / becquerel

Becquerel is a Python package for analyzing nuclear spectroscopic measurements.
Other
43 stars 16 forks source link

Add Spectrum.attenuate method #405

Closed jvavrek closed 5 months ago

jvavrek commented 5 months ago

Compute what a spectrum would look like after being attenuated by a given areal density of a given material, using the XCOM tools.

jvavrek commented 5 months ago

The pre-commit stage is complaining about

tests/spectrum_test.py:880:55: E251 unexpected spaces around keyword / parameter equals
tests/spectrum_test.py:880:57: E202 whitespace before '}'
tests/spectrum_test.py:880:57: E251 unexpected spaces around keyword / parameter equals

via flake8 due to

raise ValueError(f"Invalid {areal_density_gcm2 = }")

which is clearly incorrect. Ignoring.