Project

General

Profile

getArrayF (method from py_unsio module)

Here is a complete description of getArrayF() python method used to get data from snapshot.

getArrayF() method belong to Cunsin class.

return value

All getArrayF() methods, return two variables. First a boolean ( "true" in case of success, or "false" otherwise) and a 1D numpy array filled with float values.

getArrayF, an overloaded method

Method getData is overloaded and can have different number of arguments

  1. ok,data=getArrayF(comp, tag) see arguments description below
  2. ok,data=getArrayF( tag) see arguments description below

Return variables

variable type description
ok boolean return true if array exist, false otherwise
data float return a numpy 1D array fulfilled with the requested float data (getArrayF)

Arguments description

argument type description
comp string specify requested component (see table below)
tag string specify requested data type (see table below)

Components (comp)

From argument comp , we select the component to be treated.

component value description
gas Gas particles
halo Dark matter particles
dm Dark matter particles
disk Old stars particles
stars Stars particles
bulge Bulge particles
bndry bndry particles

Data (tag/prop)

From argument tag , we specify which data we want to get. If comp is specified in getArrayF() method, then retrieved data will belong to the component "comp". If comp is not specified, then retrieved data will belong to all the components selected during the object instantiation. All return variables are numpy 1D array in floating format.

tag/prop value return variable
pos return numpy 1D array of particles position (size=n*3)
vel return numpy 1D array of particles velocitie (size=n*3)
mass return numpy 1D array of particles velocitie (size=n)
acc return numpy 1D array of particles acceleration (size=n*3)
pot return numpy 1D array of particles potential (size=n)
rho return numpy 1D array of particles density (size=n)
hsml return numpy 1D array of particles hydro smooth length (size=n)
temp return numpy 1D array of particles temperature (size=n)
age return numpy 1D array of particles age (size=n)
metal return numpy 1D array of particles metallicity (size=n)
u return numpy 1D array of particles internal energy (size=n)
aux return numpy 1D auxiliary array (size=n)
keys return numpy 1D keys array (size=n)

getArrayI (method from py_unsio module)

Here is a complete description of getArrayI() python method used to get data from snapshot.

getArrayI() method belong to Cunsin class.

return value

All getArrayI() methods, return two variables. First a boolean ( "true" in case of success, or "false" otherwise) and a 1D numpy array filled with integer values.

getArrayI, an overloaded method

Method getArrayI is overloaded and can have different number of arguments

  1. ok,data=getArrayI(comp, tag) see arguments description below
  2. ok,data=getArrayI( tag) see arguments description below

Return variables

variable type description
ok boolean return true if array exist, false otherwise
data integer return a numpy 1D array fulfilled with the requested integer data (getArrayI)

Arguments description

argument type description
comp string specify requested component (see table below)
tag string specify requested data type (see table below)

Components (comp)

From argument comp , we select the component to be treated.

component value description
gas Gas particles
halo Dark matter particles
dm Dark matter particles
disk Old stars particles
stars Stars particles
bulge Bulge particles
bndry bndry particles

Data (tag)

From argument tag , we specify which data we want to get. If comp is specified in getArrayI() method, then retrieved data will belong to the component "comp". If comp is not specified, then retrieved data will belong to all the components selected during the object instantiation. All return variables are numpy 1D array in integer format.

tag value return variable
id return numpy 1D array of particles id (size=n)
keys return numpy 1D array of particles keys (size=n)