Hello, I have an hdf5 data file from FLASH which I analyze through yt. I use the yt_createprofile function to make a 2D profile plot of density and temperature as mentioned on the website: import yt
ds = yt.load("some_hdf5_data") dd = ds.all_data() center = ds.arr([64.0, 64.0, 64.0], 'code_length') rvir = ds.quan(1, "pc") sph = ds.sphere(center, rvir)
profile = yt.create_profile(sph, ['density', 'temperature'], n_bins=[128, 128], fields=['cell_mass'], weight_field=None) plot = yt.PhasePlot.from_profile(profile) plot.save()
However, I would also like to make a plot of the number density. Say, I define numdens = dd['density']/1.67e-24 How can I use 'numdens' to plot the same profile plot?