-
-
Notifications
You must be signed in to change notification settings - Fork 19
Fix two WCS bugs #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix two WCS bugs #276
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b248b79
Fix two WCS bugs
Cadair 6effd1c
Update CHANGES.rst
Cadair c051b3f
Bump the slicedwcs schema version
Cadair a2761c6
use pixel_shape not _naxis
Cadair cf93c6e
raise InconsistentWCSError if the wcs is inconsistent
braingram 7b4def0
Add exceptions file
Cadair 8b3b672
Update CHANGES.rst
Cadair 97556cc
Allow all objects for wrappers
Cadair File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| class InconsistentWCSError(ValueError): | ||
| """ | ||
| An error for a WCS with inconsistent attributes. | ||
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| id: asdf://astropy.org/astropy/manifests/astropy-1.4.0 | ||
| extension_uri: asdf://astropy.org/astropy/extensions/astropy-1.4.0 | ||
| title: Astropy extension 1.4.0 | ||
| description: |- | ||
| A set of tags for serializing astropy objects. This does not include most | ||
| model classes, which are handled by an implementation of the ASDF | ||
| transform extension. | ||
| asdf_standard_requirement: | ||
| gte: 1.6.0 | ||
| tags: | ||
| - tag_uri: tag:astropy.org:astropy/time/timedelta-1.1.0 | ||
| schema_uri: http://astropy.org/schemas/astropy/time/timedelta-1.1.0 | ||
| title: Represents an instance of TimeDelta from astropy | ||
| description: |- | ||
| Represents the time difference between two times. | ||
| - tag_uri: tag:astropy.org:astropy/fits/fits-1.1.0 | ||
| schema_uri: http://astropy.org/schemas/astropy/fits/fits-1.1.0 | ||
| title: A FITS file inside of an ASDF file. | ||
| description: |- | ||
| This schema is useful for distributing ASDF files that can | ||
| automatically be converted to FITS files by specifying the exact | ||
| content of the resulting FITS file. | ||
|
|
||
| Not all kinds of data in FITS are directly representable in ASDF. | ||
| For example, applying an offset and scale to the data using the | ||
| `BZERO` and `BSCALE` keywords. In these cases, it will not be | ||
| possible to store the data in the native format from FITS and also | ||
| be accessible in its proper form in the ASDF file. | ||
|
|
||
| Only image and binary table extensions are supported. | ||
| - tag_uri: tag:astropy.org:astropy/table/table-1.2.0 | ||
| schema_uri: http://astropy.org/schemas/astropy/table/table-1.2.0 | ||
| title: A table. | ||
| description: |- | ||
| A table is represented as a list of columns, where each entry is a | ||
| [column](ref:http://stsci.edu/schemas/asdf/table/column-1.1.0) | ||
| object, containing the data and some additional information. | ||
|
|
||
| The data itself may be stored inline as text, or in binary in either | ||
| row- or column-major order by use of the `strides` property on the | ||
| individual column arrays. | ||
|
|
||
| Each column in the table must have the same first (slowest moving) | ||
| dimension. | ||
| - tag_uri: tag:astropy.org:astropy/transform/units_mapping-1.1.0 | ||
| schema_uri: http://astropy.org/schemas/astropy/transform/units_mapping-1.1.0 | ||
| title: Mapper that operates on the units of the input. | ||
| description: |- | ||
| This transform operates on the units of the input, first converting to | ||
| the expected input units, then assigning replacement output units without | ||
| further conversion. | ||
| - tag_uri: tag:astropy.org:astropy/table/ndarraymixin-1.0.0 | ||
| schema_uri: http://astropy.org/schemas/astropy/table/ndarraymixin-1.0.0 | ||
| title: NdarrayMixin column. | ||
| description: |- | ||
| Represents an astropy.table.NdarrayMixin instance. | ||
| - tag_uri: tag:astropy.org:astropy/wcs/slicedwcs-1.1.0 | ||
| schema_uri: http://astropy.org/schemas/astropy/wcs/slicedwcs-1.1.0 | ||
| title: Represents an instance of SlicedLowLevelWCS | ||
| description: |- | ||
| The SlicedLowLevelWCS class is a wrapper class for WCS that applies slices | ||
| to the WCS, allowing certain pixel and world dimensions to be retained or | ||
| dropped. | ||
|
|
||
| It manages the slicing and coordinate transformations while preserving | ||
| the underlying WCS object. | ||
| - tag_uri: tag:astropy.org:astropy/wcs/wcs-1.0.0 | ||
| schema_uri: http://astropy.org/schemas/astropy/wcs/wcs-1.0.0 | ||
| title: FITS WCS (World Coordinate System) Converter | ||
| description: |- | ||
| Represents the FITS WCS object, the HDUlist of the FITS header is preserved | ||
| during serialization and during deserialization the WCS object is recreated | ||
| from the HDUlist. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| %YAML 1.1 | ||
| --- | ||
| $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" | ||
| id: "http://astropy.org/schemas/astropy/wcs/slicedwcs-1.1.0" | ||
|
|
||
| title: Represents the SlicedLowLevelWCS object | ||
|
|
||
| description: >- | ||
| The SlicedLowLevelWCS class is a wrapper class for WCS that applies slices | ||
| to the WCS, allowing certain pixel and world dimensions to be retained or | ||
| dropped. | ||
| It manages the slicing and coordinate transformations while preserving | ||
| the underlying WCS object. | ||
|
|
||
| allOf: | ||
| - type: object | ||
| properties: | ||
| wcs: | ||
| anyOf: | ||
| # Known WCS objects | ||
| - tag: "tag:astropy.org:astropy/wcs/wcs-1*" | ||
| - tag: "tag:stsci.edu:gwcs/wcs-*" | ||
Cadair marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - tag: "tag:astropy.org:astropy/wcs/slicedwcs-*" | ||
| - tag: "tag:sunpy.org:ndcube/resampledwcs-*" | ||
| - tag: "tag:sunpy.org:ndcube/ndcubesequence-*" | ||
| - tag: "tag:sunpy.org:ndcube/reorderedwcs-*" | ||
| - tag: "tag:sunpy.org:ndcube/compoundwcs-*" | ||
| # Allow anything else because any APE-14 compliant object is valid | ||
| - {} | ||
|
|
||
| slices_array: | ||
| type: array | ||
| items: | ||
| - oneOf: | ||
| - type: integer | ||
| - type: object | ||
| properties: | ||
| start: | ||
| anyOf: | ||
| - type: integer | ||
| - type: "null" | ||
| stop: | ||
| anyOf: | ||
| - type: integer | ||
| - type: "null" | ||
| step: | ||
| anyOf: | ||
| - type: integer | ||
| - type: "null" | ||
|
|
||
|
|
||
| required: ["wcs", "slices_array"] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.