Lag profile inversion method for EISCAT data analysis

The present standard EISCAT incoherent scatter experiments are based on alternating codes that are decoded in power domain by simple summation and subtraction operations. The signal is first digitised and then different lagged products are calculated and decoded in real time. Only the decoded lagged products are saved for further analysis so that both the original data samples and the undecoded lagged products are lost. A fit of plasma parameters can be later performed using the recorded lagged products. In this paper we describe a different analysis method, which makes use of statistical inversion in removing range ambiguities from the lag profiles. An analysis program carrying out both the lag profile inversion and the fit of the plasma parameters has been constructed. Because recording the received signal itself instead of the lagged products allows very flexible data analysis, the program is constructed to use raw data, i.e. IQsampled signal recorded from an IF stage of the radar. The program is now capable of analysing standard alternatingcoded EISCAT experiments as well as experiments with any other kind of radar modulation if raw data is available. The program calculates the ambiguous lag profiles and is capable of inverting them as such but, for analysis in real time, time integration is needed before inversion. We demonstrate the method using alternating code experiments in the EISCAT UHF radar and specific hardware connected to the second IF stage of the receiver. This method produces a data stream of complex samples, which are stored for later processing. The raw data is analysed with lag profile inversion and the results are compared to those given by the standard method.


Introduction
In an incoherent scatter radar (ISR) experiment, a radiowave is transmitted to the ionosphere where a small fraction of the original signal is scattered to the receiver antenna.Lagged products of the received signal and its complex conjugate are calculated to produce samples of the signal autocorrelation function (ACF).Then different plasma parameters (e.g.electron density and electron and ion temperatures) are determined from the ACF observations by means of a fitting routine.
The standard EISCAT hardware does not save the received signal itself, but calculates the lagged products in real time and saves them on hard disk after some postintegration.This process puts limits to all resolutions in further analysis, including range resolution, time resolution and lag resolution.Also, it loses the original signal so that it can no more be used in any other way and its properties cannot be investigated.While the lag profile inversion method discussed in this paper can be based on the lagged products, proper handling of some other things such as ground clutter, space debris/satellite echoes and other phenomena with long correlation times are very difficult to analyse from lag profile data.This either requires an impractically large number of lag profiles to be stored (so that the storage requirements far exceed those for storage of the IQ-sampled signal itself) or the phenomena are actually only sub-optimally resolved from the correlated (lag profile) data.
Saving the IQ-sampled signal itself would give more freedom in later data analysis.This method has been used in several special experiments including plasma line studies (Djuth et al., 1990(Djuth et al., , 1994)), interferometric measurements (Grydeland et al., 2005a(Grydeland et al., ,b, 2004, and references therein), observations of meteor-head echoes (Chau and Woodman, 2004;Sulzer, 2004) and for lag profile analysis (Lehtinen et al., 2002;Damtie et al., 2002).The MIDAS-W system in Millstone Hill is also capable in recording the raw data (Holt Published by Copernicus Publications on behalf of the European Geosciences Union.572 I. I. Virtanen et al.: Lag profile inversion et al., 2000;Grydeland et al., 2005c).Saving the digitised signal may even allow the data to be used for new purposes, such as accurate meteor-head measurements (Sulzer, 2004), but still standard ion line measurements often save only the lagged products.
The standard tool for analysing the EISCAT data is the GUISDAP package (Lehtinen and Huuskonen, 1996).The analysis is based on the concept of range-gates in the following way: The user can choose a series of range-gates which are consecutive range intervals defining the range resolution of the analysis.It is then assumed that the plasma properties inside each range-gate correspond to a single set of plasma parameters.The range-and lag-coverages of individual lagged products are expressed in terms of the corresponding ambiguity functions.The concept of ambiguity functions is introduced e.g. by Lehtinen and Huuskonen (1996).All lagged products whose range ambiguity function mainly fit inside a range-gate (is zero-valued outside the gate) are then chosen as the data for the parameter fit of the gate.Because of the assumption of a single set of plasma parameters belonging to the range-gate, the forward model in the parameter fit (ACF as a function of known plasma parameters) can be simply based on lag ambiguity functions.Thus, a set of estimated plasma parameters is produced for each range-gate.
Full profile analysis, which is described in Lehtinen et al. (1996), differs from standard analysis in the sense that no assumptions of piecewise constant plasma parameters are done.Instead, it is assumed that the plasma parameters are modelled as a spline expansion with user-defined nodes specifying the (possibly differing) range resolutions of the plasma parameters.All measured correlation estimates (lagged products) are then fitted to theoretically calculated values using two-dimensional (range and lag) ambiguity functions.This kind of model is much less approximative than the range-gate assumption in standard analysis.Full profile analysis also allows different kinds of resolution assumptions for different parameters.The analysis is computationally much more expensive than standard GUISDAP analysis and some hand-tuned shortcuts had to be used (Lehtinen et al., 1996) to make it possible to get results with the computers available at that time.This is the main reason why it could not be developed into a general-purpose analysis tool.
The analysis described in this paper is performed actually in two steps: The first step is a linear inversion of ambiguous lagged products to a sequence of lag profiles with a userchosen lag and range resolution.The second step is a nonlinear inversion of the plasma parameters.This approach has the following advantages: 1.The first step in the inversion is linear, which makes the analysis much faster than the full profile analysis.
2. The two-stepped approach separates the technically complicated questions related to radar coding from those related to plasma physics models.Different kinds of plasma spectrum models can easily be applied in the second step with no need to repeat the first step.Thus the scientist doing the analysis does not need to fully understand all the details of radar coding theory, and can concentrate on the physical aspects of plasma spectra.
The purpose of the present paper is to demonstrate the lag profile inversion and the whole sequence of IS data analysis from raw data up to the final parameter fit.All data analysis routines described in this paper are collected in an analysis package written in Fortran 95.Most of the methods have been presented in earlier publications (Lehtinen et al., 2002;Damtie et al., 2002Damtie et al., , 2004) ) but never collected together into this kind of package.The package is still under development, but it is already capable of performing the whole procedure including the parameter fit.Inversion methods have also been used to improve zero lag accuracy of multipulse experiments (Lehtinen and Huuskonen, 1986).Another inversion based analysis method is also being developed using data from Arecibo (Nikoukar et al., 2008 1 ), where linear inversion methods are also used for measuring vector velocities (Hagfors and Behnke, 1974;Sulzer et al., 2005).
We apply lag profile inversion to data obtained from standard alternating code experiments.In principle, lag profile inversion works with any phase coded transmissions.This allows one to search for new kinds of radar codes without any special decoding method applied to them, which is the main reason to build the new analysis package.A decoding filter based method for deconvolving lag profiles from practically any phase code has been discussed already by Sulzer (1989).In fact code sequences with similar estimation accuracy with alternating codes but with smaller number of different codes have been found, these new codes remain to be published in a separate paper.

