snap.read.2: Read in a Gadget format 2 snapshot file

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/snap.read.2.R

Description

This function opens the file and reads the header (also checks that the blocks are well written). Then goes trought the full file, checking the blocks. If the block label matches it returns that block.

Usage

1
snap.read.2(file, what, ndim, type, debug, gas, thin=1)

Arguments

file

File name of the snapshot file to be read.

what

Name of the block to be read.

ndim

OPTIONAL: Dimensions of the block.

type

OPTIONAL: Type of data.

debug

OPTIONAL: add extra information. If debug = 1, then it shows all the blocks present in the file.

gas

OPTIONAL: read only gas files.

thin

How much should the particle data be thinned? thin=1 means all data is read in, thin=10 means every 10th particle is read in. Larger numbers will create more sub-sampled data, and will hugely increase the read-in speed and reduce the memory required. This is useful for making images where only a small fraction of Gadget particles are required.

Details

Opens the file, and read header (also checks that the blocks are well written). Then goes through the full file, checking the blocks. If the block label matches what then it returns that block DATA.

Value

Returns the DATA block from the file.

Author(s)

Federico Stasyszyn & Aaron Robotham

See Also

snap.write.block.2, snap.add.head.1, snap.write.head.2, snap.select.type.2, snap.gen.param

Examples

1
    #None yet!

asgr/snapshot documentation built on Oct. 8, 2020, 2:52 p.m.