The time series produced will have the power spectrum given in the columns of Fxmag.

mkcorrts(fldgen, phase = NULL, method = 1, complexout = FALSE)

Arguments

fldgen

A fldgen object.

phase

An optional matrix of phases. See notes in the Details section.

method

Integer specifying method 1 or method 2 for generating the phases. Ignored if phase is set.

complexout

The inverse FFT produces complex-valued results; however, the imaginary parts should all be zero. By default we return Re(rslt), but setting this flag causes the result to be left in complex form. This is mostly useful for testing.

Details

The phase argument allows a user to provide fixed phases to be used in the field construction. This usually is not desirable because an arbitrary set of phases will not generally produce properly uncorrelated outputs. However, it may occasionally be useful to reproduce the input ESM data, or some other data set for which the phases are known. To make this sort of exercise easier, the function will accept a matrix containing phases for all frequencies, including the negative ones, despite the fact that only the phases for positive frequencies are needed.

Methods

Method I assignes uniform random values in [0,2pi) to all phases. This method is simple and fast, but it produces a slight bias in the covariance of the projection coefficients for the EOFs. (The covariance of the projection coefficients for two distinct EOFs should be zero.) Although this produces biases in the grid cell statistics, in many cases they are small enough to be ignorable.

Method II is more conservative in its phase randomization. It uses the Fourier transform of one of the input data sets as a prototype and for each frequency component it generates a random phase shift and adds it to that frequency component for all of the EOFs. This guarantees that the covariance will be zero, but at the cost of making the space of possible realizations much lower dimension, roughly 1/2 N instead of 1/2 M*N (where M is the number of EOFs and N is the number of basis functions).

ToDo

It should be possible to supply a partial matrix of phases, with some values specified and the rest set to NA. This would allow us, for example, to specify phases for the global mean component (EOF-0) while the other components are randomized.