Skip to content

Commit

Permalink
Fix #152: input bug in beamdp/beamdp_gui option 11
Browse files Browse the repository at this point in the history
Allow the specification of the range of particles for which to list
parameters, as required by beamdp. Previously, beamdp_gui only allowed
an input for the total number of particles for which to list parameters,
instead of the range. Confusion was exacerbated by the command-line
description of this input from beamdp itself, which also referred to the
number of particles instead of the range. This has been fixed as well.

Also fix a serious bug resulting in erroneous data output for all
options when analyzing IAEA phase space data.
  • Loading branch information
blakewalters authored and ftessier committed Jan 24, 2017
1 parent cb71367 commit c2cb50e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 8 additions & 2 deletions HEN_HOUSE/omega/progs/beamdp/beamdp.mortran
Original file line number Diff line number Diff line change
Expand Up @@ -1190,16 +1190,21 @@ IF(CHOICE1=11)[
IF ~EGSPERT[ CALL HELP_MESSAGE(19); ]
:LB2:
OUTPUT;
(/' Number(default=100), IQ(-1,0,1,2,3) =?'/' ',$);
(/' From particle no. (default=1), to particle no. (default=100),'
' IQ(-1,0,1,2,3) =?'/' ',$);
READ(5,'(3I12)',ERR=:LB1:)NUMBERST,NUMBERP,IQSMFP(1);
GOTO :LB3:;
:LB1:
CALL HELP_MESSAGE(19);
GOTO :LB2:;
:LB3:
IF (NUMBERST<1)[
NUMBERST=1;
OUTPUT;(/' First particle no. defaults to 1!');
]
IF (NUMBERP<1)[
NUMBERP=100;
OUTPUT;(/' Number defaults to 100!');
OUTPUT;(/' Last particle no. defaults to 100!');
]
IF(IQSMFP(1)<-1)|(IQSMFP(1)>3)[
IQSMFP(1)=2;"defaults to all the particles"
Expand Down Expand Up @@ -5250,6 +5255,7 @@ IF(i_iaea_in=1)[
IF(IMUIDX1~=0)[
OUTPUT;(' Fractional MU index also scored in phase space data. '/);
]
NINC=LPARANINC;
]
ELSE[

Expand Down
6 changes: 4 additions & 2 deletions HEN_HOUSE/omega/progs/gui/beamdp/beamdp_gui.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,8 @@ You can use bits 1 to 23 for these filters. For more information, \
# get number of particles, iq.
set w5 $w.opt11
frame $w5
textfield $w5.f1 "Number of particles to be listed (default 100)" fpar(1)
textfield $w5.f0 "Start at particle no. (defaults to 1)" fpar(0)
textfield $w5.f1 "End at particle no. (default 100)" fpar(1)
set text1(1) "Particle type"

frame $w5.inp1
Expand Down Expand Up @@ -1447,13 +1448,14 @@ proc create_script {} {
}
if $ichoice==11 {
# Put numberp,charge
if { [catch {expr $fpar(0)}]==1 } { set fpar(0) 1 }
if { [catch {expr $fpar(1)}]==1 } { set fpar(1) 100 }
if $charge==100 {
tk_dialog .failed "Failed" "The charge is not \
specified. Specify and try again." error 0 OK
return 0
}
puts $id "$fpar(1), $charge"
puts $id "$fpar(0), $fpar(1), $charge"
}

if { $ichoice>0 && $ichoice<10 || $ichoice==11} {
Expand Down

0 comments on commit c2cb50e

Please sign in to comment.