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 . import extract | |
from .setup_utils import pyspextool_setup, set_paths, set_instrument | |
# Is there a reason for absolute imports below and relative imports above? | |
from pyspextool.instrument_data.spex_dir.spex import read_fits as _read_fits_spex | |
from pyspextool.instrument_data.uspex_dir.uspex import read_fits as _read_fits_uspex | |
instrument = None |
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
class CompoundConverter(TransformConverter): | |
_tags_add = { | |
"http://asdf-format.org/schemas/transform/add-2.0.0", | |
"tag:stsci.edu:asdf/transform/add-1.2.0", | |
"tag:stsci.edu:asdf/transform/add-1.1.0", | |
"tag:stsci.edu:asdf/transform/add-1.0.0", | |
} | |
_tags_subtract = { | |
"http://asdf-format.org/schemas/transform/subtract-2.0.0", | |
"tag:stsci.edu:asdf/transform/subtract-1.2.0", |
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 to show how one might represent two linear WCS pipelines that share a step in ASDF using GWCS | |
# The transform comes from JWST NIRCam imaging. | |
from jwst import datamodels | |
import asdf | |
from copy import deepcopy | |
# Use some existing NIRCam Imaging data which has a GWCS object in it |
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 import models, fitting | |
>>> import asdf | |
>>> import numpy as np | |
>>> x = np.random.random(100) | |
>>> y = np.random.random(100) | |
>>> | |
>>> mymodel = models.Polynomial1D(degree=3) | |
>>> fitter = fitting.LevMarLSQFitter() | |
>>> myfit = fitter(mymodel,x,y) | |
WARNING: Model is linear in parameters; consider using linear fitting methods. [astropy.modeling.fitting] |