Skip to content

Commit

Permalink
Q fixes (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzanka authored Dec 7, 2022
1 parent 1077ab8 commit e3f5e6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/functionsFromC/AT_Q_from_E_single.js
Original file line number Diff line number Diff line change
@@ -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";
}
Expand All @@ -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];
}
4 changes: 3 additions & 1 deletion src/static/json/PhysicsRoutines/QFromESingle.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e3f5e6c

Please sign in to comment.