Lag profile analysis
In standard analysis of alternating codes, a set of lag profiles with different lag values (i.e.range profiles of certain lagged products) are first calculated for each transmission of the code cycle, and decoding is then made by means of additions and subtractions which are specific to the applied code.Before decoding, the calculated lag values are convolutions of the true lag profile and a range ambiguity function.The task of decoding is to produce lag profiles with a range resolution determined by the length of the bit in the code.
The main target of this work is to use lag profile inversion for calculating lag profiles with a selected range resolution.Since comparisons with standard EISCAT analysis will be made, the same resolution will be chosen as that given by standard decoding.More general presentations of inverse theory and methods for solving different inverse problems can be found from several books, e.g.Tarantola (1998Tarantola ( , 2005)); Menke (1989); Kaipio and Somersalo (2005).
When raw data is analysed, the theoretical limits of lag and range resolutions depend on the sampling frequency.Any lag value τ that is a multiple of the sampling interval can be calculated, i.e. the possible lags are where N=0, 1, 2, . . .and f s is the sampling frequency.Correspondingly, the possible widths of range-gates are where K=1, 2, 3, . . .and c is the speed of light.
Both range and time integration can be performed to improve the accuracy of the ACF estimates.In the lower E region the basic range resolution of the experiment (the bit length when using alternating codes) may be useful, but above E region some range integration can be performed to stabilise the solution and to reduce the computing time.The software puts no limits to the integration time, if the fact that at least a single transmission is needed is not counted as a limitation.The true lower limit of the integration time arises from the statistical nature of the measurement: the number of measured samples must be large enough to produce a good estimate of the true lag value.

