Relation between Pair Correlation Function and Static Structure Factor I am currently looking to calculate the static structure factor of a computer-generated sphere packing I have been referring this paper as well as numerous other online sources to try and understand how to accomplish this. 
It is my understanding that the pair correlation function $g$ of a homogeneous collection of point objects (such as the centers in a sphere packing) can be defined with the statement that $\rho g(\mathbf{r}-\mathbf{r}_{0})dV$ is the probability of finding an object in in arbitrarily small volume $dV$ at position $\mathbf{r}$ given there is an object at position $\mathbf{r}_{0}$, where $\rho$ is the global number density of the system. This implies that $g$ is a unitless quantity, and that $g(\mathbf{r})=1$ corresponds to a Poisson distribution.
I have read in several places that the structure factor $S(\mathbf{k})$ is related to the pair correlation function by the equation $$S(\mathbf{k})=1+\rho\bar{h}(\mathbf{k})$$ where $\bar{h}(\mathbf{k})$ is the Fourier transform of $h(\mathbf{r})=1-g(\mathbf{r})$, which I assume is also unitless.
I haven't been able to find a good explanation of the above relation. It seems to me that if $\rho$ signifies the global number density then  $S(\mathbf{k})$ would depend on the units used to measure to measure the size of the system. Is there some kind of unitless density or am I misinterpreting some other part of the equation?
My knowledge of this type of statistical mechanics is still somewhat rudimentary, so any explanation or background information would be appreciated. Thanks.
 A: The $g(\mathbf r_1, \mathbf r_2)$ is defined as
$$g(\mathbf{r}) = \frac{\rho^{(2)}(\mathbf{r}_1,\mathbf{r}_2)}{\rho^{(1)}(\mathbf{r}_1) \rho^{(1)}(\mathbf{r}_2)}$$
where
$$\rho^{(n)} (\mathbf r_1, \dots, \mathbf r_n) = \frac{N!}{(N-n)!} \frac 1 Z \int e^{-\beta V} d \mathbf r^{(N-n)}$$
If the system is homogeneous,
$$\rho^{(1)} (\mathbf r) = \rho \ \ \ \ \text{(bulk density)}$$
so that
$$g(\mathbf{r}) = \frac{\rho^{(2)}(\mathbf{r}_1,\mathbf{r}_2)}{\rho^2}$$
and if the system is also isotropic, 
$$g(\mathbf r_1, \mathbf r_2) = g(\mid \mathbf r_1-\mathbf r_2\mid) = g(r)$$
So we can interpret $g(r)$ as the probability to find a particle in a volume $d \mathbf r$ around a chosen particle, and $g(r) \rho d \mathbf r$ as the average number of particles in the volume $d \mathbf r$.
Now, it can be shown that
$$\rho g(\mathbf r) = \frac 1 N  \langle \sum_{i\neq j} \delta (\mathbf r + \mathbf r_i - \mathbf r_j)  \rangle $$
The structure factor is defined as
$$S(\mathbf k) = \frac 1 N \langle \sum_{i,j} e^{-i \mathbf k \cdot (\mathbf r_i - \mathbf r_j)} \rangle$$
so that you have
$$S(\mathbf k) = 1+\frac 1 N \langle \sum_{i\neq j} \int d \mathbf r e^{-i \mathbf k \cdot \mathbf r} \delta (\mathbf r + \mathbf r_i - \mathbf r_j) \rangle = 1+\rho \int d \mathbf r  e^{-i \mathbf k \cdot \mathbf r} g(r) = 1 + \rho \tilde g(\mathbf k)$$
where $\tilde {(.)}$ is the Fourier transform.
$h$ is defined as
$$h(r)=g(r)-1$$
So that
$$S(\mathbf k) = 1 + \rho \tilde h(\mathbf k) + (2 \pi)^3 \rho \delta(\mathbf k)$$
which for $\mathbf k \neq \mathbf 0$ becomes
$$S(\mathbf k) = 1 + \rho \tilde h(\mathbf k)$$
For a more complete exposition, I would suggest Theory of Simple Liquids by Hansen and McDonald.
The confusion arises from the fact that, while $h(r)$ is a dimensionless quantity, its Fourier transform $\tilde h(\mathbf k)$ is not: it has the dimension of a volume.
