C---------------------------------------------------------------------- subroutine ftpr8b(ounit,nvals,incre,r8vals,status) C Write an array of Real*8 bytes to the output FITS file. C Does any required translation from internal machine format to FITS. integer nvals,incre,ounit,status,offset double precision r8vals(nvals) C ounit i fortran unit number C nvals i number of pixels in the r4vals array C incre i byte increment between values C r8vals d array of input real*8 values C status i output error status integer compid common/ftcpid/compid integer i,ierr,cray2ieg if (compid .eq. 0 .or. compid .eq. -1)then C big endian machine (e.g., SUN) doesn't need byte swapping else if (compid .eq. 1)then C little endian machine (e.g. DEC or PC) must be byte swapped call ftswi8(r8vals,nvals) else if (compid .eq. 2)then C convert from VAX format to IEEE call ieevpd(r8vals,r8vals,nvals) else if (compid .eq. 3)then C convert from Alpha VMS format to IEEE do 5 i=1,nvals r8vals(i)=r8vals(i)*0.25 5 continue call ftswby(r8vals,nvals*4) else C must be a CRAY ierr= cray2ieg(3,nvals,r8vals,0,r8vals,1,' ') end if if (incre .le. 8)then call ftpbyt(ounit,nvals*8,r8vals,status) else C offset is the number of bytes to move between each value offset=incre-8 call ftpbyo(ounit,8,nvals,offset,r8vals,status) end if end