Recording
Data from two different experiments are analysed in this paper.Both of them are based on 64-bit alternating codes, and they were run on 2 October 2005 and on 25 November 2006.The data were collected using extra receiving devices synchronised with the radar clock and connected to the second IF stage of the EISCAT UHF receiver.The exact frequency of the IF signal depends on the applied frequency channel, but its value is about 10 MHz.The receiving hardware was different in the two cases but, effectively, it carried out downconversion to the baseband as well as complex sampling.Both real and imaginary parts were written to hard disk for later analysis.The data contains not only the scattering signal but also the true attenuated transmitted wave form.
A description of the recording system used on 2 October 2005 is given by Markkanen et al. (2005).The bit length of the alternating code was 6 µs.The effective sampling frequency on the base band was 500 kHz, which corresponds to a sampling interval of 2 µs and a range resolution of 300 m.The basic height resolution of conventional decoding is 900 m.The oversampling of the signal allows the calculation of fractional lags, which can reduce the variance of the results by a factor close to 1.5 (Huuskonen et al., 1996).
On 25 November 2006 the data were sampled using National Instruments PXI-5142 OSP high speed digitizer.The bit length of the alternating code was 3 µs, which leads to a 450-m range resolution in conventional analysis.The effective sampling frequency on the base band was 1 MHz.

Clutter suppression
Incoherent scatter experiments may be contaminated by ground clutter, i.e. coherent echoes from ground or sea.This is not serious, if the radar site is surrounded by close-by mountains like at Tromsø, where the EISCAT UHF and VHF radars are located.On Svalbard, however, the ESR radar suffers from clutter originating at long ranges and disturbing the lowest parts of the lag profiles.
The clutter signal can be filtered out because it has a very long correlation time compared to that of the ionospheric scattering signal.One way to remove clutter is to subtract two sample profiles before calculating the lagged products in real time.Then, in effect, one half of the measurements are lost, which reduces the accuracy of the results.For the standard method of clutter removal in the ESR radar, see Turunen et al. (2000).
Storing the raw data instead of ACF estimates gives a possibility of a better clutter removal (Lehtinen et al., 2002).An average of recorded echoes over several similar transmissions is first calculated.Due to the long correlation time of clutter, the clutter signal remains unaffected in the average, but the mean value of the scattering signal approaches zero.When the average signal profile is subtracted from one of the signals used in the average, the coherent clutter echoes are removed, and a clean signal is obtained for later processing.Depending on the number of signals that can be included in the average, the clutter suppression affects to the signal statistics by varying amount.Because lag profile inversion calculates variances for the inverted lag profiles, the possible deterioration in signal statistics will be readily seen as larger variance in the inverted lag profile.
The clutter removal is demonstrated in Fig. 1.Here 512 signal profiles from the experiment run on 2 October 2005 are used.Since the 64-bit alternating code sequence contains 128 different transmission envelopes, every 128th transmission is taken into the average.Figure 1 shows lower parts of four signal profiles, the clutter profile obtained as an average of 4 profiles, and the first signal profile after clutter correction.This small number is dictated by the length of the alternating code sequence and the correlation length of the clutter signal.As a matter of fact, the number of signal profiles taken into the average should be great enough to make the mean value of the incoherent scatter signal approach zero.As seen in Fig. 1, this does not happen with four profiles.However, with the new coding method that allows shorter code sequences to be used, this can be easily achieved.
Due to the location of the EISCAT UHF radar, the clutter comes from quite low altitudes, and therefore clutter removal would not be necessary, whereas clutter removal is an essential part in the analysis of the ESR radar data.As a matter of fact, the analysis package contains options with or without clutter removal.

Channel separation
Since our reception systems take samples of the signal from the second IF stage, the recorded data stream contains all frequency channels that were used in the experiment.The channels must be separated in the analysis, and data from each channel must be included in lag profile inversion.The channel separation is performed by complex mixing and filtering.A signal at frequency ω j is mixed to zero frequency by multiplying it with exp (−iω j t), where t is time.Signals at other frequencies are filtered out using a simple low-pass boxcar filter.At this point it is also possible to reduce the number of data samples by means of decimation to make the analysis faster.

