In crystallography, the basis and lattice are treated separately. For a perfect crystal the lattice gives the reciprocal lattice, which determines the positions (angles) of diffracted beams, and the basis gives the structure factor  which determines the amplitude and phase of the diffracted beams:
where the sum is over all atoms in the unit cell,  are the positional coordinates of the -th atom, and  is the scattering factor of the -th atom. The coordinates  have the directions and dimensions of the lattice vectors . That is, (0,0,0) is at the lattice point, the origin of position in the unit cell; (1,0,0) is at the next lattice point along  and (1/2, 1/2, 1/2) is at the body center of the unit cell.   defines a reciprocal lattice point at  which corresponds to the real-space plane defined by the Miller indices   (see Bragg's law).
 is the vector sum of waves from all atoms within the unit cell.  An atom at any lattice point has the reference phase angle zero for all  since then  is always an integer.  A wave scattered from an atom at (1/2, 0, 0) will be in phase if  is even, out of phase if  is odd.
Again an alternative view using convolution can be helpful.  Since [crystal structure] = [lattice]  [basis], [crystal structure] = [lattice] [basis]; that is, scattering  [reciprocal lattice]  [structure factor].