Skip to content

Commit

Permalink
revert incorrect deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Oct 23, 2022
1 parent 7496d86 commit 3b97e58
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions yt/frontends/nc4_cm1/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ def __init__(
)
self.storage_filename = storage_filename

def _setup_coordinate_handler(self):
# ensure correct ordering of axes so plots aren't rotated (z should always be
# on the vertical axis).
super()._setup_coordinate_handler()
self.coordinates._x_pairs = (("x", "y"), ("y", "x"), ("z", "x"))
self.coordinates._y_pairs = (("x", "z"), ("y", "z"), ("z", "y"))

def _set_code_unit_attributes(self):
# This is where quantities are created that represent the various
# on-disk units. These are the currently available quantities which
Expand Down
4 changes: 2 additions & 2 deletions yt/geometry/coordinates/geographic_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,13 +596,13 @@ def _retrieve_radial_offset(self, data_source=None):
outer_radius = self.ds.domain_right_edge[rax]
return outer_radius, -1.0

_x_pairs = ( # deprecated
_x_pairs = (
("latitude", "longitude"),
("longitude", "latitude"),
("depth", "longitude"),
)

_y_pairs = ( # deprecated
_y_pairs = (
("latitude", "depth"),
("longitude", "depth"),
("depth", "latitude"),
Expand Down
4 changes: 2 additions & 2 deletions yt/geometry/coordinates/spec_cube_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def _length_func(field, data):
self._register_volume(registry)
self._check_fields(registry)

_x_pairs = (("x", "y"), ("y", "x"), ("z", "x")) # deprecated
_y_pairs = (("x", "z"), ("y", "z"), ("z", "y")) # deprecated
_x_pairs = (("x", "y"), ("y", "x"), ("z", "x"))
_y_pairs = (("x", "z"), ("y", "z"), ("z", "y"))

def convert_to_cylindrical(self, coord):
raise NotImplementedError
Expand Down
4 changes: 2 additions & 2 deletions yt/geometry/coordinates/spherical_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ def image_axis_name(self):
self._image_axis_name = rv
return rv

_x_pairs = (("r", "theta"), ("theta", "r"), ("phi", "r")) # deprecated
_y_pairs = (("r", "phi"), ("theta", "phi"), ("phi", "theta")) # deprecated
_x_pairs = (("r", "theta"), ("theta", "r"), ("phi", "r"))
_y_pairs = (("r", "phi"), ("theta", "phi"), ("phi", "theta"))

@classmethod
def _get_plot_axes_default_properties(
Expand Down

0 comments on commit 3b97e58

Please sign in to comment.