Ambiguous lag profiles and ambiguity functions
After channel separation the data is ready for actual lag profile analysis.In channel separation the transmission frequency is mixed to zero, which means that the transmission part of the data has the shape of the modulation envelope.This is demonstrated with real data from the 2 October 2005 experiment on line 1 in Fig. 2, where the transmission part of the signal is marked with red colour.
The first task in lag profile analysis is to calculate the lagged products z(t)z * (t−τ ) of the complex signal z(t), where τ is the lag increment, and the range ambiguity function (3) Here S is the time from the start of transmission to the instant of reception, p is the receiver impulse response and env is the transmission envelope (Lehtinen and Huuskonen, 1996).In the standard analysis, theoretical modulation envelopes are used in calculating the ambiguity functions.Since our data contains the true envelopes, we can also use the true ambiguity functions.
If the lagged product z(t)z * (t−τ ) is calculated for the whole data vector containing the measured transmission envelope, both the lagged product of the scattering signal and the range ambiguity function are created at the same time.The non-zero part of the product (p * env)(t)(p * env) * (t−τ ) will be produced at the part of the lag profile where the data vector contains the transmission envelope.In the echo part of data this product is known to be zero, because the transmitter is off and thus env(t)=0.This is demonstrated in Fig. 2.There line 1 contains an individual sampled signal profile z as a function of time t and line 2 the same profile shifted in time by an amount τ (only real parts are shown for convenience).The transmission starts at t=t 0 .Line 3 is the real part of the product z(t)z * (t−τ ) (this is affected also by the imaginary parts which are not shown).On line 3, the range ambiguity function for lag τ , i.e.W tτ (S), appears in the bottom part of the profile and is marked by red line (at other instances of time W tτ (S)=0).
The non-zero part of the range ambiguity function W t i τ (S) has a similar shape for all reception times t i .Obviously there is a shift towards larger ranges (larger values of S) as the time increases and the transmitted pulse proceeds further away from the radar.At time t i the range coordinate of a signal transmitted at time t 0 is t i −t 0 (see line 4 in Fig. 2).In other words, the positive direction of the range axis is to the left in the figure (opposite to the time axis) and the zero range is located at t i .In this way the range ambiguity function for any lagged product can be easily constructed.

Power calibration
For calibration purposes, a noise injection is added after every second transmission.The injection power is obtained by subtracting the average power (i.e. the zero lag z(t)z * (t)) of the pure background signal from the power of the signal with noise injection.All lag profiles were divided by the injection power in order to have them in the same power scale.
In the 2 October 2005 experiment, the attenuation of the transmitted pulse was not constant for some unknown reason, and this caused a problem in the analysis.It was solved by scaling the peak powers in each transmitted pulse to a same value.

Fig. 2. Producing the linear coefficients for lag profile inversion:
On line 1 is a short time sequence of the received signal containing one transmission (marked with red color).On line 2 is the complex conjugate of the signal shifted by the lag-increment τ .By multiplying 1 and 2 both the lag profile and range ambiguity function (the red part of the curve) are produced.The range ambiguity function is in a coordinate system with positive S-axis to left in the figure and the origin (S=0) at the point t=t i (t i is the instant of time when the ambiguous lagged product m i was measured).On line 5 is a blow-up of the non-zero part of the range ambiguity function.The limits of range-gates are marked with black vertical bars between lines 5 and 6.All points of the range ambiguity function that lie inside the same gate are summed together to produce the linear coefficients a i,k on line 6.

