diff --git a/indica/models/plasma.py b/indica/models/plasma.py index 5eb2f401..89a7d44c 100644 --- a/indica/models/plasma.py +++ b/indica/models/plasma.py @@ -807,8 +807,6 @@ def __init__( self, plasma: Plasma, profilers: dict[ProfilerBase], - plasma_attribute_names=None, - map_vtor: bool = False, ): """ Interface Profiler objects with Plasma object to generate plasma profiles @@ -822,30 +820,8 @@ def __init__( dictionary of Profiler objects to generate profiles """ - if plasma_attribute_names is None: - plasma_attribute_names = [ - "electron_temperature", - "electron_density", - "ion_temperature", - "ion_density", - "impurity_density", - "fast_density", - "pressure_fast", - "neutral_density", - "zeff", - "meanz", - "wp", - "wth", - "pressure_tot", - "pressure_th", - "toroidal_rotation", - ] self.plasma = plasma self.profilers = profilers - self.plasma_attribute_names = plasma_attribute_names - self.map_vtor = map_vtor - self.phantom = None - self.phantom_profiles = None def update_profilers(self, profilers: dict): for profile_name, profiler in profilers.items(): @@ -872,16 +848,6 @@ def set_profiles(self, profiles: dict[xr.DataArray], t: float = None): else: getattr(self.plasma, profile_name).loc[dict(t=t)] = profile - def save_phantoms(self, phantom=False): - # if phantoms return profiles otherwise return empty arrays - self.phantom = phantom - phantom_profiles = self.plasma_attributes() - if not phantom: - for key, value in phantom_profiles.items(): - phantom_profiles[key] = value * 0 - self.phantom_profiles = phantom_profiles - return phantom_profiles - def map_plasma_profile_to_midplane(self, profiles: dict): """ Map profiles from flux space to real space on z=0 @@ -901,24 +867,6 @@ def map_plasma_profile_to_midplane(self, profiles: dict): midplane_profiles[key] = value.interp(rho_poloidal=rho) return midplane_profiles - def plasma_attributes(self): - plasma_attributes = {} - for attribute in self.plasma_attribute_names: - plasma_attributes[attribute] = getattr(self.plasma, attribute).sel( - t=self.plasma.time_to_calculate - ) - return plasma_attributes - - def map_toroidal_rotation_to_ion_temperature( - self, - ): - - self.plasma.toroidal_rotation = ( - self.plasma.ion_temperature - / self.plasma.ion_temperature.max("rho_poloidal") - * self.plasma.toroidal_rotation.max("rho_poloidal") - ) - def __call__(self, parameters: dict = None, t=None): """ Set parameters of given profilers and assign to plasma profiles @@ -963,5 +911,3 @@ def __call__(self, parameters: dict = None, t=None): } self.set_profiles(updated_profiles, t) - if "ion_temperature" in _profiles_to_update and self.map_vtor: - self.map_toroidal_rotation_to_ion_temperature()