././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0893962 asdf_wcs_schemas-0.1.1/0000755000446400020070000000000000000000000015742 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0570457 asdf_wcs_schemas-0.1.1/.github/0000755000446400020070000000000000000000000017302 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0649207 asdf_wcs_schemas-0.1.1/.github/workflows/0000755000446400020070000000000000000000000021337 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/.github/workflows/ci.yml0000644000446400020070000000306700000000000022463 0ustar00eslavichSTSCI\sciencename: CI on: push: branches: - main tags: - '*' pull_request: schedule: # Weekly Monday 9AM build - cron: '0 9 * * 1' jobs: tox: name: ${{ matrix.name }} runs-on: ${{ matrix.runs-on }} strategy: fail-fast: false matrix: include: - name: Python 3.6 runs-on: ubuntu-latest python-version: 3.6 toxenv: py36 - name: Python 3.7 runs-on: ubuntu-latest python-version: 3.7 toxenv: py37 - name: Python 3.8 runs-on: ubuntu-latest python-version: 3.8 toxenv: py38 - name: Python 3.9 runs-on: ubuntu-latest python-version: 3.9 toxenv: py39 - name: Code style checks runs-on: ubuntu-latest python-version: 3.8 toxenv: style - name: Bandit security audit runs-on: ubuntu-latest python-version: 3.8 toxenv: bandit - name: macOS runs-on: macos-latest python-version: 3.8 toxenv: py38 steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install tox run: | python -m pip install --upgrade pip pip install tox - name: Run tox run: tox -e ${{ matrix.toxenv }} ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/.gitignore0000644000446400020070000000112700000000000017733 0ustar00eslavichSTSCI\science# Compiled files *.py[co] *.a *.o *.so __pycache__ # Ignore .c files by default to avoid including generated code. If you want to # add a non-generated .c extension, use `git add -f filename.c`. *.c # Other generated files */*/_version.py */cython_version.py htmlcov .coverage MANIFEST .pytest_cache .tox # Sphinx docs/api docs/_build docs/generated # Eclipse editor project files .project .pydevproject .settings # Packages/installer info *.egg *.eggs *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg distribute-*.tar.gz # Other .*.swp *~ # Mac OSX .DS_Store .idea ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547285.0 asdf_wcs_schemas-0.1.1/CHANGES.rst0000644000446400020070000000035300000000000017545 0ustar00eslavichSTSCI\science0.1.1 (2021-12-03) ================== - Update manifest URI authority to asdf-format.org. [#5] 0.1.0 (2021-11-24) ================== - Initial schemas for ``gwcs``. [#1] - Update ``$ref`` targets from tag URIs to schema URIs. [#3] ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/CODE_OF_CONDUCT.md0000644000446400020070000000626500000000000020552 0ustar00eslavichSTSCI\science# Spacetelescope Open Source Code of Conduct We expect all "spacetelescope" organization projects to adopt a code of conduct that ensures a productive, respectful environment for all open source contributors and participants. We are committed to providing a strong and enforced code of conduct and expect everyone in our community to follow these guidelines when interacting with others in all forums. Our goal is to keep ours a positive, inclusive, successful, and growing community. The community of participants in open source Astronomy projects is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences success and continued growth. As members of the community, - We pledge to treat all people with respect and provide a harassment- and bullying-free environment, regardless of sex, sexual orientation and/or gender identity, disability, physical appearance, body size, race, nationality, ethnicity, and religion. In particular, sexual language and imagery, sexist, racist, or otherwise exclusionary jokes are not appropriate. - We pledge to respect the work of others by recognizing acknowledgment/citation requests of original authors. As authors, we pledge to be explicit about how we want our own work to be cited or acknowledged. - We pledge to welcome those interested in joining the community, and realize that including people with a variety of opinions and backgrounds will only serve to enrich our community. In particular, discussions relating to pros/cons of various technologies, programming languages, and so on are welcome, but these should be done with respect, taking proactive measure to ensure that all participants are heard and feel confident that they can freely express their opinions. - We pledge to welcome questions and answer them respectfully, paying particular attention to those new to the community. We pledge to provide respectful criticisms and feedback in forums, especially in discussion threads resulting from code contributions. - We pledge to be conscientious of the perceptions of the wider community and to respond to criticism respectfully. We will strive to model behaviors that encourage productive debate and disagreement, both within our community and where we are criticized. We will treat those outside our community with the same respect as people within our community. - We pledge to help the entire community follow the code of conduct, and to not remain silent when we see violations of the code of conduct. We will take action when members of our community violate this code such as such as contacting conduct@stsci.edu (all emails sent to this address will be treated with the strictest confidence) or talking privately with the person. This code of conduct applies to all community situations online and offline, including mailing lists, forums, social media, conferences, meetings, associated social events, and one-to-one interactions. Parts of this code of conduct have been adapted from the Astropy and Numfocus codes of conduct. http://www.astropy.org/code_of_conduct.html https://www.numfocus.org/about/code-of-conduct/ ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/LICENSE0000644000446400020070000000266700000000000016762 0ustar00eslavichSTSCI\scienceCopyright (C) 2021 Association of Universities for Research in Astronomy (AURA) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of AURA and its representatives may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY AURA ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AURA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1638547498.089531 asdf_wcs_schemas-0.1.1/PKG-INFO0000644000446400020070000000176400000000000017047 0ustar00eslavichSTSCI\scienceMetadata-Version: 2.1 Name: asdf_wcs_schemas Version: 0.1.1 Summary: ASDF WCS Schemas Home-page: https://github.com/spacetelescope/asdf-wcs-schemas Author: STScI License: BSD-3-Clause Project-URL: Bug Tracker, https://github.com/spacetelescope/asdf-wcs-schemas/issues Project-URL: Source Code, https://github.com/spacetelescope/asdf-wcs-schemas Platform: UNKNOWN Classifier: Intended Audience :: Science/Research Classifier: Topic :: Scientific/Engineering :: Astronomy Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python :: 3 Requires-Python: >=3.6 Description-Content-Type: text/markdown Provides-Extra: docs Provides-Extra: test License-File: LICENSE # asdf-wcs-schemas This package provides ASDF schemas for validating WCS tags. Users should not need to install this directly; instead, install an implementation package such as gwcs, which includes asdf-wcs-schemas as a dependency. ![CI](https://github.com/asdf-format/asdf-wcs-schemas/workflows/CI/badge.svg) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637772141.0 asdf_wcs_schemas-0.1.1/README.md0000644000446400020070000000047100000000000017223 0ustar00eslavichSTSCI\science# asdf-wcs-schemas This package provides ASDF schemas for validating WCS tags. Users should not need to install this directly; instead, install an implementation package such as gwcs, which includes asdf-wcs-schemas as a dependency. ![CI](https://github.com/asdf-format/asdf-wcs-schemas/workflows/CI/badge.svg) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0672576 asdf_wcs_schemas-0.1.1/docs/0000755000446400020070000000000000000000000016672 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/Makefile0000644000446400020070000001116400000000000020335 0ustar00eslavichSTSCI\science# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest #This is needed with git because git doesn't create a dir if it's empty $(shell [ -d "_static" ] || mkdir -p _static) help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR) -rm -rf api html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Astropy.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Astropy.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/Astropy" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Astropy" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." make -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0575864 asdf_wcs_schemas-0.1.1/docs/_templates/0000755000446400020070000000000000000000000021027 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0691886 asdf_wcs_schemas-0.1.1/docs/_templates/autosummary/0000755000446400020070000000000000000000000023415 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/_templates/autosummary/base.rst0000644000446400020070000000037200000000000025063 0ustar00eslavichSTSCI\science{% extends "autosummary_core/base.rst" %} {# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/_templates/autosummary/class.rst0000644000446400020070000000037300000000000025257 0ustar00eslavichSTSCI\science{% extends "autosummary_core/class.rst" %} {# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/_templates/autosummary/module.rst0000644000446400020070000000037400000000000025440 0ustar00eslavichSTSCI\science{% extends "autosummary_core/module.rst" %} {# The template this is inherited from is in astropy/sphinx/ext/templates/autosummary_core. If you want to modify this template, it is strongly recommended that you still inherit from the astropy template. #}././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1638547498.057852 asdf_wcs_schemas-0.1.1/docs/asdf-wcs-schemas/0000755000446400020070000000000000000000000022022 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1638547498.069819 asdf_wcs_schemas-0.1.1/docs/asdf-wcs-schemas/schemas/0000755000446400020070000000000000000000000023445 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/asdf-wcs-schemas/schemas/index.rst0000644000446400020070000000064200000000000025310 0ustar00eslavichSTSCI\science.. _gwcs-schemas: GWCS Schema Definitions ======================= WCS object ---------- .. asdf-autoschemas:: wcs-1.0.0 step-1.0.0 Coordinate Frames ----------------- .. asdf-autoschemas:: celestial_frame-1.0.0 frame-1.0.0 spectral_frame-1.0.0 frame2d-1.0.0 temporal_frame-1.0.0 composite_frame-1.0.0 Transforms ---------- .. asdf-autoschemas:: label_mapper-1.0.0 regions_selector-1.0.0 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/conf.py0000644000446400020070000001477300000000000020205 0ustar00eslavichSTSCI\science# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this file. # # All configuration values have a default. Some values are defined in # the global Astropy configuration which is loaded here before anything else. # See astropy.sphinx.conf for which values are set there. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('..')) # IMPORTANT: the above commented section was generated by sphinx-quickstart, but # is *NOT* appropriate for astropy or Astropy affiliated packages. It is left # commented out with this explanation to make it clear why this should not be # done. If the sys.path entry above is added, when the astropy.sphinx.conf # import occurs, it will import the *source* version of astropy instead of the # version installed (if invoked as "make html" or directly with sphinx), or the # version in the build directory (if "python setup.py build_sphinx" is used). # Thus, any C-extensions that are needed to build the documentation will *not* # be accessible, and the documentation will not build correctly. import datetime import os import sys from pkg_resources import get_distribution try: from sphinx_astropy.conf.v1 import * # noqa except ImportError: print('ERROR: the documentation requires the sphinx-astropy package to be installed') sys.exit(1) # Get configuration information from setup.cfg from configparser import ConfigParser conf = ConfigParser() conf.read([os.path.join(os.path.dirname(__file__), '..', 'setup.cfg')]) setup_cfg = dict(conf.items('metadata')) # -- General configuration ---------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.2' # To perform a Sphinx version check that needs to be more specific than # major.minor, call `check_sphinx_version("x.y.z")` here. # check_sphinx_version("1.2.1") # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns.append('_templates') # This is added to the end of RST files - a good place to put substitutions to # be used globally. rst_epilog += """ """ # Top-level directory containing ASDF schemas (relative to current directory) asdf_schema_path = '../resources/schemas' # This is the prefix common to all schema IDs in this repository asdf_schema_standard_prefix = 'stsci.edu/gwcs' asdf_schema_reference_mappings = [ ('tag:stsci.edu:gwcs', 'http://asdf-wcs-schemas.readthedocs.io/en/latest/generated/stsci.edu/gwcs/'), ] # -- Project information ------------------------------------------------------ # This does not *have* to match the package name, but typically does project = setup_cfg['name'] author = setup_cfg['author'] copyright = '{0}, {1}'.format( datetime.datetime.now().year, setup_cfg['author']) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. release = get_distribution(project).version # for example take major/minor version = '.'.join(release.split('.')[:2]) # -- Options for HTML output --------------------------------------------------- # A NOTE ON HTML THEMES # The global astropy configuration uses a custom theme, 'bootstrap-astropy', # which is installed along with astropy. A different theme can be used or # the options for this theme can be modified by overriding some of the # variables set in the global configuration. The variables set in the # global configuration are listed below, commented out. # Add any paths that contain custom themes here, relative to this directory. # To use a different custom theme, add the directory containing the theme. #html_theme_path = [] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. To override the custom theme, set this to the # name of a builtin theme or the name of a custom theme in html_theme_path. #html_theme = None # See sphinx-bootstrap-theme for documentation of these options # https://github.com/ryan-roemer/sphinx-bootstrap-theme html_theme_options = { 'logotext1': 'g', # white, semi-bold 'logotext2': 'wcs', # orange, light 'logotext3': ':docs' # white, light } # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = '' # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '' # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". html_title = '{0} v{1}'.format(project, release) # Output file base name for HTML help builder. htmlhelp_basename = project + 'doc' # -- Options for LaTeX output -------------------------------------------------- # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). #latex_documents = [('index', project + '.tex', project + u' Documentation', # author, 'manual')] # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [('index', project.lower(), project + u' Documentation', [author], 1)] ## -- Options for the edit_on_github extension ---------------------------------------- if eval(setup_cfg.get('edit_on_github')): extensions += ['astropy.sphinx.ext.edit_on_github'] versionmod = __import__(setup_cfg['name'] + '.version') edit_on_github_project = setup_cfg['github_project'] if versionmod.version.release: edit_on_github_branch = "v" + versionmod.version.version else: edit_on_github_branch = "master" edit_on_github_source_root = "" edit_on_github_doc_root = "docs" sys.path.insert(0, os.path.join(os.path.dirname('__file__'), 'sphinxext')) extensions += ['sphinx_asdf'] ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/index.rst0000644000446400020070000000262200000000000020535 0ustar00eslavichSTSCI\scienceGWCS Documentation ================== `GWCS `__ is a package for managing the World Coordinate System (WCS) of astronomical data. Introduction & Motivation for GWCS ---------------------------------- WCS validation ============== The WCS is validated when an object is read in or written to a file. However, this happens transparently to the end user and knowing the details of the validation machinery is not necessary to use or construct a WCS object. GWCS uses the `Advanced Scientific Data Format `__ (ASDF) to validate the transforms, coordinate frames and the overall WCS object structure. ASDF makes use of abstract data type definitions called ``schemas``. The serialization and deserialization happens in classes, referred to as ``tags``. Most of the transform schemas live in the ``asdf-standard`` package while most of the transform tags live in ``astropy``. :ref:`gwcs-schemas` are available for the WCS object, coordinate frames and some WCS specific transforms. Packages using GWCS may create their own transforms and schemas and register them as an ``Asdf Extension``. If those are of general use, it is recommended they be included in astropy. Using `gwcs` ------------ .. toctree:: :maxdepth: 2 asdf-wcs-schemas/schemas/index.rst Reference/API ------------- .. automodapi:: asdf_wcs_schemas.integration ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/docs/make.bat0000644000446400020070000001064100000000000020301 0ustar00eslavichSTSCI\science@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=_build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. changes to make an overview over all changed/added/deprecated items echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Astropy.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Astropy.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) :end ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/pyproject.toml0000644000446400020070000000030000000000000020647 0ustar00eslavichSTSCI\science[build-system] requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] write_to = "src/asdf_wcs_schemas/_version.py" ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0703087 asdf_wcs_schemas-0.1.1/resources/0000755000446400020070000000000000000000000017754 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/resources/__init__.py0000644000446400020070000000000000000000000022053 0ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0706122 asdf_wcs_schemas-0.1.1/resources/manifests/0000755000446400020070000000000000000000000021745 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638484248.0 asdf_wcs_schemas-0.1.1/resources/manifests/gwcs-1.0.0.yaml0000644000446400020070000002055000000000000024230 0ustar00eslavichSTSCI\science%YAML 1.1 --- id: asdf://asdf-format.org/astronomy/gwcs/manifests/gwcs-1.0.0 extension_uri: asdf://asdf-format.org/astronomy/gwcs/extensions/gwcs-1.0.0 title: gwcs extension 1.0 description: |- A set of tags for serializing STScI gwcs models. asdf_standard_requirement: gte: 1.1.0 tags: - tag_uri: tag:stsci.edu:gwcs/celestial_frame-1.0.0 schema_uri: http://stsci.edu/schemas/gwcs/celestial_frame-1.0.0 title: A celestial frame description: |- Represents a celestial frame - tag_uri: tag:stsci.edu:gwcs/composite_frame-1.0.0 schema_uri: http://stsci.edu/schemas/gwcs/composite_frame-1.0.0 title: A set of frames description: |- Represents a set of frames - tag_uri: "tag:stsci.edu:gwcs/direction_cosines-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/direction_cosines-1.0.0" title: > Convert coordinates between vector and direction cosine form. description: | This schema is for transforms which convert to and from direction cosines. - tag_uri: "tag:stsci.edu:gwcs/direction_cosines-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/direction_cosines-1.1.0" title: > Convert coordinates between vector and direction cosine form. description: | This schema is for transforms which convert to and from direction cosines. - tag_uri: "tag:stsci.edu:gwcs/frame2d-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/frame2d-1.0.0" title: > Represents a 2D frame. description: | Represents a 2D frame. - tag_uri: "tag:stsci.edu:gwcs/frame-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/frame-1.0.0" title: | The base class of all coordinate frames. description: | These objects are designed to be nested in arbitrary ways to build up transformation pipelines out of a number of low-level pieces. - tag_uri: "tag:stsci.edu:gwcs/grating_equation-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/grating_equation-1.0.0" title: > A grating equation model. description: | Supports two models: - Given incident angle and wavelength compute the refraction/difraction angle. - Given an incident angle and a refraction angle compute the wavelength. - tag_uri: "tag:stsci.edu:gwcs/grating_equation-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/grating_equation-1.1.0" title: > A grating equation model. description: | Supports two models: - Given incident angle and wavelength compute the refraction/difraction angle. - Given an incident angle and a refraction angle compute the wavelength. - tag_uri: "tag:stsci.edu:gwcs/label_mapper-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/label_mapper-1.0.0" title: > Represents a mapping from a coordinate value to a label. description: | A label mapper instance maps inputs to a label. It is used together with [regions_selector](ref:regions_selector-1.0.0). The [label_mapper](ref:label_mapper-1.0.0) returns the label corresponding to given inputs. The [regions_selector](ref:regions_selector-1.0.0) returns the transform corresponding to this label. This maps inputs (e.g. pixels on a detector) to transforms uniquely. - tag_uri: "tag:stsci.edu:gwcs/label_mapper-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/label_mapper-1.1.0" title: > Represents a mapping from a coordinate value to a label. description: | A label mapper instance maps inputs to a label. It is used together with [regions_selector](ref:regions_selector-1.1.0). The [label_mapper](ref:label_mapper-1.1.0) returns the label corresponding to given inputs. The [regions_selector](ref:regions_selector-1.1.0) returns the transform corresponding to this label. This maps inputs (e.g. pixels on a detector) to transforms uniquely. - tag_uri: "tag:stsci.edu:gwcs/regions_selector-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/regions_selector-1.0.0" title: > Represents a discontinuous transform. description: | Maps regions to transgorms and evaluates the transforms with the corresponding inputs. - tag_uri: "tag:stsci.edu:gwcs/regions_selector-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/regions_selector-1.1.0" title: > Represents a discontinuous transform. description: | Maps regions to transgorms and evaluates the transforms with the corresponding inputs. - tag_uri: "tag:stsci.edu:gwcs/sellmeier_glass-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/sellmeier_glass-1.0.0" title: > Sellmeier equation for glass description: | Sellmeier equation for glass. $$ n(\\lambda)^2 = 1 + \\frac{(B1 * \\lambda^2 )}{(\\lambda^2 - C1)} + \\frac{(B2 * \\lambda^2 )}{(\\lambda^2 - C2)} + \\frac{(B3 * \\lambda^2 )}{(\\lambda^2 - C3)} $$ - tag_uri: "tag:stsci.edu:gwcs/sellmeier_glass-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/sellmeier_glass-1.1.0" title: > Sellmeier equation for glass description: | Sellmeier equation for glass. $$ n(\\lambda)^2 = 1 + \\frac{(B1 * \\lambda^2 )}{(\\lambda^2 - C1)} + \\frac{(B2 * \\lambda^2 )}{(\\lambda^2 - C2)} + \\frac{(B3 * \\lambda^2 )}{(\\lambda^2 - C3)} $$ - tag_uri: "tag:stsci.edu:gwcs/sellmeier_zemax-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/sellmeier_zemax-1.0.0" title: Sellmeier equation for glass used by Zemax description: | Sellmeier equation for glass used by Zemax - tag_uri: "tag:stsci.edu:gwcs/sellmeier_zemax-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/sellmeier_zemax-1.1.0" title: Sellmeier equation for glass used by Zemax description: | Sellmeier equation for glass used by Zemax - tag_uri: "tag:stsci.edu:gwcs/snell3d-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/snell3d-1.0.0" title: Snell Law in 3D space description: | Snell Law in 3D. Inputs are index of refraction and direction cosines. Outputs are direction cosines. - tag_uri: "tag:stsci.edu:gwcs/snell3d-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/snell3d-1.1.0" title: Snell Law in 3D space description: | Snell Law in 3D. Inputs are index of refraction and direction cosines. Outputs are direction cosines. - tag_uri: "tag:stsci.edu:gwcs/spectral_frame-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/spectral_frame-1.0.0" title: > Represents a spectral frame. description: > - tag_uri: "tag:stsci.edu:gwcs/spherical_cartesian-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/spherical_cartesian-1.0.0" title: > Convert coordinates between spherical and Cartesian coordinates. description: | This schema is for transforms which convert between spherical coordinates (on the unit sphere) and Cartesian coordinates. - tag_uri: "tag:stsci.edu:gwcs/spherical_cartesian-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/spherical_cartesian-1.1.0" title: > Convert coordinates between spherical and Cartesian coordinates. description: | This schema is for transforms which convert between spherical coordinates (on the unit sphere) and Cartesian coordinates. - tag_uri: "tag:stsci.edu:gwcs/step-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/step-1.0.0" title: > Describes a single step of a WCS transform pipeline. description: > - tag_uri: "tag:stsci.edu:gwcs/step-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/step-1.1.0" title: > Describes a single step of a WCS transform pipeline. description: > - tag_uri: "tag:stsci.edu:gwcs/stokes_frame-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/stokes_frame-1.0.0" title: > Represents a stokes frame description: > - tag_uri: "tag:stsci.edu:gwcs/temporal_frame-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/temporal_frame-1.0.0" title: > Represents a temporal frame. description: > - tag_uri: "tag:stsci.edu:gwcs/wcs-1.0.0" schema_uri: "http://stsci.edu/schemas/gwcs/wcs-1.0.0" title: > A system for describing generalized world coordinate transformations. description: > ASDF WCS is a way of specifying transformations (usually from detector space to world coordinate space and back) by using the transformations in the `transform-schema` module. - tag_uri: "tag:stsci.edu:gwcs/wcs-1.1.0" schema_uri: "http://stsci.edu/schemas/gwcs/wcs-1.1.0" title: > A system for describing generalized world coordinate transformations. description: > ASDF WCS is a way of specifying transformations (usually from detector space to world coordinate space and back) by using the transformations in the `transform-schema` module. ... ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1638547498.058513 asdf_wcs_schemas-0.1.1/resources/schemas/0000755000446400020070000000000000000000000021377 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1638547498.058631 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/0000755000446400020070000000000000000000000023300 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0844445 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/0000755000446400020070000000000000000000000024243 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350153.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/celestial_frame-1.0.0.yaml0000644000446400020070000000071100000000000030677 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/celestial_frame-1.0.0" tag: "tag:stsci.edu:gwcs/celestial_frame-1.0.0" title: > Represents a celestial frame. allOf: - type: object properties: axes_names: minItems: 2 maxItems: 3 axes_order: minItems: 2 maxItems: 3 unit: minItems: 2 maxItems: 3 - $ref: frame-1.0.0 ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350160.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/composite_frame-1.0.0.yaml0000644000446400020070000000070700000000000030741 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/composite_frame-1.0.0" tag: "tag:stsci.edu:gwcs/composite_frame-1.0.0" title: > Represents a set of frames. allOf: - type: object properties: name: description: Name of composite frame. type: string frames: description: List of frames in the composite frame. type: array ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/direction_cosines-1.0.0.yaml0000644000446400020070000000175100000000000031270 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/direction_cosines-1.0.0" tag: "tag:stsci.edu:gwcs/direction_cosines-1.0.0" title: > Convert coordinates between vector and direction cosine form. description: | This schema is for transforms which convert to and from direction cosines. examples: - - Convert direction cosines to vectors. - | ! transform_type: from_direction_cosines - - Convert vectors to directional cosines. - | ! transform_type: to_direction_cosines allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - object: properties: transform_type: description: | The type of transform/class to initialize. type: string enum: [to_direction_cosines, from_direction_cosines] required: [transform_type] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/direction_cosines-1.1.0.yaml0000644000446400020070000000175100000000000031271 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/direction_cosines-1.1.0" tag: "tag:stsci.edu:gwcs/direction_cosines-1.1.0" title: > Convert coordinates between vector and direction cosine form. description: | This schema is for transforms which convert to and from direction cosines. examples: - - Convert direction cosines to vectors. - | ! transform_type: from_direction_cosines - - Convert vectors to directional cosines. - | ! transform_type: to_direction_cosines allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - object: properties: transform_type: description: | The type of transform/class to initialize. type: string enum: [to_direction_cosines, from_direction_cosines] required: [transform_type] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/frame-1.0.0.yaml0000644000446400020070000000410200000000000026650 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/frame-1.0.0" title: | The base class of all coordinate frames. description: | These objects are designed to be nested in arbitrary ways to build up transformation pipelines out of a number of low-level pieces. examples: - - | A celestial frame in the ICRS reference frame. - | ! axes_names: [lon, lat] name: CelestialFrame reference_frame: ! frame_attributes: {} unit: [!unit/unit-1.0.0 deg, !unit/unit-1.0.0 deg] - - | A pixel frame in three dimensions - | ! axes_names: [raster position, slit position, wavelength] axes_order: [0, 1, 2] axes_type: [SPATIAL, SPATIAL, SPECTRAL] name: pixel naxes: 3 unit: [!unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel] type: object properties: name: description: | A user-friendly name for the frame. type: string axes_order: description: | The order of the axes. type: array items: type: integer axes_names: description: | The name of each axis in this frame. type: array items: anyOf: - type: string - type: 'null' reference_frame: description: | The reference frame. $ref: "http://astropy.org/schemas/astropy/coordinates/frames/baseframe-1.0.0" unit: description: | Units for each axis. type: array items: $ref: "http://stsci.edu/schemas/asdf/unit/unit-1.0.0" axis_physical_types: description: | An iterable of strings describing the physical type for each world axis. These should be names from the VO UCD1+ controlled Vocabulary (http://www.ivoa.net/documents/latest/UCDlist.html). type: array items: type: string required: [name] additionalProperties: true ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350196.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/frame2d-1.0.0.yaml0000644000446400020070000000124000000000000027076 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/frame2d-1.0.0" tag: "tag:stsci.edu:gwcs/frame2d-1.0.0" title: > Represents a 2D frame. examples: - - | A two dimensional spatial frame - | ! axes_names: [lon, lat] name: Frame2D unit: [!unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel] allOf: - type: object properties: axes_names: minItems: 2 maxItems: 2 axes_order: minItems: 2 maxItems: 2 unit: minItems: 2 maxItems: 2 - $ref: frame-1.0.0 ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/grating_equation-1.0.0.yaml0000644000446400020070000000257500000000000031132 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/grating_equation-1.0.0" tag: "tag:stsci.edu:gwcs/grating_equation-1.0.0" title: > A grating equation model. description: | Supports two models: - Given incident angle and wavelength compute the refraction/difraction angle. - Given an incident angle and a refraction angle compute the wavelength. examples: - - AnglesFromGratingEquation3D model. - | ! groove_density: 2700.0 order: 2.0 output: angle - - WavelengthFromGratingEquation model. - | ! groove_density: 2700.0 order: 2.0 output: wavelength allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - type: object properties: groove_density: description: | The groove density of the grating anyOf: - type: number - $ref: "http://stsci.edu/schemas/asdf/unit/quantity-1.1.0" order: description: | Spectral order type: number output: type: string description: | indicates which quantity the grating equation is solved for. enum: [wavelength, angle] required: [groove_density, order, output] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/grating_equation-1.1.0.yaml0000644000446400020070000000257500000000000031133 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/grating_equation-1.1.0" tag: "tag:stsci.edu:gwcs/grating_equation-1.1.0" title: > A grating equation model. description: | Supports two models: - Given incident angle and wavelength compute the refraction/difraction angle. - Given an incident angle and a refraction angle compute the wavelength. examples: - - AnglesFromGratingEquation3D model. - | ! groove_density: 2700.0 order: 2.0 output: angle - - WavelengthFromGratingEquation model. - | ! groove_density: 2700.0 order: 2.0 output: wavelength allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - type: object properties: groove_density: description: | The groove density of the grating anyOf: - type: number - $ref: "http://stsci.edu/schemas/asdf/unit/quantity-1.1.0" order: description: | Spectral order type: number output: type: string description: | indicates which quantity the grating equation is solved for. enum: [wavelength, angle] required: [groove_density, order, output] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/label_mapper-1.0.0.yaml0000644000446400020070000001001200000000000030176 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/label_mapper-1.0.0" tag: "tag:stsci.edu:gwcs/label_mapper-1.0.0" title: > Represents a mapping from a coordinate value to a label. description: | A label mapper instance maps inputs to a label. It is used together with [regions_selector](ref:regions_selector-1.0.0). The [label_mapper](ref:label_mapper-1.0.0) returns the label corresponding to given inputs. The [regions_selector](ref:regions_selector-1.0.0) returns the transform corresponding to this label. This maps inputs (e.g. pixels on a detector) to transforms uniquely. examples: - - Map array indices are to labels. - | ! mapper: !core/ndarray-1.0.0 data: - [1, 0, 2] - [1, 0, 2] - [1, 0, 2] datatype: int64 shape: [3, 3] no_label: 0 - - Map numbers dictionary to transforms which return labels. - | ! atol: 1.0e-08 inputs: [x, y] inputs_mapping: !transform/remap_axes-1.1.0 mapping: [0] n_inputs: 2 mapper: !!omap - !!omap labels: [-1.67833272, -1.9580548, -1.118888] - !!omap models: - !transform/shift-1.1.0 {offset: 6.0} - !transform/shift-1.1.0 {offset: 2.0} - !transform/shift-1.1.0 {offset: 4.0} no_label: 0 - - Map a number within a range of numbers to transforms which return labels. - | ! mapper: !!omap - !!omap labels: - [3.2, 4.1] - [2.67, 2.98] - [1.95, 2.3] - !!omap models: - !transform/shift-1.1.0 {offset: 6.0} - !transform/shift-1.1.0 {offset: 2.0} - !transform/shift-1.1.0 {offset: 4.0} inputs: [x, y] inputs_mapping: !transform/remap_axes-1.1.0 mapping: [0] n_inputs: 2 allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - type: object properties: mapper: description: | A mapping of inputs to labels. In the general case this is a `astropy.modeling.core.Model`. It could be a numpy array with the shape of the detector/observation. Pixel values are of type integer or string and represent region labels. Pixels which are not within any region have value ``no_label``. It could be a dictionary which maps tuples to labels or floating point numbers to labels. anyOf: - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - type: object properties: labels: type: array items: anyOf: - type: number - type: array items: type: number minLength: 2 maxLength: 2 models: type: array items: $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" inputs: type: array items: type: string description: | Names of inputs. inputs_mapping: $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" description: | [mapping](https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/transform/remap_axes-1.1.0.html) atol: type: number description: | absolute tolerance to compare keys in mapper. no_label: description: | Fill in value for missing output. anyOf: - type: number - type: string required: [mapper] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/label_mapper-1.1.0.yaml0000644000446400020070000001001200000000000030177 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/label_mapper-1.1.0" tag: "tag:stsci.edu:gwcs/label_mapper-1.1.0" title: > Represents a mapping from a coordinate value to a label. description: | A label mapper instance maps inputs to a label. It is used together with [regions_selector](ref:regions_selector-1.1.0). The [label_mapper](ref:label_mapper-1.1.0) returns the label corresponding to given inputs. The [regions_selector](ref:regions_selector-1.1.0) returns the transform corresponding to this label. This maps inputs (e.g. pixels on a detector) to transforms uniquely. examples: - - Map array indices are to labels. - | ! mapper: !core/ndarray-1.0.0 data: - [1, 0, 2] - [1, 0, 2] - [1, 0, 2] datatype: int64 shape: [3, 3] no_label: 0 - - Map numbers dictionary to transforms which return labels. - | ! atol: 1.0e-08 inputs: [x, y] inputs_mapping: !transform/remap_axes-1.3.0 mapping: [0] n_inputs: 2 mapper: !!omap - !!omap labels: [-1.67833272, -1.9580548, -1.118888] - !!omap models: - !transform/shift-1.2.0 {offset: 6.0} - !transform/shift-1.2.0 {offset: 2.0} - !transform/shift-1.2.0 {offset: 4.0} no_label: 0 - - Map a number within a range of numbers to transforms which return labels. - | ! mapper: !!omap - !!omap labels: - [3.2, 4.1] - [2.67, 2.98] - [1.95, 2.3] - !!omap models: - !transform/shift-1.2.0 {offset: 6.0} - !transform/shift-1.2.0 {offset: 2.0} - !transform/shift-1.2.0 {offset: 4.0} inputs: [x, y] inputs_mapping: !transform/remap_axes-1.3.0 mapping: [0] n_inputs: 2 allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - type: object properties: mapper: description: | A mapping of inputs to labels. In the general case this is a `astropy.modeling.core.Model`. It could be a numpy array with the shape of the detector/observation. Pixel values are of type integer or string and represent region labels. Pixels which are not within any region have value ``no_label``. It could be a dictionary which maps tuples to labels or floating point numbers to labels. anyOf: - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - type: object properties: labels: type: array items: anyOf: - type: number - type: array items: type: number minLength: 2 maxLength: 2 models: type: array items: $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" inputs: type: array items: type: string description: | Names of inputs. inputs_mapping: $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" description: | [mapping](https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/transform/remap_axes-1.3.0.html) atol: type: number description: | absolute tolerance to compare keys in mapper. no_label: description: | Fill in value for missing output. anyOf: - type: number - type: string required: [mapper] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/regions_selector-1.0.0.yaml0000644000446400020070000000641400000000000031134 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/regions_selector-1.0.0" tag: "tag:stsci.edu:gwcs/regions_selector-1.0.0" title: > Represents a discontinuous transform. description: | Maps regions to transgorms and evaluates the transforms with the corresponding inputs. examples: - - Create a regions_selector schema for 2 regions, labeled "1" and "2". - | ! inputs: [x, y] label_mapper: ! mapper: !core/ndarray-1.0.0 datatype: int8 data: - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] datatype: int64 shape: [5, 6] no_label: 0 outputs: [ra, dec, lam] selector: !!omap - !!omap labels: [1, 2] - !!omap transforms: - !transform/compose-1.1.0 forward: - !transform/remap_axes-1.1.0 mapping: [0, 1, 1] - !transform/concatenate-1.1.0 forward: - !transform/concatenate-1.1.0 forward: - !transform/shift-1.1.0 {offset: 1.0} - !transform/shift-1.1.0 {offset: 2.0} - !transform/shift-1.1.0 {offset: 3.0} - !transform/compose-1.1.0 forward: - !transform/remap_axes-1.1.0 mapping: [0, 1, 1] - !transform/concatenate-1.1.0 forward: - !transform/concatenate-1.1.0 forward: - !transform/scale-1.1.0 {factor: 2.0} - !transform/scale-1.1.0 {factor: 3.0} - !transform/scale-1.1.0 {factor: 3.0} undefined_transform_value: .nan allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - type: object properties: label_mapper: description: | An instance of [label_mapper-1.1.0](ref:label_mapper-1.0.0) $ref: "./label_mapper-1.0.0" inputs: description: | Names of inputs. type: array items: type: string outputs: description: | Names of outputs. type: array items: type: string selector: description: | A mapping of regions to trransforms. type: object properties: labels: description: | An array of unique region labels. type: array items: type: - integer - string transforms: description: | A transform for each region. The order should match the order of labels. type: array items: $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" undefined_transform_value: description: | Value to be returned if there's no transform defined for the inputs. type: number required: [label_mapper, inputs, outputs, selector] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/regions_selector-1.1.0.yaml0000644000446400020070000000641400000000000031135 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/regions_selector-1.1.0" tag: "tag:stsci.edu:gwcs/regions_selector-1.1.0" title: > Represents a discontinuous transform. description: | Maps regions to transgorms and evaluates the transforms with the corresponding inputs. examples: - - Create a regions_selector schema for 2 regions, labeled "1" and "2". - | ! inputs: [x, y] label_mapper: ! mapper: !core/ndarray-1.0.0 datatype: int8 data: - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] - [0, 1, 1, 0, 2, 0] datatype: int64 shape: [5, 6] no_label: 0 outputs: [ra, dec, lam] selector: !!omap - !!omap labels: [1, 2] - !!omap transforms: - !transform/compose-1.2.0 forward: - !transform/remap_axes-1.3.0 mapping: [0, 1, 1] - !transform/concatenate-1.2.0 forward: - !transform/concatenate-1.2.0 forward: - !transform/shift-1.2.0 {offset: 1.0} - !transform/shift-1.2.0 {offset: 2.0} - !transform/shift-1.2.0 {offset: 3.0} - !transform/compose-1.2.0 forward: - !transform/remap_axes-1.3.0 mapping: [0, 1, 1] - !transform/concatenate-1.2.0 forward: - !transform/concatenate-1.2.0 forward: - !transform/scale-1.2.0 {factor: 2.0} - !transform/scale-1.2.0 {factor: 3.0} - !transform/scale-1.2.0 {factor: 3.0} undefined_transform_value: .nan allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - type: object properties: label_mapper: description: | An instance of [label_mapper-1.1.0](ref:label_mapper-1.1.0) $ref: "./label_mapper-1.1.0" inputs: description: | Names of inputs. type: array items: type: string outputs: description: | Names of outputs. type: array items: type: string selector: description: | A mapping of regions to trransforms. type: object properties: labels: description: | An array of unique region labels. type: array items: type: - integer - string transforms: description: | A transform for each region. The order should match the order of labels. type: array items: $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" undefined_transform_value: description: | Value to be returned if there's no transform defined for the inputs. type: number required: [label_mapper, inputs, outputs, selector] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/sellmeier_glass-1.0.0.yaml0000644000446400020070000000211100000000000030726 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/sellmeier_glass-1.0.0" tag: "tag:stsci.edu:gwcs/sellmeier_glass-1.0.0" title: Sellmeier equation for glass description: | Sellmeier equation for glass. $$ n(\\lambda)^2 = 1 + \\frac{(B1 * \\lambda^2 )}{(\\lambda^2 - C1)} + \\frac{(B2 * \\lambda^2 )}{(\\lambda^2 - C2)} + \\frac{(B3 * \\lambda^2 )}{(\\lambda^2 - C3)} $$ allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - type: object properties: B_coef: description: | B coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 C_coef: description: | C coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/sellmeier_glass-1.1.0.yaml0000644000446400020070000000211100000000000030727 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/sellmeier_glass-1.1.0" tag: "tag:stsci.edu:gwcs/sellmeier_glass-1.1.0" title: Sellmeier equation for glass description: | Sellmeier equation for glass. $$ n(\\lambda)^2 = 1 + \\frac{(B1 * \\lambda^2 )}{(\\lambda^2 - C1)} + \\frac{(B2 * \\lambda^2 )}{(\\lambda^2 - C2)} + \\frac{(B3 * \\lambda^2 )}{(\\lambda^2 - C3)} $$ allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - type: object properties: B_coef: description: | B coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 C_coef: description: | C coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/sellmeier_zemax-1.0.0.yaml0000644000446400020070000000376100000000000030755 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/sellmeier_zemax-1.0.0" tag: "tag:stsci.edu:gwcs/sellmeier_zemax-1.0.0" title: Sellmeier equation for glass used by Zemax description: | Sellmeier equation for glass used by Zemax allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - type: object properties: B_coef: description: | B coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 C_coef: description: | C coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 D_coef: description: | Thermal D coefficients of the glass. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 E_coef: description: | Thermal E coefficients of the glass. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 ref_temperature: description: | Reference temperature of the glass in Kelvin. type: number ref_pressure: description: | Reference pressure of the glass in ATM. type: number temperature: description: | System temperature in Kelvin. type: number pressure: description: | System pressure in ATM. type: number required: [B_coef, C_coef, D_coef, E_coef, ref_temperature, ref_pressure, temperature, pressure] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/sellmeier_zemax-1.1.0.yaml0000644000446400020070000000376100000000000030756 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/sellmeier_zemax-1.1.0" tag: "tag:stsci.edu:gwcs/sellmeier_zemax-1.1.0" title: Sellmeier equation for glass used by Zemax description: | Sellmeier equation for glass used by Zemax allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - type: object properties: B_coef: description: | B coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 C_coef: description: | C coefficients in Sellmeier equation. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 D_coef: description: | Thermal D coefficients of the glass. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 E_coef: description: | Thermal E coefficients of the glass. anyOf: - type: array - $ref: "http://stsci.edu/schemas/asdf/core/ndarray-1.0.0" items: type: number minItems: 3 maxItems: 3 ref_temperature: description: | Reference temperature of the glass in Kelvin. type: number ref_pressure: description: | Reference pressure of the glass in ATM. type: number temperature: description: | System temperature in Kelvin. type: number pressure: description: | System pressure in ATM. type: number required: [B_coef, C_coef, D_coef, E_coef, ref_temperature, ref_pressure, temperature, pressure] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/snell3d-1.0.0.yaml0000644000446400020070000000057700000000000027136 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/snell3d-1.0.0" tag: "tag:stsci.edu:gwcs/snell3d-1.0.0" title: Snell Law in 3D space description: | Snell Law in 3D. Inputs are index of refraction and direction cosines. Outputs are direction cosines. $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/snell3d-1.1.0.yaml0000644000446400020070000000057700000000000027137 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/snell3d-1.1.0" tag: "tag:stsci.edu:gwcs/snell3d-1.1.0" title: Snell Law in 3D space description: | Snell Law in 3D. Inputs are index of refraction and direction cosines. Outputs are direction cosines. $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350572.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/spectral_frame-1.0.0.yaml0000644000446400020070000000116400000000000030552 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/spectral_frame-1.0.0" tag: "tag:stsci.edu:gwcs/spectral_frame-1.0.0" title: > Represents a spectral frame. allOf: - type: object properties: reference_position: description: | The position of the reference frame. enum: [geocenter, barycenter, heliocenter] default: geocenter axes_names: minItems: 1 maxItems: 1 axes_order: minItems: 1 maxItems: 1 unit: minItems: 1 maxItems: 1 - $ref: frame-1.0.0 ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/spherical_cartesian-1.0.0.yaml0000644000446400020070000000234500000000000031570 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/spherical_cartesian-1.0.0" tag: "tag:stsci.edu:gwcs/spherical_cartesian-1.0.0" title: > Convert coordinates between spherical and Cartesian coordinates. description: | This schema is for transforms which convert between spherical coordinates (on the unit sphere) and Cartesian coordinates. examples: - - Convert spherical coordinates to Cartesian coordinates. - | ! transform_type: spherical_to_cartesian - - Convert Cartesian coordinates to spherical coordinates. - | ! transform_type: cartesian_to_spherical allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - object: properties: wrap_lon_at: description: Angle at which to wrap the longitude angle. type: integer enum: [180, 360] default: 360 transform_type: description: The type of transform/class to initialize. type: string enum: [spherical_to_cartesian, cartesian_to_spherical] required: [transform_type, wrap_lon_at] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/spherical_cartesian-1.1.0.yaml0000644000446400020070000000234500000000000031571 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/spherical_cartesian-1.1.0" tag: "tag:stsci.edu:gwcs/spherical_cartesian-1.1.0" title: > Convert coordinates between spherical and Cartesian coordinates. description: | This schema is for transforms which convert between spherical coordinates (on the unit sphere) and Cartesian coordinates. examples: - - Convert spherical coordinates to Cartesian coordinates. - | ! transform_type: spherical_to_cartesian - - Convert Cartesian coordinates to spherical coordinates. - | ! transform_type: cartesian_to_spherical allOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - object: properties: wrap_lon_at: description: Angle at which to wrap the longitude angle. type: integer enum: [180, 360] default: 360 transform_type: description: The type of transform/class to initialize. type: string enum: [spherical_to_cartesian, cartesian_to_spherical] required: [transform_type, wrap_lon_at] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/step-1.0.0.yaml0000644000446400020070000000142000000000000026531 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/step-1.0.0" tag: "tag:stsci.edu:gwcs/step-1.0.0" title: > Describes a single step of a WCS transform pipeline. description: > examples: [] type: object properties: frame: description: | The frame of the inputs to the transform. anyOf: - type: string - $ref: frame-1.0.0 transform: description: | The transform from this step to the next one. The last step in a WCS should not have a transform, but exists only to describe the frames and units of the final output axes. anyOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.1.0" - type: 'null' default: null required: [frame] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/step-1.1.0.yaml0000644000446400020070000000142000000000000026532 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/step-1.1.0" tag: "tag:stsci.edu:gwcs/step-1.1.0" title: > Describes a single step of a WCS transform pipeline. description: > examples: [] type: object properties: frame: description: | The frame of the inputs to the transform. anyOf: - type: string - $ref: frame-1.0.0 transform: description: | The transform from this step to the next one. The last step in a WCS should not have a transform, but exists only to describe the frames and units of the final output axes. anyOf: - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0" - type: 'null' default: null required: [frame] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350771.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/stokes_frame-1.0.0.yaml0000644000446400020070000000066300000000000030250 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/stokes_frame-1.0.0" tag: "tag:stsci.edu:gwcs/stokes_frame-1.0.0" title: > Represents a stokes frame type: object properties: name: description: | A user-friendly name for the frame. type: string axes_order: description: | The order of the axes. type: array items: type: integer ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637771732.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/temporal_frame-1.0.0.yaml0000644000446400020070000000225100000000000030556 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/temporal_frame-1.0.0" tag: "tag:stsci.edu:gwcs/temporal_frame-1.0.0" title: > Represents a temporal frame. type: object properties: name: description: | A user-friendly name for the frame. type: string axes_order: description: | The order of the axes. type: array items: type: integer axes_names: description: | The name of each axis in this frame. type: array items: anyOf: - type: string - type: 'null' reference_frame: description: | The reference frame. $ref: "http://stsci.edu/schemas/asdf/time/time-1.1.0" unit: description: | Units for each axis. type: array items: $ref: "http://stsci.edu/schemas/asdf/unit/unit-1.0.0" axis_physical_types: description: | An iterable of strings describing the physical type for each world axis. These should be names from the VO UCD1+ controlled Vocabulary (http://www.ivoa.net/documents/latest/UCDlist.html). type: array items: type: string required: [name] ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350754.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/wcs-1.0.0.yaml0000644000446400020070000000206700000000000026362 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/wcs-1.0.0" tag: "tag:stsci.edu:gwcs/wcs-1.0.0" title: > A system for describing generalized world coordinate transformations. description: > ASDF WCS is a way of specifying transformations (usually from detector space to world coordinate space and back) by using the transformations in the `transform-schema` module. type: object properties: name: description: | A descriptive name for this WCS. type: string steps: description: | A list of steps in the forward transformation from detector to world coordinates. The inverse transformation is determined automatically by reversing this list, and inverting each of the individual transforms according to the rules described in [inverse](https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/transform/transform-1.1.0.html#inverse). type: array items: $ref: step-1.0.0 required: [name, steps] additionalProperties: true ... ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350145.0 asdf_wcs_schemas-0.1.1/resources/schemas/stsci.edu/gwcs/wcs-1.1.0.yaml0000644000446400020070000000206700000000000026363 0ustar00eslavichSTSCI\science%YAML 1.1 --- $schema: "http://stsci.edu/schemas/yaml-schema/draft-01" id: "http://stsci.edu/schemas/gwcs/wcs-1.1.0" tag: "tag:stsci.edu:gwcs/wcs-1.1.0" title: > A system for describing generalized world coordinate transformations. description: > ASDF WCS is a way of specifying transformations (usually from detector space to world coordinate space and back) by using the transformations in the `transform-schema` module. type: object properties: name: description: | A descriptive name for this WCS. type: string steps: description: | A list of steps in the forward transformation from detector to world coordinates. The inverse transformation is determined automatically by reversing this list, and inverting each of the individual transforms according to the rules described in [inverse](https://asdf-standard.readthedocs.io/en/latest/generated/stsci.edu/asdf/transform/transform-1.2.0.html#inverse). type: array items: $ref: step-1.1.0 required: [name, steps] additionalProperties: true ... ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0901995 asdf_wcs_schemas-0.1.1/setup.cfg0000644000446400020070000000257100000000000017570 0ustar00eslavichSTSCI\science[metadata] name = asdf_wcs_schemas description = ASDF WCS Schemas long_description = file: README.md long_description_content_type = text/markdown author = STScI license = BSD-3-Clause url = https://github.com/spacetelescope/asdf-wcs-schemas project_urls = Bug Tracker = https://github.com/spacetelescope/asdf-wcs-schemas/issues Source Code = https://github.com/spacetelescope/asdf-wcs-schemas classifiers = Intended Audience :: Science/Research Topic :: Scientific/Engineering :: Astronomy License :: OSI Approved :: BSD License Programming Language :: Python :: 3 edit_on_github = False [options] python_requires = >=3.6 zip_safe = true setup_requires = setuptools setuptools_scm install_requires = asdf>=2.8.0 importlib_resources>=3;python_version<"3.9" [options.extras_require] docs = sphinx sphinx-automodapi sphinx-rtd-theme stsci-rtd-theme sphinx-astropy sphinx-asdf test = pytest>=4.6.0 pytest-openfiles>=0.5.0 [options.entry_points] asdf.resource_mappings = asdf_wcs_schemas = asdf_wcs_schemas.integration:get_resource_mappings [tool:pytest] asdf_schema_root = resources/schemas asdf_schema_tests_enabled = false asdf_schema_ignore_unrecognized_tag = true testpaths = tests resources [flake8] exclude = .git, __pycache__, build, dist, eggs, *.egg, .tox max-line-length = 130 ignore = E501, E203, W503, W504, W605, E741 [egg_info] tag_build = tag_date = 0 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/setup.py0000644000446400020070000000074300000000000017460 0ustar00eslavichSTSCI\science#!/usr/bin/env python from setuptools import setup, find_packages packages = find_packages(where="src") packages.append("asdf_wcs_schemas.resources") package_dir = { "": "src", "asdf_wcs_schemas.resources": "resources", } package_data = { "asdf_wcs_schemas.resources": [ "manifests/*.yaml", "schemas/stsci.edu/gwcs/*.yaml" ], } setup( use_scm_version=True, packages=packages, package_dir=package_dir, package_data=package_data, ) ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0592592 asdf_wcs_schemas-0.1.1/src/0000755000446400020070000000000000000000000016531 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0855758 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas/0000755000446400020070000000000000000000000022025 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas/__init__.py0000644000446400020070000000011100000000000024127 0ustar00eslavichSTSCI\sciencefrom ._version import version as __version__ __all__ = ["__version__"] ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas/_version.py0000644000446400020070000000021600000000000024222 0ustar00eslavichSTSCI\science# coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control version = '0.1.1' version_tuple = (0, 1, 1) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638484348.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas/integration.py0000644000446400020070000000231000000000000024716 0ustar00eslavichSTSCI\scienceimport sys from pathlib import Path from asdf.resource import DirectoryResourceMapping if sys.version_info < (3, 9): import importlib_resources else: import importlib.resources as importlib_resources import asdf_wcs_schemas def get_resource_mappings(): """ Get the resource mapping instances for the datamodel schemas and manifests. This method is registered with the asdf.resource_mappings entry point. Returns ------- list of collections.abc.Mapping """ resources_root = importlib_resources.files(asdf_wcs_schemas) / "resources" if not resources_root.is_dir(): # In an editable install, the resources directory will exist off the # repository root: resources_root = Path(__file__).parent.parent.parent / "resources" if not resources_root.is_dir(): raise RuntimeError("Missing resources directory") return [ DirectoryResourceMapping( resources_root / "schemas" / "stsci.edu" / "gwcs", "http://stsci.edu/schemas/gwcs/", ), DirectoryResourceMapping( resources_root / "manifests", "asdf://asdf-format.org/astronomy/gwcs/manifests/", ), ] ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1638547498.0876763 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/0000755000446400020070000000000000000000000023517 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/PKG-INFO0000644000446400020070000000176400000000000024624 0ustar00eslavichSTSCI\scienceMetadata-Version: 2.1 Name: asdf-wcs-schemas Version: 0.1.1 Summary: ASDF WCS Schemas Home-page: https://github.com/spacetelescope/asdf-wcs-schemas Author: STScI License: BSD-3-Clause Project-URL: Bug Tracker, https://github.com/spacetelescope/asdf-wcs-schemas/issues Project-URL: Source Code, https://github.com/spacetelescope/asdf-wcs-schemas Platform: UNKNOWN Classifier: Intended Audience :: Science/Research Classifier: Topic :: Scientific/Engineering :: Astronomy Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python :: 3 Requires-Python: >=3.6 Description-Content-Type: text/markdown Provides-Extra: docs Provides-Extra: test License-File: LICENSE # asdf-wcs-schemas This package provides ASDF schemas for validating WCS tags. Users should not need to install this directly; instead, install an implementation package such as gwcs, which includes asdf-wcs-schemas as a dependency. ![CI](https://github.com/asdf-format/asdf-wcs-schemas/workflows/CI/badge.svg) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/SOURCES.txt0000644000446400020070000000460300000000000025406 0ustar00eslavichSTSCI\science.gitignore CHANGES.rst CODE_OF_CONDUCT.md LICENSE README.md pyproject.toml setup.cfg setup.py tox.ini .github/workflows/ci.yml docs/Makefile docs/conf.py docs/index.rst docs/make.bat docs/_templates/autosummary/base.rst docs/_templates/autosummary/class.rst docs/_templates/autosummary/module.rst docs/asdf-wcs-schemas/schemas/index.rst resources/__init__.py resources/manifests/gwcs-1.0.0.yaml resources/schemas/stsci.edu/gwcs/celestial_frame-1.0.0.yaml resources/schemas/stsci.edu/gwcs/composite_frame-1.0.0.yaml resources/schemas/stsci.edu/gwcs/direction_cosines-1.0.0.yaml resources/schemas/stsci.edu/gwcs/direction_cosines-1.1.0.yaml resources/schemas/stsci.edu/gwcs/frame-1.0.0.yaml resources/schemas/stsci.edu/gwcs/frame2d-1.0.0.yaml resources/schemas/stsci.edu/gwcs/grating_equation-1.0.0.yaml resources/schemas/stsci.edu/gwcs/grating_equation-1.1.0.yaml resources/schemas/stsci.edu/gwcs/label_mapper-1.0.0.yaml resources/schemas/stsci.edu/gwcs/label_mapper-1.1.0.yaml resources/schemas/stsci.edu/gwcs/regions_selector-1.0.0.yaml resources/schemas/stsci.edu/gwcs/regions_selector-1.1.0.yaml resources/schemas/stsci.edu/gwcs/sellmeier_glass-1.0.0.yaml resources/schemas/stsci.edu/gwcs/sellmeier_glass-1.1.0.yaml resources/schemas/stsci.edu/gwcs/sellmeier_zemax-1.0.0.yaml resources/schemas/stsci.edu/gwcs/sellmeier_zemax-1.1.0.yaml resources/schemas/stsci.edu/gwcs/snell3d-1.0.0.yaml resources/schemas/stsci.edu/gwcs/snell3d-1.1.0.yaml resources/schemas/stsci.edu/gwcs/spectral_frame-1.0.0.yaml resources/schemas/stsci.edu/gwcs/spherical_cartesian-1.0.0.yaml resources/schemas/stsci.edu/gwcs/spherical_cartesian-1.1.0.yaml resources/schemas/stsci.edu/gwcs/step-1.0.0.yaml resources/schemas/stsci.edu/gwcs/step-1.1.0.yaml resources/schemas/stsci.edu/gwcs/stokes_frame-1.0.0.yaml resources/schemas/stsci.edu/gwcs/temporal_frame-1.0.0.yaml resources/schemas/stsci.edu/gwcs/wcs-1.0.0.yaml resources/schemas/stsci.edu/gwcs/wcs-1.1.0.yaml src/asdf_wcs_schemas/__init__.py src/asdf_wcs_schemas/_version.py src/asdf_wcs_schemas/integration.py src/asdf_wcs_schemas.egg-info/PKG-INFO src/asdf_wcs_schemas.egg-info/SOURCES.txt src/asdf_wcs_schemas.egg-info/dependency_links.txt src/asdf_wcs_schemas.egg-info/entry_points.txt src/asdf_wcs_schemas.egg-info/requires.txt src/asdf_wcs_schemas.egg-info/top_level.txt src/asdf_wcs_schemas.egg-info/zip-safe tests/conftest.py tests/test_integration.py tests/test_manifest.py tests/test_schemas.py././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/dependency_links.txt0000644000446400020070000000000100000000000027565 0ustar00eslavichSTSCI\science ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/entry_points.txt0000644000446400020070000000014000000000000027010 0ustar00eslavichSTSCI\science[asdf.resource_mappings] asdf_wcs_schemas = asdf_wcs_schemas.integration:get_resource_mappings ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/requires.txt0000644000446400020070000000031100000000000026112 0ustar00eslavichSTSCI\scienceasdf>=2.8.0 [:python_version < "3.9"] importlib_resources>=3 [docs] sphinx sphinx-automodapi sphinx-rtd-theme stsci-rtd-theme sphinx-astropy sphinx-asdf [test] pytest>=4.6.0 pytest-openfiles>=0.5.0 ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/top_level.txt0000644000446400020070000000002100000000000026242 0ustar00eslavichSTSCI\scienceasdf_wcs_schemas ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638547497.0 asdf_wcs_schemas-0.1.1/src/asdf_wcs_schemas.egg-info/zip-safe0000644000446400020070000000000100000000000025147 0ustar00eslavichSTSCI\science ././@PaxHeader0000000000000000000000000000003200000000000010210 xustar0026 mtime=1638547498.08911 asdf_wcs_schemas-0.1.1/tests/0000755000446400020070000000000000000000000017104 5ustar00eslavichSTSCI\science././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1638484430.0 asdf_wcs_schemas-0.1.1/tests/conftest.py0000644000446400020070000000034300000000000021303 0ustar00eslavichSTSCI\scienceimport asdf import pytest import yaml @pytest.fixture(scope="session") def manifest(): return yaml.safe_load( asdf.get_config().resource_manager["asdf://asdf-format.org/astronomy/gwcs/manifests/gwcs-1.0.0"] ) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/tests/test_integration.py0000644000446400020070000000156300000000000023045 0ustar00eslavichSTSCI\science""" Test that the asdf library integration is working properly. """ from pathlib import Path import asdf import pytest import yaml _MANIFESTS_ROOT = Path(__file__).parent.parent / "resources" / "manifests" _SCHEMAS_ROOT = Path(__file__).parent.parent / "resources" / "schemas" @pytest.mark.parametrize("manifest_path", _MANIFESTS_ROOT.glob("*.yaml")) def test_manifest_integration(manifest_path): content = manifest_path.read_bytes() manifest = yaml.safe_load(content) asdf_content = asdf.get_config().resource_manager[manifest["id"]] assert asdf_content == content @pytest.mark.parametrize("schema_path", _SCHEMAS_ROOT.glob("**/*.yaml")) def test_schema_integration(schema_path): content = schema_path.read_bytes() schema = yaml.safe_load(content) asdf_content = asdf.get_config().resource_manager[schema["id"]] assert asdf_content == content ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/tests/test_manifest.py0000644000446400020070000000136300000000000022326 0ustar00eslavichSTSCI\science""" Test that the manifest file is correctly structured and refers to schemas that exist. """ import asdf def test_manifest_valid(manifest): schema = asdf.schema.load_schema("asdf://asdf-format.org/core/schemas/extension_manifest-1.0.0") asdf.schema.validate(manifest, schema=schema) assert "title" in manifest assert "description" in manifest for tag in manifest["tags"]: # Check that the schema exists: assert tag["schema_uri"] in asdf.get_config().resource_manager # These are not required by the manifest schema but we're holding ourselves # to a higher standard: assert "title" in tag assert "description" in tag assert tag["tag_uri"].startswith("tag:stsci.edu:gwcs/") ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/tests/test_schemas.py0000644000446400020070000001005200000000000022136 0ustar00eslavichSTSCI\science""" Test features of the schemas not covered by the metaschema. """ from collections.abc import Mapping import asdf import pytest import yaml SCHEMA_URI_PREFIX = "http://stsci.edu/schemas/gwcs/" METASCHEMA_URI = "http://stsci.edu/schemas/yaml-schema/draft-01" SCHEMA_URIS = [ u for u in asdf.get_config().resource_manager if u.startswith(SCHEMA_URI_PREFIX) ] @pytest.fixture(scope="session", params=SCHEMA_URIS) def schema_content(request): return asdf.get_config().resource_manager[request.param] @pytest.fixture(scope="session", params=SCHEMA_URIS) def schema(request): return yaml.safe_load(asdf.get_config().resource_manager[request.param]) @pytest.fixture(scope="session") def valid_tag_uris(manifest): uris = {t["tag_uri"] for t in manifest["tags"]} uris.update([ "tag:stsci.edu:asdf/time/time-1.1.0", "tag:stsci.edu:asdf/core/ndarray-1.0.0", ]) return uris def test_required_properties(schema): assert schema["$schema"] == METASCHEMA_URI assert "id" in schema assert "title" in schema def test_schema_style(schema_content): assert schema_content.startswith(b"%YAML 1.1\n---\n") assert schema_content.endswith(b"\n...\n") assert b"\t" not in schema_content assert not any(l != l.rstrip() for l in schema_content.split(b"\n")) def test_property_order(schema, manifest): is_tag_schema = schema["id"] in {t["schema_uri"] for t in manifest["tags"]} if is_tag_schema: def callback(node): if isinstance(node, Mapping) and "propertyOrder" in node: assert node.get("type") == "object" property_names = set(node.get("properties", {}).keys()) property_order_names = set(node["propertyOrder"]) if property_order_names != property_names: missing_list = ", ".join(property_order_names - property_names) extra_list = ", ".join(property_names - property_order_names) message = ( "propertyOrder does not match list of properties:\n\n" "missing properties: " + missing_list + "\n" "extra properties: " + extra_list ) assert False, message asdf.treeutil.walk(schema, callback) else: def callback(node): if isinstance(node, Mapping): assert "propertyOrder" not in node, "Only schemas associated with a tag may specify propertyOrder" asdf.treeutil.walk(schema, callback) def test_required(schema): def callback(node): if isinstance(node, Mapping) and "required" in node: assert node.get("type") in ["object", "string", None] property_names = set(node.get("properties", {}).keys()) required_names = set(node["required"]) if not required_names.issubset(property_names): missing_list = ", ".join(required_names - property_names) message = "required references names that do not exist: " + missing_list assert False, message asdf.treeutil.walk(schema, callback) # def test_flowstyle(schema, manifest): # is_tag_schema = schema["id"] in {t["schema_uri"] for t in manifest["tags"]} # # if is_tag_schema: # found_flowstyle = False # # def callback(node): # nonlocal found_flowstyle # if isinstance(node, Mapping) and node.get("flowStyle") == "block": # found_flowstyle = True # # asdf.treeutil.walk(schema, callback) # # assert found_flowstyle, "Schemas associated with a tag must specify flowStyle: block" # else: # def callback(node): # if isinstance(node, Mapping): # assert "flowStyle" not in node, "Only schemas associated with a tag may specify flowStyle" # # asdf.treeutil.walk(schema, callback) def test_tag(schema, valid_tag_uris): def callback(node): if isinstance(node, Mapping) and "tag" in node: assert node["tag"] in valid_tag_uris asdf.treeutil.walk(schema, callback) ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1637350071.0 asdf_wcs_schemas-0.1.1/tox.ini0000644000446400020070000000054200000000000017256 0ustar00eslavichSTSCI\science[tox] envlist= py38,style,bandit [testenv] extras= test commands= pytest [testenv:egg_info] deps= commands= python setup.py egg_info [testenv:twine] deps= twine commands= twine check {distdir}/* [testenv:style] deps= flake8 commands= flake8 --count src tests [testenv:bandit] deps= bandit commands= bandit -r -ll src