hash stringlengths 64 64 | content stringlengths 0 1.51M |
|---|---|
13e09c02b387f36511200971dd04323086e2d3eaf4740a23eb5c733f19e138ee | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import copy
import pickle
from io import StringIO
import pytest
import numpy as np
from astropy.table.serialize import represent_mixins_as_columns
from astropy.utils.data_info import ParentDtypeInfo
from astropy.table.table_help... |
f3f00efdf0201bbfcefc025ec88f9b58cbbb4b26f2063c208745063c6ab7c521 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import itertools
import pytest
import numpy as np
from numpy.testing import assert_allclose
from astropy.convolution.utils import discretize_model
from astropy.modeling.functional_models import (Box1D, Box2D, Gaussian1D, Gaussian2D,
... |
e15b390ccd6bc7b673e933bf264168888ca0a68bcf8e76d77a4df082ef25ec79 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Module to test statistic functions
"""
import numpy as np
# pylint: disable=invalid-name
import pytest
from numpy.testing import assert_almost_equal
from astropy.modeling.fitting import LinearLSQFitter
from astropy.modeling.models import Identity, Map... |
a85c3de06c3b638a198f773b5cbafe07109f9d58886ce36f6277b7ba9b09338e | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test sky projections defined in WCS Paper II"""
# pylint: disable=invalid-name, no-member
import os
import unittest.mock as mk
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_almost_equal
from astropy import units a... |
3c6f92782b580f299994482b24cd4c9f40ef14694fbc4c12e7e78ec548d7b045 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides functions to help with testing against iraf tasks
"""
import numpy as np
from astropy.logger import log
iraf_models_map = {1.: 'Chebyshev',
2.: 'Legendre',
3.: 'Spline3',
... |
836735efa2e5c73b93c9dc0874652f6ed457b7f003116d28e812ed1a47a4a7d1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Here are all the test parameters and values for the each
`~astropy.modeling.FittableModel` defined. There is a dictionary for 1D and a
dictionary for 2D models.
Explanation of keywords of the dictionaries:
"parameters" : list or dict
Model parame... |
c960a22be1ea9c197d6925b3634aa1233e578806dbac08c654caf7cefcf48ce0 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Module to test fitting routines
"""
# pylint: disable=invalid-name
import os.path
import unittest.mock as mk
import warnings
from importlib.metadata import EntryPoint
from unittest import mock
import numpy as np
import pytest
from numpy import linalg
... |
75ab4bab3ed4cd5ccdb1e93de53c5581824891dd26dac55b1f05f1e5e20d642b | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal, assert_array_less
from astropy import units as u
from astropy.coordinates import Angle
from astropy.modeling import InputParame... |
f68c3a3120d1dc623de969315450b70ef70d8cc2ebcb0e10554ba0286c2339e4 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
from inspect import Parameter
import numpy as np
import pytest
from astropy.modeling.utils import (_SpecialOperatorsDict, _validate_domain_window,
get_inputs_and_params, poly_map_domain)
... |
aeed1c74245409a578dddec218e692db93a09a65701af41c87e3d0d7710821e0 | # Licensed under a 3-clause BSD style license - see LICENSE.rst:
"""
Tests for model evaluation.
Compare the results of some models with other programs.
"""
import unittest.mock as mk
import numpy as np
# pylint: disable=invalid-name, no-member
import pytest
from numpy.testing import assert_allclose, assert_equal
im... |
1416b4978fcbbcd7eec8d4c40f3946568177945cbe2770c50ab73a66f83f1457 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module tests model set evaluation and fitting for some common use cases.
"""
import numpy as np
# pylint: disable=invalid-name
import pytest
from numpy.testing import assert_allclose
from astropy.modeling.core import Model
from astropy.modeling.f... |
1323459bf540a398f03287c26fda2b743fec365763d0e14465f7c096783b3e89 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name, no-member
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy import units as u
from astropy.modeling import models
from astropy.tests.helper import assert_quantity_allclose
from astropy... |
513d74d24805fcd7341b7b23db7a14e4849dfe90a6c4ae5be6d4a50970fd224a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests that relate to evaluating models with quantity parameters
"""
# pylint: disable=invalid-name, no-member
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy import units as u
from astropy.modeling.core import... |
7e607aa678a47fee419618e92126f222c8a315949360765e0cb7833a7426ffaa | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests that relate to fitting models with quantity parameters
"""
# pylint: disable=invalid-name, no-member
import numpy as np
import pytest
from astropy import units as u
from astropy.modeling import fitting, models
from astropy.modeling.core import F... |
c006063ca90d8d32205373e50256e6cb981fd70a0b76b43ef758cdece10c9817 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module tests fitting and model evaluation with various inputs
"""
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy.modeling import fitting, models
from astropy.modeling.core import Fittable1DModel, Fittable... |
69c6966ab4942ec38b1060723cc83df3c21c349c89453396d87a4aa3e7ff6519 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests that relate to using quantities/units on parameters of models.
"""
# pylint: disable=invalid-name, no-member
import numpy as np
import pytest
from astropy import coordinates as coord
from astropy import units as u
from astropy.modeling.core im... |
38f0ed8c874bb218b09c9a1dd5e29ff4e9e6d1c277ccdb4a27d17a610e29a931 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Tests for polynomial models."""
# pylint: disable=invalid-name
import os
import unittest.mock as mk
import warnings
from itertools import product
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy import conf, wcs... |
978feec48f41401b4c743b5d45deedeb9d5972f0eb8ddcf66563bcdf772adf2d | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import unittest.mock as mk
import numpy as np
import pytest
import astropy.units as u
from astropy.coordinates import SpectralCoord
from astropy.modeling.bounding_box import (CompoundBoundingBox, ModelBoundingBox, _BaseInterval,
... |
7e5361701f39dc5fced0409e9cc899d91f88d74b0a7485017273011b098c69f7 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name, pointless-statement
import pickle
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
import astropy.units as u
from astropy.modeling.core import CompoundModel, Model, ModelDefin... |
86f4da667fa947af33d41f011ebf8db746b20110fd8c66224c59012c34b49f69 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
import numpy as np
import pytest
from astropy.convolution import convolve_models_fft
from astropy.modeling.models import Const1D, Const2D
try:
import scipy # pylint: disable=W0611 # noqa
except ImportError:
HAS_SCI... |
4d245c5965f7f9cd6b019cc29261b5a5acc26bb57026f332d2cd8a8d59e17aba | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from astropy import units as u
from astropy.modeling.core import Model, fix_inputs
from astropy.modeling.models import Polynomial1D
class _ExampleModel(Model):
n_inputs = 1
n_outputs = 1
def __init__(self):
... |
ef784c7260a1e6f18db952e553b42e3bc06670c0e999108c088367909c9159cb | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
import os
import subprocess
import sys
import unittest.mock as mk
from inspect import signature
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_equal
import astropy
import astropy.modeling... |
f53e0659b4084d1f20a52494ce2e39821de7906e9aa7bfb8394b838e270aecd0 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Tests for spline models and fitters"""
import unittest.mock as mk
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy.modeling.core import FittableModel, ModelDefinitionError
from astropy.modeling.fitting import (S... |
0bc763ca47ceca946d25a119e7f4ee67a9b4c1b41c838e94fef3bc794f51f960 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Test separability of models.
"""
import numpy as np
# pylint: disable=invalid-name
import pytest
from numpy.testing import assert_allclose
from astropy.modeling import custom_model, models
from astropy.modeling.core import ModelDefinitionError
from a... |
e842abda0f8dd05b6d12f66ac75d55ad95f91b850f059d83d9a420ad6744cfe2 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests models.parameters
"""
# pylint: disable=invalid-name
import functools
import itertools
import unittest.mock as mk
import numpy as np
import pytest
from astropy import units as u
from astropy.modeling import fitting, models
from astropy.modelin... |
d212ee183cbb50ddf8e45a63a3a0ac2127e91a281900ab1ebeceb36f4f33dcc7 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Tests for physical functions."""
# pylint: disable=no-member, invalid-name
import numpy as np
import pytest
from astropy import cosmology
from astropy import units as u
from astropy.modeling.fitting import LevMarLSQFitter
from astropy.modeling.physical... |
1091a76bb39ea6925bdc1f899c9b6abff869930b31f95ac748bacf9c0a583665 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
import unittest.mock as mk
from math import cos, sin
import numpy as np
import pytest
from numpy.testing import assert_allclose
import astropy.units as u
from astropy.modeling import models, rotations
from astropy.tests.he... |
b2f2cb96d6f0d2ef8aa1aed8bb52f3fba4ad3722a769b4f40841cebdc8f5e2d8 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
import types
import warnings
import numpy as np
import pytest
from numpy.random import default_rng
from numpy.testing import assert_allclose
from astropy.modeling import fitting, models
from astropy.modeling.core import Fi... |
21cb56c9a7e2ccaeb3e6e9d4845f779379037c18372bcf1219059e41eb52852c | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
from astropy import units as u
from astropy.modeling.fitting import LevMarLSQFitter
from astropy.modeling.models import Gaussian1... |
ac5a57825aa3d045dfdd70a64ddc4eb14eef3c0c0f5aabfc3f900357019082d6 | # Various tests of models not related to evaluation, fitting, or parameters
# pylint: disable=invalid-name, no-member
import warnings
import pytest
from astropy import units as u
from astropy.modeling import models
from astropy.modeling.core import _ModelMeta
from astropy.modeling.models import Gaussian1D, Mapping, P... |
b120103ca5561cb5f75a15034382e469d0631b2fd929738ff2ec310fc99e6cd5 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name, no-member
import numpy as np
import pytest
from astropy import units as u
from astropy.modeling.bounding_box import ModelBoundingBox
from astropy.modeling.core import fix_inputs
from astropy.modeling.fitting import LevMarL... |
fdf4236005bd1a784bfd5488459c94d8f487bb3613a2ddf7ee88f04461556f80 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
The astropy.utils.iers package provides access to the tables provided by
the International Earth Rotation and Reference Systems Service, in
particular allowing interpolation of published UT1-UTC values for given
times. These are used in `astropy.time`... |
fe0be15627ea3cb94470f39f46b00aacfda90708bb272d7d4dc36cd4d33f6957 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Functions to do XML schema and DTD validation. At the moment, this
makes a subprocess call to xmllint. This could use a Python-based
library at some point in the future, if something appropriate could be
found.
"""
import os
import subprocess
de... |
c8bf24c56732fe144ba59d4a097ac5d020c46256d6ef4430b75844fb96a9b35d | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import io
import os
import sys
import stat
import errno
import base64
import random
import shutil
import hashlib
import pathlib
import platform
import tempfile
import warnings
import itertools
import contextlib
import urllib.error
... |
4adb06f561b78cbb286aaf9614ab45316d3387d183072825a105561f132f319a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Checks for optional dependencies using lazy import from
`PEP 562 <https://www.python.org/dev/peps/pep-0562/>`_.
"""
import importlib
import warnings
# First, the top-level packages:
# TODO: This list is a duplicate of the dependencies in setup.cfg "all... |
de118a3ca7cb3d813cf02030f585a62da6414a50e68849d8d180c0588beecbb0 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This is a collection of monkey patches and workarounds for bugs in
earlier versions of Numpy.
"""
import numpy as np
from astropy.utils import minversion
__all__ = ['NUMPY_LT_1_19', 'NUMPY_LT_1_19_1', 'NUMPY_LT_1_20',
'NUMPY_LT_1_21_1', 'N... |
ce0940e9bc5c72bcee320894ee8f4412b72c918a0c58d5f442610d714394479d | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import warnings
from pathlib import Path
import pytest
import numpy as np
from astropy.tests.helper import assert_quantity_allclose
from astropy.utils.data import get_pkg_data_filename
from astropy.utils.iers import iers
from astropy import un... |
e10bcc2d11a083e52de75878820d167b7b5761b99917fcbb027c6c0569bdfe44 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from packaging.version import Version
import pytest
import numpy as np
from numpy import ma
from numpy.testing import assert_allclose, assert_equal
from astropy.visualization.mpl_normalize import ImageNormalize, simple_norm, imshow_norm
from astropy.visu... |
aa5ba5cba1faacc5a63f5d34df00533c5449678761b9e05f32a968a4ac4ea710 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from packaging.version import Version
import pytest
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.contour import QuadContourSet
from astropy import units as u
from astropy.wcs import WCS
from astropy... |
7a482f67415bfe8a6ee901d4ab975580d1379a938179051402bc8d644afbe8e1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from textwrap import dedent
import pytest
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.transforms import Affine2D, IdentityTransform
from astropy.io import fits
from astropy import units as u
from astropy.wcs.wcsap... |
01abd89ba092a0abe2840d538b146f300ab59108e2104d355964ae90b39cd732 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import io
import os
from contextlib import nullcontext
from datetime import datetime
from packaging.version import Version
import pytest
import numpy as np
from numpy.testing import (
assert_allclose, assert_array_almost_equal, assert_array_almost_eq... |
7bd9c249bf8b92ef4e165cce7084bbfa3359148808563b88a083ad742de93016 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.utils.decorators import format_doc
from astropy.coordinates import representation as r
from astropy.coordinates.baseframe import BaseCoordinateFrame, RepresentationMapping, base_doc
from ... |
5f25afa9c00df939dd7a3e9fe6230a2626742453a7e4e88235ee66202b6c5433 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.utils.decorators import format_doc
from astropy.time import Time
from astropy.coordinates import representation as r
from astropy.coordinates.baseframe import (BaseCoordinateFrame,
... |
d0e1bafdffa8a739ab2adff3f7567464b4e3128f249dd16048b4ff1d8df56964 | import os
import pytest
import numpy as np
from urllib.error import HTTPError, URLError
from astropy.time import Time
from astropy import units as u
from astropy.constants import c
from astropy.coordinates.builtin_frames import GCRS, TETE
from astropy.coordinates.earth import EarthLocation
from astropy.coordinates.sk... |
0732ebf4ce1a5cb2e67d53633d0d265fcb0d2edcea3d135efab5f4efd879cc45 |
import pytest
import numpy as np
from astropy.tests.helper import assert_quantity_allclose
from astropy import units as u
from astropy.time import Time
from astropy.coordinates import EarthLocation, SkyCoord, Angle, Distance
from astropy.coordinates.sites import get_builtin_sites
from astropy.utils.data import get_p... |
0bb3bcf35cb6025c4158cefe7a064559931a270b090c9600f8f2c30a868e9ced | """Test helper functions for coordinates."""
import numpy as np
def skycoord_equal(sc1, sc2):
"""SkyCoord equality useful for testing
"""
if not sc1.is_equivalent_frame(sc2):
return False
if sc1.representation_type is not sc2.representation_type:
return False
if sc1.shape != sc2.sh... |
94a395d453334df260272924aed0cf203d7af1e5c6c31c3ae92c89ec113841fb | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from copy import deepcopy
import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal
from astropy import units as u
from astropy.tests.helper import (assert_quantity_allclose as
... |
dec4d5148c4b719ec77821f62bfbe3f26b74d466d698c81ea3f9bfce243acf0d | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for miscellaneous functionality in the `funcs` module
"""
import pytest
import numpy as np
from numpy import testing as npt
from astropy import units as u
from astropy.time import Time
def test_sun():
"""
Tes... |
c65d092e1da6cd34871c6a6fa4a26756e0c8f7ef056f19ba8a9c72a05af78548 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the SkyCoord class. Note that there are also SkyCoord tests in
test_api_ape5.py
"""
import copy
from copy import deepcopy
import pytest
import numpy as np
import numpy.testing as npt
from erfa import ErfaWarning
f... |
c498fb982dd2486c89874eb1a51156c0c4e4e277436d2e44875983784530a729 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import copy
import operator
import re
import sys
import warnings
import weakref
import numbers
from functools import reduce
from collections import OrderedDict
from contextlib import suppress
import numpy as np
from numpy import char as chararray
from .... |
24245b2060e465c2bd045544b90565507dc58cc65dcd28dd6cb30a06591b47e1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Define the Enhanced Character-Separated-Values (ECSV) which allows for reading and
writing all the meta data associated with an astropy Table object.
"""
import re
from collections import OrderedDict
import warnings
import json
import numpy as np
fr... |
e469ac95e14bdd44c39df878a3541f115ac94c8ce2d393094c9642648eef64d5 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import contextlib
import copy
import gc
import pickle
import re
import sys
import warnings
import pytest
import numpy as np
from numpy import char as chararray
try:
import objgraph
HAVE_OBJGRAPH = True
except ImportError:
HAVE_OBJGRAPH = Fals... |
989b772db36ab19b3fae3420f85d89125496787be45ad4ab01304c8bb12929af | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module tests some of the methods related to the ``ECSV``
reader/writer.
"""
from astropy.table.column import MaskedColumn
import os
import copy
import sys
from io import StringIO
from contextlib import nullcontext
import pytest
import numpy as n... |
19d16430b791324b5426aee75d4409c61b2705a1d6accd42bd950025adc4bcdc | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
# This file connects ASDF to the astropy.table.Table class
import warnings
from astropy.io import registry as io_registry
from astropy.io.misc.asdf.deprecation import create_asdf_deprecation_warning
from astropy.table import Table
... |
d21492b23e3b12c70989f930504d70cc140a7868bc564b4369e399aeaf2b5c53 | from astropy.utils.exceptions import AstropyDeprecationWarning
def create_asdf_deprecation_warning():
return AstropyDeprecationWarning(
"ASDF functionality for astropy is being moved out of the astropy"
" package to the new asdf-astropy package. Please use this package"
" instead. astropy.... |
c75a871ef2a5c4ebd86649f6d47b3d834e6e7fffdf7007740d2b6fd42ddc2096 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import warnings
from asdf.types import CustomType, ExtensionTypeMeta
from astropy.io.misc.asdf.deprecation import create_asdf_deprecation_warning
__all__ = ['AstropyType', 'AstropyAsdfType']
# Names of AstropyType or AstropyAsdf... |
1d101f79126a220bd419c64604b07a9c421e6089a1b5b5f50302eaccb9c746c0 | from pathlib import Path
from astropy.utils.introspection import minversion
def get_asdf_tests():
asdf_dir = Path(__file__).parent.resolve()
paths = Path(asdf_dir).rglob("test_*.py")
return [str(p.relative_to(asdf_dir)) for p in paths]
collect_ignore = get_asdf_tests()
try:
import asdf
except Impor... |
8508279ce8196001afe163c265858720bdea02c1701334d120c12d2efad21e3f | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from astropy.coordinates.tests.helper import skycoord_equal as _skycoord_equal
from astropy.utils.decorators import deprecated
__all__ = ['skycoord_equal']
@deprecated("5.1", alternative="astropy.coordinates.tests.helper.skycoor... |
39caa0483e1e12e176284e7ef93fbbd749c72240ec0c52a6738d364261a57c94 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from numpy.testing import assert_array_equal
from astropy import table
from astropy.io import fits
from astropy.io.misc.asdf.types import AstropyType, AstropyAsdfType
class FitsType:
name = 'fits/fits'
types = ['astropy.i... |
3d8a23982cc506efaeaf6b72b7e47b15dea65c4ed222d21529413d369d1231b4 | from astropy.modeling.models import Spline1D
from astropy.io.misc.asdf.tags.transform.basic import TransformType
__all__ = ['SplineType']
class SplineType(TransformType):
name = 'transform/spline1d'
version = '1.0.0'
types = ['astropy.modeling.spline.Spline1D']
@classmethod
def from_tree_transf... |
1463919b5128564bbc9bb91588efd173824db293d3e873ac5d5591f990499a7a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from astropy.modeling.math_functions import __all__ as math_classes
from astropy.modeling.math_functions import *
from astropy.modeling import math_functions
from astropy.io.misc.asdf.tags.transform.basic import TransformType
__al... |
eb7a0f9124f9e29e96e7bfea06f321ada27672c33d913bf19876968c4b536a36 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from numpy.testing import assert_array_equal
from astropy.modeling import functional_models
from astropy.io.misc.asdf.tags.transform.basic import TransformType
from . import _parameter_to_value
__all__ = ['AiryDisk2DType', 'Box1D... |
249b400dd91b33fdb7d262ada437fa44da4e9eda8e78a7a5784f137dcaefb83e | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from numpy.testing import assert_array_equal
from astropy import modeling
from astropy.io.misc.asdf.tags.transform.basic import TransformType
from . import _parameter_to_value
__all__ = ['AffineType', 'Rotate2DType', 'Rotate3DTyp... |
67e7c6ab05e6364d1de2ee52f363f324765f9ed65105e105b0c21e58c71a71ad | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import numpy as np
from numpy.testing import assert_array_equal
from asdf.versioning import AsdfVersion
import astropy.units as u
from astropy import modeling
from astropy.io.misc.asdf.tags.transform.basic import TransformType
fro... |
55b4f78c98e631de30e9c11ae3c5da335a80cacf5095650e2ccf91ac54f79f9c | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import numpy as np
from numpy.testing import assert_array_equal
from astropy import modeling
from astropy import units as u
from astropy.modeling.bounding_box import ModelBoundingBox
from astropy.io.misc.asdf.tags.transform.basic i... |
4eabfdc2d999d9e0d732113add114cc9d05ad55e6b3caafa121bea848d7d5cf3 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from numpy.testing import assert_array_equal
from astropy.modeling import physical_models
from astropy.io.misc.asdf.tags.transform.basic import TransformType
from . import _parameter_to_value
__all__ = ['BlackBody', 'Drude1DType'... |
6fccb027d862fb913da0dfde5b869e013464b6c08a0f77da068d043fa96fc519 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import warnings
from asdf import tagged
from asdf.tests.helpers import assert_tree_match
from astropy.modeling.core import Model, CompoundModel
from astropy.modeling.models import Identity, Mapping, Const1D
from astropy.io.misc.asd... |
8e245509ba1f371c57579e515ed59e33e6a6f63ea68483a51e8bbf32b7ecd1e3 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from numpy.testing import assert_array_equal
from astropy.modeling import powerlaws
from astropy.io.misc.asdf.tags.transform.basic import TransformType
from . import _parameter_to_value
__all__ = ['PowerLaw1DType', 'BrokenPowerLa... |
3d4af61f41d42cda7c66fa736cf2ba90c7312fb193027efd9a1418219cba951a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import functools
import numpy as np
from astropy.time import TimeDelta
from astropy.io.misc.asdf.types import AstropyType
__all__ = ['TimeDeltaType']
allclose_jd = functools.partial(np.allclose, rtol=2. ** -52, atol=0)
allclose_... |
961e7bfc8906d23b975f729fcacb28daff901df92b12253a487a8f141e6f8b72 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import numpy as np
from numpy.testing import assert_array_equal
from asdf.versioning import AsdfSpec
from astropy import time
from astropy import units as u
from astropy.units import Quantity
from astropy.coordinates import EarthL... |
9c278d53ff411faad44c939b92f70edc27844848e8fc370b3b825ff25923c4ba | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from asdf.tags.core import NDArrayType
from astropy.coordinates.spectral_coordinate import SpectralCoord
from astropy.io.misc.asdf.types import AstropyType
from astropy.io.misc.asdf.tags.unit.unit import UnitType
__all__ = ['Spec... |
25e47b0af741bc069847da1a7f0d6bc50a0631e5d0c73afd52194fe2cbd57d40 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import os
import glob
import warnings
from asdf import tagged
import astropy.units as u
import astropy.coordinates
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.units import Quantity
from astropy.coo... |
b4accf2d735bcdbb434d33f81d38543eecacb451446822c337f418179935652d | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from astropy.coordinates import SkyCoord
from astropy.coordinates.tests.helper import skycoord_equal
from astropy.io.misc.asdf.types import AstropyType
class SkyCoordType(AstropyType):
name = 'coordinates/skycoord'
types =... |
eff71f04d6bd25fc461e51941266bcd30829a35ed4540fbebbfac74d9554740c | import astropy.units as u
import astropy.coordinates.representation
from astropy.coordinates.representation import BaseRepresentationOrDifferential
from astropy.io.misc.asdf.types import AstropyType
class RepresentationType(AstropyType):
name = "coordinates/representation"
types = [BaseRepresentationOrDiffere... |
2c42a917a0806d1671c151e88efab95d0b7d3e9201d2474c66df894609196ecc | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from astropy.coordinates import Angle, Latitude, Longitude
from astropy.io.misc.asdf.tags.unit.quantity import QuantityType
__all__ = ['AngleType', 'LatitudeType', 'LongitudeType']
class AngleType(QuantityType):
name = "coo... |
8306fa294bcf8ccb506ed745e014c7e23067f4659bfd2dbda25ddd30b535611d | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from astropy.coordinates import EarthLocation
from astropy.io.misc.asdf.types import AstropyType
class EarthLocationType(AstropyType):
name = 'coordinates/earthlocation'
types = [EarthLocation]
version = '1.0.0'
@... |
3cd0fc14d3877908ec63f7822811d5f6a7fa3c1f6b5c538ec5dfb47ba2e7d212 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from astropy.units.equivalencies import Equivalency
from astropy.units import equivalencies
from astropy.io.misc.asdf.types import AstropyType
class EquivalencyType(AstropyType):
name = "units/equivalency"
types = [Equival... |
84be84162eafd822e0d11ac062d4a675ff146ed2cf43d8b1412c42b80ff62956 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from astropy.units import Unit, UnitBase
from astropy.io.misc.asdf.types import AstropyAsdfType
class UnitType(AstropyAsdfType):
name = 'unit/unit'
types = ['astropy.units.UnitBase']
requires = ['astropy']
@classm... |
af61a6ad221048f9ac9a9a60a6cb41c0a4008b0afac326a87c5ee8a29f733544 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from asdf.tags.core import NDArrayType
from astropy.units import Quantity
from astropy.io.misc.asdf.types import AstropyAsdfType
class QuantityType(AstropyAsdfType):
name = 'unit/quantity'
types = ['astropy.units.Quantity... |
c72a9be8f7258e52c2025eaa2b7163037099812850aa42abc0be0d1c6fab7a3a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import pytest
asdf = pytest.importorskip('asdf')
import numpy as np
from packaging.version import Version
import astropy.units as u
from astropy import table
from astropy.time import Time, TimeDelta
from astropy.coordinates impo... |
b830465d091919975d8e5a8b993601266b61c704578808862adafa0bb7717c8f | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Contains a class to handle a validation result for a single VOTable
file.
"""
# STDLIB
from xml.parsers.expat import ExpatError
import hashlib
import os
import shutil
import socket
import subprocess
import warnings
import pickle
import urllib.request... |
213f56c11209d24fcd9b18116508a364f3466253ff5c8cad35371733e6e1e383 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
The following are private functions, included here **FOR REFERENCE ONLY** since
the io registry cannot be displayed. These functions are registered into
:meth:`~astropy.cosmology.Cosmology.to_format` and
:meth:`~astropy.cosmology.Cosmology.from_format... |
a88330e1609f66f63653f599d860471e7db8d55b1af20644d6a9610481b77662 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import copy
from collections import defaultdict
from astropy.cosmology.connect import convert_registry
from astropy.cosmology.core import Cosmology
from astropy.table import QTable, Row
from .mapping import from_mapping
def from_row(row, *, move_to_me... |
85f606f4dfe1af6f40d2f5a800afb9363c89a08aec66eb87592b869b4a30d602 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
The following are private functions. These functions are registered into
:meth:`~astropy.cosmology.Cosmology.to_format` and
:meth:`~astropy.cosmology.Cosmology.from_format` and should only be accessed
via these methods.
"""
from astropy.cosmology.con... |
e313dcf332530a27bc2bb06566bfc8cec4ec6c09063275a46591085abd04a54a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy.cosmology.connect import convert_registry
from astropy.cosmology.core import Cosmology
from astropy.table import Column, QTable, Table
from .mapping import to_mapping
from .row import from_row
from .utils import convert_p... |
942724e611a04ccb94389d2500c9da714e547e94bb86508bb8595189787708c4 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
The following are private functions, included here **FOR REFERENCE ONLY** since
the io registry cannot be displayed. These functions are registered into
:meth:`~astropy.cosmology.Cosmology.to_format` and
:meth:`~astropy.cosmology.Cosmology.from_format... |
4dda94c820a33a1af38991e6972d0c16523e2111a4d62050ae06c85d14993c8b | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
The following are private functions, included here **FOR REFERENCE ONLY** since
the io registry cannot be displayed. These functions are registered into
:meth:`~astropy.cosmology.Cosmology.to_format` and
:meth:`~astropy.cosmology.Cosmology.from_format... |
ffc04a13085ff1bcaedb1a7374fbeb51e5a1f5724ea1e0ac4d88828eeeb994c3 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy.modeling import Parameter as ModelParameter
from astropy.table import Column
FULLQUALNAME_SUBSTITUTIONS = {
"astropy.cosmology.flrw.base.FLRW": "astropy.cosmology.flrw.FLRW",
"astropy.cosmology.flrw.lambdacdm.Lamb... |
fae4702c662967ca1f8bf81bf38825d34b2368c254cf63d4e604c8a69eeb7c45 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import astropy.cosmology.units as cu
import astropy.units as u
from astropy.cosmology.connect import readwrite_registry
from astropy.cosmology.core import Cosmology
from astropy.table import QTable
from .table import from_table, to_table
def read_ecsv(... |
f0c025661e1eada1c55346df0508f40f4d93c4ad48cbfa418b4df921ea361dbe | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from math import inf
import numpy as np
import pytest
from astropy.cosmology.utils import aszarr, inf_like, vectorize_if_needed, vectorize_redshift_method
from astropy.utils.exceptions import AstropyDeprecationWarning
from .test_core import _zarr, inva... |
17f3527b26aa20409d592d88d1e86939c56d4122053540690feeab80a64362bf | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Configure the tests for :mod:`astropy.cosmology`."""
from astropy.cosmology.tests.helper import clean_registry
from astropy.tests.helper import pickle_protocol
|
49519a568150d95a20960334c45878e3c141458b924227d09eeccb24cf5d1cde | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Testing :mod:`astropy.cosmology.parameter`."""
##############################################################################
# IMPORTS
# STDLIB
import inspect
# THIRD PARTY
import numpy as np
import pytest
# LOCAL
import astropy.units as u
from as... |
6ecf70bedf368be2ee3fea8c6863036e7805629c8f33398bcff6bc377ca26070 | # -*- coding: utf-8 -*-
"""Testing :mod:`astropy.cosmology.units`."""
##############################################################################
# IMPORTS
import pytest
import astropy.cosmology.units as cu
import astropy.units as u
from astropy.cosmology import Planck13, default_cosmology
from astropy.tests.hel... |
c575071a35eb4bc3a079f1893681914ed8c00558a8e5dfe735470ea8d7a3d204 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import inspect
import os
import pytest
from astropy import cosmology
from astropy.cosmology import Cosmology, w0wzCDM
from astropy.cosmology.connect import readwrite_registry
from astropy.cosmology.core import Cosmology
from astropy.cosmology.io.tests i... |
f4ef22fda5e24850eebc91a465f289c4db33d5e8178482cc7e99d24398de181e | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Testing :mod:`astropy.cosmology.core`."""
##############################################################################
# IMPORTS
# STDLIB
import abc
import inspect
import pickle
# THIRD PARTY
import numpy as np
import pytest
# LOCAL
import astrop... |
8eb35001b8706ab4072b3dc8a5e62632b332d51bfffec01eb770a06d73af83f6 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides the tools used to internally run the cosmology test suite
from the installed astropy. It makes use of the `pytest`_ testing framework.
"""
##############################################################################
# IMPORTS
... |
a260de3f66e897b040af27ee0bdf20c5b5c128f02bfba07e547622ca68dc1a5a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Stand-alone overall systems tests for :mod:`astropy.cosmology`."""
from io import StringIO
import numpy as np
import pytest
import astropy.constants as const
import astropy.units as u
from astropy.cosmology import flrw
from astropy.cosmology.realiza... |
77f6d73295df0b542b17ea700073cc6c2e4ed1c30586cf63da04b5759ee50357 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# STDLIB
import pickle
# THIRD PARTY
import pytest
# LOCAL
import astropy.cosmology.units as cu
import astropy.units as u
from astropy import cosmology
from astropy.cosmology import parameters, realizations
from astropy.cosmology.realizations import Pla... |
d88a30bf375a88ee370bbfd27c7ada33aa9a157fb080977309d39dc180246501 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import inspect
import sys
from io import StringIO
import numpy as np
import pytest
from astropy import units as u
from astropy.cosmology import core, flrw
from astropy.cosmology.funcs import _z_at_scalar_value, z_at_value
from astropy.cosmology.realizat... |
749598750c789626996fc599a4292c4b727eacbc3bafb685a9ef3fc67e147254 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Astropy FLRW classes."""
from . import base, lambdacdm, w0cdm, w0wacdm, w0wzcdm, wpwazpcdm
from .base import * # noqa: F401, F403
from .lambdacdm import * # noqa: F401, F403
from .w0cdm import * # noqa: F401, F403
from .w0wacdm import * # noqa: F40... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.