Lag profile inversion
The next step in the analysis is to produce unambiguous lag profiles from the measured lagged products by means of lag profile inversion.Due to the length of the transmitted pulses, the original lagged products have contribution from long range intervals.In the conventional analysis of alternating codes, a range resolution corresponding to the length of a single bit in the code is obtained by means of decoding which is made in power domain.Lag profile inversion can do the same without using the specific properties of the alternating codes.A key point in lag profile inversion is that unknowns, measurements and measurement errors are all treated as random variables.
Range integration is often used in order to improve statistical accuracy at altitudes where the plasma parameters can safely be modeled to be constant over larger range intervals than the basic range resolution of the experiment.In standard analysis, this is simply done by adding decoded lag values of subsequent ranges in the profile and, as a result, the rangegates will be longer than in the basic analysis.In the case of the lag profile inversion method, the range-gates can be chosen before the inversion as demonstrated by lines 5 and 6 in Fig. 2. Range integration both makes the lag profile inversion more stable and reduces the computing time.
The tick marks on line 5 of Fig. 2 indicate the boundaries of chosen range-gates.Because it is assumed that the ACF at lag τ is constant within each range-gate, a measured ambiguous lagged product m i has a certain contribution from true lag values x k in each gate k.This contribution is the unknown true lag value x k multiplied by the integral of range ambiguity function W t i ,τ (S) over the range-gate k.Thus the measured ambiguous lagged product is sum of all these contributions: where N is the total number of range-gates and ε i the error in the ith measurement.Because the transmitted pulse usually covers only small part of the range-gates at a time, many of the coefficients a i,j in Eq. ( 4) are zeros.The coefficients have to be re-calculated for each lagged product, because the range ambiguity function moves with respect to the limits of the chosen range-gates.When all measurements and errors are collected into column vectors, they can be presented in terms of a matrix equation where is the measurement vector, is the theory matrix, is the error vector and M is the number of measured ambiguous lagged products for lag τ .Here T means transpose so that m and ε are column vectors.Many experiments contain transmissions in several frequency channels.In lag profile inversion the channels do not need to be decoded one-by-one as in standard decoding of alternating codes, but all measurements can be collected into the same matrix equation.In this way only one ACF per integration period is produced.This property of the method is not demonstrated in the present paper, because both experiments contain only a single frequency channel.Though additional information is not needed to solve the inversion problem, the program contains an optional regularisation routine, i.e. a method for using information not originating from the measurement itself to stabilise the inversion result.The routine is implemented by expanding Eq. ( 5) in the following manner.
If we assume that the true lag values in range-gates j and j −1 are the same, we make an error ε r,j .This can be written as 0 = x j − x j +1 + ε r,j . (9) In addition, we can assume that the signal at the lowest gate is non-correlating noise so that the measured lag estimate only consists of a random error ε r0 .This leads to a condition for boundary regularisation, i.e.
Since Eqs. ( 9) and ( 10) are mathematically similar to Eq. ( 4), they can be considered as a fictitious measurements with a regularisation measurement vector and a regularisation error vector Thus Eqs. ( 4), ( 9) and ( 10) can be collected into a single matrix equation where and This regularisation method should be understood as an example of how any additional information can be easily included in the inversion.We are aware that this particular method can cause bias to the inverted lag profiles.Due to the risk of biasing and the fact that inversion works without regularisation, the routine is not normally used.Anyhow, in the same way a different regularisation method or any other additional information could be included in the inversion.The idea of lag profile inversion is to solve the most probable values and posteriori variances of the unknowns x j , when the measurements m i and their variances are known.This is formally a straightforward operation, provided the measurement errors are Gaussian.With this assumption, the posteriori distribution of the unknowns is also Gaussian and it can be determined.Finding a maximum of the posteriori distribution leads to the most probable unknown vector where is the error covariance matrix and is the Fisher information matrix.The posteriori variances of the unknowns are given by Since ε and ε r do not correlate, the covariance matrix can be presented in the form where m and r are the covariance matrices of ε and ε r , respectively.Equation ( 17) would give solution of the inverse problem (13), but the matrices are far too large to be handled in a straightforward manner.In practical data analysis the problem is solved with a special software package for large linear inverse problems, FLIPS (Fortran Linear Inverse Problem Solver).The whole theory matrix is not produced at once, but FLIPS allows one to produce only one row of the matrix, then add it to the inversion with the corresponding measurement, and finally remove the added row from computer memory.In this way very large linear inversion problems can be solved without running into problems with the computer memory size.
FLIPS uses Givens rotations to calculate the QR-decomposition (see e.g.Golub and Van Loan, 1989) of the matrix A f and hence reduces Eq. ( 13) to a simple form where R is a square N×N upper triangular matrix.This equation is easy to solve using back substitution.FLIPS constructs implicitly the orthogonal part of the QRdecomposition and the upper triangular part row-by-row.This makes it possible to feed matrix A f into FLIPS in small blocks (in this case one row at a time), which reduces the computer memory footprint.The measurement errors are also embedded in Eq. ( 22) in such a way that the posteriori covariance of the unknowns is given simply by A single received signal profile is not sufficient for obtaining reliable ACF estimates, but some time integration is needed.
For example the number of lagged products produced by a normal E-region experiment with integration time of 4 s could be of the order of 10 5 for a single lag and the corresponding theory matrix would have an equal number of rows.
Because the solving method used by FLIPS allows the theory matrix to be produced row-by-row, so that only single row of the matrix exists in the computer memory at a time, there is no limitation for the problem size.At the moment the program is capable of performing the analysis as described above, but it is too time consuming for real-time analysis.
The solution is to calculate averages of the range ambiguity functions and lag profiles before lag profile inversion.Standard deviations are also calculated for the averages to be used in the inversion.Furthermore, the error distibutions will also be approximately Gaussian, as indicated by the central limit theorem, and therefore the basic assumptions in the lag profile inversion method will be valid.Because results of dif-ferent phase codes cannot be averaged, the number of averaged measurements is proportional to the number of different codes in the experiment.

