Skip to content

nodalxcorr output #105

@stepholinger

Description

@stepholinger

At the moment, the nodalxcorr function outputs a matrix of correlation functions rather than a CorrData object. This means the result of nodalxcorr has no metadata and requires the user to do their own bookkeeping. Ideally, it might output a single NodalCorrData object, which would have a field NodalCorrData.corr containing the matrix of correlation functions for all channel pairs. The NodalCorrDat object would also contain metadata about which station pairs correspond to each correlation function in the matrix.

In case anyone wants to use nodalxcorr and is confused about bookkeeping, the indices of channel pairs for the matrix of correlation functions can be found using the lines below:

Using Combinatorics

# choose which channels to include in the correlation computation
channel_indices = [1,2,3,4]

# get the channel pairs corresponding to each line of the correlation matrix
channel_pair_indices = [j for j in combinations(channel_indices,2)]

6-element Vector{Vector{Int64}}:
 [1, 2]
 [1, 3]
 [1, 4]
 [2, 3]
 [2, 4]
 [3, 4]

The result is a vector in which each element contains the indices of the two channels used to compute the correlation function in the corresponding row of the matrix returned by nodalxcorr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions