Skip to content

Commit

Permalink
Apply minor suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Stuart Mumford <[email protected]>
  • Loading branch information
DanRyanIrish and Cadair committed Nov 6, 2024
1 parent 6cf9602 commit ddc75be
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ndcube/asdf/converters/compoundwcs_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class CompoundConverter(Converter):
def from_yaml_tree(self, node, tag, ctx):
from ndcube.wcs.wrappers import CompoundLowLevelWCS

return(CompoundLowLevelWCS(*node["wcs"], mapping = node.get("mapping"), pixel_atol = node.get("atol")))
return(CompoundLowLevelWCS(*node["wcs"], mapping=node.get("mapping"), pixel_atol=node.get("atol")))

def to_yaml_tree(self, compoundwcs, tag, ctx):
node={}
node = {}
node["wcs"] = compoundwcs._wcs
node["mapping"] = compoundwcs.mapping.mapping
node["atol"] = compoundwcs.atol
Expand Down
6 changes: 3 additions & 3 deletions ndcube/asdf/converters/reorderedwcs_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def from_yaml_tree(self, node, tag, ctx):
from ndcube.wcs.wrappers import ReorderedLowLevelWCS

reorderedwcs = ReorderedLowLevelWCS(wcs=node["wcs"],
pixel_order = node.get("pixel_order"),
world_order = node.get("world_order")
pixel_order=node.get("pixel_order"),
world_order=node.get("world_order")
)
return reorderedwcs
def to_yaml_tree(self, reorderedwcs, tag, ctx):
node={}
node = {}
node["wcs"] = reorderedwcs._wcs
node["pixel_order"] = reorderedwcs._pixel_order
node["world_order"] = reorderedwcs._world_order
Expand Down
6 changes: 3 additions & 3 deletions ndcube/asdf/converters/resampled_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ def from_yaml_tree(self, node, tag, ctx):
from ndcube.wcs.wrappers import ResampledLowLevelWCS

resampledwcs = ResampledLowLevelWCS(wcs=node["wcs"],
offset = node.get("offset"),
factor = node.get("factor"),
offset=node.get("offset"),
factor=node.get("factor"),
)
return resampledwcs
def to_yaml_tree(self, resampledwcs, tag, ctx):
node={}
node = {}
node["wcs"] = resampledwcs._wcs
node["factor"] = resampledwcs._factor
node["offset"] = resampledwcs._offset
Expand Down
6 changes: 3 additions & 3 deletions ndcube/asdf/resources/schemas/ndcube-0.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ properties:
wcs:
anyOf:
- tag: "tag:stsci.edu:gwcs/wcs-1.*"
- tag: "tag:sunpy.org:ndcube/resampledwcs-0.1.0"
- tag: "tag:sunpy.org:ndcube/reorderedwcs-0.1.0"
- tag: "tag:sunpy.org:ndcube/compoundwcs-0.1.0"
- tag: "tag:sunpy.org:ndcube/resampledwcs-*"
- tag: "tag:sunpy.org:ndcube/reorderedwcs-*"
- tag: "tag:sunpy.org:ndcube/compoundwcs-*"
extra_coords:
tag: "tag:sunpy.org:ndcube/extra_coords/extra_coords/extracoords-0.*"
global_coords:
Expand Down

0 comments on commit ddc75be

Please sign in to comment.