Creating several groups

This forum is dedicated to discuss all problems and suggestions related to the use of geopsy database and its plugins (array processing, H/V,...).
Post Reply
sbonnefo
Posts: 34
Joined: Tue Aug 14, 2007 7:43 am

Creating several groups

Post 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
admin
Site Admin
Posts: 841
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Post 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
admin
Site Admin
Posts: 841
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Post 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.
sbonnefo
Posts: 34
Joined: Tue Aug 14, 2007 7:43 am

Post by sbonnefo »

Ok I see!

Should I write the given formula in "Name" box (in the Group properties tool box) ?
admin
Site Admin
Posts: 841
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Post by admin »

Right!
sbonnefo
Posts: 34
Joined: Tue Aug 14, 2007 7:43 am

Post by sbonnefo »

It seems that it is working only with 'FileName' parameter.
I can not use 'Name' or 'Comments' variable in this formula.
admin
Site Admin
Posts: 841
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Post by admin »

I've just tested it with Name and Component in the formula without problem.

Code: Select all

group {Return=Name+Component;}
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.
eshabani
Posts: 12
Joined: Wed Aug 29, 2007 6:41 pm

Re Name Files

Post by eshabani »

Hi,

How can I rename signal files using geopsy. I tried using "set headers" but it did not work. Any idea?
thanks
eshabani
Posts: 12
Joined: Wed Aug 29, 2007 6:41 pm

Post by eshabani »

Would you please inter the setnames.formulas ?
thanks
admin
Site Admin
Posts: 841
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Post 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?
eshabani
Posts: 12
Joined: Wed Aug 29, 2007 6:41 pm

Post by eshabani »

hi Marc,

yes, exactly that I need.
Thanks.
Post Reply