Creating several groups
Creating several groups
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
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
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
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
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",...,
Or simply to get groups with an index...
'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.
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
...
Code: Select all
"group {Return=justify(GroupIndex,4,"0");}" will produce group names:
group 0001
group 0002
...
Special variable 'GroupIndex' is set to the current split group index. The signal data considered is always the first one of each split group.
I've just tested it with Name and Component in the formula without problem.
The key was 'Name' and the signal table contained:
Created groups:
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.
Code: Select all
group {Return=Name+Component;}
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
...
Code: Select all
group S01AVertical
group S01BVertical
group S01CVertical
group S02AVertical
...
Re Name Files
Hi,
How can I rename signal files using geopsy. I tried using "set headers" but it did not work. Any idea?
thanks
How can I rename signal files using geopsy. I tried using "set headers" but it did not work. Any idea?
thanks
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):
Does it answer your question?
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)