waveform script possible bug

This forum is dedicated to discuss all problems and suggestions related to the use of geopsy database and its plugins (array processing, H/V,...).
agorbatov
Posts: 13
Joined: Thu Mar 20, 2014 6:33 am

waveform script possible bug

Postby agorbatov » Wed Sep 23, 2015 1:35 am

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
<anonymous>()@:1

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?
Cheers,

Alex

agorbatov
Posts: 13
Joined: Thu Mar 20, 2014 6:33 am

Re: waveform script possible bug

Postby agorbatov » Wed Oct 21, 2015 3:39 am

There is another bug : -save options does not work as described, for example

[agorbato@rhe-eqm-research:/export/research/agorbato/HVPROC]
$ geopsy -import-format MiniSeed 1.mseed -- -tool geopsyhv -slot 1 -- -save ./ -param hv.par -autowin
1.mseed
----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
?

admin
Site Admin
Posts: 412
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Re: waveform script possible bug

Postby admin » Wed Nov 04, 2015 9:58 am

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,...).

admin
Site Admin
Posts: 412
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Re: waveform script possible bug

Postby admin » Wed Nov 04, 2015 10:16 am

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).

agorbatov
Posts: 13
Joined: Thu Mar 20, 2014 6:33 am

Re: waveform script possible bug

Postby agorbatov » Thu Feb 04, 2016 11:12 pm

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.

agorbatov
Posts: 13
Joined: Thu Mar 20, 2014 6:33 am

Re: waveform script possible bug

Postby agorbatov » Wed Feb 10, 2016 12:59 am

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:

mergeStations();
save("mergeStations()");
cut("Signal", "Delta", "1h");
save("cut(Signal, Delta, 1h)");
removeTrend();
save("removeTrend()");
exportFile("0.mseed",false,"MiniSeed");

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
Attachments
3-zoom-mseed_script.JPG
(364.39 KiB) Not downloaded yet
2-mseed_script.JPG
(141.59 KiB) Not downloaded yet
1-GUI-mseed.JPG
(254.19 KiB) Not downloaded yet

admin
Site Admin
Posts: 412
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Re: waveform script possible bug

Postby admin » Fri May 13, 2016 8:46 am

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.


Return to “Geopsy usage”

Who is online

Users browsing this forum: No registered users and 2 guests