Table Of Contents

Previous topic

Package correlations

Next topic

Module correlationsParam

This Page

Main functionality: provide a function for computing correlations.

Module correlationsMain

Provide a function makeCorrFromDirectoryTraces() in order to make all the correlations of the traces (see Overview of the Package correlations).

In order to run this function, it is necessary to set the parameters in the module correlations.correlationsParam and to define in line parameters.

Running the module:

Requirement

The architecture of traces to load must be:

  • Either exactly the architecture of files induced by the output of the module traces.tracesMain defined in the package traces, i.e.:

    LoadDirectory -> Component -> Year -> Day -> Station.

    (The LoadDirectory for correlations is the SaveDirectory for the traces.)

  • Or either an architecture where Year -> Day directories are replace by a date in a list of dates (an attribute ‘ListOfDates’) defined in the module correlations.correlationsParam, i.e.:

    LoadDirectory -> Component -> date -> Station.

For whisper users, suppose we have the directory correlations (the package). For computing all the correlations simply type:

$ cd correlations
$ python2.7 correlationsMain.py oneList LoadDirectory SaveDirectory ComponentFirstStation ComponentSecondStation 1 0 1 0

Decentralized options:

  • (One List of stations): If you want to divide the list of dates of 5 equal sublists and the list of stations of 11 sublists. Moreover if you want to compute the correlations for the third sublist (index 2) of dates and the fifth sublist (index 4) of stations, type:

    $ cd correlations
    $ python2.7 correlationsMain.py oneList LoadDirectory SaveDirectory ComponentFirstStation ComponentSecondStation 5 2 11 4
  • (Two Lists of stations): If you want to divide the list of dates of 5 equal sublists and the list of stations of 11 sublists. Moreover if you want to compute the correlations for the third sublist (index 2) of dates and between the first sublist (index 0) of stations and the tenth sublist (index 9) of stations, type:

    $ cd correlations
    $ python2.7 correlationsMain.py twoLists LoadDirectory SaveDirectory  ComponentFirstStation ComponentSecondStation 5 2 11 0 9

Python necessary libraries:

  • python2.7
  • scipy
  • numpy

More precisely we use at the present time:

>>> import numpy
>>> numpy.__version__
'1.5.0'
>>> import scipy
>>> scipy.__version__
'0.9.0.dev6939'
correlations.correlationsMain.makeCorrFromDirectoryTraces()


Whisper project: FP7 ERC Advanced grant 227507 (WHISPER).
Codes are develop for the Whisper project (Seismic ambient noise).
If you use this code, specify it is provide by: Whisper project FP7 ERC Advanced grant 227507 (WHISPER).
Author: Xavier Briand. For questions, send email to xav.briand.whisper@gmail.com with subject begin exactly with [whisper].