FAST icon indicating copy to clipboard operation
FAST copied to clipboard

Generating Fingerprint

Open sf-wilbur opened this issue 3 years ago • 3 comments

Hi, I'm trying to replicate what you all have done to generate fingerprints but I'm running into an issue. I have generated a .json file for several .sac files containing the data to be used for generating the fingerprints. I edited a global_indices file to contain these fp_input_.json files as well a the config.json file. When running the code the same way you all do in the tutorial, "python run_fp.py -c config.json" I'm given an error saying there is no such directory. The specific error is as follows, "IOError: [Errno 2] No such file or directory: u'../data/waveforms02/Deci5.Pick.20200413000000.01.02.DPZ.sac'" Do we need to direct it to the waveform file and not the .sac file?

Thanks for the help,

Spencer

sf-wilbur avatar Nov 19 '20 22:11 sf-wilbur

Hi Spencer,

Thanks for reaching out. This sounds like a config error, maybe due to relative path. Are your sac files under FAST/data/waveforms02/? The wrapper script (run_fp) basically cds in to the fingerprint folder, and run python gen_fp.py [fp_input_.json] from there. You can try the gen_fp script first, and if it gives the same error, you can start debugging from there.

Kexin

kexinrong avatar Nov 20 '20 06:11 kexinrong

Thanks for getting back to me. Right now the sac files are under FAST/data/waveforms02/. We are currently only looking at a day's worth of data so we have eight different waveform folders and within each waveform there are three sac files, one for each channel. Are you suggesting moving the fp_input_.json files to the fingerprint folder or the subdirectory fingerprint folder under parameters?

Best,

Spencer

On Nov 19, 2020, at 11:47 PM, Kexin Rong [email protected] wrote:

Hi Spencer,

Thanks for reaching out. This sounds like a config error, maybe due to relative path. Are your sac files under FAST/data/waveforms02/? The wrapper script (run_fp) basically cds in to the fingerprint folder, and run python gen_fp.py [fp_input_.json] from there. You can try the gen_fp script first, and if it gives the same error, you can start debugging from there.

Kexin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stanford-futuredata/FAST/issues/23#issuecomment-730926804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSRCUQCF6HDJQLYQ3QOFFLSQYGHXANCNFSM4T4AGAUQ.

sf-wilbur avatar Nov 20 '20 20:11 sf-wilbur

It's a bit hard for me to debug with only the provided information, but here is what I was suggesting: ~/FAST$ cd fingerprint/ ~/FAST/fingerprint$ python gen_fp.py ../parameters/fingerprint/fp_input_*.json Of course, you should replace the path with the actual path of your fp_input_*.json file. If the above fails, it means that there are probably problems with your fp_input files.

I also suggest that you change the relative path ../data/waveforms02/ to an absolute path in the fp_input files. The location of fp_input files should not matter.

kexinrong avatar Nov 21 '20 05:11 kexinrong