Parameter fit
Ionospheric plasma parameters can be solved from the decoded autocorrelation functions by fitting a theoretical plasma spectrum to a measured ACF.The spectrum and the ACF are a Fourier transform pair that makes it easy to convert spectra to ACFs and vice versa.
The actual fitting is performed by means of an iterative Levenberg-Marquardt algorithm that is used to find the most probable values of the ionospheric parameters and their standard deviations.The direct theory (the spectrum corresponding a certain set of parameters) is calculated using a Fortran 95 module based on the GUISDAP routines written in C and Matlab.

Comparison with GUISDAP results
In order to demonstrate the applicability of the lag profile inversion method, raw data was recorded from several hours of standard EISCAT experiments with alternating codes on 2 October 2005 and 25 November 2006 in parallel with the standard recording.This gives a possibility to compare both the autocorrelation functions and the fitted parameters of the two analysis methods.

Autocorrelation functions
Comparisons between the lag profile inversion method and the standard alternating code decoding were made by calculating different lag profiles with equal range and time resolutions.To make a fair comparison, fractional lags were not used in the lag profile inversion.The data was also filtered with a 3 µs boxcar filter and decimated so that the final sampling interval is 3 µs.In this way the data used in lag profile inversion should be very much similar to that used in the standard analysis, the main difference being that the standard filter has a more complicated impulse response than the boxcar shape.Figure 3 shows real parts of sample profiles at lags 12, 60, and 108 µs from the experiment run on 25 November 2006.The basic range resolution of the alternating code (i.e.450 m) is used, and the time resolution is 6 s.The decoding results are shown by a red line and the results given by lag profile inversion by a black line.The two methods obviously give similar profiles with variances of the same order of magnitude.One should notice here that the profiles are not expected to be identical, since the two methods are quite different.
Figure 4 shows a comparison of the 12-µs lag from the same experiment.The length of the time interval is about 28 min.The results indicate that the ACF values given by the two methods are nearly identical and the variances, which are seen as fuzzy structures in the colour plots, are also quite similar.

Fitted parameters
For comparison of the fitted parameters given by the two methods, full autocorrelation functions were calculated by means of lag profile inversion.The range-gates were taken to be the same as in standard GUISDAP analysis.A theoretical plasma spectrum was fitted to the ACFs in order to find the plasma parameters.The results can then be compared with those obtained from standard GUISDAP analysis.Due to the lack of power calibration, the ACFs of the lag profile inversion method were scaled to make the resulting electron density scale match the GUISDAP density scale.The other parameters are only very weakly connected to electron density, and they are expected to be correct even if the scaling of electron density would be slightly inaccurate.
Figure 5 shows results from the observation period in Fig. 4. The standard GUISDAP results are shown on the left and the lag profile inversion results on the right hand side.The plasma parameters, from top to bottom, are electron density, ion temperature, electron temperature and ion velocity.The time resolution is 1 min and the range resolution is variable so that a high resolution is used at low altitudes but higher up, were the measurements are more noisy, the resolution is lower.In general, the results given by the two methods are quite similar, although differences at certain points do occur.One should notice that both methods produce occasionally pixels which do not fit in the surrounding profile, but they are usually at different places.
A second example of comparison is shown in Fig. 6 in the same format as in Fig. 5.This is a 53-min period from 2 October 2005.Again here the same characteristics are visible in both results, although minor differences are seen.A decrease in electron density is visible around 21:35 UT.At this time the profiles of other parameters become very noisy and unreliable because the scattering signal is weak due to the low electron density.

