Closed casshall closed 2 years ago
You're right that if the data contains both particles and sinks, then there are multiple return values. read_phantom() will separate the sinks into their own data frame by default. You can alter this behaviour using the 'separate_types=' argument, which accepts None, 'sinks', or 'all'.
See also https://sarracen.readthedocs.io/en/latest/api/sarracen.read_phantom.html#sarracen.read_phantom.
Also an easy way to unpack the list when loading the data is to do something like the following.
sdf_gas, sdf_sinks = sarracen.read_phantom('dumpfile')
Different issue in interactive vs non interactive, data frame loads as expected but:
python3 plot.py Traceback (most recent call last): File "/Users/cass/work/backreaction_selfgravity/catherine_exact_conditions/const-grains-d2g-0.1/plot.py", line 9, in
sdf.render('rho', xsec=0.0)
AttributeError: 'list' object has no attribute 'render'.
Maybe update the documentation to state that a list is returned - one for particles and one for sinks, if I have understood?