This Page

Generators of correlations (also mean and stack) and of dictionaries of doublets.

Module doubletGeneratorCorr

doublet.doubletGeneratorCorr

Provide classes of generators in order to get the couple of correlations (mean and stack) for computing the dictionaries of doublets and also for generate the dictionaries of doublets computed. This define a hierarchy of classes:

Inheritance diagram of GeneratorDateCoupleStationsAndPathDictOfDoublet, GeneratorDateCoupleStationsAndPathDictOfDoubletNotExist, GeneratorDateCoupleStationsAndOnePathDictOfDoublet, GeneratorDateCorrelationsStackMeanAndPathSaveDictOfDoublet, GeneratorPathDictOfDoublet, GeneratorPathAndDictOfDoublet

Provide classes of generators in order to get the couple of correlations for computing mean correlations and correlations stacked. This define a hierarchy of classes:

Inheritance diagram of GeneratorCoupleStations, GeneratorListDateStackCoupleStationsAndPathSaveStack, GeneratorListDateStackCoupleStationsAndOnePathSaveStack, GeneratorListCorrCoupleStationsAndOnePathSaveStack, GeneratorDateCoupleStationsAndPathSaveMean, GeneratorDateCoupleStationsAndOnePathSaveMean, GeneratorCorrCoupleStationsAndOnePathSaveMean

class doublet.doubletGeneratorCorr.GeneratorCoupleStations(**kwargs)

A generator

Generate:

  • the first station
  • the second station
Parameters :

A dictionary with the key:

param: obj

Should have an attribute ‘ListOfStations’.

Attributes :
ListOfStations: str

Defined in the module doublet.doubletGetParamIO

class doublet.doubletGeneratorCorr.GeneratorListDateStackCoupleStationsAndPathSaveStack(**kwargs)

A generator

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

Generate, for each couple of station:

  • the sublist of dates for each stack
  • the file path (path, file) to save the stack correlation if it do not exist.
Parameters :

A dictionary with the key:

param: obj

Should have an attribute ‘ListOfSublistOfDatesForStack’. Should have an attribute ‘ListOfStackDates’.

writer: obj

Should have an method ‘getDirAndFileCorrelation’.

class doublet.doubletGeneratorCorr.GeneratorListDateStackCoupleStationsAndOnePathSaveStack(**kwargs)

A generator

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

Filter the value of the generator GeneratorListDateStackCoupleStationsAndPathSaveStack. Yield the same value as the generator GeneratorListDateStackCoupleStationsAndPathSaveStack 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 doublet.doubletUtil.LastNewValueGeneratorOfListIndex in the module doubletUtil use for filtering.

class doublet.doubletGeneratorCorr.GeneratorListCorrCoupleStationsAndOnePathSaveStack(**kwargs)

A generator

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

Generate, for each couple of station:

  • the list of correlations for each stack
  • the file path (path, file) to save the stack correlation if it do not exist.
Parameters :

A dictionary with the key:

loader: obj

Should have an method ‘getDirAndFileCorrelation’. Should have an method ‘loadOneCorrelation’.

class doublet.doubletGeneratorCorr.GeneratorDateCoupleStationsAndPathSaveMean(**kwargs)

A generator

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

Generate:

  • the first station.
  • the second station.
  • the date.
  • the file path (path, file) to save the mean correlation if it do not exist.
Parameters :

A dictionary with the key:

param: obj

Should have an attribute ‘ListOfDates’.

writer: obj

Should have an method ‘getDirAndFileCorrelation’.

class doublet.doubletGeneratorCorr.GeneratorDateCoupleStationsAndOnePathSaveMean(**kwargs)

A generator

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

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

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

class doublet.doubletGeneratorCorr.GeneratorCorrCoupleStationsAndOnePathSaveMean(**kwargs)

A generator

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

Generate, for each couple of station and each date:

  • the correlation
  • the file path (path, file) to save the mean correlation if it do not exist.

Note

Every correlations of a couple of stations following each other (for all the date)

Parameters :

A dictionary with the key:

loader: obj

Should have an method ‘getDirAndFileCorrelation’. Should have an method ‘loadOneCorrelation’.

class doublet.doubletGeneratorCorr.GeneratorDateCoupleStationsAndPathDictOfDoublet(**kwargs)

A generator

Generate, for each date:

  • the date
  • the first station
  • the second station
  • the file path (path, file) to save the dictionary of doublet if it do not exist.
Parameters :

A dictionary with the key:

param: obj

Should have an attribute ‘ListOfStackDates’. Should have an attribute ‘ListOfStations’.

dictDoublet: obj

Should have a method ‘getDirAndFileDictOfDoublet’

Attributes :
ListOfStackDates: str

Defined in the module doublet.doubletGetParamIO

class doublet.doubletGeneratorCorr.GeneratorDateCoupleStationsAndPathDictOfDoubletNotExist(**kwargs)

A generator

Generate exactly the same as the base class excepted if the file path to save the dictionary do not exist, generate nothing.

Base class:GeneratorDateCoupleStationsAndPathDictOfDoublet Inherits all attributes of the base class.
class doublet.doubletGeneratorCorr.GeneratorDateCoupleStationsAndOnePathDictOfDoublet(**kwargs)

A generator

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

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

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

class doublet.doubletGeneratorCorr.GeneratorDateCorrelationsStackMeanAndPathSaveDictOfDoublet(**kwargs)

A generator

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

Generate, for each date:

  • the date.
  • the correlation stacked.
  • the correlation mean.
  • the file path (path, file) to save the dictionary of doublet if it do not exist.
Parameters :

A dictionary with the key:

param: obj

Should have an attribute ‘FormatCorrelation’. Should have an attribute ‘PathDirCorrMean’. Should have an attribute ‘PathDirCorrStack’. Should have an attribute ‘SeparatorStackDir’. Should have an attribute ‘SeparatorStackCoupleStations’. Should have an attribute ‘SeparatorMeanDir’. Should have an attribute ‘SeparatorMeanCoupleStations’.

class doublet.doubletGeneratorCorr.GeneratorPathDictOfDoublet(**kwargs)

A generator

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

Filter the value of the generator GeneratorDateCoupleStationsAndPathDictOfDoublet. Yield only the path file of the dictionary of doublet (the same value as the generator GeneratorDateCoupleStationsAndPathDictOfDoublet) excepted yield nothing if the file path will be identical at the next generation.

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

class doublet.doubletGeneratorCorr.GeneratorPathAndDictOfDoublet(**kwargs)

A generator

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

Yield only the path file of the dictionary of doublet and the dictionary of doublets itself.


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