Example 3: Log-scale PSD on MDC1 data


Let's run our third exercise by means of the LTPDA Workbench. If it is not already open, start the workbench issuing the following command on the MATLAB terminal, or clicking on the "LTPDA Workbench" button on the launch bay.

    LTPDAworkbench

As we did before, let's go ahead and create a new pipeline, or analysis diagram.

Again, use the command "Pipeline -> Rename Pipeline" to give this diagram a more significant name, such for instance "LTPDA Training Session PSD3".

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 adding a ao constructor method/block, that we can retrieve from the library or with the "quick block" shortcut.

We give the block a sensible name by double-clicking on it, and then we proceed with setting the parameters as follows:

  1. Let's first choose, from the "Parameters" drop-down list, the "From ASCII File" set, and hit "Set" to assign this choice to the currently selected ao constructor block.
  2. We can now tune the key parameters of the ao constructor: in particular, let's double click on the first parameter line, within the "Value" colum, so we can choose the filename from the file browser that will appear. Similarly, let's go ahead and insert the vaues for the others parameters.

To add parameters, we click on the "+" button, subsequently define the "Key" entry, which is the parameter name, and the "Value" entry, which contains the parameter value.

Key Value Description

FILENAME

'topic3/mockdata_16_48_17_11_2007_1.dat'

The name of the file to read the data from.

TYPE

'tsdata'

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

COLUMNS

[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.

XUNITS

's'

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

YUNITS

''

We leave this empty for now.

COMMENT_CHAR

'%'

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

FS

[]

Indicates to load time series from the first data column.

ROBUST

'no'

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

DESCRIPTION

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

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

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 add a block

ao/setYunits
The relevant parameters to set, (after choosing, from the "Parameters" drop-down list, the "Default" set, and hitting "Set" to assign this choice to the currently selected block), are:

Key Value Description

YUNITS

'm'

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 search within the library for the lpsd method on the ao class. To do that, just click on the "Library" button on the top left of the screen, and type the word in the "search" box. Once we found the lpsd method, let's add it to the diagram, and then connect its input to the output of the ao constructor block. Some details and hints on connecting blocks can be found here.

The next step is choosing the parameters. After selecting the "Default" set and clicking "Set", we can proceed and modify the parameters. Four 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

WIN

'BH92'

Or a different one, if you want.

OLAP

-1

Overlap will be chosen based on the window properties

ORDER

2

Segment-wise detrending up to order 2

SCALE

'ASD'

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

JDES

2000

Compromising execution time and resolution

KDES

10

Slightly less than the default value

LMIN

0

The default value

In order to learn features of the GUI, let's introduce a "MATBlock" by right-clicking on some empty part of the canvas and selecting "Add block ...->MATBlock". This provides the possibility to have defined numerical values to be passed to different blocks so we can change the value and be sure it's applied to all sensible blocks. As an example, we can type the value for the frequency bins: 2000.To do that, either we double click on the block or, with the block selected, we enter the values in the Property Table located in the upper-right corner of the workbench:

Adding a MATBlock for the JDES quantity

That's not all though. We need to connect the MATBlock to the ao/lpsd block, so we go ahead and right-click on the ao/lpsd block, select "Add input". Now we can actually connect the MATBlock to the ao/lpsd block; after that, let's move to the Parameter Set table, double-click on the "Edit" entry corresponding to the "JDES" key, and select the now available "PORT_1" on the drop-down list, or type "PORT_1" in the box. As an alternative to the last step, we can also type "PORT_1" in the "Value" entry.

Connecting a MATBlock for the JDES quantity

Plot the results

As we did in previous topics, let's add one ao/iplot block to the output of the ao/lpsd block; additionally, let's also have another ao/iplot block for displaying the IFO time series.

We make a little additional exercise: let's add one block of the type

plist

As usual, to add parameters, just hit he "+" sign, so we can define some "key" and "value" properties:

Key Value Description

COLORS

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

Setting x1 to blue and x12 to red

Now we can input this plists to the iplot blocks, by adding an input to them, then going into the Parameter Set area, hitting the "+" botton, and selecting "PORT_1" for both the "key" and "value" entries.

Ready for execution then ... and that's how the workbench should look like:

Workbench for PSD3 exercise ready for execution

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



©LTP Team