hash stringlengths 64 64 | content stringlengths 0 1.51M |
|---|---|
697b1d975ae4466343a4f95319141c85278e74c9fd56d2ecdf57bdbc7266a18e | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.coordinates.attributes import (
CartesianRepresentationAttribute,
TimeAttribute,
)
from astropy.coordinates.baseframe import base_doc
from astropy.utils.decorators import format_doc
from .baseradec impo... |
03a5b2490a1e3dd18a261a48f25720e0cd50ffc5bc26fb4d1c04610a4bf7e8dc | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.coordinates import representation as r
from astropy.coordinates.attributes import QuantityAttribute, TimeAttribute
from astropy.coordinates.baseframe import BaseCoordinateFrame, base_doc
from astropy.utils.decor... |
62615be3f34fd435515b67513f0cf8a43c460360d75697ece0a9ccfeb7b78061 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.coordinates.attributes import EarthLocationAttribute, TimeAttribute
from astropy.coordinates.baseframe import BaseCoordinateFrame, base_doc
from astropy.coordinates.representation import (
CartesianDifferential,
CartesianRepresentatio... |
8d86ab58e2089972c121e8615733e688c264d5c5b190ecfeaedadc4b9e3c0a48 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Contains the transformation functions for getting to "observed" systems from ICRS.
"""
import erfa
from astropy import units as u
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.builtin_frames.utils import atci... |
ef331c9b66a17819e996637d0567dd2e8b59c134b6bc37f9447bfb2e89faed69 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains functions/values used repeatedly in different modules of
the ``builtin_frames`` package.
"""
import warnings
import erfa
import numpy as np
from astropy import units as u
from astropy.coordinates.earth import EarthLocation
from ... |
9a4833042f25f9b5030a3205960920e69c76c1d79338f4302416b388440a7959 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Contains the transformation functions for getting to/from ecliptic systems.
"""
import erfa
from astropy import units as u
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.errors import UnitsError
from astropy.c... |
e32dcb9f3bace4766e0164e42495df2bcc1d1feddec3426dc878f733152e634f | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Contains the transformation functions for getting from ICRS/HCRS to CIRS and
anything in between (currently that means GCRS)
"""
import numpy as np
from astropy import units as u
from astropy.coordinates.baseframe import frame_transform_graph
from as... |
907cc03a7d3a0b3f31cc352f6567d45d76345b037f8d2ee44664555b9fab467b | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.coordinates.attributes import CoordinateAttribute, QuantityAttribute
from astropy.coordinates.baseframe import BaseCoordinateFrame, frame_transform_graph
from astropy.coordinates.matrix_utilities import matrix_tr... |
fb58675fac7b6c7ff14d29ed1ec678ec172090c3dae0809b3e0630702e33632b | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Contains the transformation functions for getting to "observed" systems from CIRS.
"""
import erfa
import numpy as np
from astropy import units as u
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.erfa_astrom ... |
dab01bf5f07cc6f7413f397863315572c47c49f15d7736579aff4b0445c080ed | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.coordinates import representation as r
from astropy.coordinates.attributes import (
EarthLocationAttribute,
QuantityAttribute,
TimeAttribute,
)
from astropy.coordinates.baseframe ... |
6255ca9b34b18cdaaf85017757b0945a669fc77261828401f83a073bde045ccf | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.coordinates import representation as r
from astropy.coordinates.attributes import (
EarthLocationAttribute,
QuantityAttribute,
TimeAttribute,
)
from astropy.coordinates.baseframe import (
BaseCoo... |
5910a3549f59b757ff860c961f7bb82ce89b8c9be188c76b9d18a19db369de60 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.matrix_utilities import matrix_transpose
from astropy.coordinates.transformations import DynamicMatrixTransform
from .fk4 import FK4NoETerms
fro... |
ba17a1341ba3f1c2113e65a7acf14ee1fee9ef362fd8e9c2dc3b23ad12247477 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.coordinates import representation as r
from astropy.coordinates.attributes import DifferentialAttribute
from astropy.coordinates.baseframe import (
BaseCoordinateFrame,
RepresentationMapping,
base_do... |
1589940eb8e2b7964b6af5d666dde599b17192fb15e964b37a61e81211fed3b5 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.matrix_utilities import matrix_transpose, rotation_matrix
from astropy.coordinates.transformations import DynamicMatrixTransform
from .fk4 import FK4NoETerms
from .f... |
2d15495c9df319d401e1e43de90f6ac7ccb458d6ea21bed2d659f5ad7a20a26d | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy import units as u
from astropy.coordinates import representation as r
from astropy.coordinates.angles import Angle
from astropy.coordinates.baseframe import (
BaseCoordinateFrame,
RepresentationMapping,
base_doc,
)
from astropy.ut... |
dcfeb3e4699ebdab29f6f3ee7a1f6ae92cdbd8a98f1bf264f8536e57c0146dd1 | import erfa
import numpy as np
from astropy import units as u
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.matrix_utilities import matrix_transpose, rotation_matrix
from astropy.coordinates.representation import CartesianRepresentation
from astropy.coordinates.transformation... |
8fde57333439d643f911edc005a2794ce931a91c5f63f836d2f21f2e8d2ead43 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordinates.matrix_utilities import matrix_transpose, rotation_matrix
from astropy.coordinates.transformations import DynamicMatrixTransform
from .fk5 import FK5
from .icrs impo... |
834d4161ee63d72c4117d0b595f930f4f67b924f625e45345fdd2d13f0791619 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.coordinates.attributes import EarthLocationAttribute, TimeAttribute
from astropy.coordinates.baseframe import base_doc
from astropy.utils.decorators import format_doc
from .baseradec import BaseRADecFrame, doc_components
from .utils import D... |
5e6efdaf2602b90cf9f21ac139e63e5e3b4666296e64c8a1ad5651995f7f6fa7 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Coordinate frames tied to the Equator and Equinox of Earth.
TEME is a True equator, Mean Equinox coordinate frame used in NORAD TLE
satellite files.
TETE is a True equator, True Equinox coordinate frame often called the
"apparent" coordinates. It is ... |
ec13f3de1d92cfd13840cd73b08dbbf60a0e61356769e716ff6f987d77f89029 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import re
from copy import deepcopy
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import EarthLocation, SkyCoord, galactocentric_frame_defaults
from astropy.coordinates import representation as r
from astropy.c... |
aa5af3d8c2d8816542b9aa7f357a2a2c92b95a037782f7e831f175da7db0eda6 | """
This file tests the behavior of subclasses of Representation and Frames
"""
from copy import deepcopy
import astropy.coordinates
import astropy.units as u
from astropy.coordinates import ICRS, Latitude, Longitude
from astropy.coordinates.baseframe import RepresentationMapping, frame_transform_graph
from astropy.co... |
89ef56ecad8c58859d4cf31609aef3bda9413eedbbdbd304597281f1b2d6d3b3 | import os
from urllib.error import HTTPError, URLError
import numpy as np
import pytest
from astropy import units as u
from astropy.constants import c
from astropy.coordinates.builtin_frames import TETE
from astropy.coordinates.earth import EarthLocation
from astropy.coordinates.funcs import get_sun
from astropy.coor... |
41695d2931eed557df1e4ffd8778e3a2ef6c2481088f8a593dc1d55412744851 | # 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.coordinates import representation as r
from astropy.coordinates import transformations as t
from astropy.coordinates.baseframe import frame_transform_graph
from astropy.coordin... |
944cc534cea56a01e287ec699e385f803dee3f0308f743c5e70c2f2939945e90 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Accuracy tests for ICRS transformations, primarily to/from AltAz.
"""
import numpy as np
from astropy import units as u
from astropy.coordinates import (
CIRS,
ICRS,
AltAz,
EarthLocation,
HADec,
SkyCoord,
frame_transform_gr... |
8043fa2683c996653a2e01279c329ac91edf04d86158e2000da30c33cbac1d0a | import pytest
from astropy.coordinates.builtin_frames.utils import (
get_offset_sun_from_barycenter,
get_polar_motion,
)
from astropy.coordinates.solar_system import get_body_barycentric_posvel
from astropy.tests.helper import assert_quantity_allclose
from astropy.time import Time
from astropy.utils.exceptions... |
faaf4c8273b39c2e47379cbe42fbc1c0429a4c127689d22fe915cbeaf7601dd0 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test geodetic representations"""
import pytest
from numpy.testing import assert_array_equal
from astropy import units as u
from astropy.coordinates.earth import (
GRS80GeodeticRepresentation,
WGS72GeodeticRepresentation,
WGS84GeodeticRepre... |
7c6117145c062023c5fdb7971fb9f82ad2a2f65446686613509a2b6c88cf1d6a | # 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.coordinates import (
Latitude,
Longitude,
SphericalDifferential,
SphericalRepresentation,
)
from astropy.units.quantity_helper.function_helpers import ARRAY_FUN... |
a6bd4081862b6c865de93e992b869f444ed8cc5035618170f0827cd54203a127 | import numpy as np
import pytest
from astropy import units as u
from astropy.constants import c as speed_of_light
from astropy.coordinates import Angle, Distance, EarthLocation, SkyCoord
from astropy.coordinates.sites import get_builtin_sites
from astropy.table import Table
from astropy.tests.helper import assert_quan... |
93877727095e16cc57126972bf118233a1c1b081e5f686b308ed8913c84799ef | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from numpy.testing import assert_array_equal
from astropy import units as u
from astropy.coordinates import EarthLocation, Latitude, Longitude, SkyCoord
# test on frame with most complicated frame attributes.
from astrop... |
c5fa21f4577562677a9559e3584ab257ccdf8da044f8ffb5af4c9ab59a7817ca | # 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.coordinates import builtin_frames as bf
from astropy.coordinates import galactocentric_frame_defaults
from astropy.coordinates import representation as r
from astropy.coordinate... |
137956f2c73d0d8a5856c4576bf546dfaded3381126fa0e868cfdbdcdb11ae5f | """
Tests the Angle string formatting capabilities. SkyCoord formatting is in
test_sky_coord
"""
import pytest
from astropy import units as u
from astropy.coordinates.angles import Angle
def test_to_string_precision():
# There are already some tests in test_api.py, but this is a regression
# test for the bu... |
4acb51d5cdbf34d8274816412c24b931864444090d48f14b98829bd0e9eabc58 | # 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.coordinates import EarthLocation, SkyCoord
from astropy.coordinates.builtin_frames import (
FK5,
ICRS,
AltAz,
Galactic,
SkyOffsetFrame,
)
from astropy.coordi... |
1b52c7bde37a52c78c9b2da07a934b354862a8ac47faf1ff0464f740acf8eb37 | import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy import units as u
from astropy.coordinates.spectral_quantity import SpectralQuantity
from astropy.tests.helper import assert_quantity_allclose
SPECTRAL_UNITS = (u.GHz, u.micron, u.keV, (1 / u.nm).unit, u.km / u.s)
class TestSpec... |
0dc1cd44f1cf3737d098e698fc8585cfd1d24d93c835e034abf168bad75e2790 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains tests for the name resolve convenience module.
"""
import time
import urllib.request
import numpy as np
import pytest
from pytest_remotedata.disable_internet import no_internet
from astropy import units as u
from astropy.config... |
32c9baf662ae4072f2566757fad7cc7cbc565ef2242543d2b19ab64c9519a252 | import pickle
import numpy as np
import pytest
import astropy.units as u
from astropy import coordinates as coord
from astropy.coordinates import Longitude
from astropy.tests.helper import check_pickling_recovery, pickle_protocol # noqa: F401
# Can't test distances without scipy due to cosmology deps
from astropy.u... |
1fe6576416b3412c868572bd5945c36585b053420fa18772b24400fd3a7c61de | # 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.coordinates import (
CartesianDifferential,
CartesianRepresentation,
EarthLocation,
SkyCoord,
galactocentric_frame_defaults,
)
from astropy.coordinates.built... |
c2b9dc7d5e35b88e9f3dedf90dcfec0d721533a6403146a529cab2876b8799eb | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test initialization and other aspects of Angle and subclasses"""
import pickle
import threading
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
import astropy.units as u
from astropy.coordinates.angles i... |
ce35e0c92eb2e8bef7241047d72448dfafc45fe316dc9a73d2bf043171a5798f | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the projected separation stuff
"""
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import Angle, Distance
from astropy.coordinates.builtin_frames import FK5, ICRS, Galactic
from astropy.tests.helpe... |
438ed2fb23b4dfeb4284133c0e8d0e2caeb63287f48924871fe5ed8304ca3cf4 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This is the APE5 coordinates API document re-written to work as a series of test
functions.
Note that new tests for coordinates functionality should generally *not* be
added to this file - instead, add them to other appropriate test modules in
this ... |
337cc6906596c541c65d6f83b2d067ed767c8881cda6cbf08880002e63ac97fe | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for putting velocity differentials into SkyCoord objects.
Note: the skyoffset velocity tests are in a different file, in
test_skyoffset_transformations.py
"""
import numpy as np
import pytest
from astropy import units as u
from astropy.coordi... |
778091d349da1677da52eed814ee22574c97ad8cd55cfe8583993cef0a666eff | from contextlib import nullcontext
import numpy as np
import pytest
from numpy.testing import assert_allclose
import astropy.units as u
from astropy import time
from astropy.constants import c
from astropy.coordinates import (
FK5,
GCRS,
ICRS,
CartesianDifferential,
CartesianRepresentation,
Ea... |
0b269b41e1bfe0307f90c12b73621bec5798ee5506111d8174b9cb4f21019c43 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import operator
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import (
CartesianDifferential,
CartesianRepresentation,
CylindricalDifferential,
CylindricalRepresentation,
Latitude,
Longi... |
8409dd79cb804c1678c3fd09d464195e367cc07926b0ab6b03d35dc5ca859337 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
import erfa
import numpy as np
import pytest
from numpy import testing as npt
from astropy import units as u
from astropy.coordinates import EarthLocation, SkyCoord
from astropy.coordinates.angle_utilities import golden_spiral_grid
from ... |
1653ea77c2df794a378f2acaa26112fdb4ca9b39f58d6f8882e8fcf2a5fad441 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test replacements for ERFA functions atciqz and aticq."""
import erfa
import pytest
import astropy.units as u
from astropy.coordinates import SphericalRepresentation
from astropy.coordinates.builtin_frames.utils import atciqz, aticq, get_jd12
from as... |
88bd9c97707dad3060027827573eaa285b8c01412e0bc74d35de3671206b9e13 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
from astropy import units as u
from astropy.coordinates.matrix_utilities import (
angle_axis,
is_O3,
is_rotation,
matrix_product,
rotation_m... |
67cb212b6434d7876d6e99ad4aeac5df10aea6f7295848460c1a3cc5c1ce8bc9 | import numpy as np
import pytest
import astropy.units as u
from astropy.coordinates import CIRS, GCRS, AltAz, EarthLocation, SkyCoord
from astropy.coordinates.erfa_astrom import (
ErfaAstrom,
ErfaAstromInterpolator,
erfa_astrom,
)
from astropy.time import Time
from astropy.utils.exceptions import AstropyWa... |
1db9f58acabf206959f199e5145f720beb1300b1d74fb8b88dcf18d9eaa0df1b | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Regression tests for coordinates-related bugs that don't have an obvious other
place to live
"""
import copy
import io
from contextlib import nullcontext
import numpy as np
import pytest
from erfa import ErfaWarning
from astropy import units as u
f... |
2e9ba76755aea0be2d20fffe84e4ea4431dfe3fe62bed9d45678f46f3300e9ae | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from numpy import testing as npt
from astropy import units as u
from astropy.coordinates import matching
from astropy.tests.helper import assert_quantity_allclose as assert_allclose
from astropy.utils.compat.optional_deps... |
c4b7b45f098a3b0dcf0a5fa9ca7ed03674db8ec121e4dd874babd3704b9aae67 | """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.shape:
... |
bfe18fa4e59787bf063b0d585c84da7a91add263e4dbe12f5c02f26f9b2711f9 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from contextlib import ExitStack
import numpy as np
import pytest
from numpy import testing as npt
from astropy import units as u
from astropy.coordinates import (
FK4,
FK5,
ICRS,
Angle,
CartesianRepresentation,
Galactic,
SkyC... |
0ac2c23ee06a4fa13fc6fe1603da5a89653ed2c16262c599b777915cd0f7f8be | # These are no-regression tests for PR #13572
import numpy as np
import pytest
from numpy.testing import assert_allclose
import astropy.units as u
from astropy.coordinates import earth_orientation
from astropy.time import Time
@pytest.fixture
def tt_to_test():
return Time("2022-08-25", scale="tt")
@pytest.mar... |
347948aab4f52eabb0a48f2d6efb4ae1134945bb0a13bcfc033f92fd3177a9bf | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from copy import deepcopy
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
from astropy import units as u
from astropy.coordinates.angles import Angle, Latitude, Longitude
from astropy.coordinates.distances ... |
31805c1b0ec0779fde8f426ecead3502ec305fc916b2b1b2980a84d933e2293b | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Accuracy tests for GCRS coordinate transformations, primarily to/from AltAz.
"""
import os
import warnings
from importlib import metadata
import erfa
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import (
... |
6ee0ebb449efa672bbffc295166c860e846d1d9e347cd5894fdb3d8f513428a7 | import pytest
from astropy import units as u
from astropy.coordinates import EarthLocation, Latitude, Longitude
from astropy.coordinates.sites import (
SiteRegistry,
get_builtin_sites,
get_downloaded_sites,
)
from astropy.tests.helper import assert_quantity_allclose
from astropy.units import allclose as qu... |
3a51b5fe2b4a6f238fcf30fe1d37c0bfbb0e879ec681c152424dd1d36e6642cd | """Unit tests for the astropy.coordinates.angle_utilities module"""
import pytest
import astropy.units as u
from astropy.coordinates.angle_utilities import (
golden_spiral_grid,
uniform_spherical_random_surface,
uniform_spherical_random_volume,
)
from astropy.utils import NumpyRNGContext
def test_golden... |
f84adee47e51ddebacac5f366db63eb0f57c91efc34617929db033eeb1d06433 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for miscellaneous functionality in the `funcs` module
"""
import numpy as np
import pytest
from numpy import testing as npt
from astropy import units as u
from astropy.time import Time
def test_sun():
"""
Test that `get_sun` works a... |
0e1c456ddcd2238684df9bd55b32b8276911a0c1e2ff56f00e886b15097a7639 | # 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 numpy as np
import numpy.testing as npt
import pytest
from erfa import ErfaWarning
from astropy import units... |
8a83c5d9d9c6615c7109b13ead211424713fb2d442026a9f881aecc4e65b71ad | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This includes tests for the Distance class and related calculations
"""
import numpy as np
import pytest
from numpy import testing as npt
from astropy import units as u
from astropy.coordinates import CartesianRepresentation, Distance, Latitude, Long... |
f3f1a93d5b6a0091e8daab92dd8a0c5db5b077c2ee0f6602b67dd956eb93caa1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test initialization of angles not already covered by the API tests"""
import pickle
import numpy as np
import pytest
from astropy import constants
from astropy import units as u
from astropy.coordinates.angles import Latitude, Longitude
from astropy... |
8b49de5c61f29fd578415bdc7832158fcae878710832a4c1a3dac68c9aa974e2 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from astropy import constants
from astropy import units as u
from astropy.coordinates import (
CartesianDifferential,
CartesianRepresentation,
DynamicMatrixTransform,
FunctionTransformWithFiniteDifference... |
f181052344efd6cd99c9f5314b52d2aae1bd0479c85aa6f9be5ea851e915dee1 | """
This series of functions are used to generate the reference CSV files
used by the accuracy tests. Running this as a command-line script will
generate them all.
"""
import os
import numpy as np
from astropy.table import Column, Table
def ref_fk4_no_e_fk4(fnout="fk4_no_e_fk4.csv"):
"""
Accuracy tests fo... |
8917bd049682941f30087a6c9240e19766db2c7f0d5524a87e74a134c8cb238c | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.coordinates.angle_utilities import angular_separation
from astropy.coordinates.builtin_frames import FK4, Galactic
from astropy.table import Table
from astropy.time import Time
from astropy.... |
0523897b65dac53eeccaa37224f590966dc0f11298c0a73723990482e7234d48 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.coordinates.angle_utilities import angular_separation
from astropy.coordinates.builtin_frames import FK5, ICRS
from astropy.table import Table
from astropy.time import Time
from astropy.util... |
5c31f60b85b896cb187916d89b7c15818c0b57a00ca1462b39a2773a1b7b01f0 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.coordinates.angle_utilities import angular_separation
from astropy.coordinates.builtin_frames import FK5, FK4NoETerms
from astropy.table import Table
from astropy.time import Time
from astro... |
94fe2ea0eb14b0af755d4d0748c49242f4ba5889a418be5c9d6f8d09e2f2f95c | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.coordinates.angle_utilities import angular_separation
from astropy.coordinates.builtin_frames import FK4, FK4NoETerms
from astropy.table import Table
from astropy.time import Time
from astro... |
09c038984679f0952d2d229ace292f5c72b3ca82e8b28d94f255d5128baa2969 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Accuracy tests for Ecliptic coordinate systems.
"""
import numpy as np
import pytest
from astropy import units as u
from astropy.constants import R_earth, R_sun
from astropy.coordinates import SkyCoord
from astropy.coordinates.builtin_frames import (... |
88a9fcee8908f4c8e78c63725a73b91112a8c0d7ea94192cc4daa7577da44346 | # Script to generate random targets, observatory locations, and times, and
# run these using the Starlink rv command to generate reference values for the
# velocity frame corrections. This requires that Starlink is installed and that
# the rv command is in your PATH. More information about Starlink can be found
# at ht... |
9f9ee24c1a02f5daf314614509fe616420840e0a5f4ff64c7fea05a557e44d18 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Accuracy tests for AltAz to ICRS coordinate transformations.
We use "known good" examples computed with other coordinate libraries.
"""
import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import Angle, EarthLocati... |
86953b50128903247995f23bc62fda1084f8d4d6649a7d5ae14c3a701435d43a | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import errno
import gzip
import http.client
import io
import mmap
import operator
import os
import re
import sys
import tempfile
import warnings
import zipfile
from functools import reduce
import numpy as np
# NOTE: Python can be built without bz2.
from ... |
5efd00ff03e84dd1e757fabd4c4a72bb13404ac3e93d2a5cc1ae80c9677e796c | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import re
import warnings
from copy import deepcopy
import numpy as np
from astropy import units as u
from astropy.io import registry as io_registry
from astropy.table import Column, MaskedColumn, Table, meta, serialize
from astropy.time impo... |
38a42a398128612b7af074e58e217d4df4e67fa24b0b0ed505547612fc6544dc | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Facilities for diffing two FITS files. Includes objects for diffing entire
FITS files, individual HDUs, FITS headers, or just FITS data.
Used to implement the fitsdiff program.
"""
import fnmatch
import glob
import io
import operator
import os
import... |
7df812a5f9bd2da831dd3e59859006a3c6a0f4deb38f726ba680dd9de9f92705 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
"""
A package for reading and writing FITS files and manipulating their
contents.
A module for reading and writing Flexible Image Transport System
(FITS) files. This file format was endorsed by the International
Astronomical Union in 1999 and mandated by... |
22bcc445ebd2e9d04a67c7c7feff42a26aec23176ddb6430a13987171f49be25 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import copy
import numbers
import operator
import re
import sys
import warnings
import weakref
from collections import OrderedDict
from contextlib import suppress
from functools import reduce
import numpy as np
from numpy import char as chararray
from as... |
fd12ce03c5aac99c92a96726f864a339b224986b951fa4d3f3056a78a3921d66 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import collections
import copy
import itertools
import numbers
import os
import re
import warnings
from astropy.utils import isiterable
from astropy.utils.exceptions import AstropyUserWarning
from ._utils import parse_header
from .card import KEYWORD_LEN... |
b196a528c3287ad7505e95e7a58c68dbba2a7d46ded173723bf41f330ae02c1a | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import copy
import operator
import warnings
import weakref
from contextlib import suppress
from functools import reduce
import numpy as np
from numpy import char as chararray
from astropy.utils import lazyproperty
from .column import (
_VLF,
ASC... |
e790ca2dc158b7b9fac25a32f64e3fdfab43fa1029c23a2af030af0143cff576 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import re
import warnings
from collections import OrderedDict, defaultdict
import numpy as np
from astropy import units as u
from astropy.coordinates import EarthLocation
from astropy.table import Column, MaskedColumn
from astropy.table.column import co... |
0ac99c35538d0497c9f496c0954493fc74f3ded4566598c4a327878ac59f4767 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
"""
Convenience functions
=====================
The functions in this module provide shortcuts for some of the most basic
operations on FITS files, such as reading and updating the header. They are
included directly in the 'astropy.io.fits' namespace so ... |
61882c397fb08d3c980b92680075815376189d0acef188a29818638cc582f5ba | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import os
import sys
from collections import defaultdict
from glob import glob
import numpy
from setuptools import Extension
from extension_helpers import get_compiler, pkg_config
def _get_compression_extension():
debug = "--debug" in sys.argv
... |
c6b4351e6749ba535f90b4f34eb20360cc8a698d45b688ed40f777d9649a6737 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import gzip
import io
import itertools
import mmap
import operator
import os
import platform
import signal
import sys
import tempfile
import textwrap
import threading
import warnings
import weakref
from contextlib import contextmanager, suppress
from funct... |
7d77010fc8f19bea4e1bdda4437338f14afbf39d18972375390d6881ceccd467 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import re
import warnings
import numpy as np
from astropy.utils.exceptions import AstropyUserWarning
from . import conf
from .util import _is_int, _str_to_num, _words_group, translate
from .verify import VerifyError, VerifyWarning, _ErrList, _Verify
__... |
975bb92177daec43fee3424604551101d8f33099bf17d62aa5480d6e22001068 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import operator
import warnings
from astropy.utils import indent
from astropy.utils.exceptions import AstropyUserWarning
class VerifyError(Exception):
"""
Verify exception class.
"""
class VerifyWarning(AstropyUserWarning):
"""
Ver... |
009321e017d760acb663ef6c0bc33eb658e95c74cba305abb3236a86988206bb | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible ASCII table reader and writer.
cds.py:
Classes to read CDS / Vizier table format
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import fnmatch
import itertools
impor... |
66fead0239f39c4205ecc445ce6436d45d024b418b35d7dd5e5828e37ded555f | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible ASCII table reader and writer.
basic.py:
Basic table read / write functionality for simple character
delimited files with various options for column header definition.
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author:... |
fbfe2816a4f49d218bda91bdff4ff6ea44ed245698972fa09af533f843d0f2e1 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# This file connects the readers/writers to the astropy.table.Table class
import re
from astropy.io import registry as io_registry # noqa: F401
from astropy.table import Table
__all__ = []
def io_read(format, filename, **kwargs):
from .ui import... |
4f91f825d8d1c45faec232998a71dcde13e53a9d8598444df028310dd380558f | # Licensed under a 3-clause BSD style license - see LICENSE.rst
""" An extensible ASCII table reader and writer.
core.py:
Core base classes and functions for reading and writing tables.
:Copyright: Smithsonian Astrophysical Observatory (2010)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import copy
i... |
127d8823fd96ddadf3fc9ff0c0404c40a2fbfe8c802e9eb05da0366751c491d7 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
""" An extensible ASCII table reader and writer.
"""
# flake8: noqa
from . import connect
from .basic import (
Basic,
BasicData,
BasicHeader,
CommentedHeader,
Csv,
NoHeader,
Rdb,
Tab,
)
from .cds import Cds
from .core impo... |
0366009cdb3974b969ca04d8f385bae457bd0a2269bd2f430018b0476cfe9a65 | # Licensed under a 3-clause BSD style license
"""
:Author: Simon Gibbons (simongibbons@gmail.com)
"""
from .core import DefaultSplitter
from .fixedwidth import (
FixedWidth,
FixedWidthData,
FixedWidthHeader,
FixedWidthTwoLineDataSplitter,
)
class SimpleRSTHeader(FixedWidthHeader):
position_line ... |
fc9cfb1437081c2a32ed520f4bb7dafa4a543195b9a5959e98fa0b267a3f4ec2 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible ASCII table reader and writer.
fixedwidth.py:
Read or write a table with fixed width columns.
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
from . import basic, cor... |
ddde45dfd79b58687778bdaea1b8638044c9cd37efc2f67ffd81b2da8dc2db3a | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Classes to read AAS MRT table format
Ref: https://journals.aas.org/mrt-standards
:Copyright: Smithsonian Astrophysical Observatory (2021)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu), \
Suyog Garg (suyog7130@gmail.com)
"""
import re... |
a91e3abf645f61a6c8833726cfa26f7430f17fd1353542f8c917298f1eedf2b4 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible ASCII table reader and writer.
latex.py:
Classes to read and write LaTeX tables
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import re
from . import core
latexdi... |
b40276d51d0676049837261c45129b0ee32b885eb3c3f02d1a2855a0393f904e | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible ASCII table reader and writer.
ipac.py:
Classes to read IPAC table format
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import re
from collections import OrderedDic... |
8b2334d83733c4b5009eae70678c0b1e993107310ab5f53e0385b1b4307fa766 | # Licensed under a 3-clause BSD style license
import os
import numpy
from setuptools import Extension
ROOT = os.path.relpath(os.path.dirname(__file__))
def get_extensions():
sources = [
os.path.join(ROOT, "cparser.pyx"),
os.path.join(ROOT, "src", "tokenizer.c"),
]
ascii_ext = Extension(... |
11bfb79f381822f685f6d0fe79bb399ac09a460fa0cc706925fc1835221fa8d8 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible HTML table reader and writer.
html.py:
Classes to read and write HTML tables
`BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>`_
must be installed to read HTML tables.
"""
import warnings
from copy import deepcopy
from a... |
4424d701fe2d493795ee01655f33a076cda21b17f8baaca06ea6d96a77c3ecca | # Licensed under a 3-clause BSD style license - see LICENSE.rst
""" sextractor.py:
Classes to read SExtractor table format
Built on daophot.py:
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import re
from . import core
class SExtractorHeader(c... |
4cfd9432fb3758d8aee48d71855116e5056207f97b67d6b44d30ea9e993525a4 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This package contains functions for reading and writing QDP tables that are
not meant to be used directly, but instead are available as readers/writers in
`astropy.table`. See :ref:`astropy:table_io` for more details.
"""
import copy
import re
import w... |
b826a3586ac3280a64cf12627d1d1ac8a0797fc1bf6ad9fa40805ccabfa6293d | READ_DOCSTRING = """
Read the input ``table`` and return the table. Most of
the default behavior for various parameters is determined by the Reader
class.
See also:
- https://docs.astropy.org/en/stable/io/ascii/
- https://docs.astropy.org/en/stable/io/ascii/read.html
Parameters
-----... |
e2e111439c0486e842708fea75d1a05bc126577cfad4cdce1c547b53adfb7d6e | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible ASCII table reader and writer.
ui.py:
Provides the main user functions for reading and writing tables.
:Copyright: Smithsonian Astrophysical Observatory (2010)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import collecti... |
c5f60c1c49a39a8f6c1b42b31393677045270afa960802b24a25d4740938e83f | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import copy
import re
from collections import OrderedDict
from astropy.table import Table
from astropy.utils.misc import _set_locale
from . import core, cparser
class FastBasic(metaclass=core.MetaBaseReader):
"""
This class is intended to hand... |
0af387450af0f63a3b7df613877697466955f22cb9cfd221d090108aca5f9738 | """A Collection of useful miscellaneous functions.
misc.py:
Collection of useful miscellaneous functions.
:Author: Hannes Breytenbach (hannes@saao.ac.za)
"""
import collections.abc
import itertools
import operator
def first_true_index(iterable, pred=None, default=None):
"""find the first index position for ... |
3c1f7bb52b18f939c25f063de25c70b4aa05c76d31fe7bfde8806676983be154 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
An extensible ASCII table reader and writer.
Classes to read DAOphot table format
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import itertools as itt
import re
from collections ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.