ascl_id stringclasses 752
values | repo_url stringclasses 737
values | file_path stringlengths 4 194 | content large_stringlengths 1 1M | language stringclasses 29
values | license_type stringclasses 24
values | size int64 1 1M |
|---|---|---|---|---|---|---|
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/EOS_Barotropic/include/eos_barotr_gpoly.h | #ifndef EOS_BAROTR_GPOLY_H
#define EOS_BAROTR_GPOLY_H
#include "eos_barotropic.h"
#include <vector>
namespace EOS_Toolkit {
eos_barotr make_eos_barotr_gpoly(
real_t n_, ///<Adiabatic index \f$ n \f$
real_t rmd_p_, ///<Density scale \f$ \rho_p \f$
real_t sed0_, ... | C/C++ Header | Unknown | 533 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/EOS_Barotropic/include/eos_barotropic_impl.h | #ifndef EOS_BAROTROPIC_IMPL_H
#define EOS_BAROTROPIC_IMPL_H
#include "config.h"
#include "intervals.h"
#include "unitconv.h"
#include "datastore.h"
namespace EOS_Toolkit {
namespace implementations {
///Abstract interface for barotropic equation of state implementations.
class eos_barotr_impl {
units eos_units;
... | C/C++ Header | Unknown | 3,875 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/EOS_Thermal_Hybrid/include/eos_hybrid.h | #ifndef EOSHYBRID_H
#define EOSHYBRID_H
#include "eos_barotropic.h"
#include "eos_thermal.h"
namespace EOS_Toolkit {
/**\brief Create Hybrid EOS
The parameters are w.r.t EOS units. The EOS units are taken from
the cold EOS and stored for bookkeeping.
@return eos_thermal object representing the hybrid EOS
@param eo... | C/C++ Header | Unknown | 871 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/EOS_Thermal_Hybrid/include/eos_hybrid_impl.h | #ifndef EOSHYBRID_IMPL_H
#define EOSHYBRID_IMPL_H
#include "eos_barotropic.h"
#include "eos_thermal_impl.h"
namespace EOS_Toolkit {
namespace implementations {
class eos_hybrid : public eos_thermal_impl {
eos_barotr eos_c;
const real_t gamma_th, gm1_th, eps_max;
const range rgrho; ///< Valid range for densit... | C/C++ Header | Unknown | 3,786 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/tov_ode.h | #ifndef TOV_ODE_H
#define TOV_ODE_H
#include <vector>
#include "config.h"
#include "eos_barotropic.h"
#include "spherical_stars.h"
namespace EOS_Toolkit {
class tov_ode {
const eos_barotr eos;
real_t gm1_center;
real_t hm1_center;
const real_t rho_center;
real_t eps_center;
real_t edens_center;
real_t ... | C/C++ Header | Unknown | 2,924 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/tov_seqs_impl.h | #ifndef TOV_SEQS_IMPL_H
#define TOV_SEQS_IMPL_H
#include <memory>
#include <vector>
#include <cassert>
#include "star_sequence.h"
#include "interpol.h"
#include "unitconv.h"
#include "datastore.h"
namespace EOS_Toolkit {
namespace detail {
class star_seq_impl {
public:
using spline_t = interpolator;
usi... | C/C++ Header | Unknown | 2,989 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/integration.h | #ifndef INTEGRATION_H
#define INTEGRATION_H
#include <vector>
#include <cassert>
namespace EOS_Toolkit {
template<class C>
auto integ_forw3(const C x1, const C x2, const C x3,
const C y1, const C y2, const C y3) -> C
{
C h12{ x1-x2 };
C h23{ x2-x3 };
C h13{ x1-x3 };
assert((h12 < 0) && (h2... | C/C++ Header | Unknown | 1,506 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/solve_ode.h | #ifndef SOLVE_ODE_H
#define SOLVE_ODE_H
#include <algorithm>
#include <functional>
#include <cmath>
#include <cassert>
#include <boost/numeric/odeint.hpp>
namespace EOS_Toolkit {
template<class ODE>
class collecting_observer {
public:
using state_t = typename ODE::state_t;
using value_t = typename state_t::... | C/C++ Header | Unknown | 4,081 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/tidal_deform_ode.h | #ifndef TIDAL_DEFORM_ODE_H
#define TIDAL_DEFORM_ODE_H
#include <vector>
#include "config.h"
#include "interpol.h"
#include "tov_ode.h"
#include "spherical_stars.h"
namespace EOS_Toolkit {
class tidal_ode {
const eos_barotr eos;
const real_t gm1_center;
const real_t rho_start;
const real_t rho_stop;
in... | C/C++ Header | Unknown | 2,672 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/spherical_stars_internals.h | #ifndef SPHERICAL_STARS_INTERNALS_H
#define SPHERICAL_STARS_INTERNALS_H
#include "spherical_stars.h"
#include "tov_ode.h"
#include "interpol.h"
namespace EOS_Toolkit {
namespace details {
class tov_profile : public spherical_star_profile {
const interpolator lambda_rsqr;
const interpolator delta_nu_rsqr;
... | C/C++ Header | Unknown | 4,454 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/include/spherical_stars.h | #ifndef SPHERICAL_STARS_H
#define SPHERICAL_STARS_H
#include <memory>
#include <boost/optional.hpp>
#include "config.h"
#include "eos_barotropic.h"
namespace EOS_Toolkit {
/// Spherical star tidal deformability measures
struct spherical_star_tidal {
real_t k2; ///< Love number \f$ k_2 \f$ (dimensionless)
real... | C/C++ Header | Unknown | 16,757 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/include/star_seq_file.h | #ifndef STAR_SEQ_FILE_H
#define STAR_SEQ_FILE_H
#include "star_sequence.h"
#include "unitconv.h"
#include "datastore.h"
#include <string>
namespace EOS_Toolkit {
/**\brief Load NS sequence from file.
@param fname File name of sequence file
@param Unit system the returned sequence should use. The unit system needs... | C/C++ Header | Unknown | 1,910 |
[ascl:2107.021] | https://github.com/wokast/RePrimAnd | library/NeutronStar/TOV/include/star_sequence.h | #ifndef STAR_SEQUENCE_H
#define STAR_SEQUENCE_H
#include <memory>
#include <vector>
#include <cassert>
#include <functional>
#include <boost/optional.hpp>
#include "config.h"
#include "intervals.h"
#include "spherical_stars.h"
#include "eos_barotropic.h"
#include "datastore.h"
namespace EOS_Toolkit {
namespace det... | C/C++ Header | Unknown | 17,098 |
[ascl:2011.023] | https://github.com/astropy/reproject | .readthedocs.yaml | version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- graphviz
sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true
python:
install:
- method: pip
extra_requirements:
- docs
path: .
| YAML | BSD | 272 |
[ascl:2011.023] | https://github.com/astropy/reproject | .pre-commit-config.yaml | repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: ".*(data.*|extern.*|licenses.*|.*.fits)$"
- id: trailing... | YAML | BSD | 2,915 |
[ascl:2011.023] | https://github.com/astropy/reproject | CHANGES.md | ## v0.19.0 - 2025-11-14
<!-- Release notes generated using configuration in .github/release.yml at main -->
### What's Changed
#### New Features
* Add a way to do reprojection without dumping dask arrays to memory maps and switch default for reproject_interp to not write to memory maps by @astrofrog in https://githu... | Markdown | BSD | 22,912 |
[ascl:2011.023] | https://github.com/astropy/reproject | pyproject.toml | [project]
name = "reproject"
authors = [
{name = "Thomas Robitaille"},
{name = "Christoph Deil"},
{name = "Adam Ginsburg"},
{name = "Stuart Mumford"},
{name = "Sam Van Kooten"}
]
license = {text = "BSD 3-Clause"}
description = "Reproject astronomical images"
urls = {Homepage = "https://reproject.rea... | TOML | BSD | 5,419 |
[ascl:2011.023] | https://github.com/astropy/reproject | RELEASE_INSTRUCTIONS.md | Making a New Reproject Release
==============================
A new release of reproject is almost fully automated.
As a maintainer it should be nice and simple to do, especially if all merged PRs
have nice titles and are correctly labelled.
Here is the process to follow to make a new release:
* Go through all the P... | Markdown | BSD | 967 |
[ascl:2011.023] | https://github.com/astropy/reproject | README.rst | |Docs| |PyPI| |Build Status| |CI Status| |Coverage Status| |Powered by Astropy Badge|
About
=====
The `reproject` package is a Python package to reproject astronomical
images using various techniques via a uniform interface. By
*reprojection*, we mean the re-gridding of images from one world
coordinate system to anot... | reStructuredText | BSD | 2,077 |
[ascl:2011.023] | https://github.com/astropy/reproject | tox.ini | [tox]
envlist =
py{311,312,313}-{test}{,-oldestdeps,-numpy121}
build_docs
codestyle
isolated_build = True
[testenv]
whitelist_externals =
geos-config
passenv =
SSL_CERT_FILE
setenv =
HOME = {envtmpdir}
MPLBACKEND = Agg
PYTEST_COMMAND = pytest --arraydiff --arraydiff-default-format=fits ... | Config | BSD | 2,825 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Astropy affiliated package for image reprojection (resampling).
"""
from .adaptive import reproject_adaptive # noqa
from .healpix import reproject_from_healpix, reproject_to_healpix # noqa
from .interpolation import reproject_interp # noqa
from .sp... | Python | BSD | 410 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/wcs_utils.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Backward-compatibility shim. The wcs_utils module is now private.
Import from reproject directly or use reproject._wcs_utils.
"""
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.wcs_utils ... | Python | BSD | 545 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/_array_utils.py | import numpy as np
from dask_image.ndinterp import map_coordinates as dask_image_map_coordinates
from dask_image.ndinterp import spline_filter
from scipy.ndimage import spline_filter as scipy_spline_filter
__all__ = ["map_coordinates", "dask_map_coordinates", "sample_array_edges", "ArrayWrapper"]
def find_chunk_shap... | Python | BSD | 10,260 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/conftest.py | # This file is used to configure the behavior of pytest when using the Astropy
# test infrastructure. It needs to live inside the package in order for it to
# get picked up when running the tests inside an interpreter using
# packagename.test
import os
from pathlib import Path
import dask.array as da
import numpy as ... | Python | BSD | 10,118 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/_wcs_utils.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
WCS-related utilities
"""
import numpy as np
from astropy.coordinates import SkyCoord, SpectralCoord
from astropy.wcs import WCS
from astropy.wcs.utils import pixel_to_pixel, proj_plane_pixel_scales
__all__ = ["has_celestial", "pixel_to_pixel_with_r... | Python | BSD | 2,598 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/utils.py | import os
import tempfile
import uuid
from pathlib import Path
import astropy.nddata
import dask.array as da
import numpy as np
from astropy.io import fits
from astropy.io.fits import CompImageHDU, HDUList, Header, ImageHDU, PrimaryHDU
from astropy.wcs import WCS
from astropy.wcs.wcsapi import BaseHighLevelWCS, BaseLo... | Python | BSD | 13,267 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/array_utils.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Backward-compatibility shim. The array_utils module is now private.
Import from reproject directly or use reproject._array_utils.
"""
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.array_... | Python | BSD | 553 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/common.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Backward-compatibility shim. The common module is now private.
Import from reproject directly or use reproject._common.
"""
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.common is a priv... | Python | BSD | 533 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/_common.py | import logging
import os
import tempfile
import uuid
import dask
import dask.array as da
import numpy as np
from astropy.wcs import WCS
from astropy.wcs.wcsapi import BaseHighLevelWCS, SlicedLowLevelWCS
from astropy.wcs.wcsapi.high_level_wcs_wrapper import HighLevelWCSWrapper
from dask import delayed
from ._array_uti... | Python | BSD | 19,988 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/overlap.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.spherical_intersect.overlap is a private module and will be removed in a future "
"version. Please use the public API from reproject.spheric... | Python | BSD | 454 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.spherical_intersect.core is a private module and will be removed in a future "
"version. Please use the public API from reproject.spherical_... | Python | BSD | 440 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/overlapArea.h | #ifndef OVERLAP_AREA
#define OVERLAP_AREA
double computeOverlap(double *ilon, double *ilat, double *olon, double *olat,
int energyMode, double refArea, double *areaRatio);
#endif
| C/C++ Header | BSD | 203 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Routines to compute pixel overlap areas.
"""
from ._high_level import * # noqa
| Python | BSD | 149 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.spherical_intersect.high_level is a private module and will be removed in a future "
"version. Please use the public API from reproject.sphe... | Python | BSD | 452 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/_overlap_wrapper.py | import numpy as np
from ._overlap import _compute_overlap
__all__ = ["compute_overlap"]
def compute_overlap(ilon, ilat, olon, olat):
"""Compute the overlap between two 'pixels' in spherical coordinates.
Parameters
----------
ilon : np.ndarray with shape (N, 4)
The longitudes (in radians) de... | Python | BSD | 1,174 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/_core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
import numpy as np
from astropy import units as u
from astropy.wcs import WCS
from astropy.wcs.utils import proj_plane_pixel_area
from ._overlap import _reproject_slice_cython
def _reproject_celestial(
array,
wcs_in,
wcs_ou... | Python | BSD | 6,157 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/setup_package.py | import os
import numpy as np
from setuptools import Extension
REPROJECT_ROOT = os.path.relpath(os.path.dirname(__file__))
def get_extensions():
libraries = []
sources = []
sources.append(os.path.join(REPROJECT_ROOT, "_overlap.pyx"))
sources.append(os.path.join(REPROJECT_ROOT, "overlapArea.c"))
... | Python | BSD | 1,096 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/reproject_slice_c.h | #ifndef REPROJECT_SLICE_C_H
#define REPROJECT_SLICE_C_H
void _reproject_slice_c(int startx, int endx, int starty, int endy, int nx_out, int ny_out,
double *xp_inout, double *yp_inout, double *xw_in, double *yw_in, double *xw_out, double *yw_out,
double *array, double *array_new, double *weights,
int col_in... | C/C++ Header | BSD | 372 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/overlapArea.c | /* Methods to compute pixel overlap areas on the sphere.
*
* Originally developed in 2003 / 2004 by John Good.
*/
#include <stdio.h>
#if defined(_MSC_VER)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#include "mNaN.h"
#include "overlapArea.h"
// Constants
#define FALSE 0
#define TRUE ... | C | BSD | 32,116 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/_high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .._common import _reproject_dispatcher
from .._wcs_utils import has_celestial
from ..utils import parse_input_data, parse_output_projection
from ._core import _reproject_celestial
__all__ = ["reproject_exact"]
def reproject_exact(
input_data,
... | Python | BSD | 6,461 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/reproject_slice_c.c | #include "overlapArea.h"
#include "reproject_slice_c.h"
#if defined(_MSC_VER)
#define INLINE _inline
#else
#define INLINE inline
#endif
static INLINE double min_4(const double *ptr)
{
double retval = ptr[0];
int i;
for (i = 1; i < 4; ++i) {
if (ptr[i] < retval) {
retval = ptr[i];
... | C | BSD | 4,641 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/overlapAreaPP.c | /* Methods to compute pixel overlap areas in the plane.
*
* Originally developed in 2003 / 2004 by John Good.
*/
#include <math.h>
double computeOverlapPP(double *ix, double *iy, double minX, double maxX,
double minY, double maxY, double pixelArea);
double polyArea(int npts, double *nx, do... | C | BSD | 4,509 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/mNaN.h | #ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#include <math.h>
#if defined(_MSC_VER)
#define mNaN(x) _isnan(x) || !_finite(x)
#else
#define mNaN(x) isnan(x) || !isfinite(x)
#endif
| C/C++ Header | BSD | 188 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/tests/test_overlap.py | from itertools import product
import numpy as np
import pytest
from .._overlap_wrapper import compute_overlap
def test_full_overlap():
EPS = np.radians(1e-2)
lon, lat = np.array([[0, EPS, EPS, 0]]), np.array([[0, 0, EPS, EPS]])
overlap, area_ratio = compute_overlap(lon, lat, lon, lat)
np.testing.ass... | Python | BSD | 1,665 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/tests/test_high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from numpy.testing import assert_allclose
from .._high_level import reproject_exact
class Tes... | Python | BSD | 8,950 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/spherical_intersect/tests/test_reproject.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from ...interpolation.tests.test_core import as_high_level_wcs
from .._core import _reproject_celestial
def te... | Python | BSD | 8,594 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/interpolation/core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.interpolation.core is a private module and will be removed in a future "
"version. Please use the public API from reproject.interpolation in... | Python | BSD | 428 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/interpolation/_core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import dask.array as da
import numpy as np
from astropy.wcs import WCS
from astropy.wcs.utils import pixel_to_pixel
from .._array_utils import dask_map_coordinates, map_coordinates
from .._wcs_utils import has_celestial, pixel_to_pixel_with_roundtrip
d... | Python | BSD | 6,196 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/interpolation/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Routines to carry out reprojection by interpolation.
"""
from ._high_level import * # noqa
| Python | BSD | 161 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/interpolation/high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.interpolation.high_level is a private module and will be removed in a future "
"version. Please use the public API from reproject.interpolat... | Python | BSD | 440 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/interpolation/_high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .._common import _reproject_dispatcher
from ..utils import parse_input_data, parse_output_projection
from ._core import _reproject_full
__all__ = ["reproject_interp"]
ORDER = {}
ORDER["nearest-neighbor"] = 0
ORDER["bilinear"] = 1
ORDER["biquadrati... | Python | BSD | 6,611 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/interpolation/tests/test_core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import itertools
import dask.array as da
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from astropy.wcs.wcs import FITSFixedWarning
from astropy.wcs.wcsapi im... | Python | BSD | 38,198 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.hips.high_level is a private module and will be removed in a future "
"version. Please use the public API from reproject.hips instead.",
... | Python | BSD | 422 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/_dask_array.py | import functools
import os
import urllib
import uuid
import numpy as np
from astropy import units as u
from astropy.coordinates import SpectralCoord
from astropy.io import fits
from astropy.utils.data import download_file
from astropy.wcs import WCS
from astropy_healpix import HEALPix, level_to_nside
from dask import ... | Python | BSD | 8,029 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/_utils.py | import os
import urllib
from numbers import Number
from pathlib import Path
import numpy as np
from astropy import units as u
from astropy.coordinates import SkyCoord, SpectralCoord
from astropy.wcs.utils import celestial_frame_to_wcs
from astropy_healpix import (
HEALPix,
level_to_nside,
)
__all__ = [
"m... | Python | BSD | 10,726 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/__init__.py | from ._high_level import * # noqa
from ._dask_array import hips_as_dask_array # noqa
| Python | BSD | 87 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/utils.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.hips.utils is a private module and will be removed in a future "
"version. Please use the public API from reproject.hips instead.",
Astr... | Python | BSD | 412 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/_trim_utils.py | import numpy as np
from astropy.io import fits
__all__ = ["fits_writeto_withtrim", "fits_getdata_untrimmed"]
def fits_writeto_withtrim(filename, array, header, **kwargs):
if array.ndim == 3:
mask = ~np.isnan(array)
slices = []
for axis in range(3):
mask_1d = np.any(mask, ax... | Python | BSD | 1,574 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/_high_level.py | import os
import shutil
import uuid
import warnings
from concurrent.futures import ThreadPoolExecutor
from copy import deepcopy
from datetime import datetime
from itertools import product
from logging import getLogger
from pathlib import Path
import numpy as np
from astropy import units as u
from astropy.coordinates i... | Python | BSD | 27,252 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/tests/test_dask_array.py | import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from reproject import reproject_interp
from reproject.hips import reproject_to_hips
from reproject.hips._dask_array import hips_as_dask_array
class TestHIPSDaskArray:
def... | Python | BSD | 6,478 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/hips/tests/test_high_level.py | import re
from math import prod
import numpy as np
import pytest
from astropy.io.fits import Header
from astropy.wcs import WCS
from PIL import Image
from pyavm import AVM
from ... import reproject_interp
from .._high_level import reproject_to_hips
EXPECTED_FILES = [
"Norder0/Dir0/Npix0.fits",
"Norder1/Dir0/... | Python | BSD | 9,948 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/adaptive/core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.adaptive.core is a private module and will be removed in a future "
"version. Please use the public API from reproject.adaptive instead.",
... | Python | BSD | 418 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/adaptive/_high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from .._common import _reproject_dispatcher
from ..utils import parse_input_data, parse_output_projection
from ._core import _reproject_adaptive_2d
__all__ = ["reproject_adaptive"]
def reproject_adaptive(
input_data,
output_projection,
shap... | Python | BSD | 14,079 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/adaptive/high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.adaptive.high_level is a private module and will be removed in a future "
"version. Please use the public API from reproject.adaptive instea... | Python | BSD | 430 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/adaptive/_core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy.wcs.utils import pixel_to_pixel
from .._wcs_utils import pixel_to_pixel_with_roundtrip
from .deforest import map_coordinates
__all__ = ["_reproject_adaptive_2d"]
class CoordinateTransformer:
def __init__(self, wcs_i... | Python | BSD | 7,668 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/adaptive/__init__.py | from ._high_level import reproject_adaptive # noqa
| Python | BSD | 52 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/adaptive/tests/test_core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from itertools import product
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from astropy.wcs.wcsapi import HighLevelWCSWrapper, SlicedLowLevelWCS
from numpy.t... | Python | BSD | 38,015 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/coadd.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.mosaicking.coadd is a private module and will be removed in a future "
"version. Please use the public API from reproject.mosaicking instead... | Python | BSD | 424 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/subset_array.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.mosaicking.subset_array is a private module and will be removed in a future "
"version. Please use the public API from reproject.mosaicking ... | Python | BSD | 438 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/_subset_array.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import operator
__all__ = ["ReprojectedArraySubset"]
class ReprojectedArraySubset:
# The aim of this class is to represent a subset of an array and
# footprint extracted (or meant to represent extracted) versions
# from larger arrays and fo... | Python | BSD | 3,562 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/_coadd.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import sys
import tempfile
import uuid
from logging import getLogger
import numpy as np
from astropy.wcs import WCS
from astropy.wcs.utils import pixel_to_pixel
from astropy.wcs.wcsapi import SlicedLowLevelWCS
from .._array_utils import iterate... | Python | BSD | 21,946 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/background.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.mosaicking.background is a private module and will be removed in a future "
"version. Please use the public API from reproject.mosaicking in... | Python | BSD | 434 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/_background.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from math import exp
import numpy as np
__all__ = ["solve_corrections_sgd", "determine_offset_matrix"]
def determine_offset_matrix(arrays):
"""
Given a list of ReprojectedArraySubset, determine the offset
matrix between all arrays.
Pa... | Python | BSD | 4,874 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/_wcs_helpers.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
import numpy as np
from astropy import units as u
from astropy.coordinates import SkyCoord, frame_transform_graph
from astropy.io.fits import Header
from astropy.wcs import WCS
from astropy.wcs.utils import (
celestial_frame_to_wcs,
... | Python | BSD | 12,956 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/__init__.py | from ._coadd import * # noqa
from ._wcs_helpers import * # noqa
| Python | BSD | 66 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/wcs_helpers.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.mosaicking.wcs_helpers is a private module and will be removed in a future "
"version. Please use the public API from reproject.mosaicking i... | Python | BSD | 436 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/tests/test_wcs_helpers.py | # 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 FK5, Galactic, SkyCoord
from astropy.io import fits
from astropy.wcs import WCS
from astropy.wcs.wcsapi import BaseHighLevelWCS, BaseLowLevelWCS, HighLevelWCSW... | Python | BSD | 14,111 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/tests/test_subset_array.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import operator
import numpy as np
import pytest
from numpy.testing import assert_equal
from .._subset_array import ReprojectedArraySubset
class TestReprojectedArraySubset:
def setup_method(self, method):
self.array1 = np.random.random((12... | Python | BSD | 3,350 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/tests/test_coadd.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import random
import numpy as np
import pytest
from astropy.io import fits
from astropy.io.fits import Header
from astropy.wcs import WCS
from numpy.testing import assert_allclose
from reproject import reproject_exact, reproject_interp
from re... | Python | BSD | 17,907 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/mosaicking/tests/test_background.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
import pytest
from numpy.testing import assert_allclose
from .._background import solve_corrections_sgd
# Try and cover a range of matrix sizes and absolute scales of corrections
CASES = [(4, 1.0), (33, 1e30), (44, 1e-50), (132, 1e10)... | Python | BSD | 923 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/tests/helpers.py | from astropy.io import fits
from astropy.wcs import WCS
from numpy.testing import assert_allclose
from reproject.conftest import TestLowLevelWCS
def array_footprint_to_hdulist(array, footprint, header):
hdulist = fits.HDUList()
hdulist.append(fits.PrimaryHDU(array, header))
hdulist.append(fits.ImageHDU(f... | Python | BSD | 1,387 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/tests/test_high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import itertools
import os
from copy import deepcopy
import numpy as np
import pytest
from astropy import units as u
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from .. import reproject_ad... | Python | BSD | 11,783 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/tests/test_array_utils.py | import numpy as np
import pytest
from numpy.testing import assert_allclose
from scipy.ndimage import map_coordinates as scipy_map_coordinates
from reproject._array_utils import dask_map_coordinates, map_coordinates
@pytest.mark.parametrize("cval", [3, np.nan])
@pytest.mark.parametrize("shape", [(3, 4), (30, 40), (3,... | Python | BSD | 1,517 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/tests/test_utils.py | import dask.array as da
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from astropy.wcs import WCS
from reproject._wcs_utils import has_celestial
from reproject.conftest import set_wcs_array_shape
from reproject.tests.helpers import assert_wcs_allclose... | Python | BSD | 5,036 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/tests/data/generate_asdf.py | from collections.abc import Iterable
import astropy.modeling.models as m
import astropy.units as u
import gwcs.coordinate_frames as cf
from astropy.modeling import CompoundModel, Model
from gwcs import WCS
from numpy.typing import ArrayLike
def generate_celestial_transform(
crpix: Iterable[float] | u.Quantity,
... | Python | BSD | 3,650 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/_high_level.py | from .._wcs_utils import has_celestial
from ..utils import parse_input_data, parse_output_projection
from ._core import healpix_to_image, image_to_healpix
from ._utils import parse_coord_system, parse_input_healpix_data
__all__ = ["reproject_from_healpix", "reproject_to_healpix"]
def reproject_from_healpix(
inpu... | Python | BSD | 6,031 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.healpix.core is a private module and will be removed in a future "
"version. Please use the public API from reproject.healpix instead.",
... | Python | BSD | 416 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/_utils.py | import numpy as np
from astropy.coordinates import (
ICRS,
BaseCoordinateFrame,
Galactic,
frame_transform_graph,
)
from astropy.io import fits
from astropy.io.fits import BinTableHDU, TableHDU
FRAMES = {"g": Galactic(), "c": ICRS()}
def parse_coord_system(system):
if isinstance(system, BaseCoordi... | Python | BSD | 1,884 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/utils.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.healpix.utils is a private module and will be removed in a future "
"version. Please use the public API from reproject.healpix instead.",
... | Python | BSD | 418 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/high_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import warnings
from astropy.utils.exceptions import AstropyDeprecationWarning
warnings.warn(
"reproject.healpix.high_level is a private module and will be removed in a future "
"version. Please use the public API from reproject.healpix instead.... | Python | BSD | 428 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/_core.py | import numpy as np
from astropy.coordinates import SkyCoord
from astropy_healpix import HEALPix, npix_to_nside
from reproject._array_utils import map_coordinates
__all__ = ["healpix_to_image", "image_to_healpix"]
ORDER = {}
ORDER["nearest-neighbor"] = 0
ORDER["bilinear"] = 1
ORDER["biquadratic"] = 2
ORDER["bicubic"]... | Python | BSD | 5,066 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/__init__.py | from ._high_level import * # noqa
| Python | BSD | 35 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/tests/test_healpix.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import itertools
import os
import numpy as np
import pytest
from astropy.io import fits
from astropy.wcs import WCS
from astropy_healpix import nside_to_npix
from ...interpolation.tests.test_core import as_high_level_wcs
from ...tests.test_high_level im... | Python | BSD | 6,984 |
[ascl:2011.023] | https://github.com/astropy/reproject | reproject/healpix/tests/test_utils.py | import numpy as np
import pytest
from astropy.coordinates import FK5, Galactic
from astropy.io import fits
from reproject.healpix._utils import parse_coord_system, parse_input_healpix_data
def test_parse_coord_system():
frame = parse_coord_system(Galactic())
assert isinstance(frame, Galactic)
frame = pa... | Python | BSD | 1,788 |
[ascl:2011.023] | https://github.com/astropy/reproject | docs/mosaicking.rst | *****************************
Combining images into mosaics
*****************************
.. warning:: The mosaicking functionality in the reproject package is
currently experimental, so use with care and please report
issues at https://github.com/astropy/reproject
The **reproject.mosaicking... | reStructuredText | BSD | 15,849 |
[ascl:2011.023] | https://github.com/astropy/reproject | docs/celestial.rst | **********************************
Regular celestial images and cubes
**********************************
One of the most common types of data to reproject are celestial images or
n-dimensional data (such as spectral cubes) where two of the axes are
celestial. There are several existing algorithms that can be used to
r... | reStructuredText | BSD | 19,997 |
[ascl:2011.023] | https://github.com/astropy/reproject | docs/noncelestial.rst | *************************
Non-celestial images/data
*************************
Non-celestial images/data are not currently supported but will be added in future releases.
| reStructuredText | BSD | 171 |
[ascl:2011.023] | https://github.com/astropy/reproject | docs/footprints.rst | ****************
Footprint arrays
****************
As described for example in :doc:`celestial`, all reprojection functions in
this package return a data array (the reprojected values) and a footprint
array, which shows which pixels in the new reprojected data fell inside the
original image.
For interpolation-based a... | reStructuredText | BSD | 2,452 |
[ascl:2011.023] | https://github.com/astropy/reproject | docs/healpix.rst | **************
HEALPIX images
**************
Images can also be stored using the HEALPIX representation, and the
*reproject* package includes two functions,
:func:`~reproject.reproject_from_healpix` and
:func:`~reproject.reproject_to_healpix`, which can be used to reproject
from/to HEALPIX representations (these funct... | reStructuredText | BSD | 5,419 |
[ascl:2011.023] | https://github.com/astropy/reproject | docs/performance_mosaicking.rst | *************************************
Optimizing performance for mosaicking
*************************************
Using memory-mapped output arrays
=================================
If you are producing a large mosaic, you may be want to write the mosaic and
footprint to an array of your choice, such as for example a... | reStructuredText | BSD | 2,516 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.