Page 1 of 1
Creating several groups
Posted: Tue Sep 18, 2007 4:36 pm
by sbonnefo
I build up a database. I use the tool box 'New group' and select the option 'Create several groups'.
The selection of the signals from the 'key' parameter is correct. However I wonder if it is possible to define automatically the name of the groups (from a key parameter?) ?
Any ideas?
Thanks
Sylvette
Posted: Tue Sep 18, 2007 5:57 pm
by admin
Hi Sylvette,
No problem, you can use the same syntax as for the dialog box in "Edit/Set headers". However there is a special trick to enter such formulas. I think that there are some examples in the "What's this". But I don't know how, under Mac OS X, I'm not able to activate it. I'll check tomorrow under Linux, and I'll give you more information about that feature.
Marc
Posted: Wed Sep 19, 2007 10:19 am
by admin
This is based on the "What's this" help content.
The current viewer is browsed and a new group is created every time the Key value change. For instance to split into individual file, first sort the viewer by FileName and set Key to FileName
If you want to create several groups, you can add a base name containing formulas (see 'Set Headers').
If filenames are "1001.dat", "1002.dat",...,
Code: Select all
"shot {fn=right(FileName,8);Return=left(fn,4);}" will produce group names:
shot 1001
shot 1002
...
Or simply to get groups with an index...
Code: Select all
"group {Return=justify(GroupIndex,4,"0");}" will produce group names:
group 0001
group 0002
...
'Return' variable must be defined in the expression between {}.
Special variable 'GroupIndex' is set to the current split group index. The signal data considered is always the first one of each split group.
Posted: Wed Sep 19, 2007 1:33 pm
by sbonnefo
Ok I see!
Should I write the given formula in "Name" box (in the Group properties tool box) ?
Posted: Wed Sep 19, 2007 1:34 pm
by admin
Right!
Posted: Wed Oct 03, 2007 1:48 pm
by sbonnefo
It seems that it is working only with 'FileName' parameter.
I can not use 'Name' or 'Comments' variable in this formula.
Posted: Wed Oct 03, 2007 6:46 pm
by admin
I've just tested it with Name and Component in the formula without problem.
The key was 'Name' and the signal table contained:
Code: Select all
1 S01A Vertical
2 S01A North
3 S01A East
4 S01B Vertical
5 S01B North
6 S01B East
7 S01C Vertical
8 S01C North
9 S01C East
10 S02A Vertical
...
Created groups:
Code: Select all
group S01AVertical
group S01BVertical
group S01CVertical
group S02AVertical
...
The properties of the first signal in the newly created group are taken in account to build the group name. Signal are not sorted before splitting in groups. It is your responsibility to sort the signals with the correct keys.
Re Name Files
Posted: Wed Nov 14, 2007 8:41 am
by eshabani
Hi,
How can I rename signal files using geopsy. I tried using "set headers" but it did not work. Any idea?
thanks
Posted: Wed Nov 14, 2007 9:31 pm
by eshabani
Would you please inter the setnames.formulas ?
thanks
Posted: Tue Nov 20, 2007 9:08 am
by admin
What do you mean "rename files"? Do you mean renaming file on your disk or just changing the signal names (header field 'Name')?
Here is an example of a formula for setting signal names from the first four characters of the ShortFileName (FileName without the path):
Code: Select all
Name="Station_"+left(ShortFileName,4)
Does it answer your question?
Posted: Fri Nov 23, 2007 7:57 pm
by eshabani
hi Marc,
yes, exactly that I need.
Thanks.