def setup_particle_fields(self, ptype): FieldInfoContainer.setup_particle_fields(self, ptype) if ptype in ("PartType0", ): self.setup_gas_particle_fields(ptype) setup_species_fields(self, ptype) if ptype in ("PartType4", ): self.setup_star_particle_fields(ptype)
def setup_particle_fields(self, ptype, *args, **kwargs): FieldInfoContainer.setup_particle_fields(self, ptype) if ptype == "PartType0": self.setup_gas_particle_fields(ptype) setup_species_fields(self, ptype)
# # The full license is in the file COPYING.txt, distributed with this software. #----------------------------------------------------------------------------- from yt.fields.field_info_container import \ FieldInfoContainer, \ FieldInfo, \ NullFunc, \ ValidateParameter, \ ValidateDataField, \ ValidateProperty, \ ValidateSpatial, \ ValidateGridType import numpy as np KnownPlutoFields = FieldInfoContainer() add_pluto_field = KnownPlutoFields.add_field PlutoFieldInfo = FieldInfoContainer.create_with_fallback(FieldInfo) add_field = PlutoFieldInfo.add_field add_pluto_field("rho", function=NullFunc, take_log=True, validators=[ValidateDataField("density")], units=r"\rm{g}/\rm{cm}^3") KnownPlutoFields["rho"]._projected_units = r"\rm{g}/\rm{cm}^2" add_pluto_field("vx1", function=NullFunc,