Hi, I am trying to get multiple profile plots of density pdf for ramses data and I encounter the following error:
/home/samvad/yt-conda/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "pdf.py", line 8, in <module>
sim = yt.simulation(filename, "Ramses")
File "/home/samvad/yt-conda/lib/python3.6/site-packages/yt/convenience.py", line 112, in simulation
raise YTSimulationNotIdentified(simulation_type)
yt.utilities.exceptions.YTSimulationNotIdentified: Simulation time-series type ramses not defined.
and the following is the code I am using to do so:
import yt
from yt.units import kpc
import matplotlib.pyplot as plt
import numpy as np
import yt.visualization.eps_writer as eps
filename="/lunarc/nobackup/users/samvad/BIG-12-new/output/"
sim = yt.simulation(filename, "Ramses") sim.get_time_series(time=[0,50,100,150,200,250,300]) profiles=[] labels=[] plot_specs=[] for ds in sim: ds.define_unit("hpc", (1.674*10**(-24), "g/cm**3")) ad=ds.all_data() dens=ad.cut_region(["obj['density'].in_units('hpc') > 0"]) profiles.append(yt.create_profile(dens, "density", "cell_mass", weight_field=None, fractional=True)) labels.append("time=%.2f" % ds.current_time.in_units('Myr')) plot_specs.append(dict(linewidth=2, alpha=0.7)) plot = yt.ProfilePlot.from_profiles(profiles, labels=labels, plot_specs=plot_specs) plot.set_log("density", True) plot.set_unit("density", "hpc") plot.set_xlim(1e-7, 1e7)
plot.save(name='density-pdf', suffix='eps') could someone please let me know how I can get the simulation_type for ramses? Thanks.