[fluka-discuss]: phantom problem - fortran code

From: Ševčik Aleksandras <aleksandras.sevcik_at_ktu.edu>
Date: Sun, 7 Oct 2018 08:45:02 +0000

Dear experts,

Despite that I have been able to successfully convert icrp phantom to fluka vxl and it works with some correction, I still need to understand one tricky moment here which, unfortunately, could not being solved by my own for a long time.
In the ICRP's data readme.txt states the following, see below. My problem is that I cannot open original .dat file with imageJ with parameters col 299 row137 sli348 which means that original .dat file is not build in such way so it must be altered as readme.txt states. I can understand basically what this code tries to do, and I can successfully compile and run it, however, nothing changes in that .dat file, i.e. it is not stored in the (299x137x348) array! Does this code lacks some output parameter or smth?

"The organ identification numbers are stored in portions of 16, but the number of columns is not a multiple of 16. Therefore, appropriate care has to be applied for reading the data. As an example, a FORTRAN programme that reads the data of the female reference computational phantom and stores them into a (299 x 137 x 348) array is given in the following:

      program readdata
* Programme to read the voxel phantom data from ASCII file
* AF.dat and store them in a three-dimensional array of
* organ identification numbers
      dimension norgin(300),nodum(16),noid(300,200,350)
* Number of columns, rows and slices:
      ncol=299
      nrow=137
      nsli=348
      open (10,file='AF.dat')
* Read phantom file, assign organ identification numbers to
* array positions
* The organ identification numbers are stored in portions of 16,
* but the number of columns is not a multiple of 16.
* Therefore, when ncol OIDs are read, this ends right in the
* middle of a line, and the rest is ignored. Therefore, the next
* "read" statement has to account for this; the last line that
* has been read only partially, has to be read again, whereby
* that first part that has been registered already needs to be
* skipped. Therefore, the number "ndum" of these items has to be
* tracked.
      write (6,'('' Reading of phantom file started'')')
      nrorea=ncol/16
      ndifcol=ncol-16*nrorea
      ndum=0
      do 40 nsl=1,nsli
      do 40 nr=1,nrow
      if (ndum.ne.0) then
                  backspace (10)
          read (10,*) (nodum(i),i=1,ndum), (norgin(i),i=1,ncol)
      else
          read (10,*) (norgin(i),i=1,ncol)
      endif
      do 30 nc=1,ncol
      noid(nc,nr,nsl)=norgin(nc)
   30 continue
      ndum=ndum+ndifcol
      if (ndum.ge.16) ndum=ndum-16
   40 continue
      write (6,'('' ... finished'')')
      close (10)
      end"




__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info

Received on Sun Oct 07 2018 - 12:07:29 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 07 2018 - 12:07:47 CEST