vice.output¶
Reads in the output from singlezone simulations and allows the user to access it easily via dataframes.
Signature: vice.output(name)
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 multizone
class,
a multioutput
object is created instead.
Attributes¶
- name
str
The name of the .vice directory containing the simulation output.
- elements
tuple
The symbols of the elements whose enrichment was tracked by the simulation, as they appear on the periodic table.
- history
dataframe
The dataframe read in via vice.history.
- mdf
dataframe
The dataframe read in via vice.mdf.
- agb_yields
dataframe
The asymptotic giant branch star yields employed in the simulation.
- ccsne_yields
dataframe
The core-collapse supernova yields employed in the simulation.
- sneia_yields
dataframe
The type Ia supernova yields employed in the simulation.
Note
Reinstancing functional yields and simulation parameters
requires dill, an extension to pickle
in the python standard
library. It is recommand that VICE users install dill >= 0.2.0.
Tip
VICE outputs are stored in directories with a ‘.vice’ extension following the name of the simulation. This allows users to run <command> *.vice in a terminal to run commands on all VICE outputs in a given directory.
Functions¶
show (requires matplotlib >= 2.0.0)
See also
vice.history
vice.mdf
vice.multioutput
Example Code¶
>>> import vice
>>> out = vice.output("example")
>>> out.history[100]
vice.dataframe{
time -----------> 1.0
mgas -----------> 5795119000.0
mstar ----------> 2001106000.0
sfr ------------> 2.897559
ifr ------------> 9.1
ofr ------------> 7.243899
eta_0 ----------> 2.5
r_eff ----------> 0.3534769
z_in(fe) -------> 0.0
z_in(sr) -------> 0.0
z_in(o) --------> 0.0
z_out(fe) ------> 0.0002769056
z_out(sr) ------> 3.700754e-09
z_out(o) -------> 0.001404602
mass(fe) -------> 1604701.0
mass(sr) -------> 21.44631
mass(o) --------> 8139837.0
z(fe) ----------> 0.0002769056166059748
z(sr) ----------> 3.700754031107903e-09
z(o) -----------> 0.0014046022178319376
[fe/h] ---------> -0.6682579454664828
[sr/h] ---------> -1.1074881208001155
[o/h] ----------> -0.6098426789720387
[sr/fe] --------> -0.43923017533363273
[o/fe] ---------> 0.05841526649444406
[o/sr] ---------> 0.4976454418280768
z --------------> 0.0033582028978416337
[m/h] ----------> -0.6200211036287412
lookback -------> 9.0
}
>>> out.mdf[60]
vice.dataframe{
bin_edge_left --> 0.0
bin_edge_right -> 0.05
dn/d[fe/h] -----> 0.0
dn/d[sr/h] -----> 0.0
dn/d[o/h] ------> 0.0
dn/d[sr/fe] ----> 0.06001488
dn/d[o/fe] -----> 0.4337209
dn/d[o/sr] -----> 0.0
}