Example 3: Log-scale PSD on MDC1 data

The idea of the third exercise is the following:

  1. load a time-series of IFO noise data simulated for the first LTPDA Mock Data Challenge (MDC1)
  2. set data units
  3. evaluate the Log-Scale Power Spectrum of the 2 IFO channels data
  4. set the plot properties
  5. plot the results
In a flow diagram, the representation is as follows:

Dataflow for the 3rd example of ao/psd

Load a time-series of IFO noise data simulated for the first LTPDA Mock Data Challenge (MDC1)

The step of building aos by loading data from files was touched upon in previous steps and in the user manual. Here we go ahead by calling the ao constructor method, that we want to specify by means of a plist, with parameters:

Key Value Description



The name of the file to read the data from.



Interpret the data in the file as time-series data.


[1 2 1 3]

Load the data x-y pairs from columns 1 (as x) and 2 (as y), in the first ao, and from columns 1 (as x) and 3 (as y), in the second ao.



Set the units of the x-data to seconds (s).



We leave this empty for now.



Indicateds which header lines to skip in the ASCII data file.



Indicates to load time series from the first data column.



We don't need robust data reading for these simulated data.


{'IFO x1', 'IFO x12'}

Specify the names of the objects.


'MDC1 set #1, 17/11/2007'

Set some text to the 'description' field of the AO.

x = ao(pl_load);
The output will be a vector of aos, containing:

We can then run all the analyses, and be sure to be applying the same parameters, by passing the vector of aos to the various methods.

Set data units

We forgot to set the units ... luckily both displacements are expressed in meters, so let's call the method

The relevant parameters to set are:

Key Value Description



The unit object to set as y-units

Evaluate the Log-Scale Power Spectrum of the 2 IFO channels data

Now let's go ahead and use the lpsd method on the ao class. It needs to be specified by setting its parameters. Many of these parameters are the same as we already discussed for ao/psd:

In this case, we will use the following parameters:

Key Value Description



Or a different one, if you want.



Overlap will be chosen based on the window properties



Segment-wise detrending up to order 2



Evaluate the Amplitude Spectral Density so that [output units] will be [input units] / sqrt(Hz)

We also need to set other 2 parameters that are typical of this method, discussed in the devoted user manual section.

We will act on the first one, so to decide how many ASD bins to estimate, leaving to the algorithm the choice of their location and the length of the windows on each bin.

Key Value Description



Compromising execution time and resolution



Slightly less than the default value



The default value

Plot the results

As we did in previous topics, let's add one ao/iplot step after the call to the ao/lpsd method. We make a little additional exercise: let's specify the color via a plist with parameters:

Key Value Description


{[0 0 1],[1 0 0]}

Setting x1 to blue and x12 to red

The execution may take some while ... and here are the results:

LPSD of IFO channels

©LTP Team