Discussion
The comparisons of the two data-analysis methods shows that the lag profile inversion method is capable of producing results that agree well with the results of the present standard methods.There are differences, especially when the results are noisy, but this is to be expected, because the two analysis methods are completely different.
A major advantage of recording the raw data is the possibility to choose the time and range resolutions of the analysis after running the experiment.In this paper the same resolutions as in standard analysis were chosen only to allow the comparison between the two methods.When the transmission wave form is recorded along the data, the way of calculating the range ambiguity functions is extremely straightforward.The method virtually eliminates any possibility of errors due to wrongly interepreted experiment timing and other experiment details.We feel this is maybe the strongest argument for storage of the data as nonprocessed echoes instead of a rather complicated set of integrated lag profiles.In the GUISDAP package a major part of the software complexity was necessitated by the need to keep record of the set of lag profiles calculated.Special initialisation calculations were necessary to model the correlator memory structure for each experiment before it could be analysed, while the present method is completely free of such complications.The way of calculating the range ambiguity functions from recorded data also makes the method quite insensitive to possible phase errors and power variations in the transmitted pulses.
The range-gates should be chosen so that the assumption of constant plasma parameters within each gate is a good approximation.Instead of assuming the parameters to stay constant inside each gate, one could also use lag values in discrete points as unknowns and assume a linear trend between adjacent points.In future the program may be changed to use the latter choice.
The present results of the lag profile inversion were not absolutely calibrated but they were just roughly scaled to match with the electron densities of the GUISDAP results of the same experiment.A calibration method utilising ionosonde or plasma line data, such as that in the present GUISDAP analysis, could be implemented in the program.
Alternating codes are used in this paper because they allow comparison between the conventional analysis and the lag profile inversion.Other modulations which have practically  the same estimation accuracy as alternating codes, but consist of only few modulation envelopes have actually been found.The theory behind these new codes and introduction of new experiments utilising them will be published in subsequent papers.

Conclusions
We have shown that the lag profile analysis based on statistical inversion is capable of producing autocorrelation functions that match well with the results of decoding the alternating code data.Ionospheric plasma parameters have also been succesfully fit to the measured ACFs.
The new method allows one to choose the integration time and range-gates of the experiment afterwards when raw data are available.Recording the IQ-samples also gives a possibility to make detailed checks of the data quality before the analysis.For instance, the shape of the transmitted pulses and amplitude of clutter signal can easily be seen.On the other hand, the use of recorded transmission envelopes makes the method less sensitive to possible errors in transmitted pulse shapes.
Our general view is that the lag profile inversion method allows a more flexible analysis in comparison with the traditional methods.Especially, the lag profile inversion offers a possibility to use new types of phase codes with a similar efficiency as the alternating codes but with a short code sequence.

Fig. 3 .
Fig. 3. Real parts of sample lag profiles at 12, 60 and 108 µs from 25 November 2006.The decoding results are shown by red line and the inversion results by black line.The integration time is 6 s, the range resolution is 450 m and the ACF value is given in arbitrary units.

Fig. 4 .
Fig. 4. Real part of 12 µs lag from the same experiment as in Fig. 3 (25 November 2006).The ACF value is in arbitrary units, the time resloution is 6 s and the range resolution 450 m.

Fig. 5 .
Fig. 5. Fitted plasma parameters by means of the inversion method and standard decoding with GUISDAP.The time period is the same as in Fig. 4 (25 November 2006).

Fig. 6 .
Fig. 6.Fitted plasma parameters by means of the inversion method and standard decoding with GUISDAP.The time period is from 2 October 2005.
Method for clutter suppression: numbered signals are clutter contaminated echoes of the same phase code.Due to the use of 64bit alternating codes the same code is repeated after 128 transmissions.The clutter signal is produced by calculating a point-by-point average of the numbered signals.Because of the long correlation time of the clutter signal it is not averaged to zero as the true ionospheric echoes do.The corrected signal is a clutter corrected version of signal number 1.It is produced by subtracting the clutter signal from the clutter-contaminated one.To make the clutter correction for signal 2 an average of signals 2, 130, 258 and 386 is subtracted from signal 2 etc.