Previous topic

Module correlationsParam

Next topic

Module correlationsGeneratorPath

This Page

Get the parameters.

Module correlationsGetParam

correlations.correlationsGetParam

Provide a class Param in order to get the parameters defined in the module correlations.correlationsParam and from the line argument. Provide also a derived class ParamWithLastDateCompute which inherits of all the attributes and provides attributes and methods to know the correlations already compute (the last date already done).

Inheritance diagram of Param, ParamWithLastDateCompute

class correlations.correlationsGetParam.Param
Line arguments:(with the order)
  • If TypeListStations is the string ‘oneList’:

<TypeOfList>

<RootPathLoad>

<RootPathSave>

<FirstComponent>

<SecondComponent>

<NumberSubListOfDates>

<IndexSublistDates>

<NumberSubListOfStations>

<IndexSublistStations>

  • If TypeListStations is the string ‘twoLists’:

<TypeOfList>

<RootPathLoad>

<RootPathSave>

<FirstComponent>

<SecondComponent>

<NumberSubListOfDates>

<IndexSublistDates>

<NumberSubListOfStations>

<FirstIndexSublistStations>

<SecondIndexSublistStations>

Attributes :
TypeListStations: str

Two possibles values: ‘oneList’ or ‘twoLists’. Two kind of instance, parameters for compute correlation for one list or for two disjoints sublists.

NumberSubListOfDates: int

The number of sublist to do from the list ‘ListOfDates’ defined in module correlationsParam

IndexSublistDates: int

The index of a sublist of dates form the list of sublist.

ListOfDates: list of str

The sublist of dates induce by parameters NumberSubListOfDates and IndexSublistDates.

LenListOfDates: int

The length of the list of dates

NumberSubListOfStations: int

The number of sublist to do from the list ‘ListOfStations’ defined in the module correlationsParam

IndexSublistStations: int

It is defined only if TypeListStations is ‘oneList’. The index of a sublist of stations form the list of sublist.

ListOfStations: list

It is defined only if TypeListStations is ‘oneList’. The sublist of stations induce by parameters NumberSubListOfStations and IndexSublistStations.

FirstIndexSublistStations: int

It is defined only if TypeListStations is ‘twoLists’. The index of a first sublist of stations form the list of sublist.

FirstListOfStations: list

It is defined only if TypeListStations is ‘twoLists’. The sublist of stations induce by parameters NumberSubListOfStations and FirstIndexSublistStations.

SecondIndexSublistStations: int

It is defined only if TypeListStations is ‘twoLists’. The index of a second sublist of stations form the list of sublist.

SecondListOfStations: list

It is defined only if TypeListStations is ‘twoLists’. The sublist of stations induce by parameters NumberSubListOfStations and SecondIndexSublistStations.

FormatTrace:

The format to load trace defined in the module correlationsParam

FormatSave:

The format to save the correlation defined in the module correlationsParam

LoadDirectory: string

The directory to read the traces.

SaveDirectory: string

The directory to save the correlations.

class correlations.correlationsGetParam.ParamWithLastDateCompute

Provides method getIndexLastDateCompute() and writeLastDateCompute() in order to get and save the last date for the correlations made for exactly the same parameters.

Base class:

Param Inherits all attibutes of the base class.

Attributes :
DirLastDateCompute: str

The directory where, if it exists, is the last date compute.

FileLastDateCompute: str

The file name where, if it exists, is the last date compute.

IndexLastDateCompute: str

The index, if it exists, of the last date compute. It is None otherwise.

getIndexLastDateCompute()

Give the index of the list of dates for the last date computed (for exactly the same parameters). Return None otherwise.

writeLastDateCompute(date)

Save the index of the list of dates for the last date computed (for exactly the same parameters) (with cPikle file). If an exception is raised, do nothing.


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