This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current definitions: | |
input_units_strict | |
# If set to True, values that are passed in compatible units will be converted to | |
# the exact units specified in input_units. | |
input_units_equivalencies | |
# This can be set to a dictionary that maps the input names to a list of equivalencies, for example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from astropy.modeling.models import * | |
import numpy as np | |
from astropy.modeling.fitting import * | |
# How to create a multiset model | |
# There are two arguments that control this - `n_models` and `model_set_axis`. | |
# The trick with model_sets is that input arguments and model parameters need | |
# to broadcast appropriately. | |
x = np.arange(4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""This is the docstring for the example.py module. Modules names should | |
have short, all-lowercase names. The module name may have underscores if | |
this improves readability. | |
Every module should have a docstring at the very top of the file. The | |
module's docstring may extend over multiple lines. If your docstring does | |
extend over multiple lines, the closing three quotation marks must be on | |
a line by itself, preferably preceded by a blank line. | |
""" | |
import os # standard library imports first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from astropy.io import fits | |
>>> from asdf import fits_embed | |
>>> hdul = fits.open("example_imaging.fits") | |
>>> hdul.info() | |
Filename: example_imaging.fits | |
No. Name Ver Type Cards Dimensions Format | |
0 PRIMARY 1 PrimaryHDU 775 () | |
1 SCI 1 ImageHDU 71 (600, 550) float32 | |
>>> tree = {"sci": hdul[1].data, | |
... "wcs": wcsobj} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ASDF 1.0.0 | |
#ASDF_STANDARD 1.5.0 | |
%YAML 1.1 | |
%TAG ! tag:stsci.edu:asdf/ | |
--- !core/asdf-1.1.0 | |
asdf_library: !core/software-1.0.0 {author: The ASDF Developers, homepage: 'http://github.com/asdf-format/asdf', | |
name: asdf, version: 2.11.1} | |
history: | |
extensions: | |
- !core/extension_metadata-1.0.0 |
OlderNewer