diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b03839..38099c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,16 @@ jobs: strategy: matrix: include: + - name: Python 3.12 Schema validation tests + python-version: '3.12' + os: ubuntu-latest + toxenv: py312 + + - name: Python 3.11 Schema validation tests + python-version: '3.11' + os: ubuntu-latest + toxenv: py310 + - name: Python 3.10 Schema validation tests python-version: '3.10' os: ubuntu-latest @@ -27,11 +37,6 @@ jobs: os: ubuntu-latest toxenv: py39 - - name: Python 3.8 Schema validation tests - python-version: 3.8 - os: ubuntu-latest - toxenv: py38 - - name: Twine check python-version: 3.9 os: ubuntu-latest diff --git a/CHANGES.rst b/CHANGES.rst index 6818992..7a0ff77 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,7 @@ - Move root-level $ref in schemas to an allOf combiner. [#87] - Fix URI fragment format in transform-1.2 schema. [#88] +- Update schemas for ASDF standard 1.6.0 [#110] 0.3.0 (2022-08-22) ------------------ diff --git a/pyproject.toml b/pyproject.toml index 580e97e..9767a14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,20 +2,20 @@ name = 'asdf_transform_schemas' description = 'ASDF schemas for transforms' readme = 'README.md' -requires-python = '>=3.8' +requires-python = '>=3.9' license = { file = 'LICENSE' } authors = [{ name = 'The ASDF Developers', email = 'help@stsci.edu' }] classifiers = [ 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Development Status :: 5 - Production/Stable', ] dependencies = [ - 'asdf-standard >= 1.0.1', - 'importlib_resources >= 3; python_version<"3.9"', + 'asdf-standard >= 1.1.0', ] dynamic = ['version'] diff --git a/resources/asdf-format.org/manifests/transform-1.6.0.yaml b/resources/asdf-format.org/manifests/transform-1.6.0.yaml new file mode 100644 index 0000000..4088658 --- /dev/null +++ b/resources/asdf-format.org/manifests/transform-1.6.0.yaml @@ -0,0 +1,912 @@ +id: asdf://asdf-format.org/transform/manifests/transform-1.6.0 +extension_uri: asdf://asdf-format.org/transform/extensions/transform-1.6.0 +title: Transform extension 1.6.0 +asdf_standard_requirement: + gte: "1.6.0" +description: |- + A set of tags for serializing data transforms. +tags: +- tag_uri: tag:stsci.edu:asdf/transform/add-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/add-1.3.0 + title: Perform a list of subtransforms in parallel and then add their results together. + description: |- + Each of the subtransforms must have the same number of inputs and + outputs. +- tag_uri: tag:stsci.edu:asdf/transform/affine-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/affine-1.4.0 + title: An affine transform. + description: |- + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform. +- tag_uri: tag:stsci.edu:asdf/transform/airy-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/airy-1.3.0 + title: The Airy projection. + description: |- + Corresponds to the `AIR` projection in the FITS WCS standard. + + See + [zenithal](ref:transform/zenithal-1.3.0) + for the definition of the full transformation. +- tag_uri: tag:stsci.edu:asdf/transform/airy_disk2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/airy_disk2d-1.1.0 + title: Two dimensional Airy disk model. + description: |- + Two dimensional Airy disk model. +- tag_uri: tag:stsci.edu:asdf/transform/blackbody-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/blackbody-1.1.0 + title: Blackbody model. + description: |- + Blackbody model using the Planck function. + + $$B_{\\nu}(T) = A \frac{2 h \nu^{3} / c^{2}}{exp(h \nu / k T) - 1}$$ +- tag_uri: tag:stsci.edu:asdf/transform/bonne_equal_area-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/bonne_equal_area-1.4.0 + title: Bonne's equal area pseudoconic projection. + description: |- + Corresponds to the `BON` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{\pi}{180^\circ} A_\phi R_\theta / \cos \theta \\ + \theta &= Y_0 - R_\theta$$ + + where: + + $$R_\theta &= \mathrm{sign} \theta_1 \sqrt{x^2 + (Y_0 - y)^2} \\ + A_\phi &= \arg\left(\frac{Y_0 - y}{R_\theta}, \frac{x}{R_\theta}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= R_\theta \sin A_\phi \\ + y &= -R_\theta \cos A_\phi + Y_0$$ + + where: + + $$A_\phi &= \frac{180^\circ}{\pi R_\theta} \phi \cos \theta \\ + R_\theta &= Y_0 - \theta \\ + Y_0 &= \frac{180^\circ}{\pi} \cot \theta_1 + \theta_1$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/box1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/box1d-1.1.0 + title: One dimensional box model. + description: |- + One dimensional box. +- tag_uri: tag:stsci.edu:asdf/transform/box2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/box2d-1.1.0 + title: Two dimensional box model. + description: |- + Two dimensional box. +- tag_uri: tag:stsci.edu:asdf/transform/broken_power_law1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/broken_power_law1d-1.1.0 + title: One dimensional power law model with a break. + description: |- + One dimensional power law model with a break. +- tag_uri: tag:stsci.edu:asdf/transform/cobe_quad_spherical_cube-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/cobe_quad_spherical_cube-1.3.0 + title: COBE quadrilateralized spherical cube projection. + description: |- + Corresponds to the `CSC` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/compose-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/compose-1.3.0 + title: Perform a list of subtransforms in series. + description: |- + The output of each subtransform is fed into the input of the next + subtransform. + + The number of output dimensions of each subtransform must be equal + to the number of input dimensions of the next subtransform in list. + To reorder or add/drop axes, insert `remap_axes` transforms in the + subtransform list. + + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform, by reversing the list of + transforms and applying the inverse of each. +- tag_uri: tag:stsci.edu:asdf/transform/concatenate-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/concatenate-1.3.0 + title: Send axes to different subtransforms. + description: |- + Transforms a set of separable inputs by splitting the axes apart, + sending them through the given subtransforms in parallel, and + finally concatenating the subtransform output axes back together. + + The input axes are assigned to each subtransform in order. If the + number of input axes is unequal to the sum of the number of input + axes of all of the subtransforms, that is considered an error case. + + The output axes from each subtransform are appended together to make + up the resulting output axes. + + For example, given 5 input axes, and 3 subtransforms with the + following orders: + + 1. transform A: 2 in -> 2 out + 1. transform B: 1 in -> 2 out + 1. transform C: 2 in -> 1 out + + The transform is performed as follows: + + ``` + : i0 i1 i2 i3 i4 + : | | | | | + : +---------+ +---------+ +----------+ + : | A | | B | | C | + : +---------+ +---------+ +----------+ + : | | | | | + : o0 o1 o2 o3 o4 + ``` + + If reordering of the input or output axes is required, use in series + with the `remap_axes` transform. + + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform. +- tag_uri: tag:stsci.edu:asdf/transform/conic_equal_area-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/conic_equal_area-1.4.0 + title: Alber's conic equal area projection. + description: |- + Corresponds to the `COE` projection in the FITS WCS standard. + + See + [conic](ref:transform/conic-1.4.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \gamma / 2 \\ + R_\theta &= \frac{180^\circ}{\pi} \frac{2}{\gamma} \sqrt{1 + \sin \theta_1 \sin \theta_2 - \gamma \sin \theta} \\ + Y_0 &= \frac{180^\circ}{\pi} \frac{2}{\gamma} \sqrt{1 + \sin \theta_1 \sin \theta_2 - \gamma \sin((\theta_1 + \theta_2)/2)}$$ + + where: + + $$\gamma = \sin \theta_1 + \sin \theta_2$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/conic_equidistant-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/conic_equidistant-1.4.0 + title: Conic equidistant projection. + description: |- + Corresponds to the `COD` projection in the FITS WCS standard. + + See + [conic](ref:transform/conic-1.4.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \frac{180^\circ}{\pi} \frac{\sin\theta_a\sin\eta}{\eta} \\ + R_\theta &= \theta_a - \theta + \eta\cot\eta\cot\theta_a \\ + Y_0 = \eta\cot\eta\cot\theta_a$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/conic_orthomorphic-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/conic_orthomorphic-1.4.0 + title: Conic orthomorphic projection. + description: |- + Corresponds to the `COO` projection in the FITS WCS standard. + + See + [conic](ref:transform/conic-1.4.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \frac{\ln \left( \frac{\cos\theta_2}{\cos\theta_1} \right)} + {\ln \left[ \frac{\tan\left(\frac{90^\circ-\theta_2}{2}\right)} + {\tan\left(\frac{90^\circ-\theta_1}{2}\right)} \right] } \\ + R_\theta &= \psi \left[ \tan \left( \frac{90^\circ - \theta}{2} \right) \right]^C \\ + Y_0 &= \psi \left[ \tan \left( \frac{90^\circ - \theta_a}{2} \right) \right]^C$$ + + where: + + $$\psi = \frac{180^\circ}{\pi} \frac{\cos \theta} + {C\left[\tan\left(\frac{90^\circ-\theta}{2}\right)\right]^C}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/conic_perspective-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/conic_perspective-1.4.0 + title: Colles' conic perspecitve projection. + description: |- + Corresponds to the `COP` projection in the FITS WCS standard. + + See + [conic](ref:transform/conic-1.4.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \sin \theta_a \\ + R_\theta &= \frac{180^\circ}{\pi} \cos \eta [ \cot \theta_a - \tan(\theta - \theta_a)] \\ + Y_0 &= \frac{180^\circ}{\pi} \cos \eta \cot \theta_a$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/constant-1.5.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/constant-1.5.0 + title: A Constant transform. + description: |- + Invertibility: A transform which takes one or two inputs based on + dimensionality and returns a constant value. It has no analytical inverse. +- tag_uri: tag:stsci.edu:asdf/transform/cylindrical_equal_area-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/cylindrical_equal_area-1.4.0 + title: The cylindrical equal area projection. + description: |- + Corresponds to the `CEA` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= x \\ + \theta &= \sin^{-1}\left(\frac{\pi}{180^{\circ}}\lambda y\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \\ + y &= \frac{180^{\circ}}{\pi}\frac{\sin \theta}{\lambda}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/cylindrical_perspective-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/cylindrical_perspective-1.4.0 + title: The cylindrical perspective projection. + description: |- + Corresponds to the `CYP` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{x}{\lambda} \\ + \theta &= \arg(1, \eta) + \sin{-1}\left(\frac{\eta \mu}{\sqrt{\eta^2 + 1}}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \lambda \phi \\ + y &= \frac{180^{\circ}}{\pi}\left(\frac{\mu + \lambda}{\mu + \cos \theta}\right)\sin \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/disk2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/disk2d-1.1.0 + title: Two dimensional disk model. + description: |- + Two dimensional radially symmetric disk. +- tag_uri: tag:stsci.edu:asdf/transform/divide-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/divide-1.3.0 + title: Perform a list of subtransforms in parallel and then divide their results. + description: |- + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. +- tag_uri: tag:stsci.edu:asdf/transform/drude1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/drude1d-1.1.0 + title: One dimensional Drude model + description: |- + Drude model based one the behavior of electons in materials (esp. metals). +- tag_uri: tag:stsci.edu:asdf/transform/ellipse2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/ellipse2d-1.1.0 + title: Two dimensional ellipse model. + description: |- + Two dimensional ellipse. +- tag_uri: tag:stsci.edu:asdf/transform/exponential1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/exponential1d-1.1.0 + title: One dimensional exponential model. + description: |- + One dimensional exponential model. +- tag_uri: tag:stsci.edu:asdf/transform/exponential_cutoff_power_law1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/exponential_cutoff_power_law1d-1.1.0 + title: One dimensional power law model with an exponential cutoff. + description: |- + One dimensional power law model with an exponential cutoff. +- tag_uri: tag:stsci.edu:asdf/transform/fix_inputs-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/fix_inputs-1.3.0 + title: Set to a constant selected input arguments of a model. + description: |- + This operation takes as the right hand side a dict equivalent + that consists of key:value pairs where the key identifies + the input argument to be set, either by position number + (0 based) or name, and the value is the floating point value + that should be assigned to that input. The result is a + compound model with n fewer input arguments where n is + the number of input values to be set (i.e., the number + of keys in the dict). +- tag_uri: tag:stsci.edu:asdf/transform/gaussian1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/gaussian1d-1.1.0 + title: A 1D Gaussian model. + description: |- + A 1D gaussian distribution. +- tag_uri: tag:stsci.edu:asdf/transform/gaussian2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/gaussian2d-1.1.0 + title: A 2D Gaussian model. + description: |- + A 2D gaussian distribution. +- tag_uri: tag:stsci.edu:asdf/transform/gnomonic-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/gnomonic-1.3.0 + title: The gnomonic projection. + description: |- + Corresponds to the `TAN` projection in the FITS WCS standard. + + See + [zenithal](ref:transform/zenithal-1.3.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = \tan^{-1}\left(\frac{180^{\circ}}{\pi R_\theta}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\cot \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/hammer_aitoff-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/hammer_aitoff-1.3.0 + title: Hammer-Aitoff projection. + description: |- + Corresponds to the `AIT` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= 2 \arg \left(2Z^2 - 1, \frac{\pi}{180^\circ} \frac{Z}{2}x\right) \\ + \theta &= \sin^{-1}\left(\frac{\pi}{180^\circ}yZ\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= 2 \gamma \cos \theta \sin \frac{\phi}{2} \\ + y &= \gamma \sin \theta$$ + + where: + + $$\gamma = \frac{180^\circ}{\pi} \sqrt{\frac{2}{1 + \cos \theta \cos(\phi / 2)}}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/healpix-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/healpix-1.3.0 + title: HEALPix projection. + description: |- + Corresponds to the `HPX` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/healpix_polar-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/healpix_polar-1.3.0 + title: HEALPix polar, aka "butterfly", projection. + description: |- + Corresponds to the `XPH` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/identity-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/identity-1.3.0 + title: The identity transform. + description: |- + Invertibility: The inverse of this transform is also the identity transform. +- tag_uri: tag:stsci.edu:asdf/transform/king_projected_analytic1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/king_projected_analytic1d-1.1.0 + title: Projected (surface density) analytic King Model. + description: |- + Projected (surface density) analytic King Model. +- tag_uri: tag:stsci.edu:asdf/transform/linear1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/linear1d-1.1.0 + title: A one dimensional line model + description: |- + A one dimensional line model +- tag_uri: tag:stsci.edu:asdf/transform/log_parabola1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/log_parabola1d-1.1.0 + title: One dimensional log parabola model (sometimes called curved power law). + description: |- + One dimensional log parabola model (sometimes called curved power law). +- tag_uri: tag:stsci.edu:asdf/transform/logarithmic1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/logarithmic1d-1.1.0 + title: One dimensional (natural) logarithmic model. + description: |- + One dimensional (natural) logarithmic model. +- tag_uri: tag:stsci.edu:asdf/transform/lorentz1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/lorentz1d-1.1.0 + title: One dimensional Lorentzian model. + description: |- + One dimensional Lorentzian model. +- tag_uri: tag:stsci.edu:asdf/transform/math_functions-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/math_functions-1.1.0 + title: Math functions. + description: |- + Commonly used math funcitons. +- tag_uri: tag:stsci.edu:asdf/transform/mercator-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/mercator-1.3.0 + title: The Mercator projection. + description: |- + Corresponds to the `MER` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= x \\ + \theta &= 2 \tan^{-1}\left(e^{y \pi / 180^{\circ}}\right)-90^{\circ}$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \\ + y &= \frac{180^{\circ}}{\pi}\ln \tan \left(\frac{90^{\circ} + \theta}{2}\right)$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/moffat1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/moffat1d-1.1.0 + title: One dimensional Moffat model. + description: |- + One dimensional Moffat distribution. +- tag_uri: tag:stsci.edu:asdf/transform/moffat2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/moffat2d-1.1.0 + title: Two dimensional Moffat model. + description: |- + Two dimensional Moffat distribution. +- tag_uri: tag:stsci.edu:asdf/transform/molleweide-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/molleweide-1.3.0 + title: Molleweide's projection. + description: |- + Corresponds to the `MOL` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{\pi x}{2 \sqrt{2 - \left(\frac{\pi}{180^\circ}y\right)^2}} \\ + \theta &= \sin^{-1}\left(\frac{1}{90^\circ}\sin^{-1}\left(\frac{\pi}{180^\circ}\frac{y}{\sqrt{2}}\right) + \frac{y}{180^\circ}\sqrt{2 - \left(\frac{\pi}{180^\circ}y\right)^2}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \frac{2 \sqrt{2}}{\pi} \phi \cos \gamma \\ + y &= \sqrt{2} \frac{180^\circ}{\pi} \sin \gamma$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/multiply-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/multiply-1.3.0 + title: Perform a list of subtransforms in parallel and then multiply their results. + description: |- + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. +- tag_uri: tag:stsci.edu:asdf/transform/multiplyscale-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/multiplyscale-1.1.0 + title: A Multiply model. + description: |- + Multiply the input by a factor. +- tag_uri: tag:stsci.edu:asdf/transform/ortho_polynomial-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/ortho_polynomial-1.1.0 + title: Respresents various Orthogonal Polynomial models. + description: |- + A polynomial model represented by its coefficients stored in + an ndarray of shape $(n+1)$ for univariate polynomials or $(n+1, n+1)$ + for polynomials with 2 variables, where $n$ is the highest total degree + of the polynomial. The property polynomial_type defines what kind of + polynomial is defined. + + $$P = \sum_{i, j=0}^{i+j=n}c_{ij} * x^{i} * y^{j}$$ + + Invertibility: This transform is not automatically invertible. +- tag_uri: tag:stsci.edu:asdf/transform/parabolic-1.2.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/parabolic-1.2.0 + title: Parabolic projection. + description: |- + Corresponds to the `PAR` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{180^\circ}{\pi} \frac{x}{1 - 4(y / 180^\circ)^2} \\ + \theta &= 3 \sin^{-1}\left(\frac{y}{180^\circ}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \left(2\cos\frac{2\theta}{3} - 1\right) \\ + y &= 180^\circ \sin \frac{\theta}{3}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/planar2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/planar2d-1.1.0 + title: Two dimensional plane model. + description: |- + Two dimensional plane model. +- tag_uri: tag:stsci.edu:asdf/transform/plate_carree-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/plate_carree-1.3.0 + title: "The plate carr\xE9e projection." + description: |- + Corresponds to the `CAR` projection in the FITS WCS standard. + + The main virtue of this transformation is its simplicity. + + The pixel-to-sky transformation is defined as: + + $$\phi &= x \\ + \theta &= y$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \\ + y &= \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/plummer1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/plummer1d-1.1.0 + title: Two dimensional Plummer model. + description: |- + One dimensional Plummer density profile model. +- tag_uri: tag:stsci.edu:asdf/transform/polyconic-1.2.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/polyconic-1.2.0 + title: Polyconic projection. + description: |- + Corresponds to the `PCO` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/polynomial-1.2.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/polynomial-1.2.0 + title: A Polynomial model. + description: |- + A polynomial model represented by its coefficients stored in + an ndarray of shape $(n+1)$ for univariate polynomials or $(n+1, n+1)$ + for polynomials with 2 variables, where $n$ is the highest total degree + of the polynomial. + + $$P = \sum_{i, j=0}^{i+j=n}c_{ij} * x^{i} * y^{j}$$ + + Invertibility: This transform is not automatically invertible. +- tag_uri: tag:stsci.edu:asdf/transform/spline1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/spline1d-1.1.0 + title: A spline1d model. + description: |- + A spline1d model represented by an array of its knots, an array of its + coefficients, and its degree. In addition the bounding endpoints + of the spline can be represented as well +- tag_uri: tag:stsci.edu:asdf/transform/power-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/power-1.3.0 + title: Perform a list of subtransforms in parallel and then raise each result to + the power of the next. + description: |- + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. +- tag_uri: tag:stsci.edu:asdf/transform/power_law1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/power_law1d-1.1.0 + title: One dimensional power law model. + description: |- + One dimensional power law model. +- tag_uri: tag:stsci.edu:asdf/transform/quad_spherical_cube-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/quad_spherical_cube-1.3.0 + title: Quadrilateralized spherical cube projection. + description: |- + Corresponds to the `QSC` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/redshift_scale_factor-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/redshift_scale_factor-1.1.0 + title: One dimensional redshift scale factor model. + description: |- + One dimensional redshift scale factor model. +- tag_uri: tag:stsci.edu:asdf/transform/remap_axes-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/remap_axes-1.4.0 + title: Reorder, add and drop axes. + description: "This transform allows the order of the input axes to be shuffled and\n\ + returned as the output axes.\n\nIt is a list made up of integers. Each item\n\ + in the list corresponds to an output axis. Each item is the index of\nthe input\ + \ axis to send to the output axis.\n\nIf an object with `mapping` and `n_inputs`\ + \ properties is provided, the\nnumber of input axes is explicitly set by the `n_inputs`\ + \ value.\nIf only a list is provided, the number of input axes is\nautomatically\ + \ determined from the maximum index in the list. \n\nInvertibility: This transform\ + \ does not have a general analytical inverse.\nIn some well defined cases it is\ + \ possible to invert automatically" +- tag_uri: tag:stsci.edu:asdf/transform/ricker_wavelet1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/ricker_wavelet1d-1.1.0 + title: One dimensional Ricker Wavelet model. + description: |- + One dimensional Ricker Wavelet model +- tag_uri: tag:stsci.edu:asdf/transform/ricker_wavelet2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/ricker_wavelet2d-1.1.0 + title: Two dimensional Ricker Wavelet model. + description: |- + Two dimensional Ricker Wavelet model. +- tag_uri: tag:stsci.edu:asdf/transform/ring2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/ring2d-1.1.0 + title: Two dimensional radially symmetric ring model. + description: |- + Two dimensional radially symmetric ring. +- tag_uri: tag:stsci.edu:asdf/transform/rotate2d-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/rotate2d-1.4.0 + title: A 2D rotation. + description: |- + A 2D rotation around the origin, in degrees. + Invertibility: All ASDF tools are required to be able to compute the analytic inverse of this transform. +- tag_uri: tag:stsci.edu:asdf/transform/rotate3d-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/rotate3d-1.4.0 + title: Rotation in 3D space. + description: |- + Euler angle rotation around 3 axes. + + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform. +- tag_uri: tag:stsci.edu:asdf/transform/rotate_sequence_3d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/rotate_sequence_3d-1.1.0 + title: Rotation in 3D space. + description: |- + Rotation in 3D space by arbitrary number of angles about + arbitrary order of "x", "y", "z" axes. +- tag_uri: tag:stsci.edu:asdf/transform/sanson_flamsteed-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/sanson_flamsteed-1.3.0 + title: The Sanson-Flamsteed projection. + description: |- + Corresponds to the `SFL` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{x}{\cos y} \\ + \theta &= y$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \cos \theta \\ + y &= \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/scale-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/scale-1.3.0 + title: A Scale model. + description: |- + Scale the input by a dimensionless factor. +- tag_uri: tag:stsci.edu:asdf/transform/schechter1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/schechter1d-1.1.0 + title: Schechter luminosity function + description: |- + Schechter luminosity function +- tag_uri: tag:stsci.edu:asdf/transform/sersic1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/sersic1d-1.1.0 + title: One dimensional Sersic surface brightness profile. + description: |- + One dimensional Sersic surface brightness profile. +- tag_uri: tag:stsci.edu:asdf/transform/sersic2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/sersic2d-1.1.0 + title: Two dimensional Sersic surface brightness profile. + description: |- + Two dimensional Sersic surface brightness profile. +- tag_uri: tag:stsci.edu:asdf/transform/shift-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/shift-1.3.0 + title: A Shift opeartion. + description: |- + Apply an offset in one direction. +- tag_uri: tag:stsci.edu:asdf/transform/sine1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/sine1d-1.1.0 + title: One dimensional sine model. + description: |- + One dimensional sine. +- tag_uri: tag:stsci.edu:asdf/transform/cosine1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/cosine1d-1.1.0 + title: One dimensional cosine model. + description: |- + One dimensional cosine. +- tag_uri: tag:stsci.edu:asdf/transform/tangent1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/tangent1d-1.1.0 + title: One dimensional tangent model. + description: |- + One dimensional tangent. +- tag_uri: tag:stsci.edu:asdf/transform/arcsine1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/arcsine1d-1.1.0 + title: One dimensional arcsine model. + description: |- + One dimensional arcsine. +- tag_uri: tag:stsci.edu:asdf/transform/arccosine1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/arccosine1d-1.1.0 + title: One dimensional arccosine model. + description: |- + One dimensional arccosine. +- tag_uri: tag:stsci.edu:asdf/transform/arctangent1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/arctangent1d-1.1.0 + title: One dimensional arctangent model. + description: |- + One dimensional arctangent. +- tag_uri: tag:stsci.edu:asdf/transform/slant_orthographic-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/slant_orthographic-1.3.0 + title: The slant orthographic projection. + description: |- + Corresponds to the `SIN` projection in the FITS WCS standard. + + See + [zenithal](ref:transform/zenithal-1.3.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = \cos^{-1}\left(\frac{\pi}{180^{\circ}}R_\theta\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\cos \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/slant_zenithal_perspective-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/slant_zenithal_perspective-1.3.0 + title: The slant zenithal perspective projection. + description: |- + Corresponds to the `SZP` projection in the FITS WCS standard. + + See + [zenithal](ref:transform/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = \tan^{-1}\left(\frac{180^{\circ}}{\pi R_\theta}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\cot \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/smoothly_broken_power_law1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/smoothly_broken_power_law1d-1.1.0 + title: One dimensional smoothly broken power law model. + description: |- + One dimensional smoothly broken power law model. +- tag_uri: tag:stsci.edu:asdf/transform/stereographic-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/stereographic-1.3.0 + title: The stereographic projection. + description: |- + Corresponds to the `STG` projection in the FITS WCS standard. + + See + [zenithal](ref:transform/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = 90^{\circ} - 2 \tan^{-1}\left(\frac{\pi R_\theta}{360^{\circ}}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\frac{2 \cos \theta}{1 + \sin \theta}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/subtract-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/subtract-1.3.0 + title: Perform a list of subtransforms in parallel and then subtract their results. + description: |- + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. +- tag_uri: tag:stsci.edu:asdf/transform/tabular-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/tabular-1.3.0 + title: A Tabular model. + description: |- + Tabular represents a lookup table with values corresponding to + some grid points. + It computes the interpolated values corresponding to the given + inputs. Three methods of interpolation are supported - + "linear", "nearest" and "splinef2d". It supports extrapolation. +- tag_uri: tag:stsci.edu:asdf/transform/tangential_spherical_cube-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/tangential_spherical_cube-1.3.0 + title: Tangential spherical cube projection. + description: |- + Corresponds to the `TSC` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/trapezoid1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/trapezoid1d-1.1.0 + title: One dimensional trapezoid model. + description: |- + One dimensional trapezoid. +- tag_uri: tag:stsci.edu:asdf/transform/trapezoid_disk2d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/trapezoid_disk2d-1.1.0 + title: Two dimensional circular trapezoid model. + description: |- + Two dimensional circular trapezoid. +- tag_uri: tag:stsci.edu:asdf/transform/voigt1d-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/voigt1d-1.1.0 + title: One dimensional model for the Voigt profile. + description: |- + One dimensional model for the Voigt profile. +- tag_uri: tag:stsci.edu:asdf/transform/zenithal_equal_area-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/zenithal_equal_area-1.3.0 + title: The zenithal equal area projection. + description: |- + Corresponds to the `ZEA` projection in the FITS WCS standard. + + See + [zenithal](ref:transform/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = 90^\circ - 2 \sin^{-1} \left(\frac{\pi R_\theta}{360^\circ}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta &= \frac{180^\circ}{\pi} \sqrt{2(1 - \sin\theta)} \\ + &= \frac{360^\circ}{\pi} \sin\left(\frac{90^\circ - \theta}{2}\right)$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/zenithal_equidistant-1.3.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/zenithal_equidistant-1.3.0 + title: The zenithal equidistant projection. + description: |- + Corresponds to the `ARC` projection in the FITS WCS standard. + + See + [zenithal](ref:transform/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = 90^\circ - R_\theta$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = 90^\circ - \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/zenithal_perspective-1.4.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/zenithal_perspective-1.4.0 + title: The zenithal perspective projection. + description: |- + Corresponds to the `AZP` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \arg(-y \cos \gamma, x) \\ + \theta &= \left\{\genfrac{}{}{0pt}{}{\psi - \omega}{\psi + \omega + 180^{\circ}}\right.$$ + + where: + + $$\psi &= \arg(\rho, 1) \\ + \omega &= \sin^{-1}\left(\frac{\rho \mu}{\sqrt{\rho^2 + 1}}\right) \\ + \rho &= \frac{R}{\frac{180^{\circ}}{\pi}(\mu + 1) + y \sin \gamma} \\ + R &= \sqrt{x^2 + y^2 \cos^2 \gamma}$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= R \sin \phi \\ + y &= -R \sec \gamma \cos \theta$$ + + where: + + $$R = \frac{180^{\circ}}{\pi} \frac{(\mu + 1) \cos \theta}{(\mu + \sin \theta) + \cos \theta \cos \phi \tan \gamma}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. +- tag_uri: tag:stsci.edu:asdf/transform/property/bounding_box-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/property/bounding_box-1.1.0 + title: Bounding box for a model. + description: |- + This object contains the bounding box for a model, which defines + the domain of valid inputs to the model. The bounds for each input + is are listed as a map under the interval keyword as ordered pairs of + lower/upper bounds with key being the input name. If any model inputs + are to be ignored by the bounding box then they need to be listed under + the ignore keyword. Finally, the tuple representation's input ordering + can be listed under the order keyword, C for C-ordering, F for Fortran + ordering. +- tag_uri: tag:stsci.edu:asdf/transform/property/compound_bounding_box-1.1.0 + schema_uri: http://stsci.edu/schemas/asdf/transform/property/compound_bounding_box-1.1.0 + title: Compound bounding box for a model. + description: |- + This object contains a compound bounding box for a model, which defines + a set of input-selectable bounding boxes. It consists of a list of selector_args + together with a list of input-key bounding box pairs. The selector + args are an ordered list of model inputs with an indication of whether + or not to ignore the input in the bounding box selected. The key for + each bounding box entry corresponds to the values of the selector args + (in the order listed) which will select the accompanying bounding box. diff --git a/resources/stsci.edu/schemas/add-1.3.0.yaml b/resources/stsci.edu/schemas/add-1.3.0.yaml new file mode 100644 index 0000000..051d1a9 --- /dev/null +++ b/resources/stsci.edu/schemas/add-1.3.0.yaml @@ -0,0 +1,33 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/add-1.3.0" +title: > + Perform a list of subtransforms in parallel and then + add their results together. + +description: | + Each of the subtransforms must have the same number of inputs and + outputs. + +examples: + - + - A list of transforms, performed in parallel and added together + - asdf-standard-1.6.0 + - | + !transform/add-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + $ref: "transform-1.3.0" + required: [forward] +... diff --git a/resources/stsci.edu/schemas/affine-1.4.0.yaml b/resources/stsci.edu/schemas/affine-1.4.0.yaml new file mode 100644 index 0000000..866c328 --- /dev/null +++ b/resources/stsci.edu/schemas/affine-1.4.0.yaml @@ -0,0 +1,45 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/affine-1.4.0" +title: > + An affine transform. +description: | + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform. + + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + matrix: + description: | + An array of size (*n* x *n*), where *n* is the number of axes, + representing the linear transformation in an affine transform. + anyOf: + - $ref: "../core/ndarray-1.1.0" + - $ref: "../unit/quantity-1.2.0" + - type: array + items: + type: array + items: + type: number + minItems: 2 + maxItems: 2 + minItems: 2 + maxItems: 2 + translation: + description: | + An array of size (*n*,), where *n* is the number of axes, + representing the translation in an affine transform. + anyOf: + - $ref: "../core/ndarray-1.1.0" + - $ref: "../unit/quantity-1.2.0" + - type: array + items: + type: number + minItems: 2 + maxItems: 2 + required: [matrix] +... diff --git a/resources/stsci.edu/schemas/airy-1.3.0.yaml b/resources/stsci.edu/schemas/airy-1.3.0.yaml new file mode 100644 index 0000000..270b943 --- /dev/null +++ b/resources/stsci.edu/schemas/airy-1.3.0.yaml @@ -0,0 +1,27 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/airy-1.3.0" +title: | + The Airy projection. + +description: | + Corresponds to the `AIR` projection in the FITS WCS standard. + + See + [zenithal](ref:schemas/zenithal-1.3.0) + for the definition of the full transformation. + +allOf: + - $ref: "zenithal-1.3.0" + - type: object + properties: + theta_b: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + The latitude $\theta_b$ at which to minimize the error, in + degrees. + default: 90 +... diff --git a/resources/stsci.edu/schemas/airy_disk2d-1.1.0.yaml b/resources/stsci.edu/schemas/airy_disk2d-1.1.0.yaml new file mode 100644 index 0000000..9cafa59 --- /dev/null +++ b/resources/stsci.edu/schemas/airy_disk2d-1.1.0.yaml @@ -0,0 +1,43 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/airy_disk2d-1.1.0" +title: > + Two dimensional Airy disk model. + +description: > + Two dimensional Airy disk model. + +examples: + - + - $f(r)=43.8[\frac{2J_1(\frac{\pi\sqrt{(x-0.5)^2+(y-1.5)^2}}{10.2/R_z})}{\frac{\pi\sqrt{(x-0.5)^2+(y-1.5)^2}}{10.2/R_z}}]^2$, where $J_1$ is the first order Bessel function and $R_z=1.2196698912665045$ + - | + !transform/airy_disk2d-1.1.0 {amplitude: 43.8, radius: 10.2, x_0: 0.5, y_0: 1.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude of the Airy function. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the maximum of the Airy function. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y position of the maximum of the Airy function. + radius: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: The radius of the Airy disk (radius of the first zero). + + required: ['amplitude', 'x_0', 'y_0', 'radius'] +... diff --git a/resources/stsci.edu/schemas/arccosine1d-1.1.0.yaml b/resources/stsci.edu/schemas/arccosine1d-1.1.0.yaml new file mode 100644 index 0000000..1958302 --- /dev/null +++ b/resources/stsci.edu/schemas/arccosine1d-1.1.0.yaml @@ -0,0 +1,38 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/arccosine1d-1.1.0" +title: > + One dimensional arccosine model. + +description: > + One dimensional arccosine. + +examples: + - + - $$f(x)=((arccos(x/10.0) / 2\pi) - 1.0) / 0.5$$ + - | + !transform/arccosine1d-1.1.0 {amplitude: 10.0, frequency: 0.5, phase: 1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation amplitude. + frequency: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation frequency. + phase: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation phase. + + required: ['amplitude', 'frequency', 'phase'] +... diff --git a/resources/stsci.edu/schemas/arcsine1d-1.1.0.yaml b/resources/stsci.edu/schemas/arcsine1d-1.1.0.yaml new file mode 100644 index 0000000..86436fb --- /dev/null +++ b/resources/stsci.edu/schemas/arcsine1d-1.1.0.yaml @@ -0,0 +1,38 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/arcsine1d-1.1.0" +title: > + One dimensional arcsine model. + +description: > + One dimensional arcsine. + +examples: + - + - $$f(x)=((arcsin(x/10.0) / 2\pi) - 1.0) / 0.5$$ + - | + !transform/arcsine1d-1.1.0 {amplitude: 10.0, frequency: 0.5, phase: 1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation amplitude. + frequency: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation frequency. + phase: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation phase. + + required: ['amplitude', 'frequency', 'phase'] +... diff --git a/resources/stsci.edu/schemas/arctangent1d-1.1.0.yaml b/resources/stsci.edu/schemas/arctangent1d-1.1.0.yaml new file mode 100644 index 0000000..379d12c --- /dev/null +++ b/resources/stsci.edu/schemas/arctangent1d-1.1.0.yaml @@ -0,0 +1,38 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/arctangent1d-1.1.0" +title: > + One dimensional arctangent model. + +description: > + One dimensional arctangent. + +examples: + - + - $$f(x)=((arctan(x/10.0) / 2\pi) - 1.0) / 0.5$$ + - | + !transform/arctangent1d-1.1.0 {amplitude: 10.0, frequency: 0.5, phase: 1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation amplitude. + frequency: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation frequency. + phase: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation phase. + + required: ['amplitude', 'frequency', 'phase'] +... diff --git a/resources/stsci.edu/schemas/blackbody-1.0.0.yaml b/resources/stsci.edu/schemas/blackbody-1.0.0.yaml index 1d48688..09b37e7 100644 --- a/resources/stsci.edu/schemas/blackbody-1.0.0.yaml +++ b/resources/stsci.edu/schemas/blackbody-1.0.0.yaml @@ -13,6 +13,7 @@ description: | examples: - - $$B_{\\nu}(T) = 10.0 \frac{2 h \nu^{3} / c^{2}}{exp(h \nu / k *6000) - 1}$$ + - asdf-standard-1.5.0 - | !transform/blackbody-1.0.0 scale: 10.0 diff --git a/resources/stsci.edu/schemas/blackbody-1.1.0.yaml b/resources/stsci.edu/schemas/blackbody-1.1.0.yaml new file mode 100644 index 0000000..9d87560 --- /dev/null +++ b/resources/stsci.edu/schemas/blackbody-1.1.0.yaml @@ -0,0 +1,36 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/blackbody-1.1.0" +title: > + Blackbody model. + +description: | + Blackbody model using the Planck function. + + $$B_{\\nu}(T) = A \frac{2 h \nu^{3} / c^{2}}{exp(h \nu / k T) - 1}$$ + +examples: + - + - $$B_{\\nu}(T) = 10.0 \frac{2 h \nu^{3} / c^{2}}{exp(h \nu / k *6000) - 1}$$ + - asdf-standard-1.5.0 + - | + !transform/blackbody-1.1.0 + scale: 10.0 + temperature: !unit/quantity-1.2.0 {unit: !unit/unit-1.0.0 K, value: 6000.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + scale: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Scale factor. + temperature: + $ref: "../unit/quantity-1.2.0" + description: Blackbody temperature. + + required: ['scale', 'temperature'] +... diff --git a/resources/stsci.edu/schemas/bonne_equal_area-1.4.0.yaml b/resources/stsci.edu/schemas/bonne_equal_area-1.4.0.yaml new file mode 100644 index 0000000..adb9c2a --- /dev/null +++ b/resources/stsci.edu/schemas/bonne_equal_area-1.4.0.yaml @@ -0,0 +1,46 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/bonne_equal_area-1.4.0" +title: | + Bonne's equal area pseudoconic projection. + +description: | + Corresponds to the `BON` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{\pi}{180^\circ} A_\phi R_\theta / \cos \theta \\ + \theta &= Y_0 - R_\theta$$ + + where: + + $$R_\theta &= \mathrm{sign} \theta_1 \sqrt{x^2 + (Y_0 - y)^2} \\ + A_\phi &= \arg\left(\frac{Y_0 - y}{R_\theta}, \frac{x}{R_\theta}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= R_\theta \sin A_\phi \\ + y &= -R_\theta \cos A_\phi + Y_0$$ + + where: + + $$A_\phi &= \frac{180^\circ}{\pi R_\theta} \phi \cos \theta \\ + R_\theta &= Y_0 - \theta \\ + Y_0 &= \frac{180^\circ}{\pi} \cot \theta_1 + \theta_1$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "pseudoconic-1.3.0" + - type: object + properties: + theta1: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + Bonne conformal latitude, in degrees. + default: 0 +... diff --git a/resources/stsci.edu/schemas/box1d-1.1.0.yaml b/resources/stsci.edu/schemas/box1d-1.1.0.yaml new file mode 100644 index 0000000..5c0d29e --- /dev/null +++ b/resources/stsci.edu/schemas/box1d-1.1.0.yaml @@ -0,0 +1,42 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/box1d-1.1.0" +title: > + One dimensional box model. + +description: > + One dimensional box. + +examples: + - + - A 1D box of width 4.0, amplitude 10.0, centered at x=1.5. + - | + !transform/box1d-1.1.0 + amplitude: 10.0 + bounding_box: [-0.5, 3.5] + width: 4.0 + x_0: 1.5 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Position of the center of the box model. + width: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Width of box. + + required: ['amplitude', 'x_0', 'width'] +... diff --git a/resources/stsci.edu/schemas/box2d-1.1.0.yaml b/resources/stsci.edu/schemas/box2d-1.1.0.yaml new file mode 100644 index 0000000..5669f92 --- /dev/null +++ b/resources/stsci.edu/schemas/box2d-1.1.0.yaml @@ -0,0 +1,56 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/box2d-1.1.0" +title: > + Two dimensional box model. + +description: > + Two dimensional box. + +examples: + - + - A 2D box with (x, y) dimensions (4.0, 2.0), centered at (0.5, 1.5) with amplitude 10.0. + - | + !transform/box2d-1.1.0 + amplitude: 10.0 + bounding_box: + - [0.5, 2.5] + - [-1.5, 2.5] + x_0: 0.5 + x_width: 4.0 + y_0: 1.5 + y_width: 2.0 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the center of the box model. + x_width: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x width of box. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y position of the center of the box model. + y_width: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y width of box. + + required: ['amplitude', 'x_0', 'x_width', 'y_0', 'y_width'] +... diff --git a/resources/stsci.edu/schemas/broken_power_law1d-1.1.0.yaml b/resources/stsci.edu/schemas/broken_power_law1d-1.1.0.yaml new file mode 100644 index 0000000..c7d5547 --- /dev/null +++ b/resources/stsci.edu/schemas/broken_power_law1d-1.1.0.yaml @@ -0,0 +1,43 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/broken_power_law1d-1.1.0" +title: > + One dimensional power law model with a break. + +description: > + One dimensional power law model with a break. + +examples: + - + - $f(x) = A (10.0 / 5.0) ^ {-2.0}$ for x < 5.0 and $f(x) = A (10.0 / 5.0) ^ {-3.0}$ for x > 5.0 + - | + !transform/broken_power_law1d-1.1.0 {alpha_1: 2.0, alpha_2: 3.0, amplitude: 10.0, x_break: 5.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Model amplitude at the break point. + x_break: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Break point. + alpha_1: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law index for x < x_break. + alpha_2: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law index for x > x_break. + + required: ['amplitude', 'x_break', 'alpha_1', 'alpha_2'] +... diff --git a/resources/stsci.edu/schemas/cobe_quad_spherical_cube-1.3.0.yaml b/resources/stsci.edu/schemas/cobe_quad_spherical_cube-1.3.0.yaml new file mode 100644 index 0000000..523e707 --- /dev/null +++ b/resources/stsci.edu/schemas/cobe_quad_spherical_cube-1.3.0.yaml @@ -0,0 +1,16 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/cobe_quad_spherical_cube-1.3.0" +title: | + COBE quadrilateralized spherical cube projection. + +description: | + Corresponds to the `CSC` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "quadcube-1.3.0" +... diff --git a/resources/stsci.edu/schemas/compose-1.3.0.yaml b/resources/stsci.edu/schemas/compose-1.3.0.yaml new file mode 100644 index 0000000..2bcad1b --- /dev/null +++ b/resources/stsci.edu/schemas/compose-1.3.0.yaml @@ -0,0 +1,41 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/compose-1.3.0" +title: > + Perform a list of subtransforms in series. + +description: | + The output of each subtransform is fed into the input of the next + subtransform. + + The number of output dimensions of each subtransform must be equal + to the number of input dimensions of the next subtransform in list. + To reorder or add/drop axes, insert `remap_axes` transforms in the + subtransform list. + + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform, by reversing the list of + transforms and applying the inverse of each. + +examples: + - + - A series of transforms + - asdf-standard-1.6.0 + - | + !transform/compose-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + $ref: "transform-1.3.0" + required: [forward] +... diff --git a/resources/stsci.edu/schemas/concatenate-1.3.0.yaml b/resources/stsci.edu/schemas/concatenate-1.3.0.yaml new file mode 100644 index 0000000..0fdd31b --- /dev/null +++ b/resources/stsci.edu/schemas/concatenate-1.3.0.yaml @@ -0,0 +1,66 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/concatenate-1.3.0" +title: > + Send axes to different subtransforms. + +description: | + Transforms a set of separable inputs by splitting the axes apart, + sending them through the given subtransforms in parallel, and + finally concatenating the subtransform output axes back together. + + The input axes are assigned to each subtransform in order. If the + number of input axes is unequal to the sum of the number of input + axes of all of the subtransforms, that is considered an error case. + + The output axes from each subtransform are appended together to make + up the resulting output axes. + + For example, given 5 input axes, and 3 subtransforms with the + following orders: + + 1. transform A: 2 in -> 2 out + 1. transform B: 1 in -> 2 out + 1. transform C: 2 in -> 1 out + + The transform is performed as follows: + + ``` + : i0 i1 i2 i3 i4 + : | | | | | + : +---------+ +---------+ +----------+ + : | A | | B | | C | + : +---------+ +---------+ +----------+ + : | | | | | + : o0 o1 o2 o3 o4 + ``` + + If reordering of the input or output axes is required, use in series + with the `remap_axes` transform. + + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform. +examples: + - + - The example in the description + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + - !transform/shift-1.3.0 + offset: 5.0 + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + $ref: "transform-1.3.0" + required: [forward] +... diff --git a/resources/stsci.edu/schemas/conic-1.4.0.yaml b/resources/stsci.edu/schemas/conic-1.4.0.yaml new file mode 100644 index 0000000..4630e07 --- /dev/null +++ b/resources/stsci.edu/schemas/conic-1.4.0.yaml @@ -0,0 +1,52 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/conic-1.4.0" +title: | + Base class of all conic projections. + +description: | + In conic projections, the sphere is thought to be projected onto the + surface of a cone which is then opened out. + + In a general sense, the pixel-to-sky transformation is defined as: + + $$\phi &= \arg\left(\frac{Y_0 - y}{R_\theta}, \frac{x}{R_\theta}\right) / C \\ + R_\theta &= \mathrm{sign} \theta_a \sqrt{x^2 + (Y_0 - y)^2}$$ + + and the inverse (sky-to-pixel) is defined as: + + $$x &= R_\theta \sin (C \phi) \\ + y &= R_\theta \cos (C \phi) + Y_0$$ + + where $C$ is the "constant of the cone": + + $$C = \frac{180^\circ \cos \theta}{\pi R_\theta}$$ + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky + + sigma: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + $(\theta_1 + \theta_2) / 2$ where $\theta_1$ and $\theta_2$ + are the latitudes of the standard parallels, in degrees. This + parameter is also referred to as `theta_A`. + + delta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + $(\theta_1 - \theta_2) / 2$ where $\theta_1$ and $\theta_2$ + are the latitudes of the standard parallels, in degrees. This + parameter is also referred to as `delta`. + default: 0 +... diff --git a/resources/stsci.edu/schemas/conic_equal_area-1.4.0.yaml b/resources/stsci.edu/schemas/conic_equal_area-1.4.0.yaml new file mode 100644 index 0000000..6af5fe3 --- /dev/null +++ b/resources/stsci.edu/schemas/conic_equal_area-1.4.0.yaml @@ -0,0 +1,30 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/conic_equal_area-1.4.0" +title: | + Alber's conic equal area projection. + +description: | + Corresponds to the `COE` projection in the FITS WCS standard. + + See + [conic](ref:schemas/conic-1.4.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \gamma / 2 \\ + R_\theta &= \frac{180^\circ}{\pi} \frac{2}{\gamma} \sqrt{1 + \sin \theta_1 \sin \theta_2 - \gamma \sin \theta} \\ + Y_0 &= \frac{180^\circ}{\pi} \frac{2}{\gamma} \sqrt{1 + \sin \theta_1 \sin \theta_2 - \gamma \sin((\theta_1 + \theta_2)/2)}$$ + + where: + + $$\gamma = \sin \theta_1 + \sin \theta_2$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "conic-1.4.0" +... diff --git a/resources/stsci.edu/schemas/conic_equidistant-1.4.0.yaml b/resources/stsci.edu/schemas/conic_equidistant-1.4.0.yaml new file mode 100644 index 0000000..275468f --- /dev/null +++ b/resources/stsci.edu/schemas/conic_equidistant-1.4.0.yaml @@ -0,0 +1,26 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/conic_equidistant-1.4.0" +title: | + Conic equidistant projection. + +description: | + Corresponds to the `COD` projection in the FITS WCS standard. + + See + [conic](ref:schemas/conic-1.3.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \frac{180^\circ}{\pi} \frac{\sin\theta_a\sin\eta}{\eta} \\ + R_\theta &= \theta_a - \theta + \eta\cot\eta\cot\theta_a \\ + Y_0 = \eta\cot\eta\cot\theta_a$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "conic-1.4.0" +... diff --git a/resources/stsci.edu/schemas/conic_orthomorphic-1.4.0.yaml b/resources/stsci.edu/schemas/conic_orthomorphic-1.4.0.yaml new file mode 100644 index 0000000..bccbb8a --- /dev/null +++ b/resources/stsci.edu/schemas/conic_orthomorphic-1.4.0.yaml @@ -0,0 +1,33 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/conic_orthomorphic-1.4.0" +title: | + Conic orthomorphic projection. + +description: | + Corresponds to the `COO` projection in the FITS WCS standard. + + See + [conic](ref:schemas/conic-1.3.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \frac{\ln \left( \frac{\cos\theta_2}{\cos\theta_1} \right)} + {\ln \left[ \frac{\tan\left(\frac{90^\circ-\theta_2}{2}\right)} + {\tan\left(\frac{90^\circ-\theta_1}{2}\right)} \right] } \\ + R_\theta &= \psi \left[ \tan \left( \frac{90^\circ - \theta}{2} \right) \right]^C \\ + Y_0 &= \psi \left[ \tan \left( \frac{90^\circ - \theta_a}{2} \right) \right]^C$$ + + where: + + $$\psi = \frac{180^\circ}{\pi} \frac{\cos \theta} + {C\left[\tan\left(\frac{90^\circ-\theta}{2}\right)\right]^C}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "conic-1.4.0" +... diff --git a/resources/stsci.edu/schemas/conic_perspective-1.4.0.yaml b/resources/stsci.edu/schemas/conic_perspective-1.4.0.yaml new file mode 100644 index 0000000..f1fe207 --- /dev/null +++ b/resources/stsci.edu/schemas/conic_perspective-1.4.0.yaml @@ -0,0 +1,26 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/conic_perspective-1.4.0" +title: | + Colles' conic perspecitve projection. + +description: | + Corresponds to the `COP` projection in the FITS WCS standard. + + See + [conic](ref:schemas/conic-1.3.0) + for the definition of the full transformation. + + The transformation is defined as: + + $$C &= \sin \theta_a \\ + R_\theta &= \frac{180^\circ}{\pi} \cos \eta [ \cot \theta_a - \tan(\theta - \theta_a)] \\ + Y_0 &= \frac{180^\circ}{\pi} \cos \eta \cot \theta_a$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "conic-1.4.0" +... diff --git a/resources/stsci.edu/schemas/constant-1.5.0.yaml b/resources/stsci.edu/schemas/constant-1.5.0.yaml new file mode 100644 index 0000000..4e2ebd1 --- /dev/null +++ b/resources/stsci.edu/schemas/constant-1.5.0.yaml @@ -0,0 +1,21 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/constant-1.5.0" +title: > + A Constant transform. +description: | + Invertibility: A transform which takes one or two inputs based on + dimensionality and returns a constant value. It has no analytical inverse. +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + value: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + dimensions: + type: integer + required: [value, dimensions] +... diff --git a/resources/stsci.edu/schemas/cosine1d-1.1.0.yaml b/resources/stsci.edu/schemas/cosine1d-1.1.0.yaml new file mode 100644 index 0000000..8e355ac --- /dev/null +++ b/resources/stsci.edu/schemas/cosine1d-1.1.0.yaml @@ -0,0 +1,39 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/cosine1d-1.1.0" +title: > + One dimensional cosine model. + +description: > + One dimensional cosine. + +examples: + - + - $$f(x)=10.0cos(2\pi *0.5x+2\pi*1.0)$$ + - asdf-standard-1.6.0 + - | + !transform/cosine1d-1.1.0 {amplitude: 10.0, frequency: 0.5, phase: 1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation amplitude. + frequency: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation frequency. + phase: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation phase. + + required: ['amplitude', 'frequency', 'phase'] +... diff --git a/resources/stsci.edu/schemas/cylindrical-1.3.0.yaml b/resources/stsci.edu/schemas/cylindrical-1.3.0.yaml new file mode 100644 index 0000000..7d0cf90 --- /dev/null +++ b/resources/stsci.edu/schemas/cylindrical-1.3.0.yaml @@ -0,0 +1,18 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/cylindrical-1.3.0" +title: | + Base class of all cylindrical projections. + +description: | + The surface of cylindrical projections is a cylinder. + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky +... diff --git a/resources/stsci.edu/schemas/cylindrical_equal_area-1.4.0.yaml b/resources/stsci.edu/schemas/cylindrical_equal_area-1.4.0.yaml new file mode 100644 index 0000000..330c218 --- /dev/null +++ b/resources/stsci.edu/schemas/cylindrical_equal_area-1.4.0.yaml @@ -0,0 +1,35 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/cylindrical_equal_area-1.4.0" +title: | + The cylindrical equal area projection. + +description: | + Corresponds to the `CEA` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= x \\ + \theta &= \sin^{-1}\left(\frac{\pi}{180^{\circ}}\lambda y\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \\ + y &= \frac{180^{\circ}}{\pi}\frac{\sin \theta}{\lambda}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "cylindrical-1.3.0" + - type: object + properties: + lambda: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + Radius of the cylinder in spherical radii, default is 1. + default: 1 +... diff --git a/resources/stsci.edu/schemas/cylindrical_perspective-1.4.0.yaml b/resources/stsci.edu/schemas/cylindrical_perspective-1.4.0.yaml new file mode 100644 index 0000000..2b4eace --- /dev/null +++ b/resources/stsci.edu/schemas/cylindrical_perspective-1.4.0.yaml @@ -0,0 +1,44 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/cylindrical_perspective-1.4.0" +title: | + The cylindrical perspective projection. + +description: | + Corresponds to the `CYP` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{x}{\lambda} \\ + \theta &= \arg(1, \eta) + \sin{-1}\left(\frac{\eta \mu}{\sqrt{\eta^2 + 1}}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \lambda \phi \\ + y &= \frac{180^{\circ}}{\pi}\left(\frac{\mu + \lambda}{\mu + \cos \theta}\right)\sin \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "cylindrical-1.3.0" + - type: object + properties: + mu: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + Distance from center of sphere in the direction opposite the + projected surface, in spherical radii. + default: 1 + + lambda: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + Radius of the cylinder in spherical radii, default is 1. + default: 1 +... diff --git a/resources/stsci.edu/schemas/disk2d-1.1.0.yaml b/resources/stsci.edu/schemas/disk2d-1.1.0.yaml new file mode 100644 index 0000000..c9ff35c --- /dev/null +++ b/resources/stsci.edu/schemas/disk2d-1.1.0.yaml @@ -0,0 +1,51 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/disk2d-1.1.0" +title: > + Two dimensional disk model. + +description: > + Two dimensional radially symmetric disk. + +examples: + - + - A 2D disk centered at (x, y) = (0.5, 1.5), of radius 5.0 and amplitude 10.0. + - asdf-standard-1.6.0 + - | + !transform/disk2d-1.1.0 + R_0: 5.0 + amplitude: 10.0 + bounding_box: + - [-3.5, 6.5] + - [-4.5, 5.5] + x_0: 0.5 + y_0: 1.5 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Value of the disk function. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the center of the disk. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y position of the center of the disk. + R_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Radius of the disk. + + required: ['amplitude', 'x_0', 'y_0', 'R_0'] +... diff --git a/resources/stsci.edu/schemas/divide-1.3.0.yaml b/resources/stsci.edu/schemas/divide-1.3.0.yaml new file mode 100644 index 0000000..b6e137e --- /dev/null +++ b/resources/stsci.edu/schemas/divide-1.3.0.yaml @@ -0,0 +1,35 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/divide-1.3.0" +title: > + Perform a list of subtransforms in parallel and then + divide their results. + +description: | + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. +examples: + - + - A list of transforms, performed in parallel, and then combined + through division. + - asdf-standard-1.6.0 + - | + !transform/divide-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 2.0 + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + $ref: "transform-1.3.0" + required: [forward] +... diff --git a/resources/stsci.edu/schemas/drude1d-1.1.0.yaml b/resources/stsci.edu/schemas/drude1d-1.1.0.yaml new file mode 100644 index 0000000..3c1d374 --- /dev/null +++ b/resources/stsci.edu/schemas/drude1d-1.1.0.yaml @@ -0,0 +1,43 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/drude1d-1.1.0" +title: > + One dimensional Drude model + +description: > + Drude model based one the behavior of electons in materials (esp. metals). + +examples: + - + - $$f(x) = 10.0 \frac{(2.5/0.5)^2}{((x/0.5 - 0.5/x)^2 + (2.5/0.5)^2}$$ + - asdf-standard-1.6.0 + - | + !transform/drude1d-1.1.0 + amplitude: 10.0 + bounding_box: [-124.5, 125.5] + fwhm: 2.5 + x_0: 0.5 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Peak value. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the peak. + fwhm: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Full width at half maximum + + required: ['amplitude', 'x_0', 'fwhm'] +... diff --git a/resources/stsci.edu/schemas/ellipse2d-1.1.0.yaml b/resources/stsci.edu/schemas/ellipse2d-1.1.0.yaml new file mode 100644 index 0000000..c06bb1c --- /dev/null +++ b/resources/stsci.edu/schemas/ellipse2d-1.1.0.yaml @@ -0,0 +1,63 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/ellipse2d-1.1.0" +title: > + Two dimensional ellipse model. + +description: > + Two dimensional ellipse. + +examples: + - + - A 2D ellipse centered at (x, y) = (0.5, 1.5), with a semimajor axis of 2.0, semiminor axis of 4.0, oriented at 0.2 radians counterclockwise from the positive x-axis. + - asdf-standard-1.6.0 + - | + !transform/ellipse2d-1.1.0 + a: 2.0 + amplitude: 10.0 + b: 4.0 + bounding_box: + - [-2.4403509950278934, 5.440350995027893] + - [-1.6150966966034175, 2.6150966966034175] + theta: 0.2 + x_0: 0.5 + y_0: 1.5 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Value of the ellipse. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the center of the ellipse. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y position of the center of the ellipse. + a: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: The length of the semimajor axis. + b: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: The length of the seminor axis. + theta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: The rotation angle in radians of the semimajor axis. The rotation angle increase counterclockwise from the positive x axis. + + required: ['amplitude', 'x_0', 'y_0', 'a', 'b', 'theta'] +... diff --git a/resources/stsci.edu/schemas/exponential1d-1.1.0.yaml b/resources/stsci.edu/schemas/exponential1d-1.1.0.yaml new file mode 100644 index 0000000..3ce347f --- /dev/null +++ b/resources/stsci.edu/schemas/exponential1d-1.1.0.yaml @@ -0,0 +1,34 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/exponential1d-1.1.0" +title: > + One dimensional exponential model. + +description: > + One dimensional exponential model. + +examples: + - + - $$f(x) = 10.0e^{x/2.5}$$ + - asdf-standard-1.6.0 + - | + !transform/exponential1d-1.1.0 {amplitude: 10.0, tau: 2.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude or scaling factor. + r_core: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Denominator in exponent. + + required: ['amplitude', 'tau'] +... diff --git a/resources/stsci.edu/schemas/exponential_cutoff_power_law1d-1.1.0.yaml b/resources/stsci.edu/schemas/exponential_cutoff_power_law1d-1.1.0.yaml new file mode 100644 index 0000000..f87c0d1 --- /dev/null +++ b/resources/stsci.edu/schemas/exponential_cutoff_power_law1d-1.1.0.yaml @@ -0,0 +1,44 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/exponential_cutoff_power_law1d-1.1.0" +title: > + One dimensional power law model with an exponential cutoff. + +description: > + One dimensional power law model with an exponential cutoff. + +examples: + - + - $$f(x) = 10.0 (x / 5.0) ^ {-2.0} \exp (-x / 7.0)$$ + - asdf-standard-1.6.0 + - | + !transform/exponential_cutoff_power_law1d-1.1.0 {alpha: 2.0, amplitude: 10.0, x_0: 5.0, x_cutoff: 7.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Model amplitude. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Reference point. + alpha: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law index. + x_cutoff: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Cutoff point. + + required: ['amplitude', 'x_0', 'alpha', 'x_cutoff'] +... diff --git a/resources/stsci.edu/schemas/fix_inputs-1.3.0.yaml b/resources/stsci.edu/schemas/fix_inputs-1.3.0.yaml new file mode 100644 index 0000000..2149e8e --- /dev/null +++ b/resources/stsci.edu/schemas/fix_inputs-1.3.0.yaml @@ -0,0 +1,64 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/fix_inputs-1.3.0" +title: > + Set to a constant selected input arguments of a model. + +description: | + This operation takes as the right hand side a dict equivalent + that consists of key:value pairs where the key identifies + the input argument to be set, either by position number + (0 based) or name, and the value is the floating point value + that should be assigned to that input. The result is a + compound model with n fewer input arguments where n is + the number of input values to be set (i.e., the number + of keys in the dict). + +examples: + - + - Fix the 0-th coordinate. + - asdf-standard-1.6.0 + - | + !transform/fix_inputs-1.3.0 + forward: + - !transform/compose-1.3.0 + forward: + - !transform/gnomonic-1.3.0 {direction: pix2sky} + - !transform/rotate2d-1.4.0 {angle: 23.0} + - keys: [0] + values: [2] + - + - Fix the "x" coordinate. + - asdf-standard-1.6.0 + - | + !transform/fix_inputs-1.3.0 + forward: + - !transform/compose-1.3.0 + forward: + - !transform/gnomonic-1.3.0 {direction: pix2sky} + - !transform/rotate2d-1.4.0 {angle: 23.0} + - keys: [x] + values: [2] + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + - $ref: "transform-1.3.0" + - type: object + properties: + keys: + type: array + items: + type: [string, integer] + values: + type: array + items: + - type: number + minItems: 2 + maxItems: 2 + required: [forward] +... diff --git a/resources/stsci.edu/schemas/gaussian1d-1.1.0.yaml b/resources/stsci.edu/schemas/gaussian1d-1.1.0.yaml new file mode 100644 index 0000000..d289b24 --- /dev/null +++ b/resources/stsci.edu/schemas/gaussian1d-1.1.0.yaml @@ -0,0 +1,43 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/gaussian1d-1.1.0" +title: > + A 1D Gaussian model. + +description: > + A 1D gaussian distribution. + +examples: + - + - $$f(x) = 10.0 e^{- \frac{\left(x - 1.5\right)^{2}}{2*0.25^{2}}}$$ + - asdf-standard-1.6.0 + - | + !transform/gaussian1d-1.1.0 + amplitude: 10.0 + bounding_box: [0.125, 2.875] + mean: 1.5 + stddev: 0.25 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude. + mean: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Mean. + stddev: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Standard deviation. + + required: [amplitude, mean, stddev] +... diff --git a/resources/stsci.edu/schemas/gaussian2d-1.1.0.yaml b/resources/stsci.edu/schemas/gaussian2d-1.1.0.yaml new file mode 100644 index 0000000..e66fbd8 --- /dev/null +++ b/resources/stsci.edu/schemas/gaussian2d-1.1.0.yaml @@ -0,0 +1,63 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/gaussian2d-1.1.0" +title: > + A 2D Gaussian model. + +description: > + A 2D gaussian distribution. + +examples: + - + - $f(x, y) = 10.0 e^{-a\left(x - 1.5\right)^{2} -b\left(x - 1.5\right) \left(y - 2.5\right) -c\left(y - 2.5\right)^{2}}$ using the following definitions $a = \left(\frac{\cos^{2}{\left (0 \right )}}{2*0.25^{2}} +\frac{\sin^{2}{\left (0 \right )}}{2*0.375^{2}}\right)$, $b = \left(\frac{\sin{\left (2 *0 \right )}}{2 *0.25^{2}} -\frac{\sin{\left (2 *0 \right )}}{2*0.375^{2}}\right)$, $c = \left(\frac{\sin^{2}{\left (0\right )}}{2*0.25^{2}} +\frac{\cos^{2}{\left (0 \right )}}{2*0.375^{2}}\right)$ + - asdf-standard-1.6.0 + - | + !transform/gaussian2d-1.1.0 + amplitude: 10.0 + bounding_box: + - [0.4375, 4.5625] + - [0.125, 2.875] + theta: 0.0 + x_mean: 1.5 + x_stddev: 0.25 + y_mean: 2.5 + y_stddev: 0.375 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude. + x_mean: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Mean in x. + y_mean: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Mean in y. + x_stddev: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Standard deviation in x. + y_stddev: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Standard deviation in y. + theta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Rotation angle in radians, increases counterclockwise. + + required: ['amplitude', 'x_mean', 'y_mean', 'x_stddev', 'y_stddev', 'theta'] +... diff --git a/resources/stsci.edu/schemas/gnomonic-1.3.0.yaml b/resources/stsci.edu/schemas/gnomonic-1.3.0.yaml new file mode 100644 index 0000000..6d4f94f --- /dev/null +++ b/resources/stsci.edu/schemas/gnomonic-1.3.0.yaml @@ -0,0 +1,28 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/gnomonic-1.3.0" +title: | + The gnomonic projection. + +description: | + Corresponds to the `TAN` projection in the FITS WCS standard. + + See + [zenithal](ref:schemas/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = \tan^{-1}\left(\frac{180^{\circ}}{\pi R_\theta}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\cot \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "zenithal-1.3.0" +... diff --git a/resources/stsci.edu/schemas/hammer_aitoff-1.3.0.yaml b/resources/stsci.edu/schemas/hammer_aitoff-1.3.0.yaml new file mode 100644 index 0000000..8376049 --- /dev/null +++ b/resources/stsci.edu/schemas/hammer_aitoff-1.3.0.yaml @@ -0,0 +1,30 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/hammer_aitoff-1.3.0" +title: | + Hammer-Aitoff projection. + +description: | + Corresponds to the `AIT` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= 2 \arg \left(2Z^2 - 1, \frac{\pi}{180^\circ} \frac{Z}{2}x\right) \\ + \theta &= \sin^{-1}\left(\frac{\pi}{180^\circ}yZ\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= 2 \gamma \cos \theta \sin \frac{\phi}{2} \\ + y &= \gamma \sin \theta$$ + + where: + + $$\gamma = \frac{180^\circ}{\pi} \sqrt{\frac{2}{1 + \cos \theta \cos(\phi / 2)}}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "pseudocylindrical-1.3.0" +... diff --git a/resources/stsci.edu/schemas/healpix-1.3.0.yaml b/resources/stsci.edu/schemas/healpix-1.3.0.yaml new file mode 100644 index 0000000..5d697be --- /dev/null +++ b/resources/stsci.edu/schemas/healpix-1.3.0.yaml @@ -0,0 +1,33 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/healpix-1.3.0" +title: | + HEALPix projection. + +description: | + Corresponds to the `HPX` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky + + H: + type: number + description: | + The number of facets in the longitude direction. + default: 4.0 + + X: + type: number + description: | + The number of facets in the latitude direction. + default: 3.0 +... diff --git a/resources/stsci.edu/schemas/healpix_polar-1.3.0.yaml b/resources/stsci.edu/schemas/healpix_polar-1.3.0.yaml new file mode 100644 index 0000000..7d91bd0 --- /dev/null +++ b/resources/stsci.edu/schemas/healpix_polar-1.3.0.yaml @@ -0,0 +1,21 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/healpix_polar-1.3.0" +title: | + HEALPix polar, aka "butterfly", projection. + +description: | + Corresponds to the `XPH` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky +... diff --git a/resources/stsci.edu/schemas/identity-1.3.0.yaml b/resources/stsci.edu/schemas/identity-1.3.0.yaml new file mode 100644 index 0000000..2f1d6da --- /dev/null +++ b/resources/stsci.edu/schemas/identity-1.3.0.yaml @@ -0,0 +1,19 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/identity-1.3.0" +title: > + The identity transform. +description: > + Invertibility: The inverse of this transform is also the identity + transform. +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + n_dims: + type: integer + default: 1 + description: | + The number of dimensions. +... diff --git a/resources/stsci.edu/schemas/king_projected_analytic1d-1.1.0.yaml b/resources/stsci.edu/schemas/king_projected_analytic1d-1.1.0.yaml new file mode 100644 index 0000000..2ccf551 --- /dev/null +++ b/resources/stsci.edu/schemas/king_projected_analytic1d-1.1.0.yaml @@ -0,0 +1,43 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/king_projected_analytic1d-1.1.0" +title: > + Projected (surface density) analytic King Model. + +description: > + Projected (surface density) analytic King Model. + +examples: + - + - $$f(x)=f(x)=10.0(12.2)^2\left(\frac{1}{\sqrt{x^2+(12.2)^2}}-\frac{1}{\sqrt{(15.4)^2+(12.2)^2}}\right)^2$$ + - asdf-standard-1.6.0 + - | + !transform/king_projected_analytic1d-1.1.0 + amplitude: 10.0 + bounding_box: [0.0, 15.4] + r_core: 12.2 + r_tide: 15.4 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude or scaling factor. + r_core: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Core radius. + r_tide: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Tidal radius. + + required: ['amplitude', 'r_core', 'r_tide'] +... diff --git a/resources/stsci.edu/schemas/label_mapper-1.3.0.yaml b/resources/stsci.edu/schemas/label_mapper-1.3.0.yaml new file mode 100644 index 0000000..a079e54 --- /dev/null +++ b/resources/stsci.edu/schemas/label_mapper-1.3.0.yaml @@ -0,0 +1,148 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/label_mapper-1.3.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:schemas/regions_selector-1.2.0). The + [label_mapper](ref:schemas/label_mapper-1.3.0) + returns the label corresponding to given inputs. The + [regions_selector](ref:schemas/regions_selector-1.2.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. + - asdf-standard-1.6.0 + - | + !transform/label_mapper-1.3.0 + mapper: !core/ndarray-1.1.0 + [[1, 0, 2], + [1, 0, 2], + [1, 0, 2]] + + - + - Map numbers dictionary to transforms which return labels. + - asdf-standard-1.6.0 + - | + !transform/label_mapper-1.3.0 + mapper: !!omap + - !!omap + labels: [-1.67833272, -1.9580548, -1.118888] + - !!omap + models: + - !transform/compose-1.3.0 + forward: + - !transform/remap_axes-1.4.0 + mapping: [1] + - !transform/shift-1.3.0 {offset: 6.0} + - !transform/compose-1.3.0 + forward: + - !transform/remap_axes-1.4.0 + mapping: [1] + - !transform/shift-1.3.0 {offset: 2.0} + - !transform/compose-1.3.0 + forward: + - !transform/remap_axes-1.4.0 + mapping: [1] + - !transform/shift-1.3.0 {offset: 4.0} + inputs: [x, y] + inputs_mapping: !transform/remap_axes-1.4.0 + mapping: [0] + n_inputs: 2 + + - + - Map a number within a range of numbers to transforms which return labels. + - asdf-standard-1.6.0 + - | + !transform/label_mapper-1.3.0 + mapper: !!omap + - !!omap + labels: + - [3.2, 4.1] + - [2.67, 2.98] + - [1.95, 2.3] + - !!omap + models: + - !transform/compose-1.2.0 + forward: + - !transform/remap_axes-1.4.0 + mapping: [1] + - !transform/shift-1.3.0 {offset: 6.0} + - !transform/compose-1.3.0 + forward: + - !transform/remap_axes-1.4.0 + mapping: [1] + - !transform/shift-1.3.0 {offset: 2.0} + - !transform/compose-1.3.0 + forward: + - !transform/remap_axes-1.4.0 + mapping: [1] + - !transform/shift-1.3.0 {offset: 4.0} + inputs: [x, y] + inputs_mapping: !transform/remap_axes-1.4.0 + mapping: [0] + n_inputs: 2 + +allOf: + - $ref: "transform-1.3.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: "../core/ndarray-1.1.0" + - $ref: "transform-1.3.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: "transform-1.3.0" + + inputs: + type: array + items: + type: string + description: | + Names of inputs. + inputs_mapping: + $ref: "transform-1.3.0" + description: | + [mapping](ref:schemas/remap_axes-1.4.0) + 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] +... diff --git a/resources/stsci.edu/schemas/linear1d-1.1.0.yaml b/resources/stsci.edu/schemas/linear1d-1.1.0.yaml new file mode 100644 index 0000000..4402715 --- /dev/null +++ b/resources/stsci.edu/schemas/linear1d-1.1.0.yaml @@ -0,0 +1,24 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/linear1d-1.1.0" +title: > + A one dimensional line model +description: > + A one dimensional line model + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + slope: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Slope of the straight line. + intercept: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Intercept of the straight line. +... diff --git a/resources/stsci.edu/schemas/log_parabola1d-1.1.0.yaml b/resources/stsci.edu/schemas/log_parabola1d-1.1.0.yaml new file mode 100644 index 0000000..293526a --- /dev/null +++ b/resources/stsci.edu/schemas/log_parabola1d-1.1.0.yaml @@ -0,0 +1,44 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/log_parabola1d-1.1.0" +title: > + One dimensional log parabola model (sometimes called curved power law). + +description: > + One dimensional log parabola model (sometimes called curved power law). + +examples: + - + - $$f(x) = 10*(\frac{x}{0.5})^{-2.0-3.2\log{(\frac{x}{0.5})}}$$ + - asdf-standard-1.6.0 + - | + !transform/log_parabola1d-1.1.0 {alpha: 2.0, amplitude: 10.0, beta: 3.2, x_0: 0.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Model amplitude. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Reference point. + alpha: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law index. + beta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law curvature. + + required: ['amplitude', 'x_0', 'alpha', 'beta'] +... diff --git a/resources/stsci.edu/schemas/logarithmic1d-1.1.0.yaml b/resources/stsci.edu/schemas/logarithmic1d-1.1.0.yaml new file mode 100644 index 0000000..cd9dad9 --- /dev/null +++ b/resources/stsci.edu/schemas/logarithmic1d-1.1.0.yaml @@ -0,0 +1,34 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/logarithmic1d-1.1.0" +title: > + One dimensional (natural) logarithmic model. + +description: > + One dimensional (natural) logarithmic model. + +examples: + - + - $$f(x) = 10.0ln(\frac{x}{2.5})$$ + - asdf-standard-1.6.0 + - | + !transform/logarithmic1d-1.1.0 {amplitude: 10.0, tau: 2.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude or scaling factor. + r_core: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Denominator in log. + + required: ['amplitude', 'tau'] +... diff --git a/resources/stsci.edu/schemas/lorentz1d-1.1.0.yaml b/resources/stsci.edu/schemas/lorentz1d-1.1.0.yaml new file mode 100644 index 0000000..5751d03 --- /dev/null +++ b/resources/stsci.edu/schemas/lorentz1d-1.1.0.yaml @@ -0,0 +1,43 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/lorentz1d-1.1.0" +title: > + One dimensional Lorentzian model. + +description: > + One dimensional Lorentzian model. + +examples: + - + - $$f(x) = \frac{10.0 *5.0^{2}}{5.0^{2} + \left(x - 0.5\right)^{2}}$$ + - asdf-standard-1.6.0 + - | + !transform/lorentz1d-1.1.0 + amplitude: 10.0 + bounding_box: [-124.5, 125.5] + fwhm: 5.0 + x_0: 0.5 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Peak value. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Position of the peak. + fwhm: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Full width at half maximum. + + required: ['amplitude', 'x_0', 'fwhm'] +... diff --git a/resources/stsci.edu/schemas/math_functions-1.1.0.yaml b/resources/stsci.edu/schemas/math_functions-1.1.0.yaml new file mode 100644 index 0000000..ebd1e12 --- /dev/null +++ b/resources/stsci.edu/schemas/math_functions-1.1.0.yaml @@ -0,0 +1,26 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/math_functions-1.1.0" +title: > + Math functions. +description: | + Commonly used math funcitons. + +examples: + - + - Atan2 + - asdf-standard-1.6.0 + - | + !transform/math_functions-1.1.0 + func_name: arctan2 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + func_name: + type: string + description: | + The name of a numpy ufunc. +... diff --git a/resources/stsci.edu/schemas/mercator-1.3.0.yaml b/resources/stsci.edu/schemas/mercator-1.3.0.yaml new file mode 100644 index 0000000..3f4c9a0 --- /dev/null +++ b/resources/stsci.edu/schemas/mercator-1.3.0.yaml @@ -0,0 +1,26 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/mercator-1.3.0" +title: | + The Mercator projection. + +description: | + Corresponds to the `MER` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= x \\ + \theta &= 2 \tan^{-1}\left(e^{y \pi / 180^{\circ}}\right)-90^{\circ}$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \\ + y &= \frac{180^{\circ}}{\pi}\ln \tan \left(\frac{90^{\circ} + \theta}{2}\right)$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "cylindrical-1.3.0" +... diff --git a/resources/stsci.edu/schemas/moffat1d-1.1.0.yaml b/resources/stsci.edu/schemas/moffat1d-1.1.0.yaml new file mode 100644 index 0000000..f8b1e95 --- /dev/null +++ b/resources/stsci.edu/schemas/moffat1d-1.1.0.yaml @@ -0,0 +1,44 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/moffat1d-1.1.0" +title: > + One dimensional Moffat model. + +description: > + One dimensional Moffat distribution. + +examples: + - + - $$f(x)=10.0\left(1+\frac{\left(x-0.5\right)^{2}}{1.2^{2}}\right)^{-2}$$ + - asdf-standard-1.6.0 + - | + !transform/moffat1d-1.1.0 {alpha: 2.5, amplitude: 10.0, gamma: 1.2, x_0: 0.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude of the model. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the maximum of the Moffat model. + gamma: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Core width of the Moffat model. + alpha: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power index of the Moffat model. + + required: ['amplitude', 'x_0', 'gamma', 'alpha'] +... diff --git a/resources/stsci.edu/schemas/moffat2d-1.1.0.yaml b/resources/stsci.edu/schemas/moffat2d-1.1.0.yaml new file mode 100644 index 0000000..8e984bf --- /dev/null +++ b/resources/stsci.edu/schemas/moffat2d-1.1.0.yaml @@ -0,0 +1,50 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/moffat2d-1.1.0" +title: > + Two dimensional Moffat model. + +description: > + Two dimensional Moffat distribution. + +examples: + - + - $$f(x)=10.0\left(1+\frac{\left(x-0.5\right)^{2}+\left(y-1.5\right)^{2}}{1.2^{2}}\right)^{-2}$$ + - asdf-standard-1.6.0 + - | + !transform/moffat2d-1.1.0 {alpha: 2.5, amplitude: 10.0, gamma: 1.2, x_0: 0.5, y_0: 1.5} + + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude of the model. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the maximum of the Moffat model. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y position of the maximum of the Moffat model. + gamma: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Core width of the Moffat model. + alpha: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power index of the Moffat model. + + required: ['amplitude', 'x_0', 'y_0', 'gamma', 'alpha'] +... diff --git a/resources/stsci.edu/schemas/molleweide-1.3.0.yaml b/resources/stsci.edu/schemas/molleweide-1.3.0.yaml new file mode 100644 index 0000000..0eb512d --- /dev/null +++ b/resources/stsci.edu/schemas/molleweide-1.3.0.yaml @@ -0,0 +1,26 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/molleweide-1.3.0" +title: | + Molleweide's projection. + +description: | + Corresponds to the `MOL` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{\pi x}{2 \sqrt{2 - \left(\frac{\pi}{180^\circ}y\right)^2}} \\ + \theta &= \sin^{-1}\left(\frac{1}{90^\circ}\sin^{-1}\left(\frac{\pi}{180^\circ}\frac{y}{\sqrt{2}}\right) + \frac{y}{180^\circ}\sqrt{2 - \left(\frac{\pi}{180^\circ}y\right)^2}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \frac{2 \sqrt{2}}{\pi} \phi \cos \gamma \\ + y &= \sqrt{2} \frac{180^\circ}{\pi} \sin \gamma$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "pseudocylindrical-1.3.0" +... diff --git a/resources/stsci.edu/schemas/multiply-1.3.0.yaml b/resources/stsci.edu/schemas/multiply-1.3.0.yaml new file mode 100644 index 0000000..14a4461 --- /dev/null +++ b/resources/stsci.edu/schemas/multiply-1.3.0.yaml @@ -0,0 +1,35 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/multiply-1.3.0" +title: > + Perform a list of subtransforms in parallel and then + multiply their results. + +description: | + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. +examples: + - + - A list of transforms, performed in parallel, and then combined + through multiplication. + - asdf-standard-1.6.0 + - | + !transform/multiply-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + $ref: "transform-1.3.0" + required: [forward] +... diff --git a/resources/stsci.edu/schemas/multiplyscale-1.0.0.yaml b/resources/stsci.edu/schemas/multiplyscale-1.0.0.yaml index 6ed5213..3f5bfad 100644 --- a/resources/stsci.edu/schemas/multiplyscale-1.0.0.yaml +++ b/resources/stsci.edu/schemas/multiplyscale-1.0.0.yaml @@ -10,7 +10,7 @@ description: > examples: - - Multiply the input by a pixel scale factor. - + - asdf-standard-1.5.0 - | !transform/multiplyscale-1.0.0 factor: !unit/quantity-1.1.0 {unit: !unit/unit-1.0.0 arcsec pixel-1, diff --git a/resources/stsci.edu/schemas/multiplyscale-1.1.0.yaml b/resources/stsci.edu/schemas/multiplyscale-1.1.0.yaml new file mode 100644 index 0000000..5ff09f6 --- /dev/null +++ b/resources/stsci.edu/schemas/multiplyscale-1.1.0.yaml @@ -0,0 +1,29 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/multiplyscale-1.1.0" +title: > + A Multiply model. +description: > + Multiply the input by a factor. + +examples: + - + - Multiply the input by a pixel scale factor. + - asdf-standard-1.6.0 + - | + !transform/multiplyscale-1.1.0 + factor: !unit/quantity-1.2.0 {unit: !unit/unit-1.0.0 arcsec pixel-1, + value: 0.06} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + factor: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Multiplication factor. + required: [factor] +... diff --git a/resources/stsci.edu/schemas/ortho_polynomial-1.1.0.yaml b/resources/stsci.edu/schemas/ortho_polynomial-1.1.0.yaml new file mode 100644 index 0000000..04d97e1 --- /dev/null +++ b/resources/stsci.edu/schemas/ortho_polynomial-1.1.0.yaml @@ -0,0 +1,55 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/ortho_polynomial-1.1.0" +title: > + Respresents various Orthogonal Polynomial models. + +description: | + A polynomial model represented by its coefficients stored in + an ndarray of shape $(n+1)$ for univariate polynomials or $(n+1, n+1)$ + for polynomials with 2 variables, where $n$ is the highest total degree + of the polynomial. The property polynomial_type defines what kind of + polynomial is defined. + + $$P = \sum_{i, j=0}^{i+j=n}c_{ij} * x^{i} * y^{j}$$ + + Invertibility: This transform is not automatically invertible. + +examples: + - + - $P = 1.2 + 0.3 * x + 56.1 * x^{2}$ + - asdf-standard-1.6.0 + - | + !transform/ortho_polynomial-1.1.0 + polynomial_type: hermite + coefficients: !core/ndarray-1.1.0 + [1.2, 0.3, 56.1] + - + - $P = 1.2 + 0.3 * x + 3 * x * y + 2.1 * y^{2}$ + - asdf-standard-1.6.0 + - | + !transform/ortho_polynomial-1.1.0 + polynomial_type: chebyshev + coefficients: !core/ndarray-1.1.0 + [[1.2, 0.0, 2.1], + [0.3, 3.0, 0.0], + [0.0, 0.0, 0.0]] + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + polynomial_type: + description: | + One of a selected set of polynomial types. + type: string + enum: [chebyshev, legendre, hermite] + coefficients: + description: | + An array with coefficients. + anyOf: + - $ref: "../core/ndarray-1.1.0" + - type: array + required: [polynomial_type, coefficients] +... diff --git a/resources/stsci.edu/schemas/parabolic-1.3.0.yaml b/resources/stsci.edu/schemas/parabolic-1.3.0.yaml new file mode 100644 index 0000000..b27e81e --- /dev/null +++ b/resources/stsci.edu/schemas/parabolic-1.3.0.yaml @@ -0,0 +1,26 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/parabolic-1.3.0" +title: | + Parabolic projection. + +description: | + Corresponds to the `PAR` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{180^\circ}{\pi} \frac{x}{1 - 4(y / 180^\circ)^2} \\ + \theta &= 3 \sin^{-1}\left(\frac{y}{180^\circ}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \left(2\cos\frac{2\theta}{3} - 1\right) \\ + y &= 180^\circ \sin \frac{\theta}{3}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "pseudocylindrical-1.3.0" +... diff --git a/resources/stsci.edu/schemas/planar2d-1.1.0.yaml b/resources/stsci.edu/schemas/planar2d-1.1.0.yaml new file mode 100644 index 0000000..ae786a7 --- /dev/null +++ b/resources/stsci.edu/schemas/planar2d-1.1.0.yaml @@ -0,0 +1,39 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/planar2d-1.1.0" +title: > + Two dimensional plane model. + +description: > + Two dimensional plane model. + +examples: + - + - $$f(x, y)= a=5.0x + 2.5y + 11$$ + - asdf-standard-1.6.0 + - | + !transform/planar2d-1.1.0 {intercept: 11.0, slope_x: 5.0, slope_y: 2.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + slope_x: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Slope of the stright line in x. + slope_y: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Slope of the straight lie in y. + intercept: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: z-intercept of the straight line. + + required: ['slope_x', 'slope_y', 'intercept'] +... diff --git a/resources/stsci.edu/schemas/plate_carree-1.3.0.yaml b/resources/stsci.edu/schemas/plate_carree-1.3.0.yaml new file mode 100644 index 0000000..43cad80 --- /dev/null +++ b/resources/stsci.edu/schemas/plate_carree-1.3.0.yaml @@ -0,0 +1,28 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/plate_carree-1.3.0" +title: | + The plate carrée projection. + +description: | + Corresponds to the `CAR` projection in the FITS WCS standard. + + The main virtue of this transformation is its simplicity. + + The pixel-to-sky transformation is defined as: + + $$\phi &= x \\ + \theta &= y$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \\ + y &= \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "cylindrical-1.3.0" +... diff --git a/resources/stsci.edu/schemas/plummer1d-1.1.0.yaml b/resources/stsci.edu/schemas/plummer1d-1.1.0.yaml new file mode 100644 index 0000000..a185755 --- /dev/null +++ b/resources/stsci.edu/schemas/plummer1d-1.1.0.yaml @@ -0,0 +1,34 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/plummer1d-1.1.0" +title: > + Two dimensional Plummer model. + +description: > + One dimensional Plummer density profile model. + +examples: + - + - $$\rho(r)=\frac{3*15.0}{4\pi *5.5^3}(1+\frac{r^2}{5.5^2})^{-5/2}$$ + - asdf-standard-1.6.0 + - | + !transform/plummer1d-1.1.0 {mass: 15.0, r_plum: 5.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + mass: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Total mass of cluster. + r_plum: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Scale parameter which sets the size of the cluster core. + + required: ['mass', 'r_plum'] +... diff --git a/resources/stsci.edu/schemas/polyconic-1.3.0.yaml b/resources/stsci.edu/schemas/polyconic-1.3.0.yaml new file mode 100644 index 0000000..0758779 --- /dev/null +++ b/resources/stsci.edu/schemas/polyconic-1.3.0.yaml @@ -0,0 +1,16 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/polyconic-1.3.0" +title: | + Polyconic projection. + +description: | + Corresponds to the `PCO` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "pseudoconic-1.3.0" +... diff --git a/resources/stsci.edu/schemas/polynomial-1.2.0.yaml b/resources/stsci.edu/schemas/polynomial-1.2.0.yaml index bf0efe9..31b5801 100644 --- a/resources/stsci.edu/schemas/polynomial-1.2.0.yaml +++ b/resources/stsci.edu/schemas/polynomial-1.2.0.yaml @@ -18,29 +18,31 @@ description: | examples: - - $P = 1.2 + 0.3 * x + 56.1 * x^{2}$ + - asdf-standard-1.6.0 - | !transform/polynomial-1.2.0 - coefficients: !core/ndarray-1.0.0 + coefficients: !core/ndarray-1.1.0 [1.2, 0.3, 56.1] - - $P = 1.2 + 0.3 * x + 3 * x * y + 2.1 * y^{2}$ + - asdf-standard-1.6.0 - | !transform/polynomial-1.2.0 - coefficients: !core/ndarray-1.0.0 + coefficients: !core/ndarray-1.1.0 [[1.2, 0.0, 2.1], [0.3, 3.0, 0.0], [0.0, 0.0, 0.0]] allOf: - - $ref: "transform-1.2.0" + - $ref: "transform-1.3.0" - type: object properties: coefficients: description: | An array with coefficients. anyOf: - - $ref: "../core/ndarray-1.0.0" - - $ref: "../unit/quantity-1.1.0" + - $ref: "../core/ndarray-1.1.0" + - $ref: "../unit/quantity-1.2.0" - type: array required: [coefficients] ... diff --git a/resources/stsci.edu/schemas/power-1.3.0.yaml b/resources/stsci.edu/schemas/power-1.3.0.yaml new file mode 100644 index 0000000..bcbffdd --- /dev/null +++ b/resources/stsci.edu/schemas/power-1.3.0.yaml @@ -0,0 +1,23 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/power-1.3.0" +title: > + Perform a list of subtransforms in parallel and then raise each + result to the power of the next. + +description: | + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + $ref: "transform-1.3.0" + required: [forward] +... diff --git a/resources/stsci.edu/schemas/power_law1d-1.1.0.yaml b/resources/stsci.edu/schemas/power_law1d-1.1.0.yaml new file mode 100644 index 0000000..6d63e75 --- /dev/null +++ b/resources/stsci.edu/schemas/power_law1d-1.1.0.yaml @@ -0,0 +1,39 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/power_law1d-1.1.0" +title: > + One dimensional power law model. + +description: > + One dimensional power law model. + +examples: + - + - $$f(x) = 10*(x/0.5)^{-2}$$ + - asdf-standard-1.6.0 + - | + !transform/power_law1d-1.1.0 {alpha: 2.0, amplitude: 10.0, x_0: 0.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Model amplitude at the reference point. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Reference point. + alpha: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law index. + + required: ['amplitude', 'x_0', 'alpha'] +... diff --git a/resources/stsci.edu/schemas/property/bounding_box-1.1.0.yaml b/resources/stsci.edu/schemas/property/bounding_box-1.1.0.yaml new file mode 100644 index 0000000..cdd02c5 --- /dev/null +++ b/resources/stsci.edu/schemas/property/bounding_box-1.1.0.yaml @@ -0,0 +1,115 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/property/bounding_box-1.1.0" +title: > + Bounding box for a model. + +description: | + This object contains the bounding box for a model, which defines + the domain of valid inputs to the model. The bounds for each input + is are listed as a map under the interval keyword as ordered pairs of + lower/upper bounds with key being the input name. If any model inputs + are to be ignored by the bounding box then they need to be listed under + the ignore keyword. Finally, the tuple representation's input ordering + can be listed under the order keyword, C for C-ordering, F for Fortran + ordering. + +examples: + - + - A 1D bounding box + - asdf-standard-1.6.0 + - | + !transform/constant-1.5.0 + value: 1 + dimensions: 1 + bounding_box: !transform/property/bounding_box-1.1.0 + intervals: + x: [1.0, 2.0] + - + - A 2D bounding box + - asdf-standard-1.6.0 + - | + !transform/constant-1.5.0 + value: 1 + dimensions: 2 + bounding_box: !transform/property/bounding_box-1.1.0 + intervals: + x: [1.0, 2.0] + y: [3.0, 4.0] + order: C + - + - A 3D bounding box + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 1.0 + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + bounding_box: !transform/property/bounding_box-1.1.0 + intervals: + x0: [1.0, 2.0] + x1: [3.0, 4.0] + x: [5.0, 6.0] + order: F + - + - A 3D bounding box with ignored inputs + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 1.0 + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + bounding_box: !transform/property/bounding_box-1.1.0 + intervals: + x: [1.0, 2.0] + ignore: [x0, x1] + order: F + +definitions: + bound: + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.2.0 + - type: number + + interval: + type: array + minItems: 2 + maxItems: 2 + items: + - $ref: "#/definitions/bound" + - $ref: "#/definitions/bound" + + ignore: + type: array + items: + type: string + + order: + enum: ['C', 'F'] + +type: object +properties: + intervals: + type: object + additionalProperties: + $ref: "#/definitions/interval" + minProperties: 1 + ignore: + $ref: "#/definitions/ignore" + order: + $ref: "#/definitions/order" +required: [intervals] +... diff --git a/resources/stsci.edu/schemas/property/compound_bounding_box-1.1.0.yaml b/resources/stsci.edu/schemas/property/compound_bounding_box-1.1.0.yaml new file mode 100644 index 0000000..1b8e2ca --- /dev/null +++ b/resources/stsci.edu/schemas/property/compound_bounding_box-1.1.0.yaml @@ -0,0 +1,226 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/property/compound_bounding_box-1.1.0" +title: > + Compound bounding box for a model. + +description: | + This object contains a compound bounding box for a model, which defines + a set of input-selectable bounding boxes. It consists of a list of selector_args + together with a list of input-key bounding box pairs. The selector + args are an ordered list of model inputs with an indication of whether + or not to ignore the input in the bounding box selected. The key for + each bounding box entry corresponds to the values of the selector args + (in the order listed) which will select the accompanying bounding box. + + +examples: + - + - A compound bounding box with one selector_args and 1D bounding_box + - asdf-standard-1.6.0 + - | + !transform/constant-1.5.0 + value: 1 + dimensions: 2 + bounding_box: !transform/property/compound_bounding_box-1.1.0 + selector_args: + - argument: x + ignore: true + cbbox: + - key: [0] # value of input x is 0 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + y: [1.0, 2.0] + - key: [3] # value of input x is 3 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + y: [4.0, 5.0] + - + - A compound bounding box with one selector_args and 2D bounding_box + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 1.0 + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + bounding_box: !transform/property/compound_bounding_box-1.1.0 + selector_args: + - argument: x + ignore: true + cbbox: + - key: [0] # value of input x is 0 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x0: [1.0, 2.0] + x1: [3.0, 4.0] + - key: [5] # value of input x is 5 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x0: [6.0, 7.0] + x1: [8.0, 9.0] + order: 'C' + - + - A compound bounding box with two selector_args and 1D bounding_box + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 1.0 + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + bounding_box: !transform/property/compound_bounding_box-1.1.0 + selector_args: + - argument: x0 + ignore: true + - argument: x1 + ignore: true + cbbox: + - key: [0, 1] # both value of input x0 is 0 and value of input x1 is 1 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x: [2.0, 3.0] + - key: [4, 5] # both value of input x0 is 4 and value of input x1 is 5 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x: [6.0, 7.0] + - + - A compound bounding box with one selector_args and 1D bounding_box + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 1.0 + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + bounding_box: !transform/property/compound_bounding_box-1.1.0 + selector_args: + - argument: x + ignore: true + cbbox: + - key: [0] # both value of input x is 0 + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x0: [2.0, 3.0] + - key: [1] # both value of input x is 1 + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x0: [6.0, 7.0] + ignore: [x1] + - + - A compound bounding box with two selector_args and 2D bounding_box + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 1.0 + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 3.0 + - !transform/shift-1.3.0 + offset: 4.0 + bounding_box: !transform/property/compound_bounding_box-1.1.0 + selector_args: + - argument: x00 + ignore: true + - argument: x10 + ignore: true + cbbox: + - key: [0, 1] # both value of input x00 is 0 and value of input x10 is 1 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x01: [2.0, 3.0] + x11: [4.0, 5.0] + - key: [6, 7] # both value of input x00 is 6 and value of input x10 is 7 to select this box + bbox: !transform/property/bounding_box-1.1.0 + intervals: + x01: [8.0, 9.0] + x11: [10.0, 11.0] + order: 'F' + +definitions: + selector_arg: + description: | + This object contains the description of a single selector argument. + + type: object + properties: + argument: + type: string + ignore: + type: boolean + required: [argument, ignore] + + selector_args: + description: | + This object contains a list of all the selector arguments. + + type: array + minItems: 1 + items: + $ref: "#/definitions/selector_arg" + cbbox_entry: + description: | + This object contains a single input-bounding_box entry for a + compound_bounding_box. Note that each key must have the same + number of items as the selector arguments. Moreover, each value + for a key is the actual input value for the model, not the name + of the input + + type: object + properties: + key: + type: array + minItems: 1 + items: + type: number + bbox: + tag: tag:stsci.edu:asdf/transform/property/bounding_box-1.1.0 + required: [key, bbox] + + cbbox: + description: | + This object contains the map of the bounding boxes. Note that + each compound_bounding_box entry should have bboxes of the same + size + + type: array + minItems: 1 + items: + $ref: "#/definitions/cbbox_entry" + + +type: object +properties: + selector_args: + $ref: "#/definitions/selector_args" + cbbox: + $ref: "#/definitions/cbbox" + ignore: + $ref: "bounding_box-1.1.0#/definitions/ignore" + order: + $ref: "bounding_box-1.1.0#/definitions/order" +required: [selector_args, cbbox] +... diff --git a/resources/stsci.edu/schemas/pseudoconic-1.3.0.yaml b/resources/stsci.edu/schemas/pseudoconic-1.3.0.yaml new file mode 100644 index 0000000..916d80f --- /dev/null +++ b/resources/stsci.edu/schemas/pseudoconic-1.3.0.yaml @@ -0,0 +1,18 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/pseudoconic-1.3.0" +title: | + Base class of all pseudoconic projections. + +description: | + Pseudoconics are a subclass of conics with concentric parallels. + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky +... diff --git a/resources/stsci.edu/schemas/pseudocylindrical-1.3.0.yaml b/resources/stsci.edu/schemas/pseudocylindrical-1.3.0.yaml new file mode 100644 index 0000000..ea27735 --- /dev/null +++ b/resources/stsci.edu/schemas/pseudocylindrical-1.3.0.yaml @@ -0,0 +1,21 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/pseudocylindrical-1.3.0" +title: | + Base class of all pseudocylindrical projections. + +description: | + Pseudocylindrical projections are like cylindrical projections + except the parallels of latitude are projected at diminishing + lengths toward the polar regions in order to reduce lateral + distortion there. Consequently, the meridians are curved. + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky +... diff --git a/resources/stsci.edu/schemas/quad_spherical_cube-1.3.0.yaml b/resources/stsci.edu/schemas/quad_spherical_cube-1.3.0.yaml new file mode 100644 index 0000000..a38004d --- /dev/null +++ b/resources/stsci.edu/schemas/quad_spherical_cube-1.3.0.yaml @@ -0,0 +1,16 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/quad_spherical_cube-1.3.0" +title: | + Quadrilateralized spherical cube projection. + +description: | + Corresponds to the `QSC` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "quadcube-1.3.0" +... diff --git a/resources/stsci.edu/schemas/quadcube-1.3.0.yaml b/resources/stsci.edu/schemas/quadcube-1.3.0.yaml new file mode 100644 index 0000000..d4092a5 --- /dev/null +++ b/resources/stsci.edu/schemas/quadcube-1.3.0.yaml @@ -0,0 +1,29 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/quadcube-1.3.0" +title: | + Base class of all quadcube projections. + +description: | + Quadrilateralized spherical cube (quad-cube) projections belong to + the class of polyhedral projections in which the sphere is projected + onto the surface of an enclosing polyhedron. + + The six faces of the quad-cube projections are numbered and laid out + as: + + ``` + 0 + 4 3 2 1 4 3 2 + 5 + ``` + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky +... diff --git a/resources/stsci.edu/schemas/redshift_scale_factor-1.1.0.yaml b/resources/stsci.edu/schemas/redshift_scale_factor-1.1.0.yaml new file mode 100644 index 0000000..81fd618 --- /dev/null +++ b/resources/stsci.edu/schemas/redshift_scale_factor-1.1.0.yaml @@ -0,0 +1,29 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/redshift_scale_factor-1.1.0" +title: > + One dimensional redshift scale factor model. + +description: > + One dimensional redshift scale factor model. + +examples: + - + - $$f(x)=x(1+2.5)$$ + - asdf-standard-1.6.0 + - | + !transform/redshift_scale_factor-1.1.0 {z: 2.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + z: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Redshift value. + + required: ['z'] +... diff --git a/resources/stsci.edu/schemas/regions_selector-1.3.0.yaml b/resources/stsci.edu/schemas/regions_selector-1.3.0.yaml new file mode 100644 index 0000000..7b7428a --- /dev/null +++ b/resources/stsci.edu/schemas/regions_selector-1.3.0.yaml @@ -0,0 +1,99 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/regions_selector-1.3.0" +title: > + Represents a discontinuous transform. +description: | + Maps regions to transforms and evaluates the transforms with the corresponding inputs. + +examples: + - + - Create a regions_selector schema for 2 regions, labeled "1" and "2". + - asdf-standard-1.6.0 + - | + !transform/regions_selector-1.3.0 + inputs: [x, y] + label_mapper: !transform/label_mapper-1.2.0 + mapper: !core/ndarray-1.1.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]] + + outputs: [ra, dec, lam] + selector: + 1: !transform/compose-1.3.0 + forward: + - !transform/remap_axes-1.2.0 + mapping: [0, 1, 1] + - !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 {offset: 1.0} + - !transform/shift-1.3.0 {offset: 2.0} + - !transform/shift-1.3.0 {offset: 3.0} + 2: !transform/compose-1.3.0 + forward: + - !transform/remap_axes-1.2.0 + mapping: [0, 1, 1] + - !transform/concatenate-1.3.0 + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/scale-1.3.0 {factor: 2.0} + - !transform/scale-1.3.0 {factor: 3.0} + - !transform/scale-1.3.0 {factor: 3.0} + undefined_transform_value: .nan + + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + label_mapper: + description: | + An instance of + [label_mapper-1.3.0](ref:schemas/label_mapper-1.3.0) + $ref: "./label_mapper-1.3.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: "transform-1.3.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] +... diff --git a/resources/stsci.edu/schemas/remap_axes-1.4.0.yaml b/resources/stsci.edu/schemas/remap_axes-1.4.0.yaml new file mode 100644 index 0000000..5b34bce --- /dev/null +++ b/resources/stsci.edu/schemas/remap_axes-1.4.0.yaml @@ -0,0 +1,84 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/remap_axes-1.4.0" +title: > + Reorder, add and drop axes. + +description: | + This transform allows the order of the input axes to be shuffled and + returned as the output axes. + + It is a list made up of integers. Each item + in the list corresponds to an output axis. Each item is the index of + the input axis to send to the output axis. + + If an object with `mapping` and `n_inputs` properties is provided, the + number of input axes is explicitly set by the `n_inputs` value. + If only a list is provided, the number of input axes is + automatically determined from the maximum index in the list. + + Invertibility: This transform does not have a general analytical inverse. + In some well defined cases it is possible to invert automatically + +examples: + - + - For 2 input axes, swap the axes + - asdf-standard-1.6.0 + - | + !transform/remap_axes-1.4.0 + mapping: [1, 0] + - + - For 2 input axes, return the second axis and drop the first + - asdf-standard-1.6.0 + - | + !transform/remap_axes-1.4.0 + mapping: [1] + + - + - For 2 input axes, return the first axis twice, followed by the second + - asdf-standard-1.6.0 + - | + !transform/remap_axes-1.4.0 + mapping: [0, 0, 1] + + - + - | + The above example is equivalent to the following, and ASDF + implementations are free to normalize it thusly: + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + forward: + - !transform/remap_axes-1.4.0 + mapping: [0] + - !transform/remap_axes-1.4.0 + mapping: [1] + + - + - Here we have 3 input axes, but we are explicitly dropping the last one + - asdf-standard-1.6.0 + - | + !transform/remap_axes-1.4.0 + mapping: [0, 1] + n_inputs: 3 + +definitions: + mapping: + type: array + items: + type: integer + +allOf: + - $ref: "transform-1.3.0" + - properties: + n_inputs: + description: | + Explicitly set the number of input axes. If not provided, + it is determined from the maximum index value in the + mapping list. + type: integer + mapping: + $ref: "#/definitions/mapping" + required: [mapping] +... diff --git a/resources/stsci.edu/schemas/ricker_wavelet1d-1.1.0.yaml b/resources/stsci.edu/schemas/ricker_wavelet1d-1.1.0.yaml new file mode 100644 index 0000000..22f91e1 --- /dev/null +++ b/resources/stsci.edu/schemas/ricker_wavelet1d-1.1.0.yaml @@ -0,0 +1,39 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/ricker_wavelet1d-1.1.0" +title: > + One dimensional Ricker Wavelet model. + +description: > + One dimensional Ricker Wavelet model + +examples: + - + - $$f(x)={10.0\left(1-\frac{\left(x-0.5\right)^{2}}{2.0^{2}}\right)e^{-\frac{\left(x-0.5\right)^{2}}{2*2.0^{2}}}}$$ + - asdf-standard-1.6.0 + - | + !transform/ricker_wavelet1d-1.1.0 {amplitude: 10.0, sigma: 2.0, x_0: 0.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Peak value. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Position of the peak. + sigma: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Width of the Ricker wavelet. + + required: ['amplitude', 'x_0', 'sigma'] +... diff --git a/resources/stsci.edu/schemas/ricker_wavelet2d-1.1.0.yaml b/resources/stsci.edu/schemas/ricker_wavelet2d-1.1.0.yaml new file mode 100644 index 0000000..670a011 --- /dev/null +++ b/resources/stsci.edu/schemas/ricker_wavelet2d-1.1.0.yaml @@ -0,0 +1,44 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/ricker_wavelet2d-1.1.0" +title: > + Two dimensional Ricker Wavelet model. + +description: > + Two dimensional Ricker Wavelet model. + +examples: + - + - $$f(x)={10.0\left(1-\frac{\left(x-0.5\right)^{2}-(y-1.5)^2}{2.0^{2}}\right)e^{-\frac{\left(x-0.5\right)^{2}-(y-1.5)^2)}{2*2.0^{2}}}}$$ + - asdf-standard-1.6.0 + - | + !transform/ricker_wavelet2d-1.1.0 {amplitude: 10.0, sigma: 2.0, x_0: 0.5, y_0: 1.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the peak. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y position of the peak. + sigma: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Width of the Ricker wavelet. + + required: ['amplitude', 'x_0', 'y_0', 'sigma'] +... diff --git a/resources/stsci.edu/schemas/ring2d-1.1.0.yaml b/resources/stsci.edu/schemas/ring2d-1.1.0.yaml new file mode 100644 index 0000000..245cd85 --- /dev/null +++ b/resources/stsci.edu/schemas/ring2d-1.1.0.yaml @@ -0,0 +1,57 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/ring2d-1.1.0" +title: > + Two dimensional radially symmetric ring model. + +description: > + Two dimensional radially symmetric ring. + +examples: + - + - A 2D disk centered at (x, y) = (0.5, 1.5), with an inner radius of 5.0, outer radius of 7.5 and amplitude 10.0. + - asdf-standard-1.6.0 + - | + !transform/ring2d-1.1.0 + amplitude: 10.0 + bounding_box: + - [-6.0, 9.0] + - [-7.0, 8.0] + r_in: 5.0 + width: 2.5 + x_0: 0.5 + y_0: 1.5 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Value of the disk function. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x center position of the disk. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y center position of the disk. + r_in: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Inner radius of the ring. + width: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Width of the ring. + + required: ['amplitude', 'x_0', 'y_0', 'r_in', 'width'] +... diff --git a/resources/stsci.edu/schemas/rotate2d-1.4.0.yaml b/resources/stsci.edu/schemas/rotate2d-1.4.0.yaml new file mode 100644 index 0000000..7bbc3ae --- /dev/null +++ b/resources/stsci.edu/schemas/rotate2d-1.4.0.yaml @@ -0,0 +1,22 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/rotate2d-1.4.0" +title: > + A 2D rotation. +description: > + A 2D rotation around the origin, in degrees. + + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform. +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + angle: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Angle, in degrees. + required: [angle] +... diff --git a/resources/stsci.edu/schemas/rotate3d-1.4.0.yaml b/resources/stsci.edu/schemas/rotate3d-1.4.0.yaml new file mode 100644 index 0000000..3f49089 --- /dev/null +++ b/resources/stsci.edu/schemas/rotate3d-1.4.0.yaml @@ -0,0 +1,59 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/rotate3d-1.4.0" +title: > + Rotation in 3D space. +description: | + Euler angle rotation around 3 axes. + + Invertibility: All ASDF tools are required to be able to compute the + analytic inverse of this transform. + +examples: + - + - The three Euler angles are 12.3, 34 and -1.2 in degrees. + - asdf-standard-1.6.0 + - | + !transform/rotate3d-1.4.0 + phi: 12.3 + theta: 34 + psi: -1.2 + direction: zxz + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + phi: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Angle, in degrees. + theta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Angle, in degrees. + psi: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Angle, in degrees. + direction: + description: | + Sequence of rotation axes: one of 'zxz', 'xyx', 'yzy', 'zyz', 'xzx', + 'yxy', 'xyz', 'yzx', 'zxy', 'xzy', 'zyx', 'yxz' + or `native2celestial`, `celestial2native`. + + If `direction` is `native2celestial` or `celestial2native`, + `phi`, `theta` are the longitude and latitude of the native pole in + the celestial system and `psi` is the longitude of the celestial pole in + the native system. + + enum: ['zxz', 'xyx', 'yzy', 'zyz', 'xzx', 'yxy', 'xyz', 'yzx', 'zxy', + 'xzy', 'zyx', 'yxz', native2celestial, celestial2native] + default: native2celestial + + required: [phi, theta, psi, direction] +... diff --git a/resources/stsci.edu/schemas/rotate_sequence_3d-1.1.0.yaml b/resources/stsci.edu/schemas/rotate_sequence_3d-1.1.0.yaml new file mode 100644 index 0000000..32fc57c --- /dev/null +++ b/resources/stsci.edu/schemas/rotate_sequence_3d-1.1.0.yaml @@ -0,0 +1,45 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/rotate_sequence_3d-1.1.0" +title: > + Rotation in 3D space. +description: | + Rotation in 3D space by arbitrary number of angles about + arbitrary order of "x", "y", "z" axes. + +examples: + - + - A sequence of rotation around 5 axes.. + - asdf-standard-1.6.0 + - | + !transform/rotate_sequence_3d-1.1.0 + angles: [-0.0193, -0.1432, -0.04, -65.60, 273.089] + axes_order: zyxyz + rotation_type: cartesian + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + angles: + type: array + items: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + The angles of rotation in units of deg. + axes_order: + description: | + A sequence of "x", "y" or "z" characters representing an axis of rotation. + The number of characters must equal the number of angles. + For the JWST V23 to sky transform the axes are zyxyz. + type: string + rotation_type: + description: | + The type of rotation class to nitialize + type: str + enum: [spherical, cartesian] + required: [angles, axes_order, rotation_type] +... diff --git a/resources/stsci.edu/schemas/sanson_flamsteed-1.3.0.yaml b/resources/stsci.edu/schemas/sanson_flamsteed-1.3.0.yaml new file mode 100644 index 0000000..ab3e02e --- /dev/null +++ b/resources/stsci.edu/schemas/sanson_flamsteed-1.3.0.yaml @@ -0,0 +1,26 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/sanson_flamsteed-1.3.0" +title: | + The Sanson-Flamsteed projection. + +description: | + Corresponds to the `SFL` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \frac{x}{\cos y} \\ + \theta &= y$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= \phi \cos \theta \\ + y &= \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "pseudocylindrical-1.3.0" +... diff --git a/resources/stsci.edu/schemas/scale-1.3.0.yaml b/resources/stsci.edu/schemas/scale-1.3.0.yaml new file mode 100644 index 0000000..fea9d03 --- /dev/null +++ b/resources/stsci.edu/schemas/scale-1.3.0.yaml @@ -0,0 +1,20 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/scale-1.3.0" +title: > + A Scale model. +description: > + Scale the input by a dimensionless factor. + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + factor: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Scale factor. + required: [factor] +... diff --git a/resources/stsci.edu/schemas/schechter1d-1.1.0.yaml b/resources/stsci.edu/schemas/schechter1d-1.1.0.yaml new file mode 100644 index 0000000..198b504 --- /dev/null +++ b/resources/stsci.edu/schemas/schechter1d-1.1.0.yaml @@ -0,0 +1,41 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/schechter1d-1.1.0" +title: > + Schechter luminosity function +description: > + Schechter luminosity function ([Schechter 1976](https://ui.adsabs.harvard.edu/abs/1976ApJ...203..297S/abstract)), + parameterized in terms of magnitudes. +examples: + - + - $$n(M) \ dM = (0.4 \ln 10) \ \phi^{*} \ + [{10^{0.4 (M^{*} - M)}}]^{\alpha + 1} \ + \exp{[-10^{0.4 (M^{*} - M)}]} \ dM$$ + - asdf-standard-1.6.0 + - | + !transform/schechter1d-1.1.0 {phi_star: 1.0, m_star: -20.0, alpha: -1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + phi_star: + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + - type: number + description: > + The normalization factor in units of number density. + m_star: + type: number + description: > + The characteristic magnitude where the power-law form of the function + cuts off into the exponential form. + alpha: + anyOf: + - tag: tag:stsci.edu:asdf/unit/quantity-1.* + - type: number + description: > + The power-law index, defining the faint-end slope of the luminosity function + required: ['phi_star', 'm_star', 'alpha'] +... diff --git a/resources/stsci.edu/schemas/sersic1d-1.1.0.yaml b/resources/stsci.edu/schemas/sersic1d-1.1.0.yaml new file mode 100644 index 0000000..4dbbee5 --- /dev/null +++ b/resources/stsci.edu/schemas/sersic1d-1.1.0.yaml @@ -0,0 +1,39 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/sersic1d-1.1.0" +title: > + One dimensional Sersic surface brightness profile. + +description: > + One dimensional Sersic surface brightness profile. + +examples: + - + - $I(r)=10.0\exp\left\{-b_n\left[\left(\frac{r}{1.0}\right)^{(1/4)}-1\right]\right\}$, where $b_n$ is defined such that $r_e$ contains half the total luminosity (can be solved for numeriacally). + - asdf-standard-1.6.0 + - | + !transform/sersic1d-1.1.0 {amplitude: 10.0, n: 4.0, r_eff: 1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Surface brightness at r_eff. + r_eff: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Effective (half-light) radius. + n: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Sersic index. + + required: ['amplitude', 'r_eff', 'n'] +... diff --git a/resources/stsci.edu/schemas/sersic2d-1.1.0.yaml b/resources/stsci.edu/schemas/sersic2d-1.1.0.yaml new file mode 100644 index 0000000..7e80f1f --- /dev/null +++ b/resources/stsci.edu/schemas/sersic2d-1.1.0.yaml @@ -0,0 +1,59 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/sersic2d-1.1.0" +title: > + Two dimensional Sersic surface brightness profile. + +description: > + Two dimensional Sersic surface brightness profile. + +examples: + - + - $I(x, y)=I(r)=I(x, y)=I(r)=10.0\exp\left\{-b_n\left[\left(\frac{(\sqrt{(x-0.5)^2 + (y-1.5)^2})}{1.0}\right)^{(1/4)}-1\right]\right\}$ where $b_n$ is defined such that $r_e$ contains half the total luminosity (can be solved for numerically). + - asdf-standard-1.6.0 + - | + !transform/sersic2d-1.1.0 {amplitude: 10.0, ellip: 0.0, n: 4.0, r_eff: 1.0, theta: 0.0, x_0: 0.5, y_0: 1.5} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Surface brightness at r_eff. + r_eff: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Effective (half-light) radius. + n: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Sersic index. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x position of the center. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y position of the center. + ellip: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Ellipticity. + theta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Rotation angle in radians, increases counterclockwise from the positive x-axis. + + required: ['amplitude', 'r_eff', 'n', 'x_0', 'y_0', 'ellip', 'theta'] +... diff --git a/resources/stsci.edu/schemas/shift-1.3.0.yaml b/resources/stsci.edu/schemas/shift-1.3.0.yaml new file mode 100644 index 0000000..0176ddd --- /dev/null +++ b/resources/stsci.edu/schemas/shift-1.3.0.yaml @@ -0,0 +1,20 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/shift-1.3.0" +title: > + A Shift opeartion. +description: > + Apply an offset in one direction. + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + offset: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Offset in one direction. + required: [offset] +... diff --git a/resources/stsci.edu/schemas/sine1d-1.1.0.yaml b/resources/stsci.edu/schemas/sine1d-1.1.0.yaml new file mode 100644 index 0000000..025c438 --- /dev/null +++ b/resources/stsci.edu/schemas/sine1d-1.1.0.yaml @@ -0,0 +1,39 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/sine1d-1.1.0" +title: > + One dimensional sine model. + +description: > + One dimensional sine. + +examples: + - + - $$f(x)=10.0sin(2\pi *0.5x+2\pi*1.0)$$ + - asdf-standard-1.6.0 + - | + !transform/sine1d-1.1.0 {amplitude: 10.0, frequency: 0.5, phase: 1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation amplitude. + frequency: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation frequency. + phase: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation phase. + + required: ['amplitude', 'frequency', 'phase'] +... diff --git a/resources/stsci.edu/schemas/slant_orthographic-1.3.0.yaml b/resources/stsci.edu/schemas/slant_orthographic-1.3.0.yaml new file mode 100644 index 0000000..59b112f --- /dev/null +++ b/resources/stsci.edu/schemas/slant_orthographic-1.3.0.yaml @@ -0,0 +1,45 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/slant_orthographic-1.3.0" +title: | + The slant orthographic projection. + +description: | + Corresponds to the `SIN` projection in the FITS WCS standard. + + See + [zenithal](ref:schemas/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = \cos^{-1}\left(\frac{\pi}{180^{\circ}}R_\theta\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\cos \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "zenithal-1.3.0" + - type: object + properties: + xi: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Obliqueness parameter, first equation of the slant + orthographic projection. + default: 0 + + eta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Obliqueness parameter, second equation of the slant + orthographic projection. + default: 0 +... diff --git a/resources/stsci.edu/schemas/slant_zenithal_perspective-1.3.0.yaml b/resources/stsci.edu/schemas/slant_zenithal_perspective-1.3.0.yaml new file mode 100644 index 0000000..022fad0 --- /dev/null +++ b/resources/stsci.edu/schemas/slant_zenithal_perspective-1.3.0.yaml @@ -0,0 +1,54 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/slant_zenithal_perspective-1.3.0" +title: | + The slant zenithal perspective projection. + +description: | + Corresponds to the `SZP` projection in the FITS WCS standard. + + See + [zenithal](ref:schemas/zenithal-1.3.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = \tan^{-1}\left(\frac{180^{\circ}}{\pi R_\theta}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\cot \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "zenithal-1.3.0" + - type: object + properties: + mu: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + Distance from point of projection to center of sphere in + spherical radii. + default: 0 + + phi0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + The longitude $\phi_0$ of the reference point, in degrees. + default: 0 + + theta0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + The latitude $\theta_0$ of the reference point, in degrees. + default: 90 +... diff --git a/resources/stsci.edu/schemas/smoothly_broken_power_law1d-1.1.0.yaml b/resources/stsci.edu/schemas/smoothly_broken_power_law1d-1.1.0.yaml new file mode 100644 index 0000000..0a65d8e --- /dev/null +++ b/resources/stsci.edu/schemas/smoothly_broken_power_law1d-1.1.0.yaml @@ -0,0 +1,49 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/smoothly_broken_power_law1d-1.1.0" +title: > + One dimensional smoothly broken power law model. + +description: > + One dimensional smoothly broken power law model. + +examples: + - + - $$f(x) = 10*(\frac{x}{5.0})^{-2.0}\{\frac{1}{2}[1+(\frac{x}{5.0})^{1/0.5}]\}^{(2.0- 3.0)0.5}$$ + - asdf-standard-1.6.0 + - | + !transform/smoothly_broken_power_law1d-1.1.0 {alpha_1: 2.0, alpha_2: 2.0, amplitude: 10.0, delta: 0.5, x_break: 5.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Model amplitude at the break point. + x_break: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Break point. + alpha_1: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law index for x < x_break. + alpha_2: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Power law index for x > x_break. + delta: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Smoothness parameter. + + required: ['amplitude', 'x_break', 'alpha_1', 'alpha_2', 'delta'] +... diff --git a/resources/stsci.edu/schemas/spline1d-1.1.0.yaml b/resources/stsci.edu/schemas/spline1d-1.1.0.yaml new file mode 100644 index 0000000..d0416d8 --- /dev/null +++ b/resources/stsci.edu/schemas/spline1d-1.1.0.yaml @@ -0,0 +1,49 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/spline1d-1.1.0" +title: > + A spline1d model. + +description: | + A spline1d model represented by an array of its knots, an array of its + coefficients, and its degree. In addition the bounding endpoints + of the spline can be represented as well + +examples: + - + - Example spline + - | + !transform/spline1d-1.1.0 + knots: !core/ndarray-1.1.0 + [0.0, 0.0, 0.0, 0.0, 0.5, 1.0, 1.0, 1.0, 1.0] + coefficients: !core/ndarray-1.1.0 + [1.2, 1.2, 1.2, 1.2, 0.3, 56.1, 56.1, 56.1, 56.1] + degree: 3 + +definitions: + coeffs: + tag: tag:stsci.edu:asdf/core/ndarray-1.* + ndim: 1 + datatype: float64 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + knots: + description: | + The spline knots + $ref: "#/definitions/coeffs" + coefficients: + description: | + The spline coefficients + $ref: "#/definitions/coeffs" + degree: + description: | + The spline degree + type: integer + minimum: 1 + maximum: 5 + required: [knots, coefficients, degree] +... diff --git a/resources/stsci.edu/schemas/stereographic-1.3.0.yaml b/resources/stsci.edu/schemas/stereographic-1.3.0.yaml new file mode 100644 index 0000000..0c447e3 --- /dev/null +++ b/resources/stsci.edu/schemas/stereographic-1.3.0.yaml @@ -0,0 +1,28 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/stereographic-1.3.0" +title: | + The stereographic projection. + +description: | + Corresponds to the `STG` projection in the FITS WCS standard. + + See + [zenithal](ref:schemas/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = 90^{\circ} - 2 \tan^{-1}\left(\frac{\pi R_\theta}{360^{\circ}}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = \frac{180^{\circ}}{\pi}\frac{2 \cos \theta}{1 + \sin \theta}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "zenithal-1.3.0" +... diff --git a/resources/stsci.edu/schemas/subtract-1.3.0.yaml b/resources/stsci.edu/schemas/subtract-1.3.0.yaml new file mode 100644 index 0000000..1031151 --- /dev/null +++ b/resources/stsci.edu/schemas/subtract-1.3.0.yaml @@ -0,0 +1,35 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/subtract-1.3.0" +title: > + Perform a list of subtransforms in parallel and then + subtract their results. + +description: | + Each of the subtransforms must have the same number of inputs and + outputs. + + Invertibility: This transform is not automatically invertible. +examples: + - + - A list of transforms, performed in parallel, and then combined + through subtraction. + - asdf-standard-1.6.0 + - | + !transform/subtract-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/shift-1.3.0 + offset: 3.0 + +allOf: + - $ref: "transform-1.3.0" + - properties: + forward: + type: array + items: + $ref: "transform-1.3.0" + required: [forward] +... diff --git a/resources/stsci.edu/schemas/tabular-1.3.0.yaml b/resources/stsci.edu/schemas/tabular-1.3.0.yaml new file mode 100644 index 0000000..66a805e --- /dev/null +++ b/resources/stsci.edu/schemas/tabular-1.3.0.yaml @@ -0,0 +1,56 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/tabular-1.3.0" +title: > + A Tabular model. +description: | + Tabular represents a lookup table with values corresponding to + some grid points. + It computes the interpolated values corresponding to the given + inputs. Three methods of interpolation are supported - + "linear", "nearest" and "splinef2d". It supports extrapolation. +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + lookup_table: + description: > + Table values. + anyOf: + - type: array + - $ref: ../core/ndarray-1.1.0 + - $ref: ../unit/quantity-1.2.0 + points: + type: array + items: + anyOf: + - type: array + - $ref: ../core/ndarray-1.1.0 + - $ref: ../unit/quantity-1.2.0 + description: | + Grid values - each row in the array corresponds to a dimension + in the lookup table. The grid does not have to be regular. + method: + description: | + Method of interpolation. Supported are "linear" and + "nearest", and "splinef2d". "splinef2d" is only supported for + 2-dimensional data. + type: string + enum: ["linear", "nearest", "splinef2d"] + default: "linear" + bounds_error: + description: | + If True, when interpolated values are requested outside of the + domain of the input data, a ValueError is raised. + If False, then "fill_value" is used. + type: boolean + default: true + fill_value: + description: | + If provided, the value to use for points outside of the + interpolation domain. If None, values outside the domain are + extrapolated. Extrapolation is not supported by method "splinef2d". + type: number + required: [lookup_table] +... diff --git a/resources/stsci.edu/schemas/tangent1d-1.1.0.yaml b/resources/stsci.edu/schemas/tangent1d-1.1.0.yaml new file mode 100644 index 0000000..896c467 --- /dev/null +++ b/resources/stsci.edu/schemas/tangent1d-1.1.0.yaml @@ -0,0 +1,39 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/tangent1d-1.1.0" +title: > + One dimensional tangent model. + +description: > + One dimensional tangent. + +examples: + - + - $$f(x)=10.0tan(2\pi *0.5x+2\pi*1.0)$$ + - asdf-standard-1.6.0 + - | + !transform/tangent1d-1.1.0 {amplitude: 10.0, frequency: 0.5, phase: 1.0} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation amplitude. + frequency: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation frequency. + phase: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Oscillation phase. + + required: ['amplitude', 'frequency', 'phase'] +... diff --git a/resources/stsci.edu/schemas/tangential_spherical_cube-1.3.0.yaml b/resources/stsci.edu/schemas/tangential_spherical_cube-1.3.0.yaml new file mode 100644 index 0000000..2449050 --- /dev/null +++ b/resources/stsci.edu/schemas/tangential_spherical_cube-1.3.0.yaml @@ -0,0 +1,16 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/tangential_spherical_cube-1.3.0" +title: | + Tangential spherical cube projection. + +description: | + Corresponds to the `TSC` projection in the FITS WCS standard. + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "quadcube-1.3.0" +... diff --git a/resources/stsci.edu/schemas/transform-1.3.0.yaml b/resources/stsci.edu/schemas/transform-1.3.0.yaml new file mode 100644 index 0000000..980432b --- /dev/null +++ b/resources/stsci.edu/schemas/transform-1.3.0.yaml @@ -0,0 +1,190 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/transform-1.3.0" +title: > + A generic type used to mark where other transforms are accepted. + +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 transform with no bounding_box or compound_bounding_box + - asdf-standard-1.6.0 + - | + !transform/transform-1.3.0 + name: test + inputs: ['x', 'y'] + outputs: ['z'] + fixed: + a: True + b: False + bounds: + c: [-1, 2] + d: [-3, null] + - + - A transform with old-style 1D bounding_box + - asdf-standard-1.6.0 + - | + !transform/transform-1.3.0 + name: test + inputs: ['x'] + outputs: ['y'] + bounding_box: [1.0, 2.0] + - + - A transform with new-style 1D bounding_box + - asdf-standard-1.6.0 + - | + !transform/constant-1.5.0 + name: test + value: 1 + dimensions: 1 + inputs: ['x'] + outputs: ['y'] + bounding_box: !transform/property/bounding_box-1.1.0 + intervals: + x: [1.0, 2.0] + - + - A transform with old-style 2D bounding_box + - asdf-standard-1.6.0 + - | + !transform/transform-1.3.0 + name: test + inputs: ['x', 'y'] + outputs: ['z'] + bounding_box: + - [1.0, 2.0] + - [3.0, 4.0] + - + - A transform with new-style 2D bounding_box + - asdf-standard-1.6.0 + - | + !transform/constant-1.5.0 + name: test + value: 1 + dimensions: 2 + inputs: ['x', 'y'] + outputs: ['z'] + bounding_box: !transform/property/bounding_box-1.1.0 + intervals: + x: [1.0, 2.0] + y: [3.0, 4.0] + - + - A transform with compound_bounding_box + - asdf-standard-1.6.0 + - | + !transform/concatenate-1.3.0 + name: test + forward: + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 1.0 + - !transform/shift-1.3.0 + offset: 2.0 + - !transform/concatenate-1.3.0 + forward: + - !transform/shift-1.3.0 + offset: 3.0 + - !transform/shift-1.3.0 + offset: 4.0 + inputs: ['x', 'y', 'a', 'b'] + bounding_box: !transform/property/compound_bounding_box-1.1.0 + selector_args: + - argument: x + ignore: true + - argument: y + ignore: true + cbbox: + - key: [0, 1] + bbox: !transform/property/bounding_box-1.1.0 + intervals: + a: [2.0, 3.0] + b: [4.0, 5.0] + - key: [6, 7] + bbox: !transform/property/bounding_box-1.1.0 + intervals: + a: [8.0, 9.0] + b: [10.0, 11.0] + +definitions: + bound: + anyOf: + - type: number + - type: "null" + +type: object +properties: + name: + description: | + A user-friendly name for the transform, to give it extra + meaning. + type: string + + inverse: + description: | + Explicitly sets the inverse transform of this transform. + + If the transform has a direct analytic inverse, this + property is usually not necessary, as the ASDF-reading tool + can provide it automatically. + + $ref: "transform-1.3.0" + + inputs: + description: | + The names of the model's evaluation input variables. + type: array + items: + type: string + + outputs: + description: | + The names of the model's evaluation output variables. + type: array + items: + type: string + + bounding_box: + description: | + Bounding box for model the transform + + oneOf: + - $ref: "property/bounding_box-1.1.0#/definitions/interval" + - type: array + minItems: 2 + items: + $ref: "property/bounding_box-1.1.0#/definitions/interval" + - tag: tag:stsci.edu:asdf/transform/property/bounding_box-1.1.0 + - tag: tag:stsci.edu:asdf/transform/property/compound_bounding_box-1.1.0 + + fixed: + description: | + The parameters which are fixed when fitting the transform to data. + type: object + additionalProperties: + type: boolean + + bounds: + description: | + The parameters which are bounded when fitting the transform to data. + type: + object + additionalProperties: + type: array + minItems: 2 + maxItems: 2 + items: + - $ref: "#/definitions/bound" + - $ref: "#/definitions/bound" + + input_units_equivalencies: + description: | + The units that are accepted for inputs to be converted into. + type: object + additionalProperties: + tag: tag:astropy.org:astropy/units/equivalency-1.* +additionalProperties: true +... diff --git a/resources/stsci.edu/schemas/trapezoid1d-1.1.0.yaml b/resources/stsci.edu/schemas/trapezoid1d-1.1.0.yaml new file mode 100644 index 0000000..6232ae7 --- /dev/null +++ b/resources/stsci.edu/schemas/trapezoid1d-1.1.0.yaml @@ -0,0 +1,49 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/trapezoid1d-1.1.0" +title: > + One dimensional trapezoid model. + +description: > + One dimensional trapezoid. + +examples: + - + - A 1D trapezoid centered at x=0.5, of width 5.0, slope of tails 1.0, and amplitude 10.0 + - asdf-standard-1.6.0 + - | + !transform/trapezoid1d-1.1.0 + amplitude: 10.0 + bounding_box: [-12.0, 13.0] + slope: 1.0 + width: 5.0 + x_0: 0.5 + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude of the trapezoid. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Center position of the trapezoid. + width: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Width of the constant part of the trapezoid. + slope: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Slope of the tails of the trapezoid. + + required: ['amplitude', 'x_0', 'width', 'slope'] +... diff --git a/resources/stsci.edu/schemas/trapezoid_disk2d-1.1.0.yaml b/resources/stsci.edu/schemas/trapezoid_disk2d-1.1.0.yaml new file mode 100644 index 0000000..a218a31 --- /dev/null +++ b/resources/stsci.edu/schemas/trapezoid_disk2d-1.1.0.yaml @@ -0,0 +1,56 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/trapezoid_disk2d-1.1.0" +title: > + Two dimensional circular trapezoid model. + +description: > + Two dimensional circular trapezoid. + +examples: + - + - A 2D trapezoid disk centered at (x, y) = (0.5, 1.5), of radius (distance between constant segments) 5.0, slope of tails 1.0, and amplitude 10.0 + - asdf-standard-1.6.0 + - | + !transform/trapezoid_disk2d-1.1.0 + R_0: 5.0 + amplitude: 10.0 + bounding_box: + - [-13.5, 16.5] + - [-14.5, 15.5] + slope: 1.0 + x_0: 0.5 + y_0: 1.5 +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + amplitude: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Amplitude of the trapezoid. + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: x center position of the trapezoid. + y_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: y center position of the trapezoid. + R_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Radius of the constant part of the trapezoid. + slope: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Slope of the tails of the trapezoid in x direction. + + required: ['amplitude', 'x_0', 'y_0', 'R_0', 'slope'] +... diff --git a/resources/stsci.edu/schemas/voigt1d-1.1.0.yaml b/resources/stsci.edu/schemas/voigt1d-1.1.0.yaml new file mode 100644 index 0000000..816b0e8 --- /dev/null +++ b/resources/stsci.edu/schemas/voigt1d-1.1.0.yaml @@ -0,0 +1,44 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/voigt1d-1.1.0" +title: > + One dimensional model for the Voigt profile. + +description: > + One dimensional model for the Voigt profile. + +examples: + - + - 1D Voigt model with a Lorentzian amplitude of 10.0, Lorentzian FWHM of 0.5, Gaussian FWHM of 0.9, centered at x=0.5. + - asdf-standard-1.6.0 + - | + !transform/voigt1d-1.1.0 {amplitude_L: 10.0, fwhm_G: 0.9, fwhm_L: 0.5, x_0: 0.55} + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + x_0: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: Position of the peak. + amplitude_L: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: The Lorentzian amplitude. + fwhm_L: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: The Lorentzian full width at half maximum. + fwhm_G: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: The Gaussian full width at half maximum. + + required: ['x_0', 'amplitude_L', 'fwhm_L', 'fwhm_G'] +... diff --git a/resources/stsci.edu/schemas/zenithal-1.3.0.yaml b/resources/stsci.edu/schemas/zenithal-1.3.0.yaml new file mode 100644 index 0000000..63cd48e --- /dev/null +++ b/resources/stsci.edu/schemas/zenithal-1.3.0.yaml @@ -0,0 +1,29 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/zenithal-1.3.0" +title: | + Base class of all zenithal (or azimuthal) projections. + +description: | + Zenithal projections are completely specified by defining the radius + as a function of native latitude, $R_\theta$. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \arg(-y, x) \\ + R_\theta &= \sqrt{x^2 + y^2}$$ + + and the inverse (sky-to-pixel) is defined as: + + $$x &= R_\theta \sin \phi \\ + y &= R_\theta \cos \phi$$ + +allOf: + - $ref: "transform-1.3.0" + - type: object + properties: + direction: + enum: [pix2sky, sky2pix] + default: pix2sky +... diff --git a/resources/stsci.edu/schemas/zenithal_equal_area-1.3.0.yaml b/resources/stsci.edu/schemas/zenithal_equal_area-1.3.0.yaml new file mode 100644 index 0000000..1b2a619 --- /dev/null +++ b/resources/stsci.edu/schemas/zenithal_equal_area-1.3.0.yaml @@ -0,0 +1,29 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/zenithal_equal_area-1.3.0" +title: | + The zenithal equal area projection. + +description: | + Corresponds to the `ZEA` projection in the FITS WCS standard. + + See + [zenithal](ref:schemas/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = 90^\circ - 2 \sin^{-1} \left(\frac{\pi R_\theta}{360^\circ}\right)$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta &= \frac{180^\circ}{\pi} \sqrt{2(1 - \sin\theta)} \\ + &= \frac{360^\circ}{\pi} \sin\left(\frac{90^\circ - \theta}{2}\right)$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "zenithal-1.3.0" +... diff --git a/resources/stsci.edu/schemas/zenithal_equidistant-1.3.0.yaml b/resources/stsci.edu/schemas/zenithal_equidistant-1.3.0.yaml new file mode 100644 index 0000000..9de0a88 --- /dev/null +++ b/resources/stsci.edu/schemas/zenithal_equidistant-1.3.0.yaml @@ -0,0 +1,28 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/zenithal_equidistant-1.3.0" +title: | + The zenithal equidistant projection. + +description: | + Corresponds to the `ARC` projection in the FITS WCS standard. + + See + [zenithal](ref:schemas/zenithal-1.2.0) + for the definition of the full transformation. + + The pixel-to-sky transformation is defined as: + + $$\theta = 90^\circ - R_\theta$$ + + And the sky-to-pixel transformation is defined as: + + $$R_\theta = 90^\circ - \theta$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "zenithal-1.3.0" +... diff --git a/resources/stsci.edu/schemas/zenithal_perspective-1.4.0.yaml b/resources/stsci.edu/schemas/zenithal_perspective-1.4.0.yaml new file mode 100644 index 0000000..c4299ad --- /dev/null +++ b/resources/stsci.edu/schemas/zenithal_perspective-1.4.0.yaml @@ -0,0 +1,55 @@ +%YAML 1.1 +--- +$schema: "http://stsci.edu/schemas/yaml-schema/draft-01" +id: "http://stsci.edu/schemas/asdf/transform/zenithal_perspective-1.4.0" +title: | + The zenithal perspective projection. + +description: | + Corresponds to the `AZP` projection in the FITS WCS standard. + + The pixel-to-sky transformation is defined as: + + $$\phi &= \arg(-y \cos \gamma, x) \\ + \theta &= \left\{\genfrac{}{}{0pt}{}{\psi - \omega}{\psi + \omega + 180^{\circ}}\right.$$ + + where: + + $$\psi &= \arg(\rho, 1) \\ + \omega &= \sin^{-1}\left(\frac{\rho \mu}{\sqrt{\rho^2 + 1}}\right) \\ + \rho &= \frac{R}{\frac{180^{\circ}}{\pi}(\mu + 1) + y \sin \gamma} \\ + R &= \sqrt{x^2 + y^2 \cos^2 \gamma}$$ + + And the sky-to-pixel transformation is defined as: + + $$x &= R \sin \phi \\ + y &= -R \sec \gamma \cos \theta$$ + + where: + + $$R = \frac{180^{\circ}}{\pi} \frac{(\mu + 1) \cos \theta}{(\mu + \sin \theta) + \cos \theta \cos \phi \tan \gamma}$$ + + Invertibility: All ASDF tools are required to provide the inverse of + this transform. + +allOf: + - $ref: "zenithal-1.3.0" + - type: object + properties: + mu: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + Distance from point of projection to center of sphere in + spherical radii. + default: 0 + + gamma: + anyOf: + - $ref: "../unit/quantity-1.2.0" + - type: number + description: | + Look angle, in degrees. + default: 0 +... diff --git a/tox.ini b/tox.ini index bb95323..4fd1ee4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py39, black, flake8 +envlist = py39, py310, py311, py312, black, flake8 isolated_build = True [testenv]