anchor.diff:    logical,                  private, save :: dist_distLibNorm = .true.  ! DISTlib is used to convert normalised coordinates
     character(len=mFileName), private, save :: dist_distFile    = " "     ! File name for reading the distribution
     character(len=mFileName), private, save :: dist_echoFile    = " "     ! File name for echoing the distribution
  -  real(kind=fPrec),         public,  save :: dist_beamEmit(2) = zero    ! Beam emittance for generator and normalisation
  -  real(kind=fPrec),         public,  save :: dist_beamLen     = zero    ! RMS bunch length
  -  real(kind=fPrec),         public,  save :: dist_beamSpread  = zero    ! Bunch energy spread
  -  real(kind=fPrec),         public,  save :: dist_tMat(6,6)   = zero    ! Cpy of the T matrix, properly scaled
   
     integer,          allocatable, private, save :: dist_colFormat(:)   ! The column types in the FORMAT
     real(kind=fPrec), allocatable, private, save :: dist_colScale(:)    ! Scaling factor for the columns
  
positive.code:   integer,                          private, save :: dist_nFill = 0
  
    !  Fill Methods
    integer, parameter :: dist_fillNONE       = 0  ! No fill
    integer, parameter :: dist_fillINT        = 1  ! Fixed integer value
    integer, parameter :: dist_fillFLOAT      = 2  ! Fixed float value
  
negative.code:     dist_beamEmit(1) = dist_beamEmit(1) * c1m6
      dist_beamEmit(2) = dist_beamEmit(2) * c1m6
  
    case("LONGEMIT")
      if(nSplit /= 3) then
        write(lerr,"(a,i0)") "DIST> ERROR LONGEMIT takes 2 arguments, got ",nSplit-1
        write(lerr,"(a)")    "DIST>       LONGEMIT emit3 unit[eVs|um]"
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), dist_beamEmit(3), cErr)
      select case(chr_toLower(lnSplit(3)))
      case("um","µm")
        dist_emit3Unit = 1
      case("evs")
        dist_emit3Unit = 2
      case default
        write(lerr,"(a)") "DIST> ERROR Unknown or unsupported unit '"//trim(lnSplit(3))//"' for LONGEMIT"
        iErr = .true.
        return
      end select
  
    case("TWISS")
      if(nSplit /= 5) then
        write(lerr,"(a,i0)") "DIST> ERROR TWISS takes 4 arguments, got ",nSplit-1
        write(lerr,"(a)")    "DIST>       TWISS betaX[m] alphaX[1] betaY[m] alphaY[1]"
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), dist_twBeta(1),  cErr)
      call chr_cast(lnSplit(3), dist_twAlpha(1), cErr)
      call chr_cast(lnSplit(4), dist_twBeta(2),  cErr)
      call chr_cast(lnSplit(5), dist_twAlpha(2), cErr)
      dist_normMethod = dist_normTWISS
  
    case("DISPERSION")
      if(nSplit /= 5) then
        write(lerr,"(a,i0)") "DIST> ERROR DISPERSION takes 4 arguments, got ",nSplit-1
        write(lerr,"(a)")    "DIST>       DISPERSION dx dpx dy dpy"
        iErr = .true.
        return
      end if
      call chr_cast(lnSplit(2), dist_bDisp(1), cErr)
      call chr_cast(lnSplit(3), dist_bDisp(2), cErr)
      call chr_cast(lnSplit(4), dist_bDisp(3), cErr)
      call chr_cast(lnSplit(5), dist_bDisp(4), cErr)
  
    case("FILL")
      if(nSplit < 3) then
  