vice.multioutput¶
Reads in the output from multizone simulations and allows the user to access it easily via dataframes.
Signature: vice.multioutput(name)
New in version 1.2.0.
Parameters¶
- name
str
The full or relative path to the output directory. The ‘.vice’ extension is not required.
Note
If name
corresponds to output from the singlezone
class,
an output
object is created instead.
Attributes¶
- name
str
The full or relative path to the output directory.
- zones
dataframe
A dataframe containing each zone’s corresponding
output
object. The keys to this dataframe are the names of thesinglezone
objects contained in themultizone
object which produced the output.- stars
dataframe
A dataframe containing all star particle data.
Example Code¶
>>> import vice
>>> example = vice.output("example")
>>> example.name
"example"
>>> example.zones
vice.dataframe{
zone0 ----------> <VICE output from singlezone: example.vice/zone0>
zone1 ----------> <VICE output from singlezone: example.vice/zone1>
zone2 ----------> <VICE output from singlezone: example.vice/zone2>
zone3 ----------> <VICE output from singlezone: example.vice/zone3>
zone4 ----------> <VICE output from singlezone: example.vice/zone4>
zone5 ----------> <VICE output from singlezone: example.vice/zone5>
zone6 ----------> <VICE output from singlezone: example.vice/zone6>
zone7 ----------> <VICE output from singlezone: example.vice/zone7>
zone8 ----------> <VICE output from singlezone: example.vice/zone8>
zone9 ----------> <VICE output from singlezone: example.vice/zone9>
}
>>> example.stars
vice.dataframe{
formation_time -> [0, 0, 0, ... , 10, 10, 10]
zone_origin ----> [0, 1, 2, ... , 7, 8, 9]
zone_final -----> [0, 1, 2, ... , 7, 8, 9]
mass -----------> [3e+07, 3e+07, 3e+07, ... , 2.96329e+07, 2.96329e+07, 2.96329e+07]
z(fe) ----------> [0, 0, 0, ... , 0.000846062, 0.000846062, 0.000846062]
z(sr) ----------> [0, 0, 0, ... , 1.03519e-08, 1.03519e-08, 1.03519e-08]
z(o) -----------> [0, 0, 0, ... , 0.0018231, 0.0018231, 0.0018231]
[fe/h] ---------> [-inf, -inf, -inf, ... , -0.183187, -0.183187, -0.183187]
[sr/h] ---------> [-inf, -inf, -inf, ... , -0.660756, -0.660756, -0.660756]
[o/h] ----------> [-inf, -inf, -inf, ... , -0.496585, -0.496585, -0.496585]
[sr/fe] --------> [nan, nan, nan, ... , -0.477569, -0.477569, -0.477569]
[o/fe] ---------> [nan, nan, nan, ... , -0.313397, -0.313397, -0.313397]
[o/sr] ---------> [nan, nan, nan, ... , 0.164171, 0.164171, 0.164171]
z --------------> [0, 0, 0, ... , 0.0053307, 0.0053307, 0.0053307]
[m/h] ----------> [-inf, -inf, -inf, ... , -0.419344, -0.419344, -0.419344]
age ------------> [10, 10, 10, ... , 0, 0, 0]
}