X-ray FELs, such as the LCLS and TESLA FEL, require electron beams with large peak current and very small emittance. The X-ray peak power, temporal and spectral properties, depend significantly on details of the electron beam phase space distribution. The electron beam distribution is determined by many effects, as the emission process at the gun photo-cathode, bunch compression, acceleration a...