Page 1 of 1

waveform script possible bug

Posted: Wed Sep 23, 2015 1:35 am
by agorbatov
Hi Marc

I am experimenting with waveform script and found interesting bug. In case if I use waveform toolkit the following command is printed in waveform console for cutting waveform:

cut("Signal", "Delta", 1h");
save("cut(Signal, Delta, 1h)");
cut("Signal", "Delta", 1h");
// Last line(s) ended with error(s), see log for details

Please note the first two lines are printed after use of cut option from the menu of waveform toolkit. The third command is copy-paste of first command from the console into waveform command window and acting Run button. The log output is:
SyntaxError: Parse error

Certainly 1h" should not be there but "1h". I assume it is printing bug of waveform tool. However after executing cut("Signal", "Delta", "1h"); in the waveform command window all trace just disappear resulting in empty trace. There are no error messages in the log window. The question is - what is the working option to cut first 1 hour of the waveform using cut option of the qs script?


Re: waveform script possible bug

Posted: Wed Oct 21, 2015 3:39 am
by agorbatov
There is another bug : -save options does not work as described, for example

$ geopsy -import-format MiniSeed 1.mseed -- -tool geopsyhv -slot 1 -- -save ./ -param hv.par -autowin
----WARNING--- Saving result files----
File /export/research/agorbato/STAVELY/Field_data/SCRIPT/hv-10m/S0100.hv already exists.
File /export/research/agorbato/STAVELY/Field_data/SCRIPT/hv-10m/S0100.log already exists.

Do you want to replace it(them)?
1. No <-- default
2. Yes

Re: waveform script possible bug

Posted: Wed Nov 04, 2015 9:58 am
by admin
Hi Alexei,

Thanks for your bug report. I've just fixed the problems related to your first message. It will be available for next releases (both testing and devel). The problem is fixed for all script functions that use time range (cut, taper,...).

Re: waveform script possible bug

Posted: Wed Nov 04, 2015 10:16 am
by admin
For your second message with HV plugin, I cannot reproduce the problem. I tested it with the "testing" branch (2.9.0). The output are not overwritten if you answer 'No', the default answer. If you want to force overwrite in all cases, write:

echo 'yes' | geopsy 1.mseed -tool geopsyhv -slot 1 -- -save ./ -param hv.par -autowin

Note that ' -import-format MiniSeed' is useless if automatic file format detection is on (the default preference). The first '--' before '-tool' is useless as well. It was a mistake in the help message (now fixed).

Re: waveform script possible bug

Posted: Thu Feb 04, 2016 11:12 pm
by agorbatov
Sorry I did not clarify the problem. The problem is that the save command does not take into account path argument ( -save ./) instead always using the same path filename. I need to save results into specific subdirectory and can not do it.

Re: waveform script possible bug

Posted: Wed Feb 10, 2016 12:59 am
by agorbatov
I installed the beta version of geopsy and it seems that some things are fixed... However:
waveform tool window still outputs command with error using cut("Signal", "Delta", 1h"); instead of cut("Signal", "Delta", "1h");

I run the script and must admit that cut does cut the waveform if you dont use save command after the merge. However the start time is the start time of the last file and not the start time of the results of merge. If you use save command after the merge the cut command doesnt cut.

The main problem is that in all cases (using GUI or script) the export to miniseed doesnt work. The resulting files are just some kind of saw noise.

I use following script to test:

cut("Signal", "Delta", "1h");
save("cut(Signal, Delta, 1h)");

I attach the images :
1-GUI-mseed.jpg - snapshot of results using GUI
2-mseed_script.jpg - snapshot of results using script (top 3 traces) and exported to miniseed from GUI (bottom 3 traces)
3-zoom-mseed_script.jpg - same as previous but zoomed

Re: waveform script possible bug

Posted: Fri May 13, 2016 8:46 am
by admin
A new release is available with some fixes for the range specification in waveform script.
If you can test and report I would be interested.