Table of Contents
uns2uns a universal converting tool for UNS snapshots.
in=uns_input out=uns_output select=selection type=uns_type [parameter=value]
uns2uns reads an UNS N-body systems and outputs another UNS
N-body systems. It can convert an uns input file to an uns output file. It
can also copy out some components and/or physical quantities from an uns
file to another one.
In and Out can be in a different type (ex conversion
from Nemo to Gadget OR Gadget to Nemo).
In and Out can also be in the same
format and the user can select a subset of the components and/or a subset
of physical quantities to save.
There are two kinds of nbody file structure:
The following parameters are recognized.
- - range file structure (RFS), like NEMO, where data are identified
range of indexes (ex 0:999 for the disk and 1000:9999 for the halo).
- - component file structure (CFS), like GADGET, where data are identified
- component name (disk, gas, halo, stars, bulge, bndry).
In the following examples, we assume that fileg2 is a GADGET2
file, filenemo is a NEMO file, filelist is a list of file and simname is
a simulation’s name stored in an uns sqlite3 database.
- in=uns input file
the following input files are supported: Nemo,Gadget 2 & 1, list of files,
sqlite3 uns data base
- out=uns output file
- Output data will be written to
out_file in the format type specified from the parameter type=
- this parameter select the input particles which will
be saved in the output file. There are several possible syntax. It can be
a range of index (RFS input, ex: select=0:999,3000:4000 ) or a list of
components (CFS input, ex: select=disk,stars), separated by coma.
are a special syntax when in=RFS and out=CFS (ex Nemo to Gadget conversion),
which is : select=comp1@range+comp2@range (ex: select=gas@0:1000+disk@300:400).
For more details, see EXAMPLES below.
- type=uns type format
- we specify here
the type of the output file. Currently, the following output files are supported:
- bits=physical quantities to saved
- If this parameter is left
blank, then all physical quantities will be saved, this is the default
behaviour. Here is the list of differents values: ’m’ mass
’k’ keys array (from nemo)
’X’ aux array (from nemo)
’I’ particles’s Id
’U’ Internal energy
’A’ stars’s age
ex: bits=xRH will save positions, densities and hsml
- - Gadget to Nemo conversion:
- 1) uns2uns in=fileg2 out=filenemo select=disk,stars type=nemo bits=mx
Convert a gadget file to nemo file, by selecting the mass and the positions
of disk and stars components.
2) uns2uns in=filelist out=filenemo select=disk,stars
type=nemo bits=mx first=t
Do exactly the same conversion as 1) but from
a list of file. Each output files will have a trailing number.
- - Nemo to Gadget
- uns2uns in=filenemo out=fileg2 select=gas@0:100+halo@200:300
Convert a Nemo file to Gadget2 by setting nemo particles
from range [0:100] to gadget2 gas component, and nemo particles from range
[200:300] to gadget2 halo component.
- - Physical quantities selection:
uns2uns in=fileg2 out=fileg22 select=gas type=gadget2 bits=xRH
a gadget2 file from another gadget2 file, by keeping only positions, densities
and hsml of gas component.
2) uns2uns in=simname out=fileg22 select=gas
type=gadget2 bits=xRH first=t
Do exactly the same thing as 1) but on all
files stored in the uns sqlite3 database which match to entry ’simname’. Each
output files will have a trailing number.
05-Jul-11 V1.0 created JCL
Table of Contents