vice.singlezone.from_output¶
Obtain an instance of the singlezone class given either the path
to an output or an output itself.
Signature: vice.singlezone.from_output(arg)
New in version 1.1.0.
Parameters¶
- arg
stroroutput The full or relative path to the output directory; the ‘.vice’ extension is not necessary. Alternatively, an output object.
Returns¶
- sz
singlezone A
singlezoneobject with the same parameters as the one which produced the output.
Raises¶
- TypeError
arg is neither an output object nor a string
- IOError [Only occurs if the output has been altered]
The output is missing files
Notes¶
Note
If arg is either a multizone output or a multioutput
object, a multizone object will be returned.
Note
In versions before 1.1.0, this function had the call signature
vice.mirror (now deprecated).
Note
This function serving as the reader, the writer is the vice.core.singlezone._singlezone.c_singlezone.pickle function, implemented in Cython.
Example Code¶
>>> import numpy as np
>>> import vice
>>> vice.singlezone(name = "example").run(np.linspace(0, 10, 1001))
>>> sz = vice.singlezone.from_output("example")
>>> sz
vice.singlezone{
name -----------> example
func -----------> <function _DEFAULT_FUNC_ at 0x10d0c8e18>
mode -----------> ifr
verbose --------> False
elements -------> ('fe', 'sr', 'o')
IMF ------------> kroupa
eta ------------> 2.5
enhancement ----> 1.0
entrainment ----> <entrainment settings>
Zin ------------> 0.0
recycling ------> continuous
delay ----------> 0.15
RIa ------------> plaw
Mg0 ------------> 6000000000.0
smoothing ------> 0.0
tau_ia ---------> 1.5
tau_star -------> 2.0
schmidt --------> False
schmidt_index --> 0.5
MgSchmidt ------> 6000000000.0
dt -------------> 0.01
m_upper --------> 100.0
m_lower --------> 0.08
postMS ---------> 0.1
Z_solar --------> 0.014
bins -----------> [-3, -2.95, -2.9, ... , 0.9, 0.95, 1]
}