Add option to bypass phagen

and set RA_cutoff default to 1
This commit is contained in:
Sylvain Tricot 2025-07-23 16:28:29 +02:00
parent 5982a56cd7
commit 35f9b55322
2 changed files with 6 additions and 5 deletions

View File

@ -17,7 +17,7 @@
# along with this msspec. If not, see <http://www.gnu.org/licenses/>.
#
# Source file : src/msspec/calculator.py
# Last modified: Mon, 23 Jun 2025 13:58:23 +0200
# Last modified: Wed, 23 Jul 2025 16:28:29 +0200
# Committed by : Sylvain Tricot <sylvain.tricot@univ-rennes.fr>
@ -620,7 +620,7 @@ class _PED(_MSCALCULATOR):
def _get_scan(self, scan_type='theta', phi=0,
theta=np.linspace(-70, 70, 141), level=None,
kinetic_energy=None, data=None,
kinetic_energy=None, data=None, run_phagen=True,
malloc={}, other_parameters={}):
LOGGER.info("Computting the %s scan...", scan_type)
if data:
@ -663,7 +663,8 @@ class _PED(_MSCALCULATOR):
grp = getattr(self, grp_str)
grp.set_parameter(param_str, v, force=True)
self.get_tmatrix()
if run_phagen:
self.get_tmatrix()
self.run_spec(malloc)
# Now load the data

View File

@ -19,7 +19,7 @@
# along with this msspec. If not, see <http://www.gnu.org/licenses/>.
#
# Source file : src/msspec/parameters.py
# Last modified: Mon, 16 Jun 2025 14:42:03 +0200
# Last modified: Wed, 23 Jul 2025 16:28:29 +0200
# Committed by : Sylvain Tricot <sylvain.tricot@univ-rennes.fr>
@ -1433,7 +1433,7 @@ class ScanParameters(BaseParameters):
class CalculationParameters(BaseParameters):
def __init__(self, global_parameters, phagen_parameters, spec_parameters):
parameters = (
Parameter('RA_cutoff', types=int, limits=(0, 8), default=1,
Parameter('RA_cutoff', types=int, limits=(0, 8), default=2,
doc="""
The Rehr-Albers cut-off parameter which controls the degree of
sphericity introduced in the description of the basis functions