Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodalxcorr output #105

Open
stepholinger opened this issue Feb 2, 2023 · 2 comments
Open

nodalxcorr output #105

stepholinger opened this issue Feb 2, 2023 · 2 comments

Comments

@stepholinger
Copy link
Contributor

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.

@stepholinger stepholinger changed the title Nodalxcorr output and bookkeeping nodalxcorr output and bookkeeping Feb 2, 2023
@stepholinger stepholinger changed the title nodalxcorr output and bookkeeping nodalxcorr output Feb 2, 2023
@tclements
Copy link
Collaborator

Awesome! I'm happy to take any input on what would be useful metadata, etc.. for a future NodalCorrData object.

@stepholinger
Copy link
Contributor Author

I think we would want the indices of the station pairs used for each correlation function, the distance between those stations (which is probably obtainable from the file's metadata, though this may differ for DAS vs an array of nodes), the parameters used in the cross correlation (at the moment, this is just maxlag for nodalxcorr), processing steps performed on the data before correlation (bandpass filtering and whitening, for instance), and processing steps performed on the correlation functions after correlation (additional filtering, etc). I'll update this as I think of more useful info to include!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants