From: Alberto Fasso' (fasso@SLAC.Stanford.EDU)
Date: Fri Nov 02 2007 - 19:35:09 CET
Stefan is right, but it is easy to make a small modification to
usbsuw.f so that the program will output the sum (result of usbsuw x number=
of
batches) even when each batch represents a different number of particles.
Replace the following lines:
200 CONTINUE
NCTOT=3DNCTOT+NCASE
by
200 CONTINUE
NCASE =3D 1
NCTOT =3D 1
Just for safety, in case you later forget that the program has been
manipulated, I would add a message at the end:
Replace:
END DO
CLOSE (UNIT=3D1)
STOP
END
by
END DO
WRITE(*,*) "This version of usbsuw has been modified"
WRITE(*,*) "in order to provide the sum and not the average"
CLOSE (UNIT=3D1)
STOP
END
Alberto
On Fri, 2 Nov 2007, Stefan Roesler wrote:
> Hi Markus,
>
> one addition to my previous reply: strictly speaking, the result of usbsu=
w
> is the weighted average, i.e. weigthed with the number of beam particles
> run. Thus, you can only recover the sum (result of usbsuw x number of
> batches) if each batch represents the same number of beam particles.
>
> Regards
> Stefan
>
>
> On Wed, 31 Oct 2007, Markus Kirk wrote:
>
>> Dear Users,
>>
>>
>>
>> Does anybody know if there is an existing utility software that allows o=
ne
>> to sum the binary files produced by the USRBIN card?
>>
>>
>>
>> By 'sum' I mean each bin in the output file of such a utility contains t=
he
>> summation of the same corresponding bin from the input files.
>>
>> It could be that perhaps one can do this with the flair utility.
>>
>> However, is there also any single command line at the linux prompt that =
can
>> achieve this?
>>
>> Something packaged together with the fluka installation?
>>
>>
>>
>> I thank you in anticipation.
>>
>>
>>
>> Yours sincerely,
>>
>>
>>
>> Markus
>>
>>
>>
>>
>
>
--=20
Alberto Fass=F2
SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025
Phone: (1 650) 926 4762 Fax: (1 650) 926 3569
fasso@slac.stanford.edu
--1334196054-1286397765-1194028509=3D:24726--
This archive was generated by hypermail 2.1.6 : Fri Nov 02 2007 - 21:46:40 CET