Bob,
Thanks for you reply RE: Fo extraction. I try that today, wish me luck.
I have revised the code I send you the other day. The new code reads
both GENIE powder format so there should be no need to hack it in any way.
The new code is at the end of this message. Cheers Jim.

       PROGRAM POLTOGSAS
C
C Verion 1
C THIS PROGRAM WILL CONVERT GENIE INTERMEDIATE POWDER DATA FILES
C FROM POLARIS TO GSAS FORMAT. THE ONLY DIFFERENCE BETWEEN GENIE
C INTERMEDIATE FILES AND NORMAL POWDER DATA FILES FOR RIETVELD
C ARE THREE COMMENT LINES AT THE TOP OF THE FILES (I THINK?).
C THE LAST THREE POINTS IN THE FILE ARE IGNORED.
C
C Version 1.1
C THIS VERSION TRIES TO DETECT IF THE FILE IS CREATED USING THE 
C SHOW DATA COMMAND OR NOT. SHOW DATA HAS FOUR HEADER LINES ON THE
C START OF THE FILE. THIS PROGRAM LOOKS FOR SPECIFIES CHARACTER.
C IF IT FINDS THEN IT ASSUMES A SHOW DATA FILE. IF NOT A NORMAL
C GENIE POWDER FILE.
C
C SOME NOTES ON THE FILE SETUP:
C
C
C% data file has two header lines each 80 characters long
C% 1st line is header information                                  
C% second line has bank number 
C% then the number of records (data is written as t-o-f*32 counts then error)
C% then number of lines there are four records per line
C% then a code RALF (meaning rutherford type data format)
C% then starting t-o-f*32 (64042)
C% then constant step size 33
C% then t-o-f where constant dt ends and binning becomes logarithmic (64075)
C% then the dt/t of the logarithmic region (0.0005)
C% then a code word for logarithmic binning (alt)
C
C THIS PROGRAM WAS WRITTEN FOR A SILICON GRAPHICS (UNIX) MACHINE.
C THE OUTPUT GSAS FILE MUST BE CONVERTED TO DIRECT ACCESS USING
C THE convstod GSAS UTILITY.
C
C VERSION 1.1
C
C D.N. ARGYRIOU, NEUTRON SCATTERING GROUP,
C AUSTRALIAN NUCLEAR SCIENCE AND TECHNOLOGY ORGANISATION,
C PMB 1,MENAI,N.S.W., 2234, AUSTRALIA.
C EMAIL:max@photon.ansto.gov.au
C
C
C
C
       DIMENSION TOF(5000), COUNT(5000),ERR(5000)
       INTEGER IDATA(3,5000)
       CHARACTER TITLE*80,FIL*30,DUM*80
       CHARACTER ANS*1
       LOGICAL FOUND
       INTEM=0
       PRINT*,'*********************************************'
       PRINT*,'*           PROGRAM POLTOGSAS               *'
       PRINT*,'*                                           *'
       PRINT*,'* Converts POLARIS powder data files to     *'
       PRINT*,'*          the GSAS format.                 *'
       PRINT*,'*                                           *'
       PRINT*,'* Please Note:                              *'
       PRINT*,'* (a)This is the UNIX version.              *'
       PRINT*,'* Output GSAS files MUST be converted to    *'
       PRINT*,'* direct access using the convstod GSAS     *'
       PRINT*,'* utility.                                  *'
       PRINT*,'* (b)This program is setup for GENIE        *'
       PRINT*,'* intermediate powder files.                *'
       PRINT*,'* For normal powder files you must edit     *'
       PRINT*,'* this program. Instructions are            *'
       PRINT*,'* included in the code.                     *'
       PRINT*,'*********************************************'
       print*,'Enter GENIE powder file:'
333    READ(*,99)FIL
       IF(FIL.EQ.'QUIT')STOP
99     FORMAT(A30)
       INQUIRE(FILE=FIL,EXIST=FOUND)
       IF(FOUND)THEN
         OPEN(UNIT=10,FILE=FIL,STATUS='OLD')
       ELSE
         PRINT*,'    '
         PRINT*,'*** FILE:',FIL,' NOT FOUND ***'
         PRINT*,'Enter GENIE file, or type QUIT to finish'
         GO TO 333
       ENDIF
C
C  WORK OUT FILE FORMAT
C
       READ(10,100)DUM 
       IF(DUM(2:7).EQ.'******')INTEM=1
       BACKSPACE(10)
       PRINT*,'  '
       IF(INTEM.EQ.0)PRINT*,'File ',FIL,' read as GENIE powder file.'
       IF(INTEM.EQ.1)THEN
       PRINT*,'File ',FIL,' read as a GENIE file written'
       PRINT*,'using the show data command.'
       PRINT*,'    '
C
C   GENIE SHOW DATA FILES   
C
       READ(10,100)DUM
       READ(10,100)DUM
       READ(10,100)DUM
       READ(10,100)DUM
       ENDIF
C
C
100    FORMAT(A80)
       MAX=0.000000001
       MIN=10000000. 
       N=0
12     N=N+1   
       IF(INTEM.EQ.1)READ(10,*,END=111)NUM,TOF(N),COUNT(N),ERR(N)
       IF(INTEM.EQ.0)READ(10,*,END=111)TOF(N),COUNT(N),ERR(N),NN1,NN2
       IF(COUNT(N).GT.MAX)MAX=COUNT(N)
       IF(COUNT(N).LT.MIN)MIN=COUNT(N)
       GO TO 12
111    PRINT*,N-1,' time channels read from file ',FIL
       N=N-3
c      PRINT Some Numbers 
       PRINT*,'TOF range is from ',TOF(1),' to ',TOF(N),' micro secs' 
       PRINT*,'Counts range from ',MAX,' to ',MIN
       PRINT*,'No of Channels is ',N
C 
C     WRITE OUTPUT FILE
C
       PRINT*,'Enter GSAS output file name:'
       READ(*,99)FIL
       OPEN(UNIT=20,FILE=FIL)
       PRINT*,'Enter title for Histrogram:'
       READ(*,'(A80)')TITLE
       WRITE(20,'(A80)')TITLE
c
c      GET DATA READY
c
C   convert data to integers
C   
       PRINT*,'****************************************************'
       PRINT*,'* In the GSAS format counts are saved              *'
       PRINT*,'* as COUNTS*TOF. This can cause overflow problems  *'
       PRINT*,'* in the output file and a multiplier to scale     *'
       PRINT*,'* the counts down is sometimes needed.             *'
       PRINT*,'* Try 1 for the multiplier first, and check        *'
       PRINT*,'* the output file for *s.                          *'
       PRINT*,'****************************************************'
       PRINT*,'Enter Multiplier for the data: '
       READ*,CONST
       PRINT*,'Multiplier is ',CONST
       IF(CONST.EQ.0)CONST=1.0
       DO 60 I=1,N
          IDATA(1,I)=NINT(TOF(I)*32)
          IDATA(2,I)=(NINT(COUNT(I)*TOF(I)*CONST))
          IDATA(3,I)=(NINT(ERR(I)*TOF(I)*CONST))
60     CONTINUE
       NREC=NINT(N/4.)
       WRITE(20,902)N,NREC
902    FORMAT('BANK 1',1X,I5,1X,I4,' RALF 64042 33 64339 .0005  ALT')
       WRITE(20,903)((IDATA(J,I),J=1,3),I=1,N)
       PRINT*,N,' Channels written to file ',FIL
903    FORMAT(4(I8,I7,I5))
       stop
       end
