From e3f5e6cc47bc0c07e7473f0cd55f8beeb9af5650 Mon Sep 17 00:00:00 2001 From: Leszek Grzanka Date: Thu, 8 Dec 2022 00:48:54 +0100 Subject: [PATCH] Q fixes (#938) --- src/functionsFromC/AT_Q_from_E_single.js | 10 ++++++---- src/static/json/PhysicsRoutines/QFromESingle.json | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/functionsFromC/AT_Q_from_E_single.js b/src/functionsFromC/AT_Q_from_E_single.js index b0ac604f..b19b31f1 100644 --- a/src/functionsFromC/AT_Q_from_E_single.js +++ b/src/functionsFromC/AT_Q_from_E_single.js @@ -1,8 +1,9 @@ export default function AT_Q_from_E_single(parameters) { - let at_q_from_e_mev_n_single = Module.cwrap('AT_Q_from_E_MeV_n_single', 'number', ['number', 'number']); + let at_q_from_e_mev_n_single = Module.cwrap('AT_Q_from_E_single', 'number', ['number', 'number']); + let at_qeff_from_e_mev_n_single = Module.cwrap('AT_Qeff_from_E_single', 'number', ['number', 'number']); /*********************STANDARD PARAMETER*************************/ - if(!parameters.E_MeV_u){ + if(!parameters.E_MeV_n){ alert("MESSAGE TO DEVELOPER: NO PARAMETER E_MeV_n IN OBJECT PASSED TO THIS FUNCTIONS"); return "error"; } @@ -16,8 +17,9 @@ export default function AT_Q_from_E_single(parameters) { let particle_no = parameters.particle_no; /*********************CALL FUNCTION******************************/ - let result = at_q_from_e_mev_n_single(E_MeV_n, particle_no); + let q = at_q_from_e_mev_n_single(E_MeV_n, particle_no); + let qeff = at_qeff_from_e_mev_n_single(E_MeV_n, particle_no); - return result; + return [q, qeff]; } \ No newline at end of file diff --git a/src/static/json/PhysicsRoutines/QFromESingle.json b/src/static/json/PhysicsRoutines/QFromESingle.json index cde567d3..24d87668 100644 --- a/src/static/json/PhysicsRoutines/QFromESingle.json +++ b/src/static/json/PhysicsRoutines/QFromESingle.json @@ -3,7 +3,9 @@ "functionName": "AT_Q_from_E_single", "description": "Q and Qeff", "plot": false, - "resultPrecision": 6, + "resultPrecision": [6,6], + "resultLabel": ["Q", "Qeff"], + "resultUnit": ["1/MeV", ""], "formItems": [ { "type": "input",