HTML automatically generated with rman
Table of Contents

Name

snapmask - mask out certain particles while copying particles from an N-body system

Synopsis

snapmask in=snap_in out=snap_out [parameters=values...]

Description

snapmask copies all particles from an N-body system for which a select keyword is given

The Key field (an integer) in the input file (if present) is also copied accordingly; when it is not present it will be initialized to the order of particles present in the input file, 0 being the first one, and nbody-1 the last one.

Parameters

The following parameters are reckognized in any order if the keyword is also given:
in=snap_in
Input data is read from snap_in, which must be in standard snapshot(5NEMO) format [no default].
out=snap_out
Copied output data is written to snap_out, which will also be in snapshot(5NEMO) format. If output file exists, program refuses to overwrite it and dies. [No default]
select=list
List of numbers of all particles to be copied. This list is currently purely by position in the file, and the maximum should never be larger than the maximum number of bodies in any of the snapshots to be copied. The keyword keyoffset (see below) can be used to correct to keyvalues to be output. Example: "0:1000:10,2000:3000:10". [default:all].
times=
The times select string. By default all times are selected.
keyfile=keyfile
Filename which is assumed to have a key field used to mask the particles to be copied. [default: not used].
keyoffset=offset
Offset applied to the output key. This offset is a temporary hack until more programs make use of the key field. The offset is applied before it is compared with the key field in the above mentioned keyfile. E.g. An input file snap-in with 10 bodies is compared with a keyfile snap-key with 5 bodies numbered 5:9 and ... - Don’t use this option, still under development.

Example

The select= keyword can easily become very long, longer than an interactive shell allows. You might see a "word too long" error message in this case. One solution is to write the numbers into a simple table and use the construct
    snapmask in=... out=... select=@particles.tab
where particles.tab is an ASCII file with a single column of all selected particles.

Author

Peter Teuben

See Also

snapsort(1NEMO) , snaptrim(1NEMO)

Files


~pjt/nbody        snapmask.c snapmask.1

Update History


19-Jun-87    Version 1.0: created                    PJT
9-Mar-88    V1.2: added data-history mechanism    PJT
xx-jun-88    V1.3 new filestruct                   PJT
18-aug-88    V1.4 allow different sized snapshots     PJT
25-oct-88    V1.5 keyfile + keyoffset introduced      PJT
6-apr-89    V1.6: skip diagnostics            PJT
12-apr-89    V1.6a: different parser for ’select’     PJT


Table of Contents