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

Load and process multiple traces #92

Open
mcardenass opened this issue Aug 13, 2021 · 3 comments
Open

Load and process multiple traces #92

mcardenass opened this issue Aug 13, 2021 · 3 comments

Comments

@mcardenass
Copy link

Dear Tim

I loaded 72 traces in sac format in S. The next step is to build a structure using R = RawData (S,cc_len, cc_step). I only see one trace in this step with the number of windows given by cc_len and cc_step. The question is whether the RawData function can operate on all channels found in S to convert all SeisData to RawData. Also, suppose we use the correlate function. In that case, ¿it is necessary to perform the individual correlation between pairs of stations (through a loop), or can you achieve the correlation between all pairs of stations and store it? Finally, ¿is possible to export Crosscorrelation results in SAC format?

Thanks in advance

Martín
Screenshot

@tclements
Copy link
Collaborator

Hello Martín!

Great to see you're using SeisNoise.jl. RawData(S) will only convert the first channel. RawData structures are intended to be used for a single station component each. To convert the other channels in S to RawData you could do something like this:

Rarray = Array{RawData}(undef,S.n) # preallocate array of RawData
for ii in 1:S.n
    Rarray[ii] = RawData(S[ii],cc_len,cc_step)
end

You might also want to check out SeisIO.Nodal, which might be a better fit for the type of data you have https://seisio.readthedocs.io/en/latest/src/Submodules/nodal.html. I've started adding functionality for correlating Nodal/array data but it's still a work in progress: https://github.com/tclements/SeisNoise.jl/blob/466a9bf900753c430ed789ac6a76b687b0e89be4/src/nodalcorrelation.jl.

For saving data in SAC format, @xtyangpsp has a package called SeisConvert.jl for converting CorrData to SAC and other formats. Xiaotao and I will have to discuss if we should move SeisConvert.jl into a SeisNoise.jl or keep it as a standalone package.

@mcardenass
Copy link
Author

mcardenass commented Aug 13, 2021 via email

@xtyangpsp
Copy link

Thanks for looping me in, Tim. Let's talk about incorporating some converting functions in SesiConvert.jl to SeisNoise.

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

3 participants