How does one actually compute a correlation function?

In summary, the power spectrum is a function of distance that can be calculated by taking the average variance of the two-point correlation function. However, this function is not easily calculable and requires guidance from a more experienced user.
  • #1
BOAS
552
19
I have been reading about weak gravitational lensing and I am trying to calculate the dispersion ##\langle M_{ap}^2\rangle## of the aperture mass for a singular isothermal sphere acting as a lens for distant objects.

I need some guidance on how to actually carry out the calculation of the power spectrum. It is defined as the Fourier transform of the two point correlation function, but how does one actually compute that function? All the information I have found just defines each quantity in terms of the other, which is not very helpful to me. I feel like I'm going around in circles.

To provide some context:

In The book "Gravitational Lensing: Strong, Weak and Micro", Peter Schneider includes a discussion on the 2-point correlation function for a homogeneous and isotropic random field ##g(\vec x)##. The main points being that (in 2d):

##\langle g(\vec x) g^*(\vec y) \rangle = C_{gg}(|\vec x - \vec y|)## is the two point correlation function.

By going to Fourier space we can show that ##\langle g(\vec k) g^*(\vec k') \rangle = (2\pi)^2 \delta(\vec k - \vec k') \int \mathrm{d^2}y \quad e^{i \vec y . \vec k} C_{gg}(|\vec y|)##

The power spectrum is then defined by the Fourier transform of the two point correlation function.

##P_g(|\vec k|) = \int \mathrm{d^2}y e^{i \vec y . \vec k} C_{gg}(|\vec y|)##

The aperture mass is defined as being ##M_{ap} (\vec \theta) = \int d^2 \theta' \kappa(\vec \theta')U(|\vec \theta - \vec \theta'|)##, where ##\kappa## is the convergence and ##U## a suitable filter function.

By following a similar approach as for the random field, expressing the two point correlation function of the convergence in Fourier space, I have been able to arrive at the desired expression for ##\langle M_{ap}^2\rangle##.

##\langle M_{ap}^2\rangle = \frac{1}{(2\pi)^2}\int d^2 \vec l \mathrm{P_{\kappa}}(\vec l) |U(\vec l)|^2 ##

But I am no closer to actually being able to compute what the power spectrum is.

Thank you if you're still reading!
 
Space news on Phys.org
  • #2
BOAS said:
I have been reading about weak gravitational lensing and I am trying to calculate the dispersion ##\langle M_{ap}^2\rangle## of the aperture mass for a singular isothermal sphere acting as a lens for distant objects.

I need some guidance on how to actually carry out the calculation of the power spectrum. It is defined as the Fourier transform of the two point correlation function, but how does one actually compute that function? All the information I have found just defines each quantity in terms of the other, which is not very helpful to me. I feel like I'm going around in circles.

To provide some context:

In The book "Gravitational Lensing: Strong, Weak and Micro", Peter Schneider includes a discussion on the 2-point correlation function for a homogeneous and isotropic random field ##g(\vec x)##. The main points being that (in 2d):

##\langle g(\vec x) g^*(\vec y) \rangle = C_{gg}(|\vec x - \vec y|)## is the two point correlation function.

By going to Fourier space we can show that ##\langle g(\vec k) g^*(\vec k') \rangle = (2\pi)^2 \delta(\vec k - \vec k') \int \mathrm{d^2}y \quad e^{i \vec y . \vec k} C_{gg}(|\vec y|)##

The power spectrum is then defined by the Fourier transform of the two point correlation function.

##P_g(|\vec k|) = \int \mathrm{d^2}y e^{i \vec y . \vec k} C_{gg}(|\vec y|)##

The aperture mass is defined as being ##M_{ap} (\vec \theta) = \int d^2 \theta' \kappa(\vec \theta')U(|\vec \theta - \vec \theta'|)##, where ##\kappa## is the convergence and ##U## a suitable filter function.

By following a similar approach as for the random field, expressing the two point correlation function of the convergence in Fourier space, I have been able to arrive at the desired expression for ##\langle M_{ap}^2\rangle##.

##\langle M_{ap}^2\rangle = \frac{1}{(2\pi)^2}\int d^2 \vec l \mathrm{P_{\kappa}}(\vec l) |U(\vec l)|^2 ##

But I am no closer to actually being able to compute what the power spectrum is.

Thank you if you're still reading!
The two-point correlation function of a field is the difference in the value of the field between any two locations on the field.

The power spectrum is the average variance of this correlation as a function of distance: P(x) is the variance of the difference in field values averaged over all pairs of points separated by that distance.

The discussion about the Fourier transform describes an optimized method of calculating this variance as a function of distance: in Fourier space, the power spectrum is simply an average over the squares of the magnitudes of the Fourier components of a given wavelength.

The final piece is the window function: because the above operations are performed on a discrete two-dimensional field, you need to average the components in a range of wavelengths. In a graphical representation, the Fourier components would exist on a plane, and the averages would be rings through the plane. For the power spectrum to be representative, there shouldn't be any gaps in the rings. That requires averaging over the square magnitudes of the Fourier components in a narrow range of wavelengths for each component.
 
Last edited:
  • #3
BOAS said:
I need some guidance on how to actually carry out the calculation of the power spectrum. It is defined as the Fourier transform of the two point correlation function, but how does one actually compute that function? All the information I have found just defines each quantity in terms of the other, which is not very helpful to me. I feel like I'm going around in circles.
You are apparently starting with a misunderstanding, which may be why you are going in circles. The power spectrum (PS) can be defined in various ways, and so can the correlation function (CF). But regardless of the definition, they are Fourier transforms of each other.

The questions for you are (a) what are your data and (b) what do you want to compute? Your title asks about the CF, yet your last question in the OP asks about the PS. Focus on your data: What kinds of measurements do you have? Locations of discrete point-like objects? photon densities as a function of position on the sky? something else? That will suggest the best way to compute either the CF or the PS; the other can then be computed from Fourier, if you want to.
 
  • #4
JMz said:
You are apparently starting with a misunderstanding, which may be why you are going in circles. The power spectrum (PS) can be defined in various ways, and so can the correlation function (CF). But regardless of the definition, they are Fourier transforms of each other.

The questions for you are (a) what are your data and (b) what do you want to compute? Your title asks about the CF, yet your last question in the OP asks about the PS. Focus on your data: What kinds of measurements do you have? Locations of discrete point-like objects? photon densities as a function of position on the sky? something else? That will suggest the best way to compute either the CF or the PS; the other can then be computed from Fourier, if you want to.

Thank you for your reply.

I have some data that is essentially a point sampled shear field. Ideally I would like to compute the power spectrum since that is the quantity I need to calculate the variance of the aperture mass. But since they are FT pairs, I suppose I would like to calculate whichever is easiest and then Fourier transform as necessary.
 
  • #5
BOAS said:
Thank you for your reply.

I have some data that is essentially a point sampled shear field. Ideally I would like to compute the power spectrum since that is the quantity I need to calculate the variance of the aperture mass. But since they are FT pairs, I suppose I would like to calculate whichever is easiest and then Fourier transform as necessary.
Sorry, a clarification question, as I may have missed something: Are you trying to infer something from measurements or is this a theoretical analysis? I had thought the former, but your wording suggests the latter. Are you trying to analyze the effect of a mass density distribution (assumed for this analysis, not measured)?
 
  • #6
JMz said:
Sorry, a clarification question, as I may have missed something: Are you trying to infer something from measurements or is this a theoretical analysis? I had thought the former, but your wording suggests the latter. Are you trying to analyze the effect of a mass density distribution (assumed for this analysis, not measured)?

Sorry, I'm confusing things:

First and foremost, I am trying to analyse the case where I have assumed a mass density distribution. I am lead to believe that this can be done analytically for the SIS profile. No data related to this step.

In addition to this, I have some simulated data that I would like to analyse through the use of some practical estimator for the aperture mass variance.
 
  • #7
BOAS said:
Sorry, I'm confusing things:

First and foremost, I am trying to analyse the case where I have assumed a mass density distribution. I am lead to believe that this can be done analytically for the SIS profile. No data related to this step.

In addition to this, I have some simulated data that I would like to analyse through the use of some practical estimator for the aperture mass variance.
OK, that makes sense. Let's start with the analytical one: You have a certain density function D, which you know well. You can compute its autocorrelation ACF[D] analytically I think (but I don't know or recall the functional form here). If not, you can certainly approximate it numerically and compute numerically. If the latter, ACF[D] = F-1[|Q|2], where F[.] is the 3-dimensional Fourier transform and Q = F[D]. Note that |Q|2 is, in fact, the PS of D.

Does this make sense so far, or have I missed something about your problem?
 
  • #8
JMz said:
OK, that makes sense. Let's start with the analytical one: You have a certain density function D, which you know well. You can compute its autocorrelation ACF[D] analytically I think (but I don't know or recall the functional form here). If not, you can certainly approximate it numerically and compute numerically. If the latter, ACF[D] = F-1[|Q|2], where F[.] is the 3-dimensional Fourier transform and Q = F[D]. Note that |Q|2 is, in fact, the PS of D.

Does this make sense so far, or have I missed something about your problem?

I believe that makes sense. So I don't actually need to compute the auto correlation function in order to find the PS of D?

i.e I want to compute the FT of D, and then take it's mod-squared.

Once I have done that, it is then relatively straightforward to compute it's ACF. Do you have any resource recommendations on this subject? It's evidently an important concept I need to understand.
 
  • #9
BOAS said:
I want to compute the FT of D, and then take it's mod-squared.
Exactly. BTW, what is the functional form of D?

I suggest starting with WP or any text on general signal processing -- though both may focus on one-dim. distributions, especially time series. But one of the useful aspects of the ACF is that it doesn't depend on the direction of "time", which is what makes it equally suitable for multidimensional distributions. You should be able to find 2-dim. discussions in image processing. I don't recall any resources for 3-dim., though.
 
  • #10
JMz said:
Exactly. BTW, what is the functional form of D?

I suggest starting with WP or any text on general signal processing -- though both may focus on one-dim. distributions, especially time series. But one of the useful aspects of the ACF is that it doesn't depend on the direction of "time", which is what makes it equally suitable for multidimensional distributions. You should be able to find 2-dim. discussions in image processing. I don't recall any resources for 3-dim., though.

My density distribution is that of a singular isothermal sphere, so ##\rho(r) = \frac{\sigma^2}{2\pi G r^2}##.

I have calculated the surface mass density (which is what I will be using), ##\kappa(\theta) = \frac{\theta_E}{2 \theta}##, where ##\theta_E## is the Einstein radius for an SIS.

Thank you very much for your help!
 
  • #11
OK. FYI, the singularity will give you spectral components at arbitrarily high frequencies, which could cause you some problems.
 
1.

What is a correlation function?

A correlation function is a mathematical tool used to measure the degree of relationship between two or more variables. It is commonly used in statistics and data analysis to determine if there is a linear relationship between variables or to identify patterns in data.

How do you calculate a correlation function?

To calculate a correlation function, you first need to determine the mean and standard deviation of each variable. Then, you can use a formula such as Pearson's correlation coefficient or Spearman's rank correlation coefficient to measure the strength and direction of the relationship between the variables.

What is the purpose of computing a correlation function?

The purpose of computing a correlation function is to identify and quantify the relationship between variables. This can help in understanding patterns in data, making predictions, and identifying potential cause-and-effect relationships.

What are the limitations of correlation functions?

Correlation functions can only measure linear relationships between variables and cannot determine causation. They can also be affected by outliers and the range of values in the data. Additionally, correlation does not imply causation, so other factors must also be considered when interpreting the results.

How can correlation functions be used in scientific research?

Correlation functions can be used in a variety of scientific research fields, such as psychology, economics, and social sciences. They can help researchers identify relationships between variables and make predictions about future outcomes. They can also be used to analyze experimental data and determine the effectiveness of interventions or treatments.

Similar threads

  • Atomic and Condensed Matter
Replies
1
Views
681
  • Atomic and Condensed Matter
Replies
5
Views
2K
Replies
4
Views
286
  • Advanced Physics Homework Help
Replies
1
Views
250
  • Introductory Physics Homework Help
Replies
1
Views
780
  • Calculus and Beyond Homework Help
Replies
3
Views
474
Replies
2
Views
785
  • Advanced Physics Homework Help
2
Replies
59
Views
7K
  • Quantum Physics
Replies
1
Views
516
Replies
1
Views
712
Back
Top