Previous topic

Module correlationsGetParam

Next topic

Module correlationsTestParam

This Page

Generators of couples traces and save path files.

Module correlationsGeneratorPath

correlations.correlationsGeneratorPath

Provide classes of generators in order to get the couple of traces for computing correlation. This define a hierarchy of classes, induced by the cases of one list or two lists of stations:

Inheritance diagram of InitGeneratorCoupleTraces, GeneratorDateCoupleNotSaveOneListStation, GeneratorDateArrayFirstStationAndNameSecondStationOneListStation, GeneratorPathSaveDateCoupleArraysOneList, GeneratorDateCoupleNotSaveTwoListsStation, GeneratorDateArrayFirstStationAndNameSecondStationTwosListsStations, GeneratorPathSaveDateCoupleArraysTwoLists

class correlations.correlationsGeneratorPath.InitGeneratorCoupleTraces(**kwargs)

Get the attribute ListOfDates from the key ‘param’ of the dictionary kwargs.

Attribute :
ListOfDates: list

Defined in the module correlations.correlationsGetParam

class correlations.correlationsGeneratorPath.GeneratorDateCoupleNotSaveOneListStation(**kwargs)

A generator

Generate, for each date, for each couple of stations:

  • the directory to save the correlation.
  • the file name to save the correlation.
  • the date.
  • a first station of the list of stations.
  • a second station of the list of stations.
Base class:

InitGeneratorCoupleTraces Inherits all attibutes of the base class.

Attributes :
ListOfStations: list

Defined in the module correlations.correlationsGetParam.

LenListOfStations: int

The length of the list of stations ListOfStations.

Parameters :
  • An attribute ‘ListOfStations’ of a key ‘param’ of the dictionary kwargs.
  • A method ‘getDirAndFileSaveCorrelation’ of a key ‘writer’ of the dictionary kwargs in order to get the path file to save the correlation.
class correlations.correlationsGeneratorPath.GeneratorDateArrayFirstStationAndNameSecondStationOneListStation(**kwargs)

A generator

Generate, for each date, for each couple of stations:

  • the directory to save the correlation.
  • the file name to save the correlation.
  • the date.
  • an array correspond to the trace of the first station of the list of stations.
  • a second station of the list of stations.
Base class:

GeneratorDateCoupleNotSaveOneListStation Inherits all attibutes of the base class.

Attributes :
ComponentFirstStation: str

Defined in the module correlations.correlationsGetParam.

Parameters :
  • An attribute ‘ComponentFirstStation’ of a key ‘param’ of the dictionary kwargs.
  • A method ‘getDirAndFileLoadTrace’ of a key ‘loader’ of the dictionary kwargs in order to get the path file to load the first trace.
  • A method ‘loadOneTrace’ of a key ‘loader’ of the dictionary kwargs in order to load the first trace.
class correlations.correlationsGeneratorPath.GeneratorPathSaveDateCoupleArraysOneList(**kwargs)

A generator

Generate, for each date, for each couple of stations:

  • the directory to save the correlation.
  • the file name to save the correlation.
  • the date.
  • an array correspond to the trace of the first station of the list of stations.
  • an array correspond to the trace of the second station of the list of stations.
Base class:

GeneratorDateArrayFirstStationAndNameSecondStationOneListStation Inherits all attibutes of the base class.

Attributes :
ComponentSecondStation: str

Defined in the module correlations.correlationsGetParam.

Parameters :
  • An attribute ‘ComponentSecondStation’ of a key ‘param’ of the dictionary kwargs.
class correlations.correlationsGeneratorPath.GeneratorPathSaveOneDateCoupleArraysOneList(**kwargs)

A generator

Base class:GeneratorPathSaveDateCoupleArraysOneList Inherits all attributes of the base class.

Filter the value of the generator GeneratorPathSaveDateCoupleArraysOneList. Yield the same value as the generator GeneratorPathSaveDateCoupleArraysOneList excepted yield None instead of the file path (path, file) to save the stack correlation if the file path will be identical at the next generation.

See also the class correlations.correlationsUtil.LastNewValueGeneratorOfListIndex in the module doubletUtil use for filtering.

class correlations.correlationsGeneratorPath.GeneratorDateCoupleNotSaveTwoListsStation(**kwargs)

A generator

Generate, for each date, for each couple of stations:

  • the directory to save the correlation.
  • the file name to save the correlation.
  • the date.
  • a first station of the first list of stations.
  • a second station of the second list of stations.
Base class:

InitGeneratorCoupleTraces Inherits all attibutes of the base class.

Attributes :
FirstListOfStations: list

Defined in the module correlations.correlationsGetParam.

SecondListOfStations: list

Defined in the module correlations.correlationsGetParam.

Parameters :
  • An attribute ‘FirstListOfStations’ of a key ‘param’ of the dictionary kwargs.
  • An attribute ‘SecondListOfStations’ of a key ‘param’ of the dictionary kwargs.
  • A method ‘getDirAndFileSaveCorrelation’ of a key ‘writer’ of the dictionary kwargs in order to get the path file to save the correlation.
class correlations.correlationsGeneratorPath.GeneratorDateArrayFirstStationAndNameSecondStationTwosListsStations(**kwargs)

A generator

Generate, for each date, for each couple of stations:

  • the directory to save the correlation.
  • the file name to save the correlation.
  • the date.
  • an array correspond to the trace of the first station of the first list of stations.
  • a second station of the second list of stations.
Base class:

GeneratorDateCoupleNotSaveTwoListsStation Inherits all attibutes of the base class.

Attributes :
ComponentFirstStation: str

Defined in the module correlations.correlationsGetParam.

Parameters :
  • An attribute ‘ComponentFirstStation’ of a key ‘param’ of the dictionary kwargs.
  • A method ‘getDirAndFileLoadTrace’ of a key ‘loader’ of the dictionary kwargs in order to get the path file to load the first trace.
  • A method ‘loadOneTrace’ of a key ‘loader’ of the dictionary kwargs in order to load the first trace.
class correlations.correlationsGeneratorPath.GeneratorPathSaveDateCoupleArraysTwoLists(**kwargs)

A generator

Generate, for each date, for each couple of stations:

  • the directory to save the correlation.
  • the file name to save the correlation.
  • the date.
  • an array correspond to the trace of the first station of the first list of stations.
  • an array correspond to the trace of the second station of the second list of stations.
Base class:

GeneratorDateArrayFirstStationAndNameSecondStationTwosListsStations Inherits all attibutes of the base class.

Attributes :
ComponentSecondStation: str

Defined in the module correlations.correlationsGetParam.

Parameters :
  • An attribute ‘ComponentSecondStation’ of a key ‘param’ of the dictionary kwargs.
class correlations.correlationsGeneratorPath.GeneratorPathSaveOneDateCoupleArraysTwoLists(**kwargs)

A generator

Base class:GeneratorPathSaveDateCoupleArraysTwoLists Inherits all attributes of the base class.

Filter the value of the generator GeneratorPathSaveDateCoupleArraysTwoLists. Yield the same value as the generator GeneratorPathSaveDateCoupleArraysTwoLists excepted yield None instead of the file path (path, file) to save the stack correlation if the file path will be identical at the next generation.

See also the class correlations.correlationsUtil.LastNewValueGeneratorOfListIndex in the module doubletUtil use for filtering.


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