diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index feffc2ee564..b346e120b3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: matrix: # First all python versions in basic linux os: [ ubuntu-latest ] - py: [ 3.7, 3.8, 3.9, "3.10", 3.11, 3.12 ] + py: [ 3.9, "3.10", 3.11, 3.12, 3.13, 3.14 ] CC: [ gcc ] CXX: [ g++ ] FFTW_DIR: [ "/usr/local/lib" ] @@ -111,7 +111,7 @@ jobs: # Easier if eigen is installed with apt-get, but on at least one system, check that # it gets downloaded and installed properly if it isn't installed. - if ${{ matrix.py != 3.7 }}; then sudo -H apt install -y libeigen3-dev; fi + if ${{ matrix.py != 3.12 }}; then sudo -H apt install -y libeigen3-dev; fi # Need this for the mpeg tests sudo -H apt install -y ffmpeg @@ -152,7 +152,7 @@ jobs: # Do these three first to clarify potential conflicts pip install -U numpy - pip install -U "setuptools<72" + pip install -U setuptools pip install -U wheel # Standard dependencies @@ -164,13 +164,15 @@ jobs: pip install -U matplotlib - - name: Install astroplan - # astroplan isn't yet numpy 2.0 compatible. So don't install that on 3.9+. - # I'm also getting errors with starlink, which I think may be related to - # numpy 2.0. - if: (matrix.py == 3.8) || (matrix.py == 3.9) - run: | pip install -U astroplan + + # Starlink doesn't seem to work anymore. Even with numpy 1.x, I'm getting + # "ModuleNotFoundError: No module named 'numpy'" when building the wheel. + # This after already installing numpy, so it should be there. + # Revisit from time to time to see if they fix it. + - name: Install starlink + if: 0 + run: | pip install -U starlink-pyast - name: Install CPython-only dependencies @@ -193,7 +195,7 @@ jobs: FFTW_DIR=$FFTW_DIR pip install -vvv . - name: Check download_cosmos only if it changed. (And only on 1 runner) - if: matrix.py == 3.7 && github.base_ref != '' + if: matrix.py == 3.12 && github.base_ref != '' run: | git status git --no-pager log --graph --pretty=oneline --abbrev-commit | head -50 @@ -210,11 +212,11 @@ jobs: # Less confusing to include it explicitly. - name: Check shared library - if: matrix.py == 3.8 + if: matrix.py == 3.12 run: | - # On a few systems (arbitrarily py3.8, where we also check mac and clang), + # On a few systems (arbitrarily py3.12, where we also check mac and clang), # check the shared library creation and link. - GALSIM_BUILD_SHARED=1 python setup.py install + GALSIM_BUILD_SHARED=1 python setup.py build # These directories/files should now exist. echo "Look for the shared library:" @@ -222,15 +224,8 @@ jobs: ls build/shared_clib ls build/shared_clib/libgalsim.* - # For now, use `python setup.py test` to test linking to the shared library. - # We run some C++ tests there, and we use the shared library for linking. - # Caveats: - # 1. The C++ tests are not very comprehensive, so it won't catch all errors. - # 2. Apparently setup.py test is deprecated. I'm getting warnings when I run - # it that indicate it may go away at some point. So whenever that happens, - # we'll have to revisit this test to find another way to build and run - # the C++ tests. - GALSIM_TEST_PY=0 python setup.py test + # Build and run the C++ test suite + GALSIM_RUN_TEST=1 python setup.py build - name: Upload coverage to codecov if: matrix.py != 'pypy-3.7' diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d41f4ed7fab..966a450f5e0 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -16,11 +16,11 @@ jobs: - uses: actions/setup-python@v5 - name: Build wheels - uses: pypa/cibuildwheel@v2.21.1 + uses: pypa/cibuildwheel@v3.3.1 env: CIBW_BUILD: "*manylinux*" CIBW_ARCHS: auto64 - CIBW_SKIP: cp36* cp37* pp* + CIBW_SKIP: cp36* cp37* cp38* pp* # I think yum might always work here. But leave all options available. CIBW_BEFORE_ALL: yum install -y fftw-devel || apt-get install libfftw3-dev || apk add --upgrade fftw-dev @@ -38,11 +38,11 @@ jobs: - uses: actions/setup-python@v5 - name: Build wheels - uses: pypa/cibuildwheel@v2.21.1 + uses: pypa/cibuildwheel@v3.3.1 env: CIBW_BUILD: "*musllinux*" CIBW_ARCHS: auto64 - CIBW_SKIP: cp36* cp37* pp* + CIBW_SKIP: cp36* cp37* cp38* pp* # I think musl always uses apk, but keep all options available. CIBW_BEFORE_ALL: apk add --upgrade fftw-dev || apt-get install libfftw3-dev || yum install -y fftw-devel @@ -53,21 +53,21 @@ jobs: build_macosx_intel_wheels: name: Build wheels on MacOS Intel - runs-on: macos-13 + runs-on: macos-15-intel steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - name: Build wheels - uses: pypa/cibuildwheel@v2.21.1 + uses: pypa/cibuildwheel@v3.3.1 env: CIBW_BUILD: "*macosx*" CIBW_ARCHS: auto64 - CIBW_SKIP: cp36* cp37* pp* + CIBW_SKIP: cp36* cp37* cp38* pp* CIBW_BEFORE_ALL: brew install fftw || true CIBW_ENVIRONMENT: >- - MACOSX_DEPLOYMENT_TARGET=13.0 + MACOSX_DEPLOYMENT_TARGET=14.0 - uses: actions/upload-artifact@v4 with: @@ -76,27 +76,22 @@ jobs: build_macosx_arm_wheels: name: Build wheels on MacOS ARM - runs-on: macos-latest + runs-on: macos-14 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - name: Build wheels - uses: pypa/cibuildwheel@v2.21.1 + uses: pypa/cibuildwheel@v3.3.1 env: CIBW_BUILD: "*macosx*" CIBW_ARCHS: arm64 - CIBW_SKIP: cp36* cp37* pp* - CIBW_BEFORE_ALL: brew install llvm libomp fftw eigen + CIBW_SKIP: cp36* cp37* cp38* pp* + CIBW_BEFORE_ALL: brew install fftw eigen CIBW_ENVIRONMENT: >- - CC=/opt/homebrew/opt/llvm/bin/clang - CXX=/opt/homebrew/opt/llvm/bin/clang++ - LDFLAGS="-L/opt/homebrew/opt/llvm/lib -Wl,-rpath,/opt/homebrew/opt/llvm/lib" - CPPFLAGS="-I/opt/homebrew/opt/llvm/include" - PATH="/opt/homebrew/opt/llvm/bin:$PATH" FFTW_DIR="/opt/homebrew/lib" - MACOSX_DEPLOYMENT_TARGET=14.7 + MACOSX_DEPLOYMENT_TARGET=14.0 - uses: actions/upload-artifact@v4 with: @@ -128,7 +123,7 @@ jobs: - name: Install dependencies run: | python -m pip install -U pip - pip install -U numpy "setuptools<72" + pip install -U numpy setuptools pip install -U -r requirements.txt - name: Download wheels diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f9b58124c7a..f28cad9aee5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,11 +1,11 @@ -Changes from v2.5 to v2.6 +Changes from v2.7 to v2.8 ========================= -We currently support Python 3.7 through 3.12. +We currently support Python 3.9 through 3.14. A complete list of all new features and changes is given below. `Relevant PRs and Issues, -`_ +`_ whose issue numbers are listed below for the relevant items. Dependency Changes diff --git a/LICENSE b/LICENSE index a0a7565344a..462160c0cf1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012-2023 by the GalSim developers team on GitHub +Copyright (c) 2012-2026 by the GalSim developers team on GitHub https://github.com/GalSim-developers Redistribution and use in source and binary forms, with or without diff --git a/conda_requirements.txt b/conda_requirements.txt index a0dfb6ccd38..5e87ca011e7 100644 --- a/conda_requirements.txt +++ b/conda_requirements.txt @@ -1,6 +1,6 @@ # The requirements packages that can be installed with # conda install -y -c conda-forge --file conda_requirements.txt -setuptools>=38,<72 +setuptools>=38 numpy>=1.17 astropy>=2.0 pybind11>=2.2 diff --git a/devel/GalSim_License_statement.txt b/devel/GalSim_License_statement.txt index 3e9cc68ded1..813bc7d15e5 100644 --- a/devel/GalSim_License_statement.txt +++ b/devel/GalSim_License_statement.txt @@ -2,7 +2,7 @@ All GalSim source files should contain the following copyright statement (Python commented versions follow below): -Copyright (c) 2012-2023 by the GalSim developers team on GitHub +Copyright (c) 2012-2026 by the GalSim developers team on GitHub https://github.com/GalSim-developers This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -20,7 +20,7 @@ conditions are met: and/or other materials provided with the distribution. -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -39,7 +39,7 @@ conditions are met: /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/brighter-fatter/bf_plots_07aug18.py b/devel/brighter-fatter/bf_plots_07aug18.py index 92a51d9887b..c3ecd180d3e 100644 --- a/devel/brighter-fatter/bf_plots_07aug18.py +++ b/devel/brighter-fatter/bf_plots_07aug18.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/brighter-fatter/bf_plots_20Oct17.py b/devel/brighter-fatter/bf_plots_20Oct17.py index cc0f8ab05f4..a3b68fab8a6 100644 --- a/devel/brighter-fatter/bf_plots_20Oct17.py +++ b/devel/brighter-fatter/bf_plots_20Oct17.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/brighter-fatter/forward_model_varying_i/forward.cpp b/devel/brighter-fatter/forward_model_varying_i/forward.cpp index 651a4ce2859..1bfa30cb231 100755 --- a/devel/brighter-fatter/forward_model_varying_i/forward.cpp +++ b/devel/brighter-fatter/forward_model_varying_i/forward.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/brighter-fatter/forward_model_varying_i/forward.h b/devel/brighter-fatter/forward_model_varying_i/forward.h index b5df13709e7..4be75fd6a5d 100644 --- a/devel/brighter-fatter/forward_model_varying_i/forward.h +++ b/devel/brighter-fatter/forward_model_varying_i/forward.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/brighter-fatter/forward_model_varying_i/forward_convert.cpp b/devel/brighter-fatter/forward_model_varying_i/forward_convert.cpp index d0bbb43d803..e06f3875888 100644 --- a/devel/brighter-fatter/forward_model_varying_i/forward_convert.cpp +++ b/devel/brighter-fatter/forward_model_varying_i/forward_convert.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/brighter-fatter/forward_model_varying_i/setup.py b/devel/brighter-fatter/forward_model_varying_i/setup.py index 66ab404e298..5593520d254 100644 --- a/devel/brighter-fatter/forward_model_varying_i/setup.py +++ b/devel/brighter-fatter/forward_model_varying_i/setup.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/add_weights.py b/devel/external/AEGIS/add_weights.py index 9d8ebd0079e..98d75f04e4f 100644 --- a/devel/external/AEGIS/add_weights.py +++ b/devel/external/AEGIS/add_weights.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/apply_cuts.py b/devel/external/AEGIS/apply_cuts.py index 89c78004d4a..f95d20bc730 100644 --- a/devel/external/AEGIS/apply_cuts.py +++ b/devel/external/AEGIS/apply_cuts.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/clean_pstamp.py b/devel/external/AEGIS/clean_pstamp.py index 635efaa843e..a529874ce93 100644 --- a/devel/external/AEGIS/clean_pstamp.py +++ b/devel/external/AEGIS/clean_pstamp.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/functions.py b/devel/external/AEGIS/functions.py index df91adffe9e..d2ca8fb9915 100644 --- a/devel/external/AEGIS/functions.py +++ b/devel/external/AEGIS/functions.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/get_all_gal.py b/devel/external/AEGIS/get_all_gal.py index 3b9e0629068..f69eea5713c 100644 --- a/devel/external/AEGIS/get_all_gal.py +++ b/devel/external/AEGIS/get_all_gal.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/get_cat_seg.py b/devel/external/AEGIS/get_cat_seg.py index a5ec8b4318e..56fee8c0acc 100644 --- a/devel/external/AEGIS/get_cat_seg.py +++ b/devel/external/AEGIS/get_cat_seg.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/get_in_galsim.py b/devel/external/AEGIS/get_in_galsim.py index 932a21f07d6..3e115aca068 100644 --- a/devel/external/AEGIS/get_in_galsim.py +++ b/devel/external/AEGIS/get_in_galsim.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/get_objects.py b/devel/external/AEGIS/get_objects.py index a6906a444c9..75902337ece 100644 --- a/devel/external/AEGIS/get_objects.py +++ b/devel/external/AEGIS/get_objects.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/get_psf.py b/devel/external/AEGIS/get_psf.py index ce1d7d36784..5cb77463b5d 100644 --- a/devel/external/AEGIS/get_psf.py +++ b/devel/external/AEGIS/get_psf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/get_pstamps.py b/devel/external/AEGIS/get_pstamps.py index 50e9eedcded..cb19ff2d39b 100644 --- a/devel/external/AEGIS/get_pstamps.py +++ b/devel/external/AEGIS/get_pstamps.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/remove_multi.py b/devel/external/AEGIS/remove_multi.py index 6290a006865..7a837bdbefe 100644 --- a/devel/external/AEGIS/remove_multi.py +++ b/devel/external/AEGIS/remove_multi.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/run_batch_first.py b/devel/external/AEGIS/run_batch_first.py index 4b53628427d..6893fb2cb4a 100644 --- a/devel/external/AEGIS/run_batch_first.py +++ b/devel/external/AEGIS/run_batch_first.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/run_batch_fourth.py b/devel/external/AEGIS/run_batch_fourth.py index d6c13af5eb5..08443429628 100644 --- a/devel/external/AEGIS/run_batch_fourth.py +++ b/devel/external/AEGIS/run_batch_fourth.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/run_batch_second.py b/devel/external/AEGIS/run_batch_second.py index 8510ce9be19..b05d376f507 100644 --- a/devel/external/AEGIS/run_batch_second.py +++ b/devel/external/AEGIS/run_batch_second.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/run_batch_third.py b/devel/external/AEGIS/run_batch_third.py index dabeb5a08b5..ce74ca501ad 100644 --- a/devel/external/AEGIS/run_batch_third.py +++ b/devel/external/AEGIS/run_batch_third.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/run_batch_third_again.py b/devel/external/AEGIS/run_batch_third_again.py index 164c5f37c85..f740e2de433 100644 --- a/devel/external/AEGIS/run_batch_third_again.py +++ b/devel/external/AEGIS/run_batch_third_again.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/AEGIS/run_clean_seg.py b/devel/external/AEGIS/run_clean_seg.py index 5910832156f..332c3e85230 100644 --- a/devel/external/AEGIS/run_clean_seg.py +++ b/devel/external/AEGIS/run_clean_seg.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/calculate_moffat_radii.py b/devel/external/calculate_moffat_radii.py index d54d7a9417e..1547e90ee95 100644 --- a/devel/external/calculate_moffat_radii.py +++ b/devel/external/calculate_moffat_radii.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/comparison_utilities.py b/devel/external/comparison_utilities.py index 2bc64a7f251..f9d5fa558cb 100644 --- a/devel/external/comparison_utilities.py +++ b/devel/external/comparison_utilities.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/hst/compare_whitening_subtraction.py b/devel/external/hst/compare_whitening_subtraction.py index 50f3885714b..4527bff3af4 100644 --- a/devel/external/hst/compare_whitening_subtraction.py +++ b/devel/external/hst/compare_whitening_subtraction.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/hst/make_cosmos_cfimage.py b/devel/external/hst/make_cosmos_cfimage.py index 825e6d95438..0fca31ca226 100644 --- a/devel/external/hst/make_cosmos_cfimage.py +++ b/devel/external/hst/make_cosmos_cfimage.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/make_subcatalogs.py b/devel/external/make_subcatalogs.py index aad1beb1cc3..da9838b3334 100644 --- a/devel/external/make_subcatalogs.py +++ b/devel/external/make_subcatalogs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/make_table_testarrays.py b/devel/external/make_table_testarrays.py index 07120ca8b1d..320a199acb0 100644 --- a/devel/external/make_table_testarrays.py +++ b/devel/external/make_table_testarrays.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/make_test_catalog.pro b/devel/external/make_test_catalog.pro index 29dca1d7dc7..666c6f8fe6e 100644 --- a/devel/external/make_test_catalog.pro +++ b/devel/external/make_test_catalog.pro @@ -1,4 +1,4 @@ -; Copyright (c) 2012-2023 by the GalSim developers team on GitHub +; Copyright (c) 2012-2026 by the GalSim developers team on GitHub ; https://github.com/GalSim-developers ; ; This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/make_test_images_real.pro b/devel/external/make_test_images_real.pro index 118ae9cbdab..52409f1ef49 100644 --- a/devel/external/make_test_images_real.pro +++ b/devel/external/make_test_images_real.pro @@ -1,4 +1,4 @@ -; Copyright (c) 2012-2023 by the GalSim developers team on GitHub +; Copyright (c) 2012-2026 by the GalSim developers team on GitHub ; https://github.com/GalSim-developers ; ; This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/makecatalog.pro b/devel/external/makecatalog.pro index 67d0273ac8c..f331389842f 100644 --- a/devel/external/makecatalog.pro +++ b/devel/external/makecatalog.pro @@ -1,4 +1,4 @@ -; Copyright (c) 2012-2023 by the GalSim developers team on GitHub +; Copyright (c) 2012-2026 by the GalSim developers team on GitHub ; https://github.com/GalSim-developers ; ; This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/makestamps.pro b/devel/external/makestamps.pro index 77a0c3023d1..a205c2a02fa 100644 --- a/devel/external/makestamps.pro +++ b/devel/external/makestamps.pro @@ -1,4 +1,4 @@ -; Copyright (c) 2012-2023 by the GalSim developers team on GitHub +; Copyright (c) 2012-2026 by the GalSim developers team on GitHub ; https://github.com/GalSim-developers ; ; This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/parse_wfirst_zernikes_1217.py b/devel/external/parse_wfirst_zernikes_1217.py index 9c6ad8c9836..0f759b1e410 100644 --- a/devel/external/parse_wfirst_zernikes_1217.py +++ b/devel/external/parse_wfirst_zernikes_1217.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/radius_flux_cuts.py b/devel/external/radius_flux_cuts.py index 9317077321b..c74e4ed2b67 100644 --- a/devel/external/radius_flux_cuts.py +++ b/devel/external/radius_flux_cuts.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/repackage_great3_cut_info.py b/devel/external/repackage_great3_cut_info.py index 4004beb6237..2bada7a573e 100644 --- a/devel/external/repackage_great3_cut_info.py +++ b/devel/external/repackage_great3_cut_info.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/run_shera.pro b/devel/external/run_shera.pro index 4f46eac9222..7a5b4708d5e 100644 --- a/devel/external/run_shera.pro +++ b/devel/external/run_shera.pro @@ -1,4 +1,4 @@ -; Copyright (c) 2012-2023 by the GalSim developers team on GitHub +; Copyright (c) 2012-2026 by the GalSim developers team on GitHub ; https://github.com/GalSim-developers ; ; This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_Image/make_test_ims.pro b/devel/external/test_Image/make_test_ims.pro index 36d5154c500..9a2349eae8b 100644 --- a/devel/external/test_Image/make_test_ims.pro +++ b/devel/external/test_Image/make_test_ims.pro @@ -1,4 +1,4 @@ -; Copyright (c) 2012-2023 by the GalSim developers team on GitHub +; Copyright (c) 2012-2026 by the GalSim developers team on GitHub ; https://github.com/GalSim-developers ; ; This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_cf/test_cf.py b/devel/external/test_cf/test_cf.py index b2a3ee92426..acc32ee552a 100644 --- a/devel/external/test_cf/test_cf.py +++ b/devel/external/test_cf/test_cf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_cf/test_cf_convolution_detailed.py b/devel/external/test_cf/test_cf_convolution_detailed.py index a1f5e232124..26469264871 100644 --- a/devel/external/test_cf/test_cf_convolution_detailed.py +++ b/devel/external/test_cf/test_cf_convolution_detailed.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_cf/test_noise_gen_irfft.py b/devel/external/test_cf/test_noise_gen_irfft.py index 69e9f36ae7c..0c3a7572d47 100644 --- a/devel/external/test_cf/test_noise_gen_irfft.py +++ b/devel/external/test_cf/test_noise_gen_irfft.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_gridshear/g10_powerspec.py b/devel/external/test_gridshear/g10_powerspec.py index 81361fbec3a..8e4e915206a 100644 --- a/devel/external/test_gridshear/g10_powerspec.py +++ b/devel/external/test_gridshear/g10_powerspec.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_gridshear/plot_pk_test.py b/devel/external/test_gridshear/plot_pk_test.py index 3881c3812f2..c1411191a98 100644 --- a/devel/external/test_gridshear/plot_pk_test.py +++ b/devel/external/test_gridshear/plot_pk_test.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_gridshear/test_pk.py b/devel/external/test_gridshear/test_pk.py index 68a51765929..274e68b34d4 100644 --- a/devel/external/test_gridshear/test_pk.py +++ b/devel/external/test_gridshear/test_pk.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_gridshear/test_pk_sht.py b/devel/external/test_gridshear/test_pk_sht.py index 51c87c24c68..1fbfec84274 100644 --- a/devel/external/test_gridshear/test_pk_sht.py +++ b/devel/external/test_gridshear/test_pk_sht.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_interpolant/make_interpolant_comparison_files.py b/devel/external/test_interpolant/make_interpolant_comparison_files.py index 19580073825..8b606ad87dc 100644 --- a/devel/external/test_interpolant/make_interpolant_comparison_files.py +++ b/devel/external/test_interpolant/make_interpolant_comparison_files.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_photon_vs_fft/photon_vs_fft.debug.yaml b/devel/external/test_photon_vs_fft/photon_vs_fft.debug.yaml index 61481789f14..5024e031201 100644 --- a/devel/external/test_photon_vs_fft/photon_vs_fft.debug.yaml +++ b/devel/external/test_photon_vs_fft/photon_vs_fft.debug.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_photon_vs_fft/photon_vs_fft.ground.yaml b/devel/external/test_photon_vs_fft/photon_vs_fft.ground.yaml index 7ca6d019268..6132e441f5e 100644 --- a/devel/external/test_photon_vs_fft/photon_vs_fft.ground.yaml +++ b/devel/external/test_photon_vs_fft/photon_vs_fft.ground.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_photon_vs_fft/photon_vs_fft.py b/devel/external/test_photon_vs_fft/photon_vs_fft.py index 3ed86ac8cb2..34ccb78f2cd 100644 --- a/devel/external/test_photon_vs_fft/photon_vs_fft.py +++ b/devel/external/test_photon_vs_fft/photon_vs_fft.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_photon_vs_fft/photon_vs_fft.space.yaml b/devel/external/test_photon_vs_fft/photon_vs_fft.space.yaml index 170636dec1e..c05272cc119 100644 --- a/devel/external/test_photon_vs_fft/photon_vs_fft.space.yaml +++ b/devel/external/test_photon_vs_fft/photon_vs_fft.space.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_photon_vs_fft/photon_vs_fft_plots.py b/devel/external/test_photon_vs_fft/photon_vs_fft_plots.py index 552aa24ab30..a554ee1c975 100644 --- a/devel/external/test_photon_vs_fft/photon_vs_fft_plots.py +++ b/devel/external/test_photon_vs_fft/photon_vs_fft_plots.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_pse_corr.py b/devel/external/test_pse_corr.py index 43f40c4c9cf..bb5f6332746 100644 --- a/devel/external/test_pse_corr.py +++ b/devel/external/test_pse_corr.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_reconvolution/reconvolution_validation.debug.yaml b/devel/external/test_reconvolution/reconvolution_validation.debug.yaml index 83961fb5b5a..affdbe43ea6 100644 --- a/devel/external/test_reconvolution/reconvolution_validation.debug.yaml +++ b/devel/external/test_reconvolution/reconvolution_validation.debug.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_reconvolution/reconvolution_validation.py b/devel/external/test_reconvolution/reconvolution_validation.py index 23e78c7669f..05a585205bf 100644 --- a/devel/external/test_reconvolution/reconvolution_validation.py +++ b/devel/external/test_reconvolution/reconvolution_validation.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_reconvolution/reconvolution_validation.yaml b/devel/external/test_reconvolution/reconvolution_validation.yaml index 809055a7285..7b6e408683b 100644 --- a/devel/external/test_reconvolution/reconvolution_validation.yaml +++ b/devel/external/test_reconvolution/reconvolution_validation.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_reconvolution/reconvolution_validation_plots.py b/devel/external/test_reconvolution/reconvolution_validation_plots.py index 4ef3666c7fc..081d6e61834 100644 --- a/devel/external/test_reconvolution/reconvolution_validation_plots.py +++ b/devel/external/test_reconvolution/reconvolution_validation_plots.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/break_test_sersic_highn_basic.py b/devel/external/test_sersic_highn/break_test_sersic_highn_basic.py index 90ea5fafcd9..12da87cc008 100644 --- a/devel/external/test_sersic_highn/break_test_sersic_highn_basic.py +++ b/devel/external/test_sersic_highn/break_test_sersic_highn_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/fitting.py b/devel/external/test_sersic_highn/fitting.py index a1c48c16510..b4ed4ea72a2 100644 --- a/devel/external/test_sersic_highn/fitting.py +++ b/devel/external/test_sersic_highn/fitting.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/galaxy_sample.py b/devel/external/test_sersic_highn/galaxy_sample.py index d87e33a9cbf..a1459096305 100644 --- a/devel/external/test_sersic_highn/galaxy_sample.py +++ b/devel/external/test_sersic_highn/galaxy_sample.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/plot_gaussian.py b/devel/external/test_sersic_highn/plot_gaussian.py index 4f8e6bb1a44..e213ce3a632 100644 --- a/devel/external/test_sersic_highn/plot_gaussian.py +++ b/devel/external/test_sersic_highn/plot_gaussian.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/plot_sersic_highn.py b/devel/external/test_sersic_highn/plot_sersic_highn.py index 8e2839f6d75..b56aeacb106 100644 --- a/devel/external/test_sersic_highn/plot_sersic_highn.py +++ b/devel/external/test_sersic_highn/plot_sersic_highn.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_comparison_basic.py b/devel/external/test_sersic_highn/test_comparison_basic.py index 4362d65f133..ed47c489c9c 100644 --- a/devel/external/test_sersic_highn/test_comparison_basic.py +++ b/devel/external/test_sersic_highn/test_comparison_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_gaussian_basic.py b/devel/external/test_sersic_highn/test_gaussian_basic.py index a0d0570ebde..f69af60281f 100644 --- a/devel/external/test_sersic_highn/test_gaussian_basic.py +++ b/devel/external/test_sersic_highn/test_gaussian_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn.py b/devel/external/test_sersic_highn/test_sersic_highn.py index 4f569211a9c..8d720d4ba38 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn.py +++ b/devel/external/test_sersic_highn/test_sersic_highn.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_alias2.py b/devel/external/test_sersic_highn/test_sersic_highn_alias2.py index 5704718483d..b16a03c8889 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_alias2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_alias2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_alias2_maxk2_wmult2.py b/devel/external/test_sersic_highn/test_sersic_highn_alias2_maxk2_wmult2.py index 91689b91a20..474d5830e6e 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_alias2_maxk2_wmult2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_alias2_maxk2_wmult2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_allowed_flux_variation2.py b/devel/external/test_sersic_highn/test_sersic_highn_allowed_flux_variation2.py index e2bfbd802d5..abf9e64dc6e 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_allowed_flux_variation2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_allowed_flux_variation2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_basic.py b/devel/external/test_sersic_highn/test_sersic_highn_basic.py index 01827478574..acdbec43e2c 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_basic.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_basic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_kvalue10.py b/devel/external/test_sersic_highn/test_sersic_highn_kvalue10.py index fa6f650fff4..8477f2953ff 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_kvalue10.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_kvalue10.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_maxk2.py b/devel/external/test_sersic_highn/test_sersic_highn_maxk2.py index de5fa8554df..b1d809f85ea 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_maxk2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_maxk2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_range_division_for_extrema2.py b/devel/external/test_sersic_highn/test_sersic_highn_range_division_for_extrema2.py index f8fa5e4fa2b..f44b28ae1ed 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_range_division_for_extrema2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_range_division_for_extrema2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_shoot_abserr2.py b/devel/external/test_sersic_highn/test_sersic_highn_shoot_abserr2.py index ad422f4a193..41bca3c8553 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_shoot_abserr2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_shoot_abserr2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_shoot_accuracy2.py b/devel/external/test_sersic_highn/test_sersic_highn_shoot_accuracy2.py index 2a74a51946a..9a4a96aec8e 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_shoot_accuracy2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_shoot_accuracy2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_shoot_relerr2.py b/devel/external/test_sersic_highn/test_sersic_highn_shoot_relerr2.py index 7352d99a278..badf518033b 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_shoot_relerr2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_shoot_relerr2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_small_fraction_of_flux2.py b/devel/external/test_sersic_highn/test_sersic_highn_small_fraction_of_flux2.py index 52f57f38609..9e325ba4561 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_small_fraction_of_flux2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_small_fraction_of_flux2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/test_sersic_highn/test_sersic_highn_wmult2.py b/devel/external/test_sersic_highn/test_sersic_highn_wmult2.py index 51090ef6dcf..9949b6fb1ac 100644 --- a/devel/external/test_sersic_highn/test_sersic_highn_wmult2.py +++ b/devel/external/test_sersic_highn/test_sersic_highn_wmult2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/time_photon_shooting/time_exponential.py b/devel/external/time_photon_shooting/time_exponential.py index a5371408d4c..3fd940378f5 100644 --- a/devel/external/time_photon_shooting/time_exponential.py +++ b/devel/external/time_photon_shooting/time_exponential.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/time_photon_shooting/time_gaussian.py b/devel/external/time_photon_shooting/time_gaussian.py index 24044f742cb..aa3010af946 100644 --- a/devel/external/time_photon_shooting/time_gaussian.py +++ b/devel/external/time_photon_shooting/time_gaussian.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/time_photon_shooting/time_moffat.py b/devel/external/time_photon_shooting/time_moffat.py index ed0881a01ff..4a69b615b00 100644 --- a/devel/external/time_photon_shooting/time_moffat.py +++ b/devel/external/time_photon_shooting/time_moffat.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/update_parametric_fits.py b/devel/external/update_parametric_fits.py index cd5d75229bd..fc96e42dc62 100644 --- a/devel/external/update_parametric_fits.py +++ b/devel/external/update_parametric_fits.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/external/update_rgc.py b/devel/external/update_rgc.py index 978e6448e26..a17eb09653b 100644 --- a/devel/external/update_rgc.py +++ b/devel/external/update_rgc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/fds_test.py b/devel/fds_test.py index 3892ee22fc5..44bc188aaf5 100644 --- a/devel/fds_test.py +++ b/devel/fds_test.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/getACSBandpass.py b/devel/getACSBandpass.py index bf46828d2d6..80f61c10e5b 100644 --- a/devel/getACSBandpass.py +++ b/devel/getACSBandpass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/getLSSTBandpass.py b/devel/getLSSTBandpass.py index dfa23984ac5..6841268a8f1 100644 --- a/devel/getLSSTBandpass.py +++ b/devel/getLSSTBandpass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/getSEDs.py b/devel/getSEDs.py index 466f6a8bd69..57f759d00df 100644 --- a/devel/getSEDs.py +++ b/devel/getSEDs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/getWFC3Bandpass.py b/devel/getWFC3Bandpass.py index a7868203f16..08f80f62508 100644 --- a/devel/getWFC3Bandpass.py +++ b/devel/getWFC3Bandpass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/get_sysinfo.py b/devel/get_sysinfo.py index 1a6c4e0031c..93d0ae81c8c 100644 --- a/devel/get_sysinfo.py +++ b/devel/get_sysinfo.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/check_flats.py b/devel/lsst/check_flats.py index 95623733551..f209cb619b2 100644 --- a/devel/lsst/check_flats.py +++ b/devel/lsst/check_flats.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/csl_flats/Flat_Correlations_18Apr18.py b/devel/lsst/csl_flats/Flat_Correlations_18Apr18.py index c87eb7bff17..01b4e6a0888 100644 --- a/devel/lsst/csl_flats/Flat_Correlations_18Apr18.py +++ b/devel/lsst/csl_flats/Flat_Correlations_18Apr18.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/csl_flats/Plot_Correlations_Varying_Flux_Errors_18Apr18.py b/devel/lsst/csl_flats/Plot_Correlations_Varying_Flux_Errors_18Apr18.py index 9f6974e928a..d6acba46e20 100644 --- a/devel/lsst/csl_flats/Plot_Correlations_Varying_Flux_Errors_18Apr18.py +++ b/devel/lsst/csl_flats/Plot_Correlations_Varying_Flux_Errors_18Apr18.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/focus_depth.py b/devel/lsst/focus_depth.py index 70c95fcdc44..f0e58a02880 100644 --- a/devel/lsst/focus_depth.py +++ b/devel/lsst/focus_depth.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/test_bf_direction.py b/devel/lsst/test_bf_direction.py index 0f64ac45127..5ed03b59d40 100644 --- a/devel/lsst/test_bf_direction.py +++ b/devel/lsst/test_bf_direction.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/time_phase_phot.py b/devel/lsst/time_phase_phot.py index 5800d9dfb8e..0c8a756af28 100644 --- a/devel/lsst/time_phase_phot.py +++ b/devel/lsst/time_phase_phot.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/treering_flat.py b/devel/lsst/treering_flat.py index 8ceabd068c8..f80035d09ef 100644 --- a/devel/lsst/treering_flat.py +++ b/devel/lsst/treering_flat.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/treering_flat_csl_18apr18.py b/devel/lsst/treering_flat_csl_18apr18.py index 48443f4aee3..fd3f5ae4ad0 100644 --- a/devel/lsst/treering_flat_csl_18apr18.py +++ b/devel/lsst/treering_flat_csl_18apr18.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/treering_skybg2.py b/devel/lsst/treering_skybg2.py index 99ae7a35ab0..d42bc16e03c 100644 --- a/devel/lsst/treering_skybg2.py +++ b/devel/lsst/treering_skybg2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/lsst/treering_skybg_check.py b/devel/lsst/treering_skybg_check.py index e54e6faaea8..6693639fee5 100644 --- a/devel/lsst/treering_skybg_check.py +++ b/devel/lsst/treering_skybg_check.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/make_sensor_data_symmetrical.py b/devel/make_sensor_data_symmetrical.py index 1681b5f7bac..38b29fe934a 100644 --- a/devel/make_sensor_data_symmetrical.py +++ b/devel/make_sensor_data_symmetrical.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/CGNotes.tex b/devel/modules/CGNotes.tex index 25e7e45fd19..b511578d045 100644 --- a/devel/modules/CGNotes.tex +++ b/devel/modules/CGNotes.tex @@ -1,4 +1,4 @@ -% Copyright (c) 2012-2023 by the GalSim developers team on GitHub +% Copyright (c) 2012-2026 by the GalSim developers team on GitHub % https://github.com/GalSim-developers % % This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/atmValidate/firstKick.py b/devel/modules/atmValidate/firstKick.py index 3733072fbf0..12e1e9df073 100644 --- a/devel/modules/atmValidate/firstKick.py +++ b/devel/modules/atmValidate/firstKick.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/atmValidate/firstKick_screen_scale.py b/devel/modules/atmValidate/firstKick_screen_scale.py index 7fb156a255e..6b79d51899a 100644 --- a/devel/modules/atmValidate/firstKick_screen_scale.py +++ b/devel/modules/atmValidate/firstKick_screen_scale.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/atmValidate/screen_plot.py b/devel/modules/atmValidate/screen_plot.py index daaafe73cdc..6bcff2884d4 100644 --- a/devel/modules/atmValidate/screen_plot.py +++ b/devel/modules/atmValidate/screen_plot.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/atmValidate/screen_scale.py b/devel/modules/atmValidate/screen_scale.py index 8df56c93234..68f92303867 100644 --- a/devel/modules/atmValidate/screen_scale.py +++ b/devel/modules/atmValidate/screen_scale.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/atmValidate/secondKick.py b/devel/modules/atmValidate/secondKick.py index 2336da3140b..9198d3d2afe 100644 --- a/devel/modules/atmValidate/secondKick.py +++ b/devel/modules/atmValidate/secondKick.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/atmValidate/vonKarman.py b/devel/modules/atmValidate/vonKarman.py index fe3709af63f..4f2af86cdaf 100644 --- a/devel/modules/atmValidate/vonKarman.py +++ b/devel/modules/atmValidate/vonKarman.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/atmos_factfinding.tex b/devel/modules/atmos_factfinding.tex index 31602e192de..8f5804ea4a0 100644 --- a/devel/modules/atmos_factfinding.tex +++ b/devel/modules/atmos_factfinding.tex @@ -1,4 +1,4 @@ -% Copyright (c) 2012-2023 by the GalSim developers team on GitHub +% Copyright (c) 2012-2026 by the GalSim developers team on GitHub % https://github.com/GalSim-developers % % This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/chromatic_real_galaxy/test_CRG.py b/devel/modules/chromatic_real_galaxy/test_CRG.py index bbeb030d166..d521d157b5d 100644 --- a/devel/modules/chromatic_real_galaxy/test_CRG.py +++ b/devel/modules/chromatic_real_galaxy/test_CRG.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/chromatic_real_galaxy/test_CRG_noise.py b/devel/modules/chromatic_real_galaxy/test_CRG_noise.py index a55c4723f21..640871578f9 100644 --- a/devel/modules/chromatic_real_galaxy/test_CRG_noise.py +++ b/devel/modules/chromatic_real_galaxy/test_CRG_noise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/corrfuncs/test_cf_interpolant.py b/devel/modules/corrfuncs/test_cf_interpolant.py index 91d3a2a8d73..7bfa6c7b5bf 100644 --- a/devel/modules/corrfuncs/test_cf_interpolant.py +++ b/devel/modules/corrfuncs/test_cf_interpolant.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/corrfuncs/test_cf_periodicity.py b/devel/modules/corrfuncs/test_cf_periodicity.py index 26bcdb7d7b9..ebd37a5b12e 100644 --- a/devel/modules/corrfuncs/test_cf_periodicity.py +++ b/devel/modules/corrfuncs/test_cf_periodicity.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/lensing_engine.tex b/devel/modules/lensing_engine.tex index fe3d414f47b..c0af3c67aec 100644 --- a/devel/modules/lensing_engine.tex +++ b/devel/modules/lensing_engine.tex @@ -1,4 +1,4 @@ -% Copyright (c) 2012-2023 by the GalSim developers team on GitHub +% Copyright (c) 2012-2026 by the GalSim developers team on GitHub % https://github.com/GalSim-developers % % This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/lensing_engine_interpolants.py b/devel/modules/lensing_engine_interpolants.py index b81e0d23ff4..4a995c08c5b 100644 --- a/devel/modules/lensing_engine_interpolants.py +++ b/devel/modules/lensing_engine_interpolants.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/phase_psf/ArScreens/ArScreens.py b/devel/modules/phase_psf/ArScreens/ArScreens.py index 800e1c66cf0..36ee4cd1854 100644 --- a/devel/modules/phase_psf/ArScreens/ArScreens.py +++ b/devel/modules/phase_psf/ArScreens/ArScreens.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/phase_psf/ArScreens/create_multilayer_arbase.py b/devel/modules/phase_psf/ArScreens/create_multilayer_arbase.py index a431c123fb5..8d11ce30bee 100644 --- a/devel/modules/phase_psf/ArScreens/create_multilayer_arbase.py +++ b/devel/modules/phase_psf/ArScreens/create_multilayer_arbase.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/plot_test_interpolants.py b/devel/modules/plot_test_interpolants.py index 293311fa4f0..7c0dca6f699 100644 --- a/devel/modules/plot_test_interpolants.py +++ b/devel/modules/plot_test_interpolants.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/shera_vs_sbprofile.tex b/devel/modules/shera_vs_sbprofile.tex index ee061de5516..438b622db7c 100644 --- a/devel/modules/shera_vs_sbprofile.tex +++ b/devel/modules/shera_vs_sbprofile.tex @@ -1,4 +1,4 @@ -% Copyright (c) 2012-2023 by the GalSim developers team on GitHub +% Copyright (c) 2012-2026 by the GalSim developers team on GitHub % https://github.com/GalSim-developers % % This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/test_interpolants.py b/devel/modules/test_interpolants.py index 7d25fd4e52d..33f76d1863a 100644 --- a/devel/modules/test_interpolants.py +++ b/devel/modules/test_interpolants.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/test_interpolants_parametric.py b/devel/modules/test_interpolants_parametric.py index 46d13fdac67..0e856a452a0 100644 --- a/devel/modules/test_interpolants_parametric.py +++ b/devel/modules/test_interpolants_parametric.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/modules/test_mom_timing.py b/devel/modules/test_mom_timing.py index 8231aa5f6bd..744e99c6bb2 100644 --- a/devel/modules/test_mom_timing.py +++ b/devel/modules/test_mom_timing.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/plot_si.py b/devel/plot_si.py index 6d1f5680a6b..7c85649529f 100644 --- a/devel/plot_si.py +++ b/devel/plot_si.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/plot_thin.py b/devel/plot_thin.py index bf659caa7af..029ebf74710 100644 --- a/devel/plot_thin.py +++ b/devel/plot_thin.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/roman/make_sip_file.py b/devel/roman/make_sip_file.py index d8a43080048..51a1e064d37 100644 --- a/devel/roman/make_sip_file.py +++ b/devel/roman/make_sip_file.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/roman/test_roman_phot.py b/devel/roman/test_roman_phot.py index a6cc34fac21..f9b5c052934 100644 --- a/devel/roman/test_roman_phot.py +++ b/devel/roman/test_roman_phot.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/roman/test_roman_psf.py b/devel/roman/test_roman_psf.py index 758110b5d36..ce611465425 100644 --- a/devel/roman/test_roman_psf.py +++ b/devel/roman/test_roman_psf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/test_zernike_speed.py b/devel/test_zernike_speed.py index 3289dfc139c..05e47c74202 100644 --- a/devel/test_zernike_speed.py +++ b/devel/test_zernike_speed.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/testlinecounting.py b/devel/testlinecounting.py index 23f62eed3e7..41aa12eea5a 100644 --- a/devel/testlinecounting.py +++ b/devel/testlinecounting.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_combine_waves.py b/devel/time_combine_waves.py index 96cf1dd3e81..1469021c6c9 100644 --- a/devel/time_combine_waves.py +++ b/devel/time_combine_waves.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_conv.py b/devel/time_conv.py index 5171eb61681..b9f5223d25d 100644 --- a/devel/time_conv.py +++ b/devel/time_conv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_expon_k.py b/devel/time_expon_k.py index 268b4f335ee..c785f5f0e3a 100644 --- a/devel/time_expon_k.py +++ b/devel/time_expon_k.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_faint_bd_gals.py b/devel/time_faint_bd_gals.py index 0fae5870ec6..0f59306faf0 100644 --- a/devel/time_faint_bd_gals.py +++ b/devel/time_faint_bd_gals.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_hankel.py b/devel/time_hankel.py index ac819ab3ecd..acf8e0de5ba 100644 --- a/devel/time_hankel.py +++ b/devel/time_hankel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_invsqrt.cpp b/devel/time_invsqrt.cpp index 33e495f1a56..9031c7630fb 100644 --- a/devel/time_invsqrt.cpp +++ b/devel/time_invsqrt.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_knots.py b/devel/time_knots.py index 978f43ab302..ef6e9af7ff4 100644 --- a/devel/time_knots.py +++ b/devel/time_knots.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_noise_pad.py b/devel/time_noise_pad.py index 666d16668f2..7686fc976a4 100644 --- a/devel/time_noise_pad.py +++ b/devel/time_noise_pad.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_phot.py b/devel/time_phot.py index 763fde776b4..5e18be3f18e 100644 --- a/devel/time_phot.py +++ b/devel/time_phot.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_sersic.py b/devel/time_sersic.py index 7934ea590a0..af5b4321cff 100644 --- a/devel/time_sersic.py +++ b/devel/time_sersic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_silicon_accumulate.py b/devel/time_silicon_accumulate.py index 194e39c1c1f..ba30823cadd 100644 --- a/devel/time_silicon_accumulate.py +++ b/devel/time_silicon_accumulate.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_wcs.py b/devel/time_wcs.py index fd4c8b84b96..42c00569834 100644 --- a/devel/time_wcs.py +++ b/devel/time_wcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/time_zip.py b/devel/time_zip.py index 025fc7cef00..330bee05397 100644 --- a/devel/time_zip.py +++ b/devel/time_zip.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/treerings/tr_plots.py b/devel/treerings/tr_plots.py index 1bc018cc873..b9f0ee47ad2 100644 --- a/devel/treerings/tr_plots.py +++ b/devel/treerings/tr_plots.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/treerings/tree_ring_test_function.py b/devel/treerings/tree_ring_test_function.py index 1b48a6d0cac..769ee83de6f 100644 --- a/devel/treerings/tree_ring_test_function.py +++ b/devel/treerings/tree_ring_test_function.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/devel/treerings/write_tree_ring_table.py b/devel/treerings/write_tree_ring_table.py index 68219d4406f..241c9919d72 100644 --- a/devel/treerings/write_tree_ring_table.py +++ b/devel/treerings/write_tree_ring_table.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/docs/conf.py b/docs/conf.py index b468d03e6fc..295b5443a6a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/docs/gh-link.py b/docs/gh-link.py index 45b35d61a50..d8a14a5f21e 100644 --- a/docs/gh-link.py +++ b/docs/gh-link.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/docs/older.rst b/docs/older.rst index 0596863ba44..f8805f33230 100644 --- a/docs/older.rst +++ b/docs/older.rst @@ -5,6 +5,89 @@ listed here for brevity. See the CHANGELOG files associated with each version for a more complete list. Issue numbers related to each change are given in parentheses. +v2.8 +---- + +*Dependency Changes* + +- Removed setuptools<72 pin. (#1335) +- Updated build to use std=c++14 to allow for eigen version 5.0. (#1343) + + +*API Change* + +- Changed behavior for large FFTs to be a warning, rather than an error. (#1332, #1341) + + +*Bug Fixes* + +- Fixed a bug in `Image.calculateFWHM` that started with numpy version 2.3. (#1336, #1337) +- Fixed an error in chromatic drawing when WCS involves a reflection. (#1346, #1349) +- Fixed the Roman bandpass functions using config interface to allow non-imaging bands. (#1347) + + +v2.7 +---- + +*New Features* + +- Added `DoubleZernike.xycoef`. (#1327) +- Added a setter for the `Image.array` property. (#1272, #1329) +- Added an option ``recalc=True`` to `SiliconSensor.accumulate`. (#1328) + + +*Performance Improvements* + +- Switched to inbuilt operators on lists rather than numpy operators in a few places (#1316) +- Added ``robust=True`` option to `Zernike.__call__`. (#1326, #1327) +- Reduced memory use in the Silicon class. (#1331) + + +*Bug Fixes* + +- Fixed an error in the `Spergel` stepk calculation. (#1324, #1325) +- Fixed an error in PhotonDCR use of zenith_angle if sky_pos is also given. (#1330) + + +v2.6 +---- + +*Dependency Change* + +- Removed an accidental implicit dependency we had on scipy in `FittedSIPWCS`. (#1253, #1305) + + +*API Changes* + +- Changed the behavior of random_seed. cf. `Image Field Attributes`. (#1309) + + +*Config Updates* + +- Changed the behavior of random_seed to be less confusing and safer for most use cases. (#1309) +- Added Quantity and Unit types. (#1311) + + +*New Features* + +- Added `InterpolatedChromaticObject.from_images`. (#1294, #1296) +- Allow PosixPath instances in constructors for `Bandpass` and `SED`. (#1270, #1304) +- Added filter information for the Prism and Grism in the roman module. (#1307) +- Added options to give some unitful values as an astropy Quantity. (#1311) + + +*Bug Fixes* + +- Fixed a bug in the config-layer parsing of Position items. (#1299, #1300) +- Fixed a bug in `DoubleZernike` to handle integer arguments. (#1283, #1303) +- Fixed a bug in `ChromaticConvolution` with a simple `GSObject` and one with an inseparable SED. + (#1302, #1306) +- Fixed a build problem for some compilers when GPU offloading is enabled. (#1313, #1314) +- Fixed a bug for chromatic photon shooting if the realized flux is zero. (#1317) +- Fixed a bug that could occasionally cause singular matrix exceptions in `FittedSIPWCS`. (#1319) +- Fixed a bug in the object centering when drawing with nx, ny and center. (#1322, #1323) + + v2.5 ---- diff --git a/docs/zernike.rst b/docs/zernike.rst index 80eab7368e1..2e65416eeb7 100644 --- a/docs/zernike.rst +++ b/docs/zernike.rst @@ -12,6 +12,7 @@ Zernike Functions .. automethod:: galsim.zernike.Zernike.__call__ .. autoclass:: galsim.zernike.DoubleZernike + :members: .. autofunction:: galsim.zernike.noll_to_zern .. autofunction:: galsim.zernike.zernikeRotMatrix diff --git a/examples/IntExample.cpp b/examples/IntExample.cpp index 212c77af5ca..4a78978bd40 100644 --- a/examples/IntExample.cpp +++ b/examples/IntExample.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/check_des b/examples/check_des index bc7dedd2dd9..1007534b2a8 100755 --- a/examples/check_des +++ b/examples/check_des @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/check_diff.py b/examples/check_diff.py index e365dc1786a..5b804133a64 100644 --- a/examples/check_diff.py +++ b/examples/check_diff.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/check_json b/examples/check_json index 31e92ee03b9..fd6d10a41b1 100755 --- a/examples/check_json +++ b/examples/check_json @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/check_yaml b/examples/check_yaml index 12b834cbd2e..db055aad43b 100755 --- a/examples/check_yaml +++ b/examples/check_yaml @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/data/plot_ps.py b/examples/data/plot_ps.py index 2ccf8a032ef..39b8f1f73e1 100644 --- a/examples/data/plot_ps.py +++ b/examples/data/plot_ps.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo1.py b/examples/demo1.py index 993c5f29472..6efb29bd597 100644 --- a/examples/demo1.py +++ b/examples/demo1.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo1.yaml b/examples/demo1.yaml index 2058060b4ef..7671906dc05 100644 --- a/examples/demo1.yaml +++ b/examples/demo1.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo10.py b/examples/demo10.py index 1a6e7d7a64d..6c1e080ffab 100644 --- a/examples/demo10.py +++ b/examples/demo10.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo10.yaml b/examples/demo10.yaml index 1f2c4283a96..8b5f10734b3 100644 --- a/examples/demo10.yaml +++ b/examples/demo10.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo11.py b/examples/demo11.py index 4381bd28141..b8226ea2ce5 100644 --- a/examples/demo11.py +++ b/examples/demo11.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo11.yaml b/examples/demo11.yaml index 8913e950421..27876c0e2da 100644 --- a/examples/demo11.yaml +++ b/examples/demo11.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo12.py b/examples/demo12.py index a19484f689c..72eb71e2570 100644 --- a/examples/demo12.py +++ b/examples/demo12.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo12.yaml b/examples/demo12.yaml index d6453859251..29f71b0f1bc 100644 --- a/examples/demo12.yaml +++ b/examples/demo12.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo13.py b/examples/demo13.py index 00228edfb3c..a62129ce4df 100644 --- a/examples/demo13.py +++ b/examples/demo13.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo13.yaml b/examples/demo13.yaml index 7ec1e6314ba..90edc5d7942 100644 --- a/examples/demo13.yaml +++ b/examples/demo13.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo2.py b/examples/demo2.py index dbe2b4121e5..5d4f0e2b51b 100644 --- a/examples/demo2.py +++ b/examples/demo2.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo2.yaml b/examples/demo2.yaml index 7e79ab74054..03350983fa4 100644 --- a/examples/demo2.yaml +++ b/examples/demo2.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo3.py b/examples/demo3.py index 052f585f125..90a364488d5 100644 --- a/examples/demo3.py +++ b/examples/demo3.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo3.yaml b/examples/demo3.yaml index 9e145b51b10..62090a52c35 100644 --- a/examples/demo3.yaml +++ b/examples/demo3.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo4.py b/examples/demo4.py index aaeed8522f4..f85ae64c389 100644 --- a/examples/demo4.py +++ b/examples/demo4.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo4.yaml b/examples/demo4.yaml index 4a50451266d..c6861844d3b 100644 --- a/examples/demo4.yaml +++ b/examples/demo4.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo5.py b/examples/demo5.py index 6c1d694ab0f..69ec76f7c42 100644 --- a/examples/demo5.py +++ b/examples/demo5.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo5.yaml b/examples/demo5.yaml index 58f87a54a5e..68de1dc4899 100644 --- a/examples/demo5.yaml +++ b/examples/demo5.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo6.py b/examples/demo6.py index 924d0fd35a6..fb661c98437 100644 --- a/examples/demo6.py +++ b/examples/demo6.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo6.yaml b/examples/demo6.yaml index 5199b209a64..43049b8df65 100644 --- a/examples/demo6.yaml +++ b/examples/demo6.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo7.py b/examples/demo7.py index 68adf0e0cc6..50829ecd80c 100644 --- a/examples/demo7.py +++ b/examples/demo7.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo7.yaml b/examples/demo7.yaml index 20d325cc9a3..95d186fee85 100644 --- a/examples/demo7.yaml +++ b/examples/demo7.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo8.py b/examples/demo8.py index 8e318a56307..83b6e0c4b50 100644 --- a/examples/demo8.py +++ b/examples/demo8.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo8.yaml b/examples/demo8.yaml index c48eb953bb4..18326f60767 100644 --- a/examples/demo8.yaml +++ b/examples/demo8.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo9.py b/examples/demo9.py index dba15f449b7..0452b94d888 100644 --- a/examples/demo9.py +++ b/examples/demo9.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/demo9.yaml b/examples/demo9.yaml index 887a37552d9..2de7acfcd59 100644 --- a/examples/demo9.yaml +++ b/examples/demo9.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/blend.py b/examples/des/blend.py index cc1ceb07b18..c3fae1dcb05 100644 --- a/examples/des/blend.py +++ b/examples/des/blend.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/blend.yaml b/examples/des/blend.yaml index 91ea7bf5d9c..da4d82e5cd2 100644 --- a/examples/des/blend.yaml +++ b/examples/des/blend.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/blendset.yaml b/examples/des/blendset.yaml index 1bc191de390..1592c96e1a3 100644 --- a/examples/des/blendset.yaml +++ b/examples/des/blendset.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/des_wcs.py b/examples/des/des_wcs.py index 9b08d522818..0db4d63c3c5 100644 --- a/examples/des/des_wcs.py +++ b/examples/des/des_wcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/draw_psf.py b/examples/des/draw_psf.py index 00244802277..bead657090d 100644 --- a/examples/des/draw_psf.py +++ b/examples/des/draw_psf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/draw_psf.yaml b/examples/des/draw_psf.yaml index a604ff33b9e..1c4a66f243d 100644 --- a/examples/des/draw_psf.yaml +++ b/examples/des/draw_psf.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/excluded_random.py b/examples/des/excluded_random.py index 444f37476cf..8064f5bedee 100644 --- a/examples/des/excluded_random.py +++ b/examples/des/excluded_random.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/hsm_shape_measure.py b/examples/des/hsm_shape_measure.py index 37af7fcd800..806e4ef711c 100644 --- a/examples/des/hsm_shape_measure.py +++ b/examples/des/hsm_shape_measure.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/log_normal.py b/examples/des/log_normal.py index 7553179a234..5f830127362 100644 --- a/examples/des/log_normal.py +++ b/examples/des/log_normal.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/des/meds.yaml b/examples/des/meds.yaml index 2b8d88ab656..88f611919f8 100644 --- a/examples/des/meds.yaml +++ b/examples/des/meds.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/fft_vs_geom_movie.py b/examples/fft_vs_geom_movie.py index 1b2e1a6d3b8..4cf6d6a1ef6 100644 --- a/examples/fft_vs_geom_movie.py +++ b/examples/fft_vs_geom_movie.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/great3/cgc.yaml b/examples/great3/cgc.yaml index fad99c950b7..ab3d3c48475 100644 --- a/examples/great3/cgc.yaml +++ b/examples/great3/cgc.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/great3/cgc_faint.yaml b/examples/great3/cgc_faint.yaml index af652634edb..9d787b6159f 100644 --- a/examples/great3/cgc_faint.yaml +++ b/examples/great3/cgc_faint.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/great3/cgc_psf.yaml b/examples/great3/cgc_psf.yaml index f9d5add9dd3..30149459732 100644 --- a/examples/great3/cgc_psf.yaml +++ b/examples/great3/cgc_psf.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/great3/great3_reject.py b/examples/great3/great3_reject.py index 59bf846954b..ddf5588bbfe 100644 --- a/examples/great3/great3_reject.py +++ b/examples/great3/great3_reject.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/great3/noise_free.py b/examples/great3/noise_free.py index 6f6a47c582c..9f7558d2023 100644 --- a/examples/great3/noise_free.py +++ b/examples/great3/noise_free.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/great3/rgc.yaml b/examples/great3/rgc.yaml index 5b3522f81f6..f77552f4f17 100644 --- a/examples/great3/rgc.yaml +++ b/examples/great3/rgc.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/great3/rgc_psf.yaml b/examples/great3/rgc_psf.yaml index bb53a35512d..09629d8e83d 100644 --- a/examples/great3/rgc_psf.yaml +++ b/examples/great3/rgc_psf.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/input/make_default_input.py b/examples/input/make_default_input.py index d360adbcc22..397e98e00c6 100644 --- a/examples/input/make_default_input.py +++ b/examples/input/make_default_input.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/log_normal.py b/examples/log_normal.py index c798aa6be36..a830d44200d 100644 --- a/examples/log_normal.py +++ b/examples/log_normal.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/lsst.yaml b/examples/lsst.yaml index 768322e46a9..3964fce1074 100644 --- a/examples/lsst.yaml +++ b/examples/lsst.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/make_coadd.py b/examples/make_coadd.py index e2c8ee095b7..b40e7d1d0a8 100644 --- a/examples/make_coadd.py +++ b/examples/make_coadd.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/mixed_scene.py b/examples/mixed_scene.py index 22cc1cb022f..babe0ecd053 100644 --- a/examples/mixed_scene.py +++ b/examples/mixed_scene.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/psf_wf_movie.py b/examples/psf_wf_movie.py index cc2013b6341..ff02fc5e61e 100644 --- a/examples/psf_wf_movie.py +++ b/examples/psf_wf_movie.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/shear_test1.yaml b/examples/shear_test1.yaml index 03f8ec58464..f872df546d6 100644 --- a/examples/shear_test1.yaml +++ b/examples/shear_test1.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/examples/testRandom.cpp b/examples/testRandom.cpp index 4a2cf95beca..c7af480b214 100644 --- a/examples/testRandom.cpp +++ b/examples/testRandom.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/__init__.py b/galsim/__init__.py index 0dd6a6fdeef..f20aec18a0e 100644 --- a/galsim/__init__.py +++ b/galsim/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -53,7 +53,7 @@ -Copyright (c) 2012-2023 by the GalSim developers team on GitHub +Copyright (c) 2012-2026 by the GalSim developers team on GitHub https://github.com/GalSim-developers Redistribution and use in source and binary forms, with or without diff --git a/galsim/__main__.py b/galsim/__main__.py index 07f8b2dec36..214cce85a19 100644 --- a/galsim/__main__.py +++ b/galsim/__main__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/_pyfits.py b/galsim/_pyfits.py index 835d7d1c665..7e4ef5cea0f 100644 --- a/galsim/_pyfits.py +++ b/galsim/_pyfits.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/_utilities.py b/galsim/_utilities.py index e1d845f7848..a3daf906652 100644 --- a/galsim/_utilities.py +++ b/galsim/_utilities.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/_version.py b/galsim/_version.py index fa04b39fa14..c9e892a7393 100644 --- a/galsim/_version.py +++ b/galsim/_version.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -15,5 +15,5 @@ # this list of conditions, and the disclaimer given in the documentation # and/or other materials provided with the distribution. # -__version__ = '2.7' +__version__ = '2.9' __version_info__ = tuple(map(lambda x:int(x.split('-')[0]), __version__.split('.')))[:3] diff --git a/galsim/airy.py b/galsim/airy.py index aa175ea0c42..b1312484256 100644 --- a/galsim/airy.py +++ b/galsim/airy.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/angle.py b/galsim/angle.py index d4a76f7a7f3..8c525bf5baf 100644 --- a/galsim/angle.py +++ b/galsim/angle.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/bandpass.py b/galsim/bandpass.py index c93e11a517b..c5c0fbad89c 100644 --- a/galsim/bandpass.py +++ b/galsim/bandpass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/bessel.py b/galsim/bessel.py index 9b729a86b55..b9d6893d01d 100644 --- a/galsim/bessel.py +++ b/galsim/bessel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/bounds.py b/galsim/bounds.py index 0cd4976d37d..c0fb46d6309 100644 --- a/galsim/bounds.py +++ b/galsim/bounds.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/box.py b/galsim/box.py index 99146cbb420..18dfc003a56 100644 --- a/galsim/box.py +++ b/galsim/box.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/catalog.py b/galsim/catalog.py index 5d3b66066ab..cce04c8c997 100644 --- a/galsim/catalog.py +++ b/galsim/catalog.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -23,6 +23,7 @@ import pickle import yaml import json +import warnings from .errors import GalSimValueError, GalSimKeyError, GalSimIndexError from ._utilities import lazy_property @@ -130,7 +131,10 @@ def finishReadAscii(self): # Note: we leave the data as str, rather than convert to float, so that if # we have any str fields, they don't give an error here. They'll only give an # error if one tries to convert them to float at some point. - self._data = np.loadtxt(self.file_name, comments=self.comments, dtype=bytes, ndmin=2) + with warnings.catch_warnings(): + # numpy 1.23 emits a stupid warning here about max_rows even though we're not using it. + warnings.filterwarnings("ignore", category=UserWarning) + self._data = np.loadtxt(self.file_name, comments=self.comments, dtype=bytes, ndmin=2) # Convert the bytes to str. For Py2, this is a no op. self._data = self._data.astype(str) diff --git a/galsim/cdmodel.py b/galsim/cdmodel.py index 74ca04c99b1..8d3bcd992e9 100644 --- a/galsim/cdmodel.py +++ b/galsim/cdmodel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/celestial.py b/galsim/celestial.py index c302a270432..92ea09e8224 100644 --- a/galsim/celestial.py +++ b/galsim/celestial.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/chromatic.py b/galsim/chromatic.py index 813eb7af493..581aa23bc81 100644 --- a/galsim/chromatic.py +++ b/galsim/chromatic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -1902,10 +1902,10 @@ def sed(self): if hasattr(self._jac, '__call__'): @np.vectorize def detjac(w): - return np.linalg.det(np.asarray(self._jac(w)).reshape(2,2)) + return np.abs(np.linalg.det(np.asarray(self._jac(w)).reshape(2,2))) sed *= detjac elif self._jac is not None: - sed *= np.linalg.det(np.asarray(self._jac).reshape(2,2)) + sed *= np.abs(np.linalg.det(np.asarray(self._jac).reshape(2,2))) return sed diff --git a/galsim/config/__init__.py b/galsim/config/__init__.py index 82e1a845089..e808c2c7d7b 100644 --- a/galsim/config/__init__.py +++ b/galsim/config/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/bandpass.py b/galsim/config/bandpass.py index 0057349877e..fd768b4168b 100644 --- a/galsim/config/bandpass.py +++ b/galsim/config/bandpass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/extra.py b/galsim/config/extra.py index d95bfb28258..634dfa6751d 100644 --- a/galsim/config/extra.py +++ b/galsim/config/extra.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/extra_badpix.py b/galsim/config/extra_badpix.py index e2788ba9e70..2372f3a5295 100644 --- a/galsim/config/extra_badpix.py +++ b/galsim/config/extra_badpix.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/extra_psf.py b/galsim/config/extra_psf.py index 861a00e30cf..1c1122ac867 100644 --- a/galsim/config/extra_psf.py +++ b/galsim/config/extra_psf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/extra_truth.py b/galsim/config/extra_truth.py index 79a4a8597f8..f400037b199 100644 --- a/galsim/config/extra_truth.py +++ b/galsim/config/extra_truth.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/extra_weight.py b/galsim/config/extra_weight.py index 5e8bdf6525d..6df834c1875 100644 --- a/galsim/config/extra_weight.py +++ b/galsim/config/extra_weight.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/gsobject.py b/galsim/config/gsobject.py index 2cb37d11739..5754330c6b9 100644 --- a/galsim/config/gsobject.py +++ b/galsim/config/gsobject.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/image.py b/galsim/config/image.py index 697a9b73e52..3e9c660a6ab 100644 --- a/galsim/config/image.py +++ b/galsim/config/image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/image_scattered.py b/galsim/config/image_scattered.py index 995b68f8206..f067a3b6df7 100644 --- a/galsim/config/image_scattered.py +++ b/galsim/config/image_scattered.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/image_tiled.py b/galsim/config/image_tiled.py index 478b589e3e2..8bd149b6ef1 100644 --- a/galsim/config/image_tiled.py +++ b/galsim/config/image_tiled.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/input.py b/galsim/config/input.py index 97f84798767..b6afb0cd0cc 100644 --- a/galsim/config/input.py +++ b/galsim/config/input.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/input_cosmos.py b/galsim/config/input_cosmos.py index 5e6f9d819dc..7eed1ab9d48 100644 --- a/galsim/config/input_cosmos.py +++ b/galsim/config/input_cosmos.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/input_fitsheader.py b/galsim/config/input_fitsheader.py index 5293b215e5f..c8a16c6b853 100644 --- a/galsim/config/input_fitsheader.py +++ b/galsim/config/input_fitsheader.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/input_image.py b/galsim/config/input_image.py index 68767ee7b7c..459e5d74388 100644 --- a/galsim/config/input_image.py +++ b/galsim/config/input_image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/input_nfw.py b/galsim/config/input_nfw.py index 8b443905ef3..c47b7253b70 100644 --- a/galsim/config/input_nfw.py +++ b/galsim/config/input_nfw.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/input_powerspectrum.py b/galsim/config/input_powerspectrum.py index c84bba97e6d..ce08208ba20 100644 --- a/galsim/config/input_powerspectrum.py +++ b/galsim/config/input_powerspectrum.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/input_real.py b/galsim/config/input_real.py index f0c5dd857d4..9aa807b073f 100644 --- a/galsim/config/input_real.py +++ b/galsim/config/input_real.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/noise.py b/galsim/config/noise.py index cd2448d7d12..685275e6278 100644 --- a/galsim/config/noise.py +++ b/galsim/config/noise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/output.py b/galsim/config/output.py index e6a86c1d5e5..7d91fcaf06f 100644 --- a/galsim/config/output.py +++ b/galsim/config/output.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/output_datacube.py b/galsim/config/output_datacube.py index 9e2fb196a42..72a563c1d79 100644 --- a/galsim/config/output_datacube.py +++ b/galsim/config/output_datacube.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/output_multifits.py b/galsim/config/output_multifits.py index c0de86f9441..53494236f54 100644 --- a/galsim/config/output_multifits.py +++ b/galsim/config/output_multifits.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/photon_ops.py b/galsim/config/photon_ops.py index 6a3f874852a..068283ea77d 100644 --- a/galsim/config/photon_ops.py +++ b/galsim/config/photon_ops.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/process.py b/galsim/config/process.py index 17ca513d2c5..2283e5cf496 100644 --- a/galsim/config/process.py +++ b/galsim/config/process.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/sed.py b/galsim/config/sed.py index 05ed926ddf9..1f87d5a827a 100644 --- a/galsim/config/sed.py +++ b/galsim/config/sed.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/sensor.py b/galsim/config/sensor.py index 858e7d0f482..d086bd0906e 100644 --- a/galsim/config/sensor.py +++ b/galsim/config/sensor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/stamp.py b/galsim/config/stamp.py index 78119ddf81a..f293e8fef96 100644 --- a/galsim/config/stamp.py +++ b/galsim/config/stamp.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/stamp_ring.py b/galsim/config/stamp_ring.py index 1e9bb96ae0f..d0a1e6794ae 100644 --- a/galsim/config/stamp_ring.py +++ b/galsim/config/stamp_ring.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/util.py b/galsim/config/util.py index 35aade6cf7c..0c28dfafeb5 100644 --- a/galsim/config/util.py +++ b/galsim/config/util.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/value.py b/galsim/config/value.py index 2ba2411fec8..13b58dd9ec2 100644 --- a/galsim/config/value.py +++ b/galsim/config/value.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/value_eval.py b/galsim/config/value_eval.py index 87c594bf791..a324849abf8 100644 --- a/galsim/config/value_eval.py +++ b/galsim/config/value_eval.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/value_random.py b/galsim/config/value_random.py index bf8d0f50b68..9012dc92dfd 100644 --- a/galsim/config/value_random.py +++ b/galsim/config/value_random.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/config/wcs.py b/galsim/config/wcs.py index 9c22d734e44..11d7075dd22 100644 --- a/galsim/config/wcs.py +++ b/galsim/config/wcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/convolve.py b/galsim/convolve.py index c198e037736..a34ebd5565a 100644 --- a/galsim/convolve.py +++ b/galsim/convolve.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/correlatednoise.py b/galsim/correlatednoise.py index e0a3580a158..af212b94cb4 100644 --- a/galsim/correlatednoise.py +++ b/galsim/correlatednoise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/dcr.py b/galsim/dcr.py index d79744208fe..e260399c8a8 100644 --- a/galsim/dcr.py +++ b/galsim/dcr.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -131,6 +131,7 @@ def parse_dcr_angles(**kwargs): if 'zenith_angle' in kwargs: zenith_angle = kwargs.pop('zenith_angle') parallactic_angle = kwargs.pop('parallactic_angle', 0.0*degrees) + kwargs.pop('obj_coord', None) # Ok if present, but want to make sure we remove it. if not isinstance(zenith_angle, Angle): raise TypeError("zenith_angle must be a galsim.Angle.") if not isinstance(parallactic_angle, Angle): diff --git a/galsim/deltafunction.py b/galsim/deltafunction.py index 299d86de03e..80576ba9373 100644 --- a/galsim/deltafunction.py +++ b/galsim/deltafunction.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/deprecated/__init__.py b/galsim/deprecated/__init__.py index bf2e51e384c..43ad7108f17 100644 --- a/galsim/deprecated/__init__.py +++ b/galsim/deprecated/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/deprecated/correlatednoise.py b/galsim/deprecated/correlatednoise.py index 92f979df926..ebf3f53612d 100644 --- a/galsim/deprecated/correlatednoise.py +++ b/galsim/deprecated/correlatednoise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/deprecated/integ.py b/galsim/deprecated/integ.py index f0ec00a708f..75aa33e95ae 100644 --- a/galsim/deprecated/integ.py +++ b/galsim/deprecated/integ.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/deprecated/randwalk.py b/galsim/deprecated/randwalk.py index b4b1b9d9978..ac81f4c8bf1 100644 --- a/galsim/deprecated/randwalk.py +++ b/galsim/deprecated/randwalk.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/des/__init__.py b/galsim/des/__init__.py index 7792bf8134c..858d86d4ff5 100644 --- a/galsim/des/__init__.py +++ b/galsim/des/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/des/des_meds.py b/galsim/des/des_meds.py index c28ca98aadc..5b80743fe0b 100644 --- a/galsim/des/des_meds.py +++ b/galsim/des/des_meds.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/des/des_psfex.py b/galsim/des/des_psfex.py index 0a0960a1d24..6bb54c945b7 100644 --- a/galsim/des/des_psfex.py +++ b/galsim/des/des_psfex.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/des/des_shapelet.py b/galsim/des/des_shapelet.py index 0b9b6c27492..0cff23ee64f 100644 --- a/galsim/des/des_shapelet.py +++ b/galsim/des/des_shapelet.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/detectors.py b/galsim/detectors.py index ec1f8a03dc9..933e98fcd69 100644 --- a/galsim/detectors.py +++ b/galsim/detectors.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/download_cosmos.py b/galsim/download_cosmos.py index 827484bbc39..cc9cff7876c 100644 --- a/galsim/download_cosmos.py +++ b/galsim/download_cosmos.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/errors.py b/galsim/errors.py index 01b1be4082d..ae1281df2bc 100644 --- a/galsim/errors.py +++ b/galsim/errors.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -25,12 +25,16 @@ 'GalSimSEDError', 'GalSimHSMError', 'GalSimFFTSizeError', 'GalSimConfigError', 'GalSimConfigValueError', 'GalSimNotImplementedError', - 'GalSimWarning', 'GalSimDeprecationWarning', - 'convert_cpp_errors', 'galsim_warn', ] + 'GalSimWarning', 'GalSimDeprecationWarning', 'GalSimFFTSizeWarning', + 'convert_cpp_errors', 'galsim_warn', 'galsim_warn_fft' ] import warnings from contextlib import contextmanager +# Set this to True to have large FFTs raise a GalSimFFTSizeError exception rather +# merely emit a GalSimFFTSizeWarning. +raise_fft_size_error = False + # Note to developers about which exception to throw. # # Aside from the below classes, which should be preferred for most errors, we also @@ -125,10 +129,6 @@ # GalSimHSMError: Use this for errors from the HSM algorithm. They are emitted in C++, but # we use `with convert_cpp_errors(GalSimHSMError):` to convert them. # -# GalSimFFTSizeError: Use this when a requested FFT would exceed the relevant maximum_fft_size -# for the object, so the recommendation is raise this parameter if that -# is possible. -# # GalSimConfigError: Use this for errors processing a config dict. # # GalSimConfigValueError: Use this when a config dict has a value that is invalid. Basically, @@ -412,6 +412,34 @@ class GalSimDeprecationWarning(GalSimWarning): """ def __repr__(self): return 'galsim.GalSimDeprecationWarning(%r)'%(str(self)) +class GalSimFFTSizeWarning(GalSimWarning): + """A GalSim-specific warning class indicating that a requested FFT exceeds the relevant + maximum_fft_size. + + Attributes: + size: The size that was deemed too large + mem: The estimated memory that would be required (in GB) for the FFT. + """ + def __init__(self, message, size): + self.message = message + self.size = size + self.mem = size * size * 24. / 1024**3 + message += "\nThe required FFT size would be {0} x {0}, which requires ".format(size) + message += "{0:.2f} GB of memory.\n".format(self.mem) + message += "If you can handle the large FFT and want to suppress this warning,\n" + message += "you may update gsparams.maximum_fft_size." + super(GalSimFFTSizeWarning, self).__init__(message) + def __repr__(self): + return 'galsim.GalSimFFTSizeWarning(%r,%r)'%(self.message, self.size) + def __reduce__(self): + return GalSimFFTSizeWarning, (self.message, self.size) + +def galsim_warn_fft(message, size): + if raise_fft_size_error: + raise GalSimFFTSizeError(message, size) + else: + warnings.warn(GalSimFFTSizeWarning(message, size)) + @contextmanager def convert_cpp_errors(error_type=GalSimError): try: diff --git a/galsim/exponential.py b/galsim/exponential.py index 46cdc140b63..b7d5aef0c13 100644 --- a/galsim/exponential.py +++ b/galsim/exponential.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/fft.py b/galsim/fft.py index 5d4d876f768..1d4c7f0241a 100644 --- a/galsim/fft.py +++ b/galsim/fft.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/fits.py b/galsim/fits.py index cdf6a6cb7ca..1c970887a37 100644 --- a/galsim/fits.py +++ b/galsim/fits.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/fitswcs.py b/galsim/fitswcs.py index a85947e0603..ed3b88b99a4 100644 --- a/galsim/fitswcs.py +++ b/galsim/fitswcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -307,7 +307,7 @@ def __setstate__(self, d): self._wcs = self._load_from_header(self.header) -class PyAstWCS(CelestialWCS): +class PyAstWCS(CelestialWCS): # pragma: no cover """This WCS uses PyAst (the python front end for the Starlink AST code) to read WCS information from a FITS file. It requires the starlink.Ast python module to be installed. diff --git a/galsim/fouriersqrt.py b/galsim/fouriersqrt.py index 723c9799d11..a1445029307 100644 --- a/galsim/fouriersqrt.py +++ b/galsim/fouriersqrt.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/galaxy_sample.py b/galsim/galaxy_sample.py index dc8bc89a490..aca7fe29e6a 100644 --- a/galsim/galaxy_sample.py +++ b/galsim/galaxy_sample.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/gaussian.py b/galsim/gaussian.py index 9fa4f53be2e..064249e5f4a 100644 --- a/galsim/gaussian.py +++ b/galsim/gaussian.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/gsobject.py b/galsim/gsobject.py index 4be5872097f..84c935bc5b2 100644 --- a/galsim/gsobject.py +++ b/galsim/gsobject.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -27,7 +27,8 @@ from .position import _PositionD, _PositionI, Position, parse_pos_args from ._utilities import lazy_property from .errors import GalSimError, GalSimRangeError, GalSimValueError, GalSimIncompatibleValuesError -from .errors import GalSimFFTSizeError, GalSimNotImplementedError, convert_cpp_errors, galsim_warn +from .errors import GalSimNotImplementedError, convert_cpp_errors +from .errors import galsim_warn, galsim_warn_fft from .image import Image, ImageD, ImageF, ImageCD, ImageCF from .shear import Shear, _Shear from .angle import Angle @@ -162,17 +163,11 @@ class GSObject: >>> conv = galsim.Convolve([gal,psf]) >>> im = galsim.Image(1000,1000, scale=0.02) # Note the very small pixel scale! >>> im = conv.drawImage(image=im) # This uses the default GSParams. - Traceback (most recent call last): - File "", line 1, in - File "galsim/gsobject.py", line 1666, in drawImage - added_photons = prof.drawFFT(draw_image, add) - File "galsim/gsobject.py", line 1877, in drawFFT - kimage, wrap_size = self.drawFFT_makeKImage(image) - File "galsim/gsobject.py", line 1802, in drawFFT_makeKImage - raise GalSimFFTSizeError("drawFFT requires an FFT that is too large.", Nk) - galsim.errors.GalSimFFTSizeError: drawFFT requires an FFT that is too large. + galsim/errors.py:437: GalSimFFTSizeWarning: drawFFT requires a very large FFT. The required FFT size would be 12288 x 12288, which requires 3.38 GB of memory. - If you can handle the large FFT, you may update gsparams.maximum_fft_size. + If you can handle the large FFT and want to suppress this warning, + you may update gsparams.maximum_fft_size. + warnings.warn(GalSimFFTSizeWarning(message, size)) >>> big_fft_params = galsim.GSParams(maximum_fft_size=12300) >>> conv = galsim.Convolve([gal,psf],gsparams=big_fft_params) >>> im = conv.drawImage(image=im) # Now it works (but is slow!) @@ -1968,7 +1963,7 @@ def drawFFT_makeKImage(self, image): Nk = int(np.ceil(maxk/dk)) * 2 if Nk > self.gsparams.maximum_fft_size: - raise GalSimFFTSizeError("drawFFT requires an FFT that is too large.", Nk) + galsim_warn_fft("drawFFT requires a very large FFT.", Nk) bounds = _BoundsI(0,Nk//2,-Nk//2,Nk//2) if image.dtype in (np.complex128, np.float64, np.int32, np.uint32): diff --git a/galsim/gsparams.py b/galsim/gsparams.py index f032083652c..479d37a60c8 100644 --- a/galsim/gsparams.py +++ b/galsim/gsparams.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -43,14 +43,22 @@ class GSParams: Parameters: minimum_fft_size: The minimum size of any FFT that may need to be performed. [default: 128] - maximum_fft_size: The maximum allowed size of an image for performing an FFT. This - is more about memory use than accuracy. We have this maximum - value to help prevent the user from accidentally trying to perform - an extremely large FFT that crashes the program. Instead, GalSim - will raise an exception indicating that the image is too large, - which is often a sign of an error in the user's code. However, if - you have the memory to handle it, you can raise this limit to - allow the calculation to happen. [default: 8192] + maximum_fft_size: The maximum allowed size of an image for performing an FFT without + warning. This is more about memory use than accuracy. We have this + maximum value to inform a user who accidentally performs an extremely + large FFT why they just crashed the program. GalSim used to + raise an exception indicating that the image is too large, + which is often a sign of an error in the user's code. However, we + now just emit a warning about the large FFT, so if the code crashes + you have some indication of why. If you have the memory to handle it, + you can raise this limit to allow the calculation to happen without + seeing the warning. [default: 8192] + + .. note:: + + To revert to the old behavior of raising an exception, you + may set ``galsim.errors.raise_fft_size_error = True``. + folding_threshold: This sets a maximum amount of real space folding that is allowed, an effect caused by the periodic nature of FFTs. FFTs implicitly use periodic boundary conditions, and a profile specified on a diff --git a/galsim/hsm.py b/galsim/hsm.py index 4dceaa79097..6d0e9523710 100644 --- a/galsim/hsm.py +++ b/galsim/hsm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/image.py b/galsim/image.py index 0001b85d538..3681958504a 100644 --- a/galsim/image.py +++ b/galsim/image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -479,6 +479,10 @@ def iscontiguous(self): """ return self._array.strides[1]//self._array.itemsize == 1 + @array.setter + def array(self, other): + self._array[:] = self._safe_cast(other) + @lazy_property def _image(self): cls = self._cpp_type[self.dtype] @@ -1586,13 +1590,18 @@ def calculateFWHM(self, center=None, Imax=0.): # Find the first value with I < 0.5 * Imax k = np.argmax(data < 0.5 * Imax) - Ik = data[k] / Imax + # If there are duplicate rsq values, argmax won't be deterministic across numpy versions. + # To achieve consistent results, we take the average of all data values with the same rsq. + k2 = np.searchsorted(rsqf, rsqf[k], side='right') + Ik = np.mean(data[k:k2]) / Imax # Interpolate (linearly) between this and the previous value. if k == 0: rsqhm = rsqf[0] * (0.5 / Ik) else: - Ikm1 = data[k-1] / Imax + # Similarly, use the mean data for all rsq equal to rsqf[k-1]. + k1 = np.searchsorted(rsqf, rsqf[k-1], side='left') + Ikm1 = np.mean(data[k1:k]) / Imax rsqhm = (rsqf[k-1] * (Ik-0.5) + rsqf[k] * (0.5-Ikm1)) / (Ik-Ikm1) # This has all been done in pixels. So normalize according to the pixel scale. @@ -1785,7 +1794,10 @@ def __pow__(self, other): def __ipow__(self, other): if not isinstance(other, int) and not isinstance(other, float): raise TypeError("Can only raise an image to a float or int power!") - self.array[:,:] **= other + if not self.isinteger or isinstance(other, int): + self.array[:,:] **= other + else: + self.array[:,:] = self._safe_cast(self.array ** other) return self def __neg__(self): diff --git a/galsim/inclined.py b/galsim/inclined.py index 0495a272d6b..03a8ac22c6d 100644 --- a/galsim/inclined.py +++ b/galsim/inclined.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/integ.py b/galsim/integ.py index 24df68da5ca..4209db65fa1 100644 --- a/galsim/integ.py +++ b/galsim/integ.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/interpolant.py b/galsim/interpolant.py index 06d022d4469..4e24b036b3e 100644 --- a/galsim/interpolant.py +++ b/galsim/interpolant.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/interpolatedimage.py b/galsim/interpolatedimage.py index 07c8f3be9e1..9ed6d853f0e 100644 --- a/galsim/interpolatedimage.py +++ b/galsim/interpolatedimage.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/knots.py b/galsim/knots.py index 3ebc82f7bba..3d1a00e27e6 100644 --- a/galsim/knots.py +++ b/galsim/knots.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/kolmogorov.py b/galsim/kolmogorov.py index 1fa7066536c..e03993ee388 100644 --- a/galsim/kolmogorov.py +++ b/galsim/kolmogorov.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/lensing_ps.py b/galsim/lensing_ps.py index d0b56c97bde..421c6b1a4e7 100644 --- a/galsim/lensing_ps.py +++ b/galsim/lensing_ps.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/main.py b/galsim/main.py index 300124e3829..a60ed70db3c 100644 --- a/galsim/main.py +++ b/galsim/main.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/meta_data.py b/galsim/meta_data.py index a019ae1328d..8586970d3f5 100644 --- a/galsim/meta_data.py +++ b/galsim/meta_data.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/moffat.py b/galsim/moffat.py index b251706a77e..189d1b56051 100644 --- a/galsim/moffat.py +++ b/galsim/moffat.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/nfw_halo.py b/galsim/nfw_halo.py index 4c550508ff9..f65d28bdcbd 100644 --- a/galsim/nfw_halo.py +++ b/galsim/nfw_halo.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/noise.py b/galsim/noise.py index 49a9f69d5c5..67e722c7549 100644 --- a/galsim/noise.py +++ b/galsim/noise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/phase_psf.py b/galsim/phase_psf.py index 003881ba455..01780405799 100644 --- a/galsim/phase_psf.py +++ b/galsim/phase_psf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -34,7 +34,7 @@ from .interpolatedimage import InterpolatedImage from .utilities import doc_inherit, OrderedWeakRef, rotate_xy, lazy_property, basestring from .errors import GalSimValueError, GalSimRangeError, GalSimIncompatibleValuesError -from .errors import GalSimFFTSizeError, galsim_warn +from .errors import galsim_warn, galsim_warn_fft from .photon_array import TimeSampler, PhotonArray from .airy import Airy from .second_kick import SecondKick @@ -328,7 +328,7 @@ def _generate_pupil_plane(self): # Check FFT size if self._npix > self.gsparams.maximum_fft_size: - raise GalSimFFTSizeError("Created pupil plane array that is too large.",self._npix) + galsim_warn_fft("Created pupil plane array that will need a very large fft.",self._npix) # Shrink scale such that size = scale * npix exactly. self._pupil_plane_scale = self._pupil_plane_size / self._npix @@ -383,7 +383,7 @@ def _load_pupil_plane(self): # Check FFT size if self._npix > self.gsparams.maximum_fft_size: - raise GalSimFFTSizeError("Loaded pupil plane array that is too large.", self._npix) + galsim_warn_fft("Loaded pupil plane array that will need a very large fft.",self._npix) # Sanity checks if self._pupil_plane_im.array.shape[0] != self._pupil_plane_im.array.shape[1]: diff --git a/galsim/phase_screens.py b/galsim/phase_screens.py index fa00df4b84d..cdb2eedb187 100644 --- a/galsim/phase_screens.py +++ b/galsim/phase_screens.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/photon_array.py b/galsim/photon_array.py index 5de24fcaf87..502dc2c87e0 100644 --- a/galsim/photon_array.py +++ b/galsim/photon_array.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/position.py b/galsim/position.py index 147dad3ca31..7460837868f 100644 --- a/galsim/position.py +++ b/galsim/position.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/pse.py b/galsim/pse.py index c795859d338..7d49fd032a4 100644 --- a/galsim/pse.py +++ b/galsim/pse.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/random.py b/galsim/random.py index a47246aa038..60f23d7270a 100644 --- a/galsim/random.py +++ b/galsim/random.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/real.py b/galsim/real.py index 1d58eb59048..8f12ad23a4a 100644 --- a/galsim/real.py +++ b/galsim/real.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -508,6 +508,14 @@ class RealGalaxyCatalog: GalSim knows the location of the installation share directory, so it will automatically look for it there. + .. note:: + + A RealGalaxyCatalog instance will cache data from the input files that it loads. + Normally, this leads to a performance improvement, especially if objects are selected + from the catalog semi-randomly, since it is faster to access the data in memory. + If you want to free the cached memory before the RealGalaxyCatalog goes out of + scope, you can use the `close` method to do so. + Parameters: file_name: The file containing the catalog. [default: None, which will look for the F814W<25.2 COSMOS catalog in $PREFIX/share/galsim. It will raise an @@ -548,8 +556,8 @@ def __init__(self, file_name=None, sample=None, dir=None, preload=False, logger= logger.debug('RealGalaxyCatalog %s has %d objects',self.file_name,self.nobjects) self._preload = preload - self.loaded_files = {} self.saved_noise_im = {} + self.loaded_files = {} # The pyfits commands aren't thread safe. So we need to make sure the methods that # use pyfits are not run concurrently from multiple threads. self.gal_lock = Lock() # Use this when accessing gal files @@ -647,13 +655,22 @@ def __del__(self): self.close() def close(self): + """Close all loaded files. + + Usually it is a performance improvement to keep the various input files open while using + the RealGalaxyCatalog, especially if the access of the galaxies is in semi-random order. + However, if you want to release the memory tied up in these files before the + RealGalaxyCatalog goes out of scope, then this method will release the memory directly. + """ # Need to close any open files. # Make sure to check if loaded_files exists, since the constructor could abort # before it gets to the place where loaded_files is built. if hasattr(self, 'loaded_files'): for f in self.loaded_files.values(): f.close() - self.loaded_files = {} + self.loaded_files.clear() + # Also release the memory in the noise images, even though this is usually negligible. + self.saved_noise_im.clear() def getNObjects(self) : return self.nobjects def __len__(self): return self.nobjects diff --git a/galsim/roman/__init__.py b/galsim/roman/__init__.py index 8468b62601c..8d5aee8fd42 100644 --- a/galsim/roman/__init__.py +++ b/galsim/roman/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -99,7 +99,7 @@ # Maxinum allowed angle from the telecope solar panels to the sun in degrees. max_sun_angle = 36. -from .roman_bandpass import getBandpasses +from .roman_bandpass import getBandpass, getBandpasses from .roman_backgrounds import getSkyLevel from .roman_psfs import getPSF from .roman_wcs import getWCS, findSCA, allowedPos, bestPA, convertCenter diff --git a/galsim/roman/roman_backgrounds.py b/galsim/roman/roman_backgrounds.py index bd56179c937..9e00088616d 100644 --- a/galsim/roman/roman_backgrounds.py +++ b/galsim/roman/roman_backgrounds.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/roman/roman_bandpass.py b/galsim/roman/roman_bandpass.py index 9ff664bc207..e5956d9a402 100644 --- a/galsim/roman/roman_bandpass.py +++ b/galsim/roman/roman_bandpass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -26,10 +26,11 @@ import os from .. import meta_data -from ..errors import galsim_warn +from ..errors import GalSimValueError, galsim_warn from .. import Bandpass, LookupTable -def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands=False, **kwargs): +def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands=False, bandnames=None, + **kwargs): """Utility to get a dictionary containing the Roman ST bandpasses used for imaging. This routine reads in a file containing a list of wavelengths and throughput for all Roman @@ -96,6 +97,9 @@ def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands= There is currently no estimate for the thermal background for these bands and they are set to zero arbitrarily. [default: False] + bandnames: Iterable of bandpass names to get. If None, it gets all the imaging + bands if ``include_all_bands`` is False, or all bands if + ``include_all_bands`` is True. **kwargs: Other kwargs are passed to either `Bandpass.thin` or `Bandpass.truncate` as appropriate. @@ -109,11 +113,19 @@ def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands= data = np.genfromtxt(datafile, names=True) wave = 1000.*data['Wave'] + if bandnames is None: + bandnames = data.dtype.names[1:] + elif (invalid_bandnames := set(bandnames).difference(data.dtype.names[1:])): + raise GalSimValueError("Invalid Roman bandpasses requested;", + value=invalid_bandnames, + allowed_values=data.dtype.names[1:], + ) + # Read in and manipulate the sky background info. sky_file = os.path.join(meta_data.share_dir, "roman", "roman_sky_backgrounds.txt") - sky_data = np.loadtxt(sky_file).transpose() - ecliptic_lat = sky_data[0, :] - ecliptic_lon = sky_data[1, :] + sky_data = np.genfromtxt(sky_file, names=True) + ecliptic_lat = sky_data['Latitude'] + ecliptic_lon = sky_data['Longitude'] # Parse kwargs for truncation, thinning, etc., and check for nonsense. truncate_kwargs = ['blue_limit', 'red_limit', 'relative_throughput'] @@ -138,7 +150,7 @@ def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands= # Set up a dictionary. bandpass_dict = {} # Loop over the bands. - for index, bp_name in enumerate(data.dtype.names[1:]): + for bp_name in bandnames: if include_all_bands is False and bp_name in non_imaging_bands: continue @@ -160,10 +172,36 @@ def getBandpasses(AB_zeropoint=True, default_thin_trunc=True, include_all_bands= # Store the sky level information as an attribute. bp._ecliptic_lat = ecliptic_lat bp._ecliptic_lon = ecliptic_lon - bp._sky_level = sky_data[2+index, :] + bp._sky_level = sky_data[bp_name] # Add it to the dictionary. bp.name = bp_name if bp_name != 'W149' else 'W146' bandpass_dict[bp.name] = bp return bandpass_dict + +def getBandpass(bandname, AB_zeropoint=True, default_thin_trunc=True, **kwargs): + """Utility to get a single bandpass from the Roman ST bandpasses used. + + If you need to get more than one bandpass, use `getBandpasses` instead. + This function just provides a cleaner interface when only one bandpass + is needed. + + See also `getBandpasses`. + + Parameters: + bandname: Name of the bandpass to get. + AB_zeropoint: Should the routine set an AB zeropoint before returning the bandpass? + If False, then it is up to the user to set a zero point. [default: + True] + default_thin_trunc: Use the default thinning and truncation options? Users who wish to + use no thinning and truncation of bandpasses, or who want control over + the level of thinning and truncation, should have this be False. + [default: True] + **kwargs: Other kwargs are passed to either `Bandpass.thin` or + `Bandpass.truncate` as appropriate. + + @returns A Bandpass object for the specified band. + """ + return getBandpasses(AB_zeropoint=AB_zeropoint, default_thin_trunc=default_thin_trunc, + include_all_bands=True, bandnames=[bandname], **kwargs)[bandname] diff --git a/galsim/roman/roman_config.py b/galsim/roman/roman_config.py index b2d49f3cdff..9b1e522f50c 100644 --- a/galsim/roman/roman_config.py +++ b/galsim/roman/roman_config.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -20,7 +20,7 @@ from . import n_pix, exptime, dark_current, read_noise, gain from . import stray_light_fraction, thermal_backgrounds from .roman_psfs import getPSF -from .roman_bandpass import getBandpasses +from .roman_bandpass import getBandpass, getBandpasses from .roman_wcs import getWCS from .roman_backgrounds import getSkyLevel from ..config import ParseAberrations, BandpassBuilder, GetAllParams, GetRNG @@ -112,7 +112,7 @@ def buildBandpass(self, config, base, logger): from ..deprecated import depr depr('W149', 2.5, 'W146', 'Note: this is to match current Roman filter naming schemes') name = 'W146' - bandpass = getBandpasses()[name] + bandpass = getBandpass(name) return bandpass, safe @@ -200,7 +200,7 @@ def setup(self, config, base, image_num, obj_num, ignore, logger): def getBandpass(self, filter_name): if not hasattr(self, 'all_roman_bp'): - self.all_roman_bp = getBandpasses() + self.all_roman_bp = getBandpasses(include_all_bands=True) return self.all_roman_bp[filter_name] def addNoise(self, image, config, base, image_num, obj_num, current_var, logger): diff --git a/galsim/roman/roman_detectors.py b/galsim/roman/roman_detectors.py index 256d8ba5acd..a9030aaa801 100644 --- a/galsim/roman/roman_detectors.py +++ b/galsim/roman/roman_detectors.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/roman/roman_psfs.py b/galsim/roman/roman_psfs.py index c7a8dc7f100..2e9a71db212 100644 --- a/galsim/roman/roman_psfs.py +++ b/galsim/roman/roman_psfs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -22,7 +22,7 @@ from . import pixel_scale, n_pix, pixel_scale_mm from . import n_pix, n_sca, longwave_bands, shortwave_bands from . import diameter, obscuration -from .roman_bandpass import getBandpasses +from .roman_bandpass import getBandpass from ..utilities import LRU_Cache from ..position import PositionD @@ -335,8 +335,7 @@ def _get_single_PSF(SCA, bandpass, SCA_pos, pupil_bin, aper=aper, gsparams=gsparams) if n_waves is not None: # To decide the range of wavelengths to use, check the bandpass. - bp_dict = getBandpasses() - bp = bp_dict[bandpass] + bp = getBandpass(bandpass) PSF = PSF.interpolate(waves=np.linspace(bp.blue_limit, bp.red_limit, n_waves), oversample_fac=1.5) else: diff --git a/galsim/roman/roman_wcs.py b/galsim/roman/roman_wcs.py index 24ec3e2b79d..416555f59eb 100644 --- a/galsim/roman/roman_wcs.py +++ b/galsim/roman/roman_wcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/second_kick.py b/galsim/second_kick.py index 1dc96bd53b0..be0ce85aeb5 100644 --- a/galsim/second_kick.py +++ b/galsim/second_kick.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/sed.py b/galsim/sed.py index e4427d89b46..704957d4462 100644 --- a/galsim/sed.py +++ b/galsim/sed.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/sensor.py b/galsim/sensor.py index 0ac2a820530..844cc0f4f90 100644 --- a/galsim/sensor.py +++ b/galsim/sensor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -129,7 +129,7 @@ class SiliconSensor(Sensor): lsst_e2v_50_8 The E2V sensor being used for LSST, using 8 points along each side of the - pixel boundaries. + pixel boundaries. lsst_e2v_50_32 The E2V sensor being used for LSST, using 32 points along each side of the @@ -175,7 +175,10 @@ class SiliconSensor(Sensor): take more time. If it is increased larger than 4, the size of the Poisson simulation must be increased to match. [default: 3] nrecalc: The number of electrons to accumulate before recalculating the - distortion of the pixel shapes. [default: 10000] + distortion of the pixel shapes. If this is 0, then no automatic + recalculations are done during an accumulation. Coupled with + resume=True and recalc=True options, this allows the user to fully + control when recalculations happen. [default: 10000] treering_func: A `LookupTable` giving the tree ring pattern f(r). [default: None] treering_center: A `PositionD` object with the center of the tree ring pattern in pixel coordinates, which may be outside the pixel region. [default: None; @@ -296,7 +299,7 @@ def __setstate__(self, d): self.__dict__ = d self._init_silicon() # Build the _silicon object. - def accumulate(self, photons, image, orig_center=PositionI(0,0), resume=False): + def accumulate(self, photons, image, orig_center=PositionI(0,0), resume=False, recalc=False): """Accumulate the photons incident at the surface of the sensor into the appropriate pixels in the image. @@ -310,6 +313,8 @@ def accumulate(self, photons, image, orig_center=PositionI(0,0), resume=False): accumulation to see what flux is already on the image, which can be more efficient, especially when the number of pixels is large. [default: False] + recalc: Whether to force a recalculation of the pixel boundaries at the + start. [default: False] Returns: the total flux that fell onto the image. @@ -325,10 +330,42 @@ def accumulate(self, photons, image, orig_center=PositionI(0,0), resume=False): if not image.bounds.isDefined(): raise GalSimUndefinedBoundsError("Calling accumulate on image with undefined bounds") - if resume: + # Cases: + # 1. Brand new image. + # - resume=False + # Set image and initialize + # Set nbatch to effective_nrecalc (or all) + # + # 2. Continuing previous image with recalc according to nrecalc + # - resume=True + # - nrecalc > 0 + # Don't initialize image. Use _last_image. + # Set nbatch to how many left in current recalc + # + # 3. Continuing previous image with manual recalculation + # - resume=True + # - nrecalc = 0 + # Don't initialize image. Use _last_image. + # Do an update at the start if recalc=True + # Set nbatch to total photon flux + + nphotons = len(photons) + + if self.effective_nrecalc == 0: + # Case 3 or 1 + nbatch = np.inf # We won't actually use this, but logically this makes sense. + i2 = nphotons + if resume: + self._silicon.subtractDelta(image._image) + else: + self._silicon.initialize(image._image, orig_center._p); + self._accum_flux_since_update = 0. + elif resume: + # Case 2 # The number in this batch is the total per recalc minus the number of photons # shot in the last pass(es) of this function since being updated. nbatch = self.effective_nrecalc - self._accum_flux_since_update + i2 = 0 # We also need to subtract off the delta image from the last pass. # This represents the flux in the image that hasn't updated the pixel boundaries @@ -337,20 +374,26 @@ def accumulate(self, photons, image, orig_center=PositionI(0,0), resume=False): # not added twice. self._silicon.subtractDelta(image._image) else: + # Case 1 nbatch = self.effective_nrecalc + i2 = 0 self._silicon.initialize(image._image, orig_center._p); self._accum_flux_since_update = 0 + if resume and recalc: + self._silicon.update(image._image) + self._accum_flux_since_update = 0 + i1 = 0 - nphotons = len(photons) # added_flux is how much flux acctually lands on the sensor. # accum_flux is how much flux is in the photons that we have accumulated so far. # cumsum_flux is an array with the cumulate sum of the photon fluxes in the photon array. added_flux = accum_flux = 0. cumsum_flux = np.cumsum(photons.flux) while i1 < nphotons: - i2 = np.searchsorted(cumsum_flux, accum_flux+nbatch) + 1 - i2 = min(i2, nphotons) + if i2 == 0: + i2 = np.searchsorted(cumsum_flux, accum_flux+nbatch) + 1 + i2 = min(i2, nphotons) added_flux += self._silicon.accumulate(photons._pa, i1, i2, self.rng._rng, image._image) if i2 < nphotons: self._silicon.update(image._image) @@ -360,6 +403,7 @@ def accumulate(self, photons, image, orig_center=PositionI(0,0), resume=False): else: self._accum_flux_since_update += cumsum_flux[-1] - accum_flux i1 = i2 + i2 = 0 # On the last pass, we don't update the pixel positions, but we do need to add the # current running delta image to the full image. diff --git a/galsim/sersic.py b/galsim/sersic.py index 0ef996bc127..df2c5daa5fd 100644 --- a/galsim/sersic.py +++ b/galsim/sersic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/shapelet.py b/galsim/shapelet.py index 4d5ffdc77de..20d1dc3f519 100644 --- a/galsim/shapelet.py +++ b/galsim/shapelet.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/shear.py b/galsim/shear.py index 70fff39163a..4a738144523 100644 --- a/galsim/shear.py +++ b/galsim/shear.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/spergel.py b/galsim/spergel.py index e0be12dc49e..5904809efbf 100644 --- a/galsim/spergel.py +++ b/galsim/spergel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -205,7 +205,7 @@ def _maxk(self): @property def _stepk(self): - R = self.calculateFluxRadius(1.0 - self.gsparams.folding_threshold) * self._r0 + R = self.calculateFluxRadius(1.0 - self.gsparams.folding_threshold) # Go to at least 5*hlr R = max(R, self.gsparams.stepk_minimum_hlr * self.half_light_radius) return math.pi / R diff --git a/galsim/sum.py b/galsim/sum.py index 2a0598cde04..148b86f65a8 100644 --- a/galsim/sum.py +++ b/galsim/sum.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/table.py b/galsim/table.py index 2fa69620af1..1ccf2acb7c0 100644 --- a/galsim/table.py +++ b/galsim/table.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -951,7 +951,7 @@ def __call__(self, x, y, grid=False): Returns: a scalar value if x and y are scalar, or a numpy array if x and y are arrays. """ - if np.__version__ >= "2.0": + if np.__version__ >= "2.0": # pragma: no branch # I'm not sure if there is a simpler way to do this in 2.0. # We want a copy when edge_mode == wrap. Otherwise, only copy if dtype changes or # x,y aren't already arrays. That used to be simple... @@ -1071,7 +1071,7 @@ def gradient(self, x, y, grid=False): A tuple of (dfdx, dfdy) where dfdx, dfdy are single values (if x,y were single values) or numpy arrays. """ - if np.__version__ >= "2.0": + if np.__version__ >= "2.0": # pragma: no branch copy = True if self.edge_mode=='wrap' else None else: copy = self.edge_mode=='wrap' diff --git a/galsim/transform.py b/galsim/transform.py index bd24779d513..8e24a7f7bac 100644 --- a/galsim/transform.py +++ b/galsim/transform.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/utilities.py b/galsim/utilities.py index acd233ca58c..86d79acb62c 100644 --- a/galsim/utilities.py +++ b/galsim/utilities.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -1879,7 +1879,7 @@ def least_squares(fun, x0, args=(), kwargs={}, max_iter=1000, tol=1e-9, lambda_i A = JTJ + lambda_ * np.eye(len(JTJ)) try: delta_params = np.linalg.solve(A, JTr) - except np.linalg.LinAlgError: + except np.linalg.LinAlgError: # pragma: no cover lambda_ *= 2 continue diff --git a/galsim/vonkarman.py b/galsim/vonkarman.py index bd2abaf2f71..c0f42743d9d 100644 --- a/galsim/vonkarman.py +++ b/galsim/vonkarman.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/wcs.py b/galsim/wcs.py index 014dfa1aa8a..e93fa68c002 100644 --- a/galsim/wcs.py +++ b/galsim/wcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/wfirst.py b/galsim/wfirst.py index 1d9dba349f4..2b5eddd2842 100644 --- a/galsim/wfirst.py +++ b/galsim/wfirst.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/galsim/zernike.py b/galsim/zernike.py index 16643d376dd..e162a20353d 100644 --- a/galsim/zernike.py +++ b/galsim/zernike.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -140,7 +140,7 @@ def __noll_coef_array(jmax, obscuration): _noll_coef_array = LRU_Cache(__noll_coef_array) -def _xy_contribution(rho2_power, rho_power, shape): +def __xy_contribution(rho2_power, rho_power): """Convert (rho, |rho|^2) bivariate polynomial coefficients to (x, y) bivariate polynomial coefficients. """ @@ -162,25 +162,29 @@ def _xy_contribution(rho2_power, rho_power, shape): # # and so on. We can apply these operations repeatedly to effect arbitrary powers of rho or # |rho|^2. + if rho2_power == 0 and rho_power == 0: + return np.array([[1]], dtype=np.complex128) + + if rho2_power > 0: + prev = _xy_contribution(rho2_power-1, rho_power) + shape = (prev.shape[0] + 2, prev.shape[1] +2) + out = np.zeros(shape, dtype=np.complex128) + for (i, j) in zip(*np.nonzero(prev)): + val = prev[i, j] + out[i+2, j] += val + out[i, j+2] += val + return out + + # else rho_power > 0 + prev = _xy_contribution(rho2_power, rho_power-1) + shape = (prev.shape[0] + 1, prev.shape[1] + 1) out = np.zeros(shape, dtype=np.complex128) - out[0,0] = 1 - while rho2_power >= 1: - new = np.zeros_like(out) - for (i, j) in zip(*np.nonzero(out)): - val = out[i, j] - new[i+2, j] += val - new[i, j+2] += val - rho2_power -= 1 - out = new - while rho_power >= 1: - new = np.zeros_like(out) - for (i, j) in zip(*np.nonzero(out)): - val = out[i, j] - new[i+1, j] += val - new[i, j+1] += 1j*val - rho_power -= 1 - out = new + for (i, j) in zip(*np.nonzero(prev)): + val = prev[i, j] + out[i+1, j] += val + out[i, j+1] += 1j*val return out +_xy_contribution = LRU_Cache(__xy_contribution) def _rrsq_to_xy(coefs, shape): @@ -190,7 +194,8 @@ def _rrsq_to_xy(coefs, shape): # Now we loop through the elements of coefs and compute their contribution to new_coefs for (i, j) in zip(*np.nonzero(coefs)): - new_coefs += (coefs[i, j]*_xy_contribution(i, j, shape)).real + contribution = (coefs[i, j]*_xy_contribution(i, j)).real + new_coefs[:contribution.shape[0], :contribution.shape[1]] += contribution return new_coefs @@ -387,7 +392,7 @@ def __annular_zern_rho_coefs(n, m, eps): if i % 2 == 1: continue j = i // 2 more_coefs = (norm**j) * binomial(-eps**2, 1, j) - out[0:i+1:2] += coef*more_coefs + out[0:i+1:2] += float(coef)*more_coefs elif m == n: # Equation (25) norm = 1./np.sqrt(np.sum((eps**2)**np.arange(n+1))) out[n] = norm @@ -716,17 +721,40 @@ def gradY(self): newCoef /= self.R_outer return Zernike(newCoef, R_outer=self.R_outer, R_inner=self.R_inner) - def __call__(self, x, y): + def __call__(self, x, y, robust=False): """Evaluate this Zernike polynomial series at Cartesian coordinates x and y. Synonym for `evalCartesian`. + Parameters: + x: x-coordinate of evaluation points. Can be list-like. + y: y-coordinate of evaluation points. Can be list-like. + robust: If True, use a more robust method for evaluating the polynomial. + This can sometimes be slower, but is usually more accurate, + especially for large Noll indices. [default: False] + Returns: + Series evaluations as numpy array. + """ + if robust: + return self.evalCartesianRobust(x, y) + return self.evalCartesian(x, y) + + def evalCartesianRobust(self, x, y): + """Evaluate this Zernike polynomial series at Cartesian coordinates x and y using a more + robust method than the default `evalCartesian`. + Parameters: x: x-coordinate of evaluation points. Can be list-like. y: y-coordinate of evaluation points. Can be list-like. + Returns: Series evaluations as numpy array. """ - return self.evalCartesian(x, y) + x = np.asarray(x) + y = np.asarray(y) + rho = (x + 1j*y) / self.R_outer + rhosq = np.abs(rho)**2 + ar = _noll_coef_array(len(self.coef)-1, self.R_inner/self.R_outer).dot(self.coef[1:]) + return horner2d(rhosq, rho, ar).real def evalCartesian(self, x, y): """Evaluate this Zernike polynomial series at Cartesian coordinates x and y. @@ -738,7 +766,8 @@ def evalCartesian(self, x, y): Returns: Series evaluations as numpy array. """ - return horner2d(x, y, self._coef_array_xy, dtype=float) + ar = self._coef_array_xy + return horner2d(x, y, ar, dtype=float) def evalPolar(self, rho, theta): """Evaluate this Zernike polynomial series at polar coordinates rho and theta. @@ -1215,6 +1244,20 @@ def __call__(self, u, v, x=None, y=None): assert np.shape(x) == np.shape(u) return horner4d(u, v, x, y, self._coef_array_uvxy) + def xycoef(self, u, v): + """Return the xy Zernike coefficients for a given uv point or points. + + Parameters: + u, v: float or array. UV point(s). + + Returns: + [npoint, jmax] array. Zernike coefficients for the given UV point(s). + """ + uu, vv = np.broadcast_arrays(u, v) + out = np.array([z(uu, vv) for z in self._xy_series]).T + out[..., 0] = 0.0 # Zero out piston term + return out + def __neg__(self): """Negate a DoubleZernike.""" if 'coef' in self.__dict__: diff --git a/include/GalSim.h b/include/GalSim.h index 69c4c5715f4..5f9bafffffe 100644 --- a/include/GalSim.h +++ b/include/GalSim.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/BinomFact.h b/include/galsim/BinomFact.h index 02104a40a12..f47122e3be2 100644 --- a/include/galsim/BinomFact.h +++ b/include/galsim/BinomFact.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Bounds.h b/include/galsim/Bounds.h index 75a67d99629..ef377623b21 100644 --- a/include/galsim/Bounds.h +++ b/include/galsim/Bounds.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/CDModel.h b/include/galsim/CDModel.h index 0434fceda8e..48313fc1817 100644 --- a/include/galsim/CDModel.h +++ b/include/galsim/CDModel.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/CorrelatedNoise.h b/include/galsim/CorrelatedNoise.h index 3b7b34a557c..3c4b98cf052 100644 --- a/include/galsim/CorrelatedNoise.h +++ b/include/galsim/CorrelatedNoise.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/GSParams.h b/include/galsim/GSParams.h index 8129956b3c4..8c23a1b916e 100644 --- a/include/galsim/GSParams.h +++ b/include/galsim/GSParams.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Image.h b/include/galsim/Image.h index 3923e03c87b..55362ddd411 100644 --- a/include/galsim/Image.h +++ b/include/galsim/Image.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/ImageArith.h b/include/galsim/ImageArith.h index 3c01642a6f1..838cf436f37 100644 --- a/include/galsim/ImageArith.h +++ b/include/galsim/ImageArith.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Interpolant.h b/include/galsim/Interpolant.h index 955eafe4d6a..f0cedf5ba5c 100644 --- a/include/galsim/Interpolant.h +++ b/include/galsim/Interpolant.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/LRUCache.h b/include/galsim/LRUCache.h index 796488ca169..cd6157a96bc 100644 --- a/include/galsim/LRUCache.h +++ b/include/galsim/LRUCache.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Laguerre.h b/include/galsim/Laguerre.h index f12f1ed0c43..8d37490b0a9 100644 --- a/include/galsim/Laguerre.h +++ b/include/galsim/Laguerre.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/OneDimensionalDeviate.h b/include/galsim/OneDimensionalDeviate.h index 5d8aa575e80..0ed0bc2d8b3 100644 --- a/include/galsim/OneDimensionalDeviate.h +++ b/include/galsim/OneDimensionalDeviate.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/PhotonArray.h b/include/galsim/PhotonArray.h index 34ba27a0740..126e6c13824 100644 --- a/include/galsim/PhotonArray.h +++ b/include/galsim/PhotonArray.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Polygon.h b/include/galsim/Polygon.h index 1948613d3b5..6f1beffdee6 100644 --- a/include/galsim/Polygon.h +++ b/include/galsim/Polygon.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/ProbabilityTree.h b/include/galsim/ProbabilityTree.h index 313a054a231..37d42a7ff7b 100644 --- a/include/galsim/ProbabilityTree.h +++ b/include/galsim/ProbabilityTree.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Random.h b/include/galsim/Random.h index d6afe8b7c5f..f40cc8205d8 100644 --- a/include/galsim/Random.h +++ b/include/galsim/Random.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/RealGalaxy.h b/include/galsim/RealGalaxy.h index 0b14774454b..4751ffaca0d 100644 --- a/include/galsim/RealGalaxy.h +++ b/include/galsim/RealGalaxy.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBAdd.h b/include/galsim/SBAdd.h index 5a8b59a8e64..d7f0cfdade2 100644 --- a/include/galsim/SBAdd.h +++ b/include/galsim/SBAdd.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBAddImpl.h b/include/galsim/SBAddImpl.h index 492c3659efd..2f78ed05078 100644 --- a/include/galsim/SBAddImpl.h +++ b/include/galsim/SBAddImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBAiry.h b/include/galsim/SBAiry.h index 6edf348395b..7079aabf794 100644 --- a/include/galsim/SBAiry.h +++ b/include/galsim/SBAiry.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBAiryImpl.h b/include/galsim/SBAiryImpl.h index 584a491a16d..90716bf200e 100644 --- a/include/galsim/SBAiryImpl.h +++ b/include/galsim/SBAiryImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBBox.h b/include/galsim/SBBox.h index 55048cce4ff..b44c7e1d72c 100644 --- a/include/galsim/SBBox.h +++ b/include/galsim/SBBox.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBBoxImpl.h b/include/galsim/SBBoxImpl.h index a39bd872ba1..a1d022c24cf 100644 --- a/include/galsim/SBBoxImpl.h +++ b/include/galsim/SBBoxImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBConvolve.h b/include/galsim/SBConvolve.h index 01b7d1da717..497348dcc78 100644 --- a/include/galsim/SBConvolve.h +++ b/include/galsim/SBConvolve.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBConvolveImpl.h b/include/galsim/SBConvolveImpl.h index 351688e6aa9..fd431a98005 100644 --- a/include/galsim/SBConvolveImpl.h +++ b/include/galsim/SBConvolveImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBDeconvolve.h b/include/galsim/SBDeconvolve.h index 7702b0a92d1..8c58fd76f4d 100644 --- a/include/galsim/SBDeconvolve.h +++ b/include/galsim/SBDeconvolve.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBDeconvolveImpl.h b/include/galsim/SBDeconvolveImpl.h index f3c82a88c3f..274f01fd80e 100644 --- a/include/galsim/SBDeconvolveImpl.h +++ b/include/galsim/SBDeconvolveImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBDeltaFunction.h b/include/galsim/SBDeltaFunction.h index a08ed866af2..9df280ad7ef 100644 --- a/include/galsim/SBDeltaFunction.h +++ b/include/galsim/SBDeltaFunction.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBDeltaFunctionImpl.h b/include/galsim/SBDeltaFunctionImpl.h index e4298bebf13..2cf97b0b18d 100644 --- a/include/galsim/SBDeltaFunctionImpl.h +++ b/include/galsim/SBDeltaFunctionImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBExponential.h b/include/galsim/SBExponential.h index 4542420e7bb..d83990d1d2f 100644 --- a/include/galsim/SBExponential.h +++ b/include/galsim/SBExponential.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBExponentialImpl.h b/include/galsim/SBExponentialImpl.h index 8a809500cd2..7d594f9bc28 100644 --- a/include/galsim/SBExponentialImpl.h +++ b/include/galsim/SBExponentialImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBFourierSqrt.h b/include/galsim/SBFourierSqrt.h index 4fc4e89aaf0..745c2c0fd34 100644 --- a/include/galsim/SBFourierSqrt.h +++ b/include/galsim/SBFourierSqrt.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBFourierSqrtImpl.h b/include/galsim/SBFourierSqrtImpl.h index 786164521eb..bcf0e5aae6f 100644 --- a/include/galsim/SBFourierSqrtImpl.h +++ b/include/galsim/SBFourierSqrtImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBGaussian.h b/include/galsim/SBGaussian.h index d573eff499d..d5072add25a 100644 --- a/include/galsim/SBGaussian.h +++ b/include/galsim/SBGaussian.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBGaussianImpl.h b/include/galsim/SBGaussianImpl.h index d05d948ccb1..dd2c46ddeb8 100644 --- a/include/galsim/SBGaussianImpl.h +++ b/include/galsim/SBGaussianImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBInclinedExponential.h b/include/galsim/SBInclinedExponential.h index 2980abac962..5fc3a74464e 100644 --- a/include/galsim/SBInclinedExponential.h +++ b/include/galsim/SBInclinedExponential.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBInclinedExponentialImpl.h b/include/galsim/SBInclinedExponentialImpl.h index 710daf04fe4..5c358d801e7 100644 --- a/include/galsim/SBInclinedExponentialImpl.h +++ b/include/galsim/SBInclinedExponentialImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBInclinedSersic.h b/include/galsim/SBInclinedSersic.h index 3da9dbdc398..2441a99602b 100644 --- a/include/galsim/SBInclinedSersic.h +++ b/include/galsim/SBInclinedSersic.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBInclinedSersicImpl.h b/include/galsim/SBInclinedSersicImpl.h index 656bec0f1c7..6231d4025f3 100644 --- a/include/galsim/SBInclinedSersicImpl.h +++ b/include/galsim/SBInclinedSersicImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBInterpolatedImage.h b/include/galsim/SBInterpolatedImage.h index eaa1f2c55d4..5d5ebc24660 100644 --- a/include/galsim/SBInterpolatedImage.h +++ b/include/galsim/SBInterpolatedImage.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBInterpolatedImageImpl.h b/include/galsim/SBInterpolatedImageImpl.h index b4d7a8d756e..505c98e617d 100644 --- a/include/galsim/SBInterpolatedImageImpl.h +++ b/include/galsim/SBInterpolatedImageImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBKolmogorov.h b/include/galsim/SBKolmogorov.h index 663042812db..654be3c8d35 100644 --- a/include/galsim/SBKolmogorov.h +++ b/include/galsim/SBKolmogorov.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBKolmogorovImpl.h b/include/galsim/SBKolmogorovImpl.h index 7218de48af2..4830cb1f76e 100644 --- a/include/galsim/SBKolmogorovImpl.h +++ b/include/galsim/SBKolmogorovImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBMoffat.h b/include/galsim/SBMoffat.h index f84e78cddd4..bf3302ff739 100644 --- a/include/galsim/SBMoffat.h +++ b/include/galsim/SBMoffat.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBMoffatImpl.h b/include/galsim/SBMoffatImpl.h index 83109f849a9..de50c9b6c0c 100644 --- a/include/galsim/SBMoffatImpl.h +++ b/include/galsim/SBMoffatImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBProfile.h b/include/galsim/SBProfile.h index 4f08af72f4f..3ae101cb833 100644 --- a/include/galsim/SBProfile.h +++ b/include/galsim/SBProfile.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBProfileImpl.h b/include/galsim/SBProfileImpl.h index 5d004aae697..da1ce4e34eb 100644 --- a/include/galsim/SBProfileImpl.h +++ b/include/galsim/SBProfileImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBSecondKick.h b/include/galsim/SBSecondKick.h index 5fc905d5324..c1312e1e90e 100644 --- a/include/galsim/SBSecondKick.h +++ b/include/galsim/SBSecondKick.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBSecondKickImpl.h b/include/galsim/SBSecondKickImpl.h index eb402f6391f..5f1a5fe02cd 100644 --- a/include/galsim/SBSecondKickImpl.h +++ b/include/galsim/SBSecondKickImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBSersic.h b/include/galsim/SBSersic.h index 1f0d5c30fed..676bb328f80 100644 --- a/include/galsim/SBSersic.h +++ b/include/galsim/SBSersic.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBSersicImpl.h b/include/galsim/SBSersicImpl.h index 4e55b134b20..f75d18976b2 100644 --- a/include/galsim/SBSersicImpl.h +++ b/include/galsim/SBSersicImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBShapelet.h b/include/galsim/SBShapelet.h index 9e7a8e20464..e186a4d52ac 100644 --- a/include/galsim/SBShapelet.h +++ b/include/galsim/SBShapelet.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBShapeletImpl.h b/include/galsim/SBShapeletImpl.h index 99a7c4f14a5..ee0091197c0 100644 --- a/include/galsim/SBShapeletImpl.h +++ b/include/galsim/SBShapeletImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBSpergel.h b/include/galsim/SBSpergel.h index 3a107a52da1..0c828e418cc 100644 --- a/include/galsim/SBSpergel.h +++ b/include/galsim/SBSpergel.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBSpergelImpl.h b/include/galsim/SBSpergelImpl.h index c7298a555a8..7ef41019615 100644 --- a/include/galsim/SBSpergelImpl.h +++ b/include/galsim/SBSpergelImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBTransform.h b/include/galsim/SBTransform.h index dc4267c5bb0..b3c644c5886 100644 --- a/include/galsim/SBTransform.h +++ b/include/galsim/SBTransform.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBTransformImpl.h b/include/galsim/SBTransformImpl.h index 108f1bc5fcb..2faee572e82 100644 --- a/include/galsim/SBTransformImpl.h +++ b/include/galsim/SBTransformImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBVonKarman.h b/include/galsim/SBVonKarman.h index fc97172edff..ef25e4b3c46 100644 --- a/include/galsim/SBVonKarman.h +++ b/include/galsim/SBVonKarman.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/SBVonKarmanImpl.h b/include/galsim/SBVonKarmanImpl.h index fe61fd6d857..65bde1330c8 100644 --- a/include/galsim/SBVonKarmanImpl.h +++ b/include/galsim/SBVonKarmanImpl.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Silicon.h b/include/galsim/Silicon.h index a275d46e242..31405fce489 100644 --- a/include/galsim/Silicon.h +++ b/include/galsim/Silicon.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -46,8 +46,8 @@ namespace galsim bool insidePixel(int ix, int iy, double x, double y, double zconv, Bounds& targetBounds, bool* off_edge, int emptypolySize, - Bounds* pixelInnerBoundsData, - Bounds* pixelOuterBoundsData, + Bounds* pixelInnerBoundsData, + Bounds* pixelOuterBoundsData, Position* horizontalBoundaryPointsData, Position* verticalBoundaryPointsData, Position* emptypolyData) const; @@ -261,8 +261,8 @@ namespace galsim void initializeBoundaryPoints(int nx, int ny); void updatePixelBounds(int nx, int ny, size_t k, - Bounds* pixelInnerBoundsData, - Bounds* pixelOuterBoundsData, + Bounds* pixelInnerBoundsData, + Bounds* pixelOuterBoundsData, Position* horizontalBoundaryPointsData, Position* verticalBoundaryPointsData); @@ -270,8 +270,8 @@ namespace galsim std::vector > _horizontalBoundaryPoints; std::vector > _verticalBoundaryPoints; - std::vector > _pixelInnerBounds; - std::vector > _pixelOuterBounds; + std::vector > _pixelInnerBounds; + std::vector > _pixelOuterBounds; std::vector > _horizontalDistortions; std::vector > _verticalDistortions; int _numVertices, _nx, _ny, _nv, _qDist; diff --git a/include/galsim/Solve.h b/include/galsim/Solve.h index 3bb3bdd2cd8..1035bc341b8 100644 --- a/include/galsim/Solve.h +++ b/include/galsim/Solve.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Std.h b/include/galsim/Std.h index 81824a6ab08..a149800e92a 100644 --- a/include/galsim/Std.h +++ b/include/galsim/Std.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Stopwatch.h b/include/galsim/Stopwatch.h index 324a10d217e..efd062d20bd 100644 --- a/include/galsim/Stopwatch.h +++ b/include/galsim/Stopwatch.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/Table.h b/include/galsim/Table.h index e5313473149..c4fa54b3ac9 100644 --- a/include/galsim/Table.h +++ b/include/galsim/Table.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/WCS.h b/include/galsim/WCS.h index 33697714d0d..4e936c01d8c 100644 --- a/include/galsim/WCS.h +++ b/include/galsim/WCS.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/hsm/PSFCorr.h b/include/galsim/hsm/PSFCorr.h index baecb29e8a3..cbd27dfedea 100644 --- a/include/galsim/hsm/PSFCorr.h +++ b/include/galsim/hsm/PSFCorr.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/integ/Int.h b/include/galsim/integ/Int.h index 0da23ef342a..f75263a6867 100644 --- a/include/galsim/integ/Int.h +++ b/include/galsim/integ/Int.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/integ/IntGKPData1.h b/include/galsim/integ/IntGKPData1.h index 8e9525a9230..e9d7b5398f9 100644 --- a/include/galsim/integ/IntGKPData1.h +++ b/include/galsim/integ/IntGKPData1.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/integ/IntGKPData10.h b/include/galsim/integ/IntGKPData10.h index 73adb4cdb63..6f06367b7fb 100644 --- a/include/galsim/integ/IntGKPData10.h +++ b/include/galsim/integ/IntGKPData10.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/integ/MoreFunctional.h b/include/galsim/integ/MoreFunctional.h index 2e63faf0fd7..adbb9cc891f 100644 --- a/include/galsim/integ/MoreFunctional.h +++ b/include/galsim/integ/MoreFunctional.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/math/Angle.h b/include/galsim/math/Angle.h index b86ef6d38dd..223be8e4e79 100644 --- a/include/galsim/math/Angle.h +++ b/include/galsim/math/Angle.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/math/Bessel.h b/include/galsim/math/Bessel.h index d734dc57e01..a6b2eb65140 100644 --- a/include/galsim/math/Bessel.h +++ b/include/galsim/math/Bessel.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/math/Gamma.h b/include/galsim/math/Gamma.h index 405d75b3cc6..20d492a6a42 100644 --- a/include/galsim/math/Gamma.h +++ b/include/galsim/math/Gamma.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/math/Hankel.h b/include/galsim/math/Hankel.h index 65e911f623d..b0398be0254 100644 --- a/include/galsim/math/Hankel.h +++ b/include/galsim/math/Hankel.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/math/Horner.h b/include/galsim/math/Horner.h index 8fc39791249..5e4b97a71c0 100644 --- a/include/galsim/math/Horner.h +++ b/include/galsim/math/Horner.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/math/Nan.h b/include/galsim/math/Nan.h index 33b710dc622..10661b6c4f0 100644 --- a/include/galsim/math/Nan.h +++ b/include/galsim/math/Nan.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/math/Sinc.h b/include/galsim/math/Sinc.h index bf99fcfbe39..f5c15c4af67 100644 --- a/include/galsim/math/Sinc.h +++ b/include/galsim/math/Sinc.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/include/galsim/mmgr.h b/include/galsim/mmgr.h index 1f3e8b3cdaa..0ba448c85b4 100644 --- a/include/galsim/mmgr.h +++ b/include/galsim/mmgr.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pyproject.toml b/pyproject.toml index a7d1740add5..ce74a191b14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,7 @@ [build-system] -requires = ["setuptools>=38,<72", "wheel", "pybind11>=2.2"] +requires = ["setuptools>=38", "wheel", "pybind11>=2.2"] + +[tool.pytest.ini_options] +testpaths = [ + "tests", +] diff --git a/pysrc/Bessel.cpp b/pysrc/Bessel.cpp index df1a7ee0013..35a0aa4afcd 100644 --- a/pysrc/Bessel.cpp +++ b/pysrc/Bessel.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Bounds.cpp b/pysrc/Bounds.cpp index a7d55d4b3f3..f8de093f9fd 100644 --- a/pysrc/Bounds.cpp +++ b/pysrc/Bounds.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/CDModel.cpp b/pysrc/CDModel.cpp index fdf8829305a..6a71021a1ba 100644 --- a/pysrc/CDModel.cpp +++ b/pysrc/CDModel.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/HSM.cpp b/pysrc/HSM.cpp index 33cec393f38..b6fdaf7c48b 100644 --- a/pysrc/HSM.cpp +++ b/pysrc/HSM.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Horner.cpp b/pysrc/Horner.cpp index 785ea8fbdec..c15fb00a1d5 100644 --- a/pysrc/Horner.cpp +++ b/pysrc/Horner.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Image.cpp b/pysrc/Image.cpp index 631942fdf5d..8c07b0b98f9 100644 --- a/pysrc/Image.cpp +++ b/pysrc/Image.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Integ.cpp b/pysrc/Integ.cpp index 131ab4d43ba..74d1744f64f 100644 --- a/pysrc/Integ.cpp +++ b/pysrc/Integ.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Interpolant.cpp b/pysrc/Interpolant.cpp index 57f48179108..87585a077e1 100644 --- a/pysrc/Interpolant.cpp +++ b/pysrc/Interpolant.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/PhotonArray.cpp b/pysrc/PhotonArray.cpp index b01ab6f101e..cc97d9343d2 100644 --- a/pysrc/PhotonArray.cpp +++ b/pysrc/PhotonArray.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/PyBind11Helper.h b/pysrc/PyBind11Helper.h index d89f7c55aac..0459e0d8722 100644 --- a/pysrc/PyBind11Helper.h +++ b/pysrc/PyBind11Helper.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Random.cpp b/pysrc/Random.cpp index 8a63c10126e..5d5f942175d 100644 --- a/pysrc/Random.cpp +++ b/pysrc/Random.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/RealGalaxy.cpp b/pysrc/RealGalaxy.cpp index e87ab367368..2aceb654118 100644 --- a/pysrc/RealGalaxy.cpp +++ b/pysrc/RealGalaxy.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBAdd.cpp b/pysrc/SBAdd.cpp index b7af0b33d0f..2b95cbdb1e3 100644 --- a/pysrc/SBAdd.cpp +++ b/pysrc/SBAdd.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBAiry.cpp b/pysrc/SBAiry.cpp index bf60e764177..7ac4141b654 100644 --- a/pysrc/SBAiry.cpp +++ b/pysrc/SBAiry.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBBox.cpp b/pysrc/SBBox.cpp index b9e28322d76..621e066d520 100644 --- a/pysrc/SBBox.cpp +++ b/pysrc/SBBox.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBConvolve.cpp b/pysrc/SBConvolve.cpp index e52d1f49f84..8bb3d69945e 100644 --- a/pysrc/SBConvolve.cpp +++ b/pysrc/SBConvolve.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBDeconvolve.cpp b/pysrc/SBDeconvolve.cpp index 2d7732b554b..2caf6675a2f 100644 --- a/pysrc/SBDeconvolve.cpp +++ b/pysrc/SBDeconvolve.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBDeltaFunction.cpp b/pysrc/SBDeltaFunction.cpp index b4a86bbc85c..c37fc36ba9b 100644 --- a/pysrc/SBDeltaFunction.cpp +++ b/pysrc/SBDeltaFunction.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBExponential.cpp b/pysrc/SBExponential.cpp index 5d13064f478..0a5a9d40846 100644 --- a/pysrc/SBExponential.cpp +++ b/pysrc/SBExponential.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBFourierSqrt.cpp b/pysrc/SBFourierSqrt.cpp index 8267d8785b9..0277b19581c 100644 --- a/pysrc/SBFourierSqrt.cpp +++ b/pysrc/SBFourierSqrt.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBGaussian.cpp b/pysrc/SBGaussian.cpp index 877106aef21..138912e934b 100644 --- a/pysrc/SBGaussian.cpp +++ b/pysrc/SBGaussian.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBInclinedExponential.cpp b/pysrc/SBInclinedExponential.cpp index 706478af58e..da8d2b24455 100644 --- a/pysrc/SBInclinedExponential.cpp +++ b/pysrc/SBInclinedExponential.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBInclinedSersic.cpp b/pysrc/SBInclinedSersic.cpp index 6e24cd2b2c7..d3680c9f276 100644 --- a/pysrc/SBInclinedSersic.cpp +++ b/pysrc/SBInclinedSersic.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBInterpolatedImage.cpp b/pysrc/SBInterpolatedImage.cpp index a9c4a7c14b6..ee2a3cbfecb 100644 --- a/pysrc/SBInterpolatedImage.cpp +++ b/pysrc/SBInterpolatedImage.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBKolmogorov.cpp b/pysrc/SBKolmogorov.cpp index a14047b391d..23df1251fa2 100644 --- a/pysrc/SBKolmogorov.cpp +++ b/pysrc/SBKolmogorov.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBMoffat.cpp b/pysrc/SBMoffat.cpp index d4dda8a262f..7b26c370da4 100644 --- a/pysrc/SBMoffat.cpp +++ b/pysrc/SBMoffat.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBProfile.cpp b/pysrc/SBProfile.cpp index 88a97765a47..6b53adae612 100644 --- a/pysrc/SBProfile.cpp +++ b/pysrc/SBProfile.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBSecondKick.cpp b/pysrc/SBSecondKick.cpp index 6c4d3942fe2..a89fafe91dc 100644 --- a/pysrc/SBSecondKick.cpp +++ b/pysrc/SBSecondKick.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBSersic.cpp b/pysrc/SBSersic.cpp index 9dad5a2b680..2667b44032d 100644 --- a/pysrc/SBSersic.cpp +++ b/pysrc/SBSersic.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBShapelet.cpp b/pysrc/SBShapelet.cpp index 505ea956d9b..f54ebace3a8 100644 --- a/pysrc/SBShapelet.cpp +++ b/pysrc/SBShapelet.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBSpergel.cpp b/pysrc/SBSpergel.cpp index 7ddf9bc72ed..cfe3dbf0949 100644 --- a/pysrc/SBSpergel.cpp +++ b/pysrc/SBSpergel.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBTransform.cpp b/pysrc/SBTransform.cpp index 6c8de5041ca..a55777a0d7e 100644 --- a/pysrc/SBTransform.cpp +++ b/pysrc/SBTransform.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/SBVonKarman.cpp b/pysrc/SBVonKarman.cpp index a5b733d7e5e..7bfd9f0b63f 100644 --- a/pysrc/SBVonKarman.cpp +++ b/pysrc/SBVonKarman.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Silicon.cpp b/pysrc/Silicon.cpp index 5d84d4bd2d4..0cfe487c5c5 100644 --- a/pysrc/Silicon.cpp +++ b/pysrc/Silicon.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Table.cpp b/pysrc/Table.cpp index a195e33b4cd..a4d843f91e4 100644 --- a/pysrc/Table.cpp +++ b/pysrc/Table.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/Utilities.cpp b/pysrc/Utilities.cpp index 1482538cf2c..d593264c80e 100644 --- a/pysrc/Utilities.cpp +++ b/pysrc/Utilities.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/WCS.cpp b/pysrc/WCS.cpp index 355473dd9f7..db2ee100fbb 100644 --- a/pysrc/WCS.cpp +++ b/pysrc/WCS.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/pysrc/module.cpp b/pysrc/module.cpp index 51232736178..476171ab368 100644 --- a/pysrc/module.cpp +++ b/pysrc/module.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/requirements.txt b/requirements.txt index 52b065502df..cc9a22fe013 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ # These are in conda_requirements.txt. If using that, you may prefer to do # conda install -c conda-forge --file conda_requirements.txt # prior to running pip install -r requirements.txt -setuptools>=38,<72 +setuptools>=38 numpy>=1.17 astropy>=2.0 pybind11>=2.2 diff --git a/setup.py b/setup.py index d18d9332ca9..05d7a16a980 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -70,21 +70,21 @@ def all_files_from(dir, ext=''): shared_data = all_files_from('share') copt = { - 'gcc' : ['-O2','-std=c++11','-fvisibility=hidden','-fopenmp'], - 'gcc w/ GPU' : ['-O2','-std=c++11','-fvisibility=hidden','-fopenmp','-foffload=nvptx-none','-DGALSIM_USE_GPU'], - 'icc' : ['-O2','-vec-report0','-std=c++11','-openmp'], - 'clang' : ['-O2','-std=c++11', + 'gcc' : ['-O2','-std=c++14','-fvisibility=hidden','-fopenmp'], + 'gcc w/ GPU' : ['-O2','-std=c++14','-fvisibility=hidden','-fopenmp','-foffload=nvptx-none','-DGALSIM_USE_GPU'], + 'icc' : ['-O2','-vec-report0','-std=c++14','-openmp'], + 'clang' : ['-O2','-std=c++14', '-Wno-shorten-64-to-32','-fvisibility=hidden','-stdlib=libc++'], - 'clang w/ OpenMP' : ['-O2','-std=c++11','-fopenmp', + 'clang w/ OpenMP' : ['-O2','-std=c++14','-fopenmp', '-Wno-shorten-64-to-32','-fvisibility=hidden','-stdlib=libc++'], - 'clang w/ Intel OpenMP' : ['-O2','-std=c++11','-Xpreprocessor','-fopenmp', + 'clang w/ Intel OpenMP' : ['-O2','-std=c++14','-Xpreprocessor','-fopenmp', '-Wno-shorten-64-to-32','-fvisibility=hidden','-stdlib=libc++'], - 'clang w/ manual OpenMP' : ['-O2','-std=c++11','-Xpreprocessor','-fopenmp', + 'clang w/ manual OpenMP' : ['-O2','-std=c++14','-Xpreprocessor','-fopenmp', '-Wno-shorten-64-to-32','-fvisibility=hidden','-stdlib=libc++'], - 'clang w/ GPU' : ['-O2','-msse2','-std=c++11','-fopenmp','-fopenmp-targets=nvptx64-nvidia-cuda', + 'clang w/ GPU' : ['-O2','-msse2','-std=c++14','-fopenmp','-fopenmp-targets=nvptx64-nvidia-cuda', '-Wno-openmp-mapping','-Wno-unknown-cuda-version', '-Wno-shorten-64-to-32','-fvisibility=hidden', '-DGALSIM_USE_GPU'], - 'nvc++' : ['-O2','-std=c++11','-mp=gpu','-DGALSIM_USE_GPU'], + 'nvc++' : ['-O2','-std=c++14','-mp=gpu','-DGALSIM_USE_GPU'], 'unknown' : [], } lopt = { @@ -102,10 +102,12 @@ def all_files_from(dir, ext=''): } # If we build with debug, undefine NDEBUG flag -# Note: setuptools stopped allowing --debug, so if we need this, we'll need to find another -# mechanism. +# Note: setuptools stopped allowing --debug, so edit this manually if you want debugging. +# (The other debug variable is just for verbose output to debug this setup script.) +full_debug = False + undef_macros = [] -if "--debug" in sys.argv: +if full_debug: undef_macros+=['NDEBUG'] for name in copt.keys(): if name != 'unknown': @@ -118,7 +120,7 @@ def all_files_from(dir, ext=''): # Verbose is the default for setuptools logging, but if it's on the command line, we take it # to mean that we should also be verbose. -if "--debug" in sys.argv or "--verbose" in sys.argv: +if full_debug or "--verbose" in sys.argv: debug = True local_tmp = 'tmp' @@ -682,17 +684,29 @@ def try_cpp(compiler, cflags=[], lflags=[], prepend=None): """) return try_compile(cpp_code, compiler, cflags, lflags, prepend=prepend) -def try_cpp11(compiler, cflags=[], lflags=[], check_warning=False): - """Check if compiling c++11 code with the given compiler works properly. +def try_cpp14(compiler, cflags=[], lflags=[], check_warning=False): + """Check if compiling c++14 code with the given compiler works properly. """ from textwrap import dedent cpp_code = dedent(""" #include - #include + #include // c++11 feature #include + #include int main(void) { + // c++11 feature std::cout << std::tgamma(1.3) << std::endl; + + // c++14 feature + auto func = [](int i) { return i + 5; }; + std::cout << "Result of func(3): " << func(3) << std::endl; + + // A more sophisticated c++14 feature + std::unique_ptr ptr(new int(10)); + auto lambda = [value = std::move(ptr)]() { if (value) return *value; }; + std::cout << "Value from lambda(): " << lambda() << std::endl; + return 0; } """) @@ -820,7 +834,7 @@ def fix_compiler(compiler, njobs): extra_cflags = copt[comp_type] extra_lflags = lopt[comp_type] - success = try_cpp11(compiler, extra_cflags, extra_lflags) + success = try_cpp14(compiler, extra_cflags, extra_lflags) if not success: # In case libc++ doesn't work, try letting the system use the default stdlib try: @@ -829,16 +843,16 @@ def fix_compiler(compiler, njobs): except (AttributeError, ValueError): pass else: - success = try_cpp11(compiler, extra_cflags, extra_lflags) + success = try_cpp14(compiler, extra_cflags, extra_lflags) if not success: - print('The compiler %s with flags %s did not successfully compile C++11 code'% + print('The compiler %s with flags %s did not successfully compile C++14 code'% (cc, ' '.join(extra_cflags))) - raise OSError("Compiler is not C++-11 compatible") + raise OSError("Compiler is not C++-14 compatible") # Also see if adding -msse2 works (and doesn't give a warning) if '-msse2' not in extra_cflags: extra_cflags.append('-msse2') - if try_cpp11(compiler, extra_cflags, extra_lflags, check_warning=True): + if try_cpp14(compiler, extra_cflags, extra_lflags, check_warning=True): print('Using cflag -msse2') else: print('warning with -msse2.') @@ -1196,6 +1210,9 @@ def run(self): if int(os.environ.get('GALSIM_BUILD_SHARED', 0)): self.run_command("build_shared_clib") + if int(os.environ.get('GALSIM_RUN_TEST', 0)): + self.run_command("run_cpp_test") + class my_install(install): user_options = install.user_options + [('njobs=', 'j', "Number of jobs to use for compiling")] @@ -1227,24 +1244,9 @@ def run(self): install_scripts.run(self) self.distribution.script_install_dir = self.install_dir -class my_test(test): - # TODO: setuptools v72 deprecated python setup.py test, so we need to figure out another - # way to test the C++ code. For now, we are pinning setuptools to <72. +class my_run_cpp_test(my_build_ext): - # cf. https://pytest.readthedocs.io/en/2.7.3/goodpractises.html - user_options = [('njobs=', 'j', "Number of jobs to use in py.test")] - - def initialize_options(self): - test.initialize_options(self) - self.pytest_args = None - self.njobs = None - - def finalize_options(self): - test.finalize_options(self) - self.test_args = [] - self.test_suite = True - - def run_cpp_tests(self): + def run(self): builder = self.distribution.get_command_obj('build_ext') compiler = builder.compiler cflags, lflags = fix_compiler(compiler, 1) @@ -1306,32 +1308,6 @@ def run_cpp_tests(self): raise RuntimeError("C++ tests failed") print("All C++ tests passed.") - def run_tests(self): - - if int(os.environ.get('GALSIM_TEST_PY', 1)): - njobs = parse_njobs(self.njobs, 'pytest', 'test') - pytest_args = ['-n=%d'%njobs, '--timeout=60'] - original_dir = os.getcwd() - os.chdir('tests') - test_files = glob.glob('test*.py') - - import pytest - pytest.main(['--version']) - errno = pytest.main(pytest_args + test_files) - py_err = errno != 0 - - os.chdir(original_dir) - - # Build and run the C++ tests - if int(os.environ.get('GALSIM_TEST_CPP', 1)): - self.run_cpp_tests() - - if int(os.environ.get('GALSIM_TEST_PY', 1)): - if py_err: - raise RuntimeError("Some Python tests failed") - else: - print("All python tests passed.") - lib=("galsim", {'sources' : cpp_sources, 'depends' : headers + inst, @@ -1343,7 +1319,7 @@ def run_tests(self): undef_macros = undef_macros, extra_link_args = ["-lfftw3"]) -build_dep = ['setuptools>=38,<72', 'pybind11>=2.2', 'numpy>=1.17'] +build_dep = ['setuptools>=38', 'pybind11>=2.2', 'numpy>=1.17'] run_dep = ['astropy', 'LSSTDESC.Coord'] test_dep = ['pytest', 'pytest-xdist', 'pytest-timeout', 'scipy', 'pyyaml'] @@ -1366,7 +1342,7 @@ def run_tests(self): print('GalSim version is %s'%(galsim_version)) # Write a Version.h file that has this information for people using the C++ library. -vi = re.split('\.|-',galsim_version) +vi = re.split(r'\.|-',galsim_version) version_info = tuple([int(x) for x in vi if x.isdigit()]) if len(version_info) == 2: version_info = version_info + (0,) @@ -1432,7 +1408,7 @@ def run_tests(self): 'install': my_install, 'install_scripts': my_install_scripts, 'easy_install': my_easy_install, - 'test': my_test, + 'run_cpp_test': my_run_cpp_test, }, entry_points = {'console_scripts' : [ 'galsim = galsim.__main__:run_main', diff --git a/share/roman/roman_sky_backgrounds.txt b/share/roman/roman_sky_backgrounds.txt index 4dd8431dcee..9230987926c 100644 --- a/share/roman/roman_sky_backgrounds.txt +++ b/share/roman/roman_sky_backgrounds.txt @@ -1,3 +1,4 @@ +# Latitude Longitude R062 Z087 Y106 J129 H158 F184 W146 K213 SNPrism Grism_1stOrder Grism_0thOrder 0.0000 0.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 1.3976 0.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 2.7960 0.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 -10.0000 diff --git a/src/BinomFact.cpp b/src/BinomFact.cpp index 8a2e787a2c3..bc0654b3083 100644 --- a/src/BinomFact.cpp +++ b/src/BinomFact.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/CDModel.cpp b/src/CDModel.cpp index 9d4358d783f..0961b39e26f 100644 --- a/src/CDModel.cpp +++ b/src/CDModel.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/CorrelatedNoise.cpp b/src/CorrelatedNoise.cpp index d9f04af53d5..393d0555210 100644 --- a/src/CorrelatedNoise.cpp +++ b/src/CorrelatedNoise.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/GSParams.cpp b/src/GSParams.cpp index 6223ada1719..7dd74382740 100644 --- a/src/GSParams.cpp +++ b/src/GSParams.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Image.cpp b/src/Image.cpp index bcf9a00484f..9d5464f108b 100644 --- a/src/Image.cpp +++ b/src/Image.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Image.inst b/src/Image.inst index 1a76fd313c8..0d443c54361 100644 --- a/src/Image.inst +++ b/src/Image.inst @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Interpolant.cpp b/src/Interpolant.cpp index 4f00178b820..d5fc3f10d39 100644 --- a/src/Interpolant.cpp +++ b/src/Interpolant.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Laguerre.cpp b/src/Laguerre.cpp index e7bab91a11e..ea9f940faa1 100644 --- a/src/Laguerre.cpp +++ b/src/Laguerre.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/OneDimensionalDeviate.cpp b/src/OneDimensionalDeviate.cpp index 11d9636f31f..91d50da463d 100644 --- a/src/OneDimensionalDeviate.cpp +++ b/src/OneDimensionalDeviate.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/PhotonArray.cpp b/src/PhotonArray.cpp index 25aa5851151..b95773cae6c 100644 --- a/src/PhotonArray.cpp +++ b/src/PhotonArray.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Polygon.cpp b/src/Polygon.cpp index d8a3766c393..2367aa8cbf7 100644 --- a/src/Polygon.cpp +++ b/src/Polygon.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Random.cpp b/src/Random.cpp index a7f806c5034..905c25d5f06 100644 --- a/src/Random.cpp +++ b/src/Random.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/RealGalaxy.cpp b/src/RealGalaxy.cpp index 0aa54bf7a31..a006cd4643e 100644 --- a/src/RealGalaxy.cpp +++ b/src/RealGalaxy.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/RealSpaceConvolve.cpp b/src/RealSpaceConvolve.cpp index a8e01a2e5c6..1b5bd514608 100644 --- a/src/RealSpaceConvolve.cpp +++ b/src/RealSpaceConvolve.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBAdd.cpp b/src/SBAdd.cpp index 457fefb7aea..5f2f92fa24f 100644 --- a/src/SBAdd.cpp +++ b/src/SBAdd.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBAiry.cpp b/src/SBAiry.cpp index 45da16df064..8f31d2e22d4 100644 --- a/src/SBAiry.cpp +++ b/src/SBAiry.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBBox.cpp b/src/SBBox.cpp index dbc8caf81c5..dc3b23c73a7 100644 --- a/src/SBBox.cpp +++ b/src/SBBox.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBConvolve.cpp b/src/SBConvolve.cpp index ee8f3dab319..782735ebb88 100644 --- a/src/SBConvolve.cpp +++ b/src/SBConvolve.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBDeconvolve.cpp b/src/SBDeconvolve.cpp index 6f8b2e460c4..e000145458c 100644 --- a/src/SBDeconvolve.cpp +++ b/src/SBDeconvolve.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBDeltaFunction.cpp b/src/SBDeltaFunction.cpp index 44269521610..9853b45308c 100644 --- a/src/SBDeltaFunction.cpp +++ b/src/SBDeltaFunction.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBExponential.cpp b/src/SBExponential.cpp index b8f5f6cba7f..46c320c65d0 100644 --- a/src/SBExponential.cpp +++ b/src/SBExponential.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBFourierSqrt.cpp b/src/SBFourierSqrt.cpp index fee2529c789..5c4492171e2 100644 --- a/src/SBFourierSqrt.cpp +++ b/src/SBFourierSqrt.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBGaussian.cpp b/src/SBGaussian.cpp index 60371535715..8ffe248f206 100644 --- a/src/SBGaussian.cpp +++ b/src/SBGaussian.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBInclinedExponential.cpp b/src/SBInclinedExponential.cpp index b2f8f8ebd46..ff9d1bd7085 100644 --- a/src/SBInclinedExponential.cpp +++ b/src/SBInclinedExponential.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBInclinedSersic.cpp b/src/SBInclinedSersic.cpp index 5fcc2c13545..6429423fe9e 100644 --- a/src/SBInclinedSersic.cpp +++ b/src/SBInclinedSersic.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBInterpolatedImage.cpp b/src/SBInterpolatedImage.cpp index 16aa5a120c1..c92672fe066 100644 --- a/src/SBInterpolatedImage.cpp +++ b/src/SBInterpolatedImage.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBKolmogorov.cpp b/src/SBKolmogorov.cpp index 30158747a6f..c0a04de60ca 100644 --- a/src/SBKolmogorov.cpp +++ b/src/SBKolmogorov.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBMoffat.cpp b/src/SBMoffat.cpp index 2cbb8e891a2..369d045738d 100644 --- a/src/SBMoffat.cpp +++ b/src/SBMoffat.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBProfile.cpp b/src/SBProfile.cpp index cfce28e1f4d..a0d53b4a288 100644 --- a/src/SBProfile.cpp +++ b/src/SBProfile.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBSecondKick.cpp b/src/SBSecondKick.cpp index dc027e138dd..1a5471ba047 100644 --- a/src/SBSecondKick.cpp +++ b/src/SBSecondKick.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBSersic.cpp b/src/SBSersic.cpp index 187ca83ff7c..a8d1968253b 100644 --- a/src/SBSersic.cpp +++ b/src/SBSersic.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBShapelet.cpp b/src/SBShapelet.cpp index 93217f2fead..569d5d9b284 100644 --- a/src/SBShapelet.cpp +++ b/src/SBShapelet.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBSpergel.cpp b/src/SBSpergel.cpp index d5b0e356ca2..990ff2980f9 100644 --- a/src/SBSpergel.cpp +++ b/src/SBSpergel.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBTransform.cpp b/src/SBTransform.cpp index 23dd42e28d5..ed844101516 100644 --- a/src/SBTransform.cpp +++ b/src/SBTransform.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/SBVonKarman.cpp b/src/SBVonKarman.cpp index bce0c39194e..250ff010a69 100644 --- a/src/SBVonKarman.cpp +++ b/src/SBVonKarman.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Silicon.cpp b/src/Silicon.cpp index d8699ab68f6..155fb3dfc68 100644 --- a/src/Silicon.cpp +++ b/src/Silicon.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -268,8 +268,8 @@ namespace galsim { } void Silicon::updatePixelBounds(int nx, int ny, size_t k, - Bounds* pixelInnerBoundsData, - Bounds* pixelOuterBoundsData, + Bounds* pixelInnerBoundsData, + Bounds* pixelOuterBoundsData, Position* horizontalBoundaryPointsData, Position* verticalBoundaryPointsData) { @@ -279,7 +279,7 @@ namespace galsim { int y = k % ny; // compute outer bounds first - pixelOuterBoundsData[k] = Bounds(); + pixelOuterBoundsData[k] = Bounds(); // iterate over pixel boundary int n, idx; @@ -517,8 +517,8 @@ namespace galsim { } } - Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); - Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); + Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); + Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); #ifdef _OPENMP #ifndef GALSIM_USE_GPU #pragma omp parallel for @@ -663,8 +663,8 @@ namespace galsim { bool Silicon::insidePixel(int ix, int iy, double x, double y, double zconv, Bounds& targetBounds, bool* off_edge, int emptypolySize, - Bounds* pixelInnerBoundsData, - Bounds* pixelOuterBoundsData, + Bounds* pixelInnerBoundsData, + Bounds* pixelOuterBoundsData, Position* horizontalBoundaryPointsData, Position* verticalBoundaryPointsData, Position* emptypolyData) const @@ -880,8 +880,8 @@ namespace galsim { bool searchNeighbors(const Silicon& silicon, int& ix, int& iy, double x, double y, double zconv, Bounds& targetBounds, int& step, int emptypolysize, - Bounds* pixelInnerBoundsData, - Bounds* pixelOuterBoundsData, + Bounds* pixelInnerBoundsData, + Bounds* pixelOuterBoundsData, Position* horizontalBoundaryPointsData, Position* verticalBoundaryPointsData, Position* emptypolyData) @@ -1164,8 +1164,8 @@ namespace galsim { int emptypolySize = _emptypoly.size(); Position* emptypolyData = _emptypolyGPU.data(); - Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); - Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); + Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); + Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); Position* horizontalBoundaryPointsData = _horizontalBoundaryPoints.data(); Position* verticalBoundaryPointsData = _verticalBoundaryPoints.data(); @@ -1183,8 +1183,8 @@ namespace galsim { void Silicon::finalize() { #ifdef GALSIM_USE_GPU - Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); - Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); + Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); + Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); Position* horizontalBoundaryPointsData = _horizontalBoundaryPoints.data(); Position* verticalBoundaryPointsData = _verticalBoundaryPoints.data(); @@ -1383,8 +1383,8 @@ namespace galsim { int emptypolySize = _emptypoly.size(); double* deltaData = _delta.getData(); - Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); - Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); + Bounds* pixelInnerBoundsData = _pixelInnerBounds.data(); + Bounds* pixelOuterBoundsData = _pixelOuterBounds.data(); Position* horizontalBoundaryPointsData = _horizontalBoundaryPoints.data(); Position* verticalBoundaryPointsData = _verticalBoundaryPoints.data(); diff --git a/src/Table.cpp b/src/Table.cpp index 0206daf32ba..33000ff8bb1 100644 --- a/src/Table.cpp +++ b/src/Table.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/Version.cpp b/src/Version.cpp index 2e58fdbac54..dfe56f124a4 100644 --- a/src/Version.cpp +++ b/src/Version.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/WCS.cpp b/src/WCS.cpp index d4eb1c23460..e69a4261e0f 100644 --- a/src/WCS.cpp +++ b/src/WCS.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/hsm/PSFCorr.cpp b/src/hsm/PSFCorr.cpp index f9ca154c86f..45903d94900 100644 --- a/src/hsm/PSFCorr.cpp +++ b/src/hsm/PSFCorr.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/Angle.cpp b/src/math/Angle.cpp index 228ec65ed17..e1f90aac3ac 100644 --- a/src/math/Angle.cpp +++ b/src/math/Angle.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/Bessel.cpp b/src/math/Bessel.cpp index 2e993fd9528..6cd2963e405 100644 --- a/src/math/Bessel.cpp +++ b/src/math/Bessel.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/BesselI.cpp b/src/math/BesselI.cpp index c36da0a9566..9350223d962 100644 --- a/src/math/BesselI.cpp +++ b/src/math/BesselI.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/BesselJ.cpp b/src/math/BesselJ.cpp index 8be3025882a..f26994c9f6f 100644 --- a/src/math/BesselJ.cpp +++ b/src/math/BesselJ.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/BesselK.cpp b/src/math/BesselK.cpp index b3334225f34..86e47731a72 100644 --- a/src/math/BesselK.cpp +++ b/src/math/BesselK.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/BesselRoots.cpp b/src/math/BesselRoots.cpp index 9be711f9e6b..31c46a82bfe 100644 --- a/src/math/BesselRoots.cpp +++ b/src/math/BesselRoots.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/BesselY.cpp b/src/math/BesselY.cpp index 80efa0b48fe..39d3995a658 100644 --- a/src/math/BesselY.cpp +++ b/src/math/BesselY.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/Gamma.cpp b/src/math/Gamma.cpp index b4d5f84d7b6..b4dc6402a07 100644 --- a/src/math/Gamma.cpp +++ b/src/math/Gamma.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/Hankel.cpp b/src/math/Hankel.cpp index 0ed59ba4caf..676884f2a34 100644 --- a/src/math/Hankel.cpp +++ b/src/math/Hankel.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/Horner.cpp b/src/math/Horner.cpp index 6a2350d52d5..4497b48565d 100644 --- a/src/math/Horner.cpp +++ b/src/math/Horner.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/Nan.cpp b/src/math/Nan.cpp index eb54cd8c461..7cd2dca6892 100644 --- a/src/math/Nan.cpp +++ b/src/math/Nan.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/src/math/Sinc.cpp b/src/math/Sinc.cpp index 3c64f009ec0..6737d4f4101 100644 --- a/src/math/Sinc.cpp +++ b/src/math/Sinc.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/Image_comparison_images/read_rice.py b/tests/Image_comparison_images/read_rice.py new file mode 100644 index 00000000000..7b7e0e5a43e --- /dev/null +++ b/tests/Image_comparison_images/read_rice.py @@ -0,0 +1,11 @@ +# Script posted to demonstrate astropy error: +# https://github.com/astropy/astropy/issues/15477 +# Fails on astropy 5.3 .. 7.2 + +from astropy.io import fits + +file_name = 'testF.fits.fz' + +with fits.open(file_name, 'readonly') as hdu_list: + hdu = hdu_list[1] + hdu.data diff --git a/tests/Optics_comparison_images/generate_optics_comparison_images.py b/tests/Optics_comparison_images/generate_optics_comparison_images.py index 5a3c7b89431..982ccad5117 100644 --- a/tests/Optics_comparison_images/generate_optics_comparison_images.py +++ b/tests/Optics_comparison_images/generate_optics_comparison_images.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/SBProfile_comparison_images/convert_maple_output.py b/tests/SBProfile_comparison_images/convert_maple_output.py index fd498088db1..49d7e2475c1 100644 --- a/tests/SBProfile_comparison_images/convert_maple_output.py +++ b/tests/SBProfile_comparison_images/convert_maple_output.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/SBProfile_comparison_images/spergel_image.py b/tests/SBProfile_comparison_images/spergel_image.py index 17ace7d30bf..d21aa815953 100644 --- a/tests/SBProfile_comparison_images/spergel_image.py +++ b/tests/SBProfile_comparison_images/spergel_image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/Test.h b/tests/Test.h index 0d4077254fa..5451e156f06 100644 --- a/tests/Test.h +++ b/tests/Test.h @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/TestAll.cpp b/tests/TestAll.cpp index 56680784d6f..f83e1504458 100644 --- a/tests/TestAll.cpp +++ b/tests/TestAll.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/TestImage.cpp b/tests/TestImage.cpp index a4f355568a5..4719d684f5d 100644 --- a/tests/TestImage.cpp +++ b/tests/TestImage.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/TestInteg.cpp b/tests/TestInteg.cpp index 9f89b02a1d2..d6637f9707f 100644 --- a/tests/TestInteg.cpp +++ b/tests/TestInteg.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/TestVersion.cpp b/tests/TestVersion.cpp index 700805bb763..7c101032aa6 100644 --- a/tests/TestVersion.cpp +++ b/tests/TestVersion.cpp @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/compare_image_integrators.py b/tests/compare_image_integrators.py index f8d5854ebfd..978d644e37c 100644 --- a/tests/compare_image_integrators.py +++ b/tests/compare_image_integrators.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/compare_thin.py b/tests/compare_thin.py index ffabd050d00..17eff889027 100644 --- a/tests/compare_thin.py +++ b/tests/compare_thin.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/config_input/dict.yaml b/tests/config_input/dict.yaml index cb6a52a13a2..c6563c20208 100644 --- a/tests/config_input/dict.yaml +++ b/tests/config_input/dict.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/config_input/index_key.yaml b/tests/config_input/index_key.yaml index f7d28a0063b..b55d2ca7a94 100644 --- a/tests/config_input/index_key.yaml +++ b/tests/config_input/index_key.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/config_input/multirng.yaml b/tests/config_input/multirng.yaml index 57679c3f98a..94c282d26a1 100644 --- a/tests/config_input/multirng.yaml +++ b/tests/config_input/multirng.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/config_input/sequential_seeds.yaml b/tests/config_input/sequential_seeds.yaml index 30bb586cf86..1091e588a47 100644 --- a/tests/config_input/sequential_seeds.yaml +++ b/tests/config_input/sequential_seeds.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/config_input/sn.yaml b/tests/config_input/sn.yaml index 042454baf1f..b43061a7e48 100644 --- a/tests/config_input/sn.yaml +++ b/tests/config_input/sn.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/config_input/template.yaml b/tests/config_input/template.yaml index d45b4811e1f..c2b16937e86 100644 --- a/tests/config_input/template.yaml +++ b/tests/config_input/template.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/config_input_test_modules.py b/tests/config_input_test_modules.py index 8e3a3e39ffb..044eef6156e 100644 --- a/tests/config_input_test_modules.py +++ b/tests/config_input_test_modules.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/conftest.py b/tests/conftest.py index 2ecbe8f3847..8c5f033a8d6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,29 @@ +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub +# https://github.com/GalSim-developers +# +# This file is part of GalSim: The modular galaxy image simulation toolkit. +# https://github.com/GalSim-developers/GalSim +# +# GalSim is free software: redistribution and use in source and binary forms, +# with or without modification, are permitted provided that the following +# conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions, and the disclaimer given in the accompanying LICENSE +# file. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions, and the disclaimer given in the documentation +# and/or other materials provided with the distribution. +# + +import pytest + def pytest_addoption(parser): parser.addoption( "--run_slow", action="store_true", default=False, help="Run slow tests" ) + +# cf. https://stackoverflow.com/questions/62044541/change-pytest-working-directory-to-test-case-directory +@pytest.fixture(autouse=True) +def change_test_dir(request, monkeypatch): + monkeypatch.chdir(request.fspath.dirname) diff --git a/tests/fits_files/check_pyast_sip.py b/tests/fits_files/check_pyast_sip.py index 02272283ed9..dee82663ced 100644 --- a/tests/fits_files/check_pyast_sip.py +++ b/tests/fits_files/check_pyast_sip.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/fits_files/check_pyast_tpv.py b/tests/fits_files/check_pyast_tpv.py index 6e5cfc05a00..28e169bd9f8 100644 --- a/tests/fits_files/check_pyast_tpv.py +++ b/tests/fits_files/check_pyast_tpv.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/fits_files/make_interpim_hdu.py b/tests/fits_files/make_interpim_hdu.py index ca891109eec..e109bb5a6e7 100644 --- a/tests/fits_files/make_interpim_hdu.py +++ b/tests/fits_files/make_interpim_hdu.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/galsim_test_helpers.py b/tests/galsim_test_helpers.py index 309308262ac..36121604470 100644 --- a/tests/galsim_test_helpers.py +++ b/tests/galsim_test_helpers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/hsm_shape.py b/tests/hsm_shape.py index 1ef1bc8c264..86e8f5aeb57 100644 --- a/tests/hsm_shape.py +++ b/tests/hsm_shape.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/inclined_exponential_images/hankelcode4.c b/tests/inclined_exponential_images/hankelcode4.c index 2af1730e75e..4a6fa3bb1ed 100644 --- a/tests/inclined_exponential_images/hankelcode4.c +++ b/tests/inclined_exponential_images/hankelcode4.c @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (c) 2012-2023 by the GalSim developers team on GitHub + * Copyright (c) 2012-2026 by the GalSim developers team on GitHub * https://github.com/GalSim-developers * * This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/input/test.yaml b/tests/input/test.yaml index 540b1922047..30394d8b079 100644 --- a/tests/input/test.yaml +++ b/tests/input/test.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/lensing_reference_data/shearfield_ref.py b/tests/lensing_reference_data/shearfield_ref.py index 5ace9f3989c..32d6a8d8f82 100644 --- a/tests/lensing_reference_data/shearfield_ref.py +++ b/tests/lensing_reference_data/shearfield_ref.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/real_comparison_images/make_images.py b/tests/real_comparison_images/make_images.py index 5e4319dd7b1..97b31eafa12 100644 --- a/tests/real_comparison_images/make_images.py +++ b/tests/real_comparison_images/make_images.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/roman_files/gen_chris_comparison.py b/tests/roman_files/gen_chris_comparison.py index 25ba9334916..7dee5a5eac2 100644 --- a/tests/roman_files/gen_chris_comparison.py +++ b/tests/roman_files/gen_chris_comparison.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/roman_files/radec_to_chip.py b/tests/roman_files/radec_to_chip.py index cf6d33cd465..45d516b3dda 100644 --- a/tests/roman_files/radec_to_chip.py +++ b/tests/roman_files/radec_to_chip.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/run_examples.py b/tests/run_examples.py index f99c0b18db6..8d9c2eaab1c 100644 --- a/tests/run_examples.py +++ b/tests/run_examples.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -26,6 +26,7 @@ import sys import logging import shutil +import pytest import galsim @@ -65,8 +66,10 @@ def check_same(f1, f2): logging.basicConfig(format="%(message)s", stream=sys.stdout) +@pytest.fixture(scope="module", autouse=True) @in_examples def setup(): + print("Removing output dirs") remove_dir('output') remove_dir('output_yaml') remove_dir('output_json') diff --git a/tests/template_register.py b/tests/template_register.py index 7b259364955..676b28fe125 100644 --- a/tests/template_register.py +++ b/tests/template_register.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_airy.py b/tests/test_airy.py index 4ae8c2c7fb9..dc60a07c711 100644 --- a/tests/test_airy.py +++ b/tests/test_airy.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -222,6 +222,39 @@ def test_airy_flux_scaling(): obj2.flux, test_flux / 2., decimal=param_decimal, err_msg="Flux param inconsistent after __div__ (result).") +@timer +def test_airy_properties(): + """Test some basic properties of the Airy profile. + """ + # Regression test based on v2.3.5 version of the code. + + test_loD = 1.9 + test_obscuration = 0.32 + test_flux = 17.9 + psf = galsim.Airy(lam_over_diam=test_loD, flux=test_flux, obscuration=test_obscuration) + + # Check various properties + np.testing.assert_equal(psf.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(psf.maxk, 3.306939635357677) + np.testing.assert_almost_equal(psf.stepk, 0.027742458082373515) + np.testing.assert_almost_equal(psf.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(psf.xValue(0,0), 3.4955744341366577) + np.testing.assert_almost_equal(psf.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(psf.flux, test_flux) + np.testing.assert_almost_equal(psf.xValue(0,0), psf.max_sb) + + # Check that stepk and maxk scale correctly with lam/D + psf2 = galsim.Airy(lam_over_diam=5*test_loD, flux=test_flux, obscuration=test_obscuration) + np.testing.assert_almost_equal(psf2.maxk, psf.maxk/5) + np.testing.assert_almost_equal(psf2.stepk, psf.stepk/5) + + # Check input flux vs output flux + for inFlux in np.logspace(-2, 2, 10): + psf3 = galsim.Airy(lam_over_diam=test_loD, flux=inFlux, obscuration=test_obscuration) + outFlux = psf3.flux + np.testing.assert_almost_equal(outFlux, inFlux) + + @timer def test_airy_shoot(): """Test Airy with photon shooting. Particularly the flux of the final image. diff --git a/tests/test_bandpass.py b/tests/test_bandpass.py index edfcfba87bb..bf4e045e143 100644 --- a/tests/test_bandpass.py +++ b/tests/test_bandpass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_bessel.py b/tests/test_bessel.py index f86285c28c1..36f30715127 100644 --- a/tests/test_bessel.py +++ b/tests/test_bessel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_box.py b/tests/test_box.py index 4c9b8f0e39a..7942763713b 100644 --- a/tests/test_box.py +++ b/tests/test_box.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -241,6 +241,67 @@ def test_tophat(): approx_maxsb=True, scale=0.2) do_kvalue(conv,im, "Sheared TopHat convolved with pixel in real space") +@timer +def test_box_properties(): + """Test some basic properties of the Box profile. + """ + # Regression test based on v2.3.5 version of the code. + + test_flux = 17.9 + box = galsim.Box(width=0.2, height=0.25, flux=test_flux) + + # Check various properties + np.testing.assert_equal(box.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(box.maxk, 10000) + np.testing.assert_almost_equal(box.stepk, 12.566370614359172) + np.testing.assert_almost_equal(box.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(box.xValue(0,0), 358.0) + np.testing.assert_almost_equal(box.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(box.flux, test_flux) + np.testing.assert_almost_equal(box.xValue(0,0), box.max_sb) + + # Check that stepk and maxk scale correctly with lam/D + box2 = galsim.Box(width=5*0.2, height=5*0.25, flux=test_flux) + np.testing.assert_almost_equal(box2.maxk, box.maxk/5) + np.testing.assert_almost_equal(box2.stepk, box.stepk/5) + + # Check input flux vs output flux + for inFlux in np.logspace(-2, 2, 10): + box3 = galsim.Box(width=0.2, height=0.25, flux=inFlux) + outFlux = box3.flux + np.testing.assert_almost_equal(outFlux, inFlux) + + +@timer +def test_tophat_properties(): + """Test some basic properties of the TopHat profile. + """ + # Regression test based on v2.3.5 version of the code. + + test_flux = 17.9 + tophat = galsim.TopHat(radius=0.23, flux=test_flux) + + # Check various properties + np.testing.assert_equal(tophat.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(tophat.maxk, 593.7252723959091) + np.testing.assert_almost_equal(tophat.stepk, 13.659098493868665) + np.testing.assert_almost_equal(tophat.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(tophat.xValue(0,0), 107.70788209243577) + np.testing.assert_almost_equal(tophat.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(tophat.flux, test_flux) + np.testing.assert_almost_equal(tophat.xValue(0,0), tophat.max_sb) + + # Check that stepk and maxk scale correctly with lam/D + tophat2 = galsim.TopHat(radius=5*0.23, flux=test_flux) + np.testing.assert_almost_equal(tophat2.maxk, tophat.maxk/5) + np.testing.assert_almost_equal(tophat2.stepk, tophat.stepk/5) + + # Check input flux vs output flux + for inFlux in np.logspace(-2, 2, 10): + tophat3 = galsim.TopHat(radius=0.2, flux=inFlux) + outFlux = tophat3.flux + np.testing.assert_almost_equal(outFlux, inFlux) + @timer def test_box_shoot(): diff --git a/tests/test_calc.py b/tests/test_calc.py index a80e82c71f5..6d2d4b1fcdd 100644 --- a/tests/test_calc.py +++ b/tests/test_calc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -369,5 +369,30 @@ def test_fwhm(): err_msg="non-square image.calculateFWHM is not accurate.") +def test_fwhm_deterministic_fwhm(): + # This test was proposed by Wiliam Lucas in issue #1336. + # Numpy changed some details about how argsort works, so different numpy versions had + # given different answers to the following calculation. + + gal = galsim.Gaussian(flux=1.e5, sigma=5.) + rng = galsim.BaseDeviate(1234) + img = gal.drawImage(method='phot', rng=rng, nx=50, ny=50) + fwhm = img.calculateFWHM() + # This value used to be different on systems with different numpy versions. + # Note: this only affects situations where the center is a pixel center or pixel corner + # (or some other very special locations) such that the rsq values include repeated values. + # Then argsort could return a different data index for what pixel was the first one past + # the half max value. For symmetric profiles, even this probalby wasn't a problem, since all + # data values at that radius have the same value. But for photon shooting, there is photon + # noise, which means the values are not identical, leading to indeterminacy in the FWHM value. + print(fwhm) + + # The code was changed in GalSim version 2.7 to be insensitive to the details of what argsort + # does with repeated values. Specifically, we now take the mean of all data values with the + # same rsq value. + # Thus, this value should be consistent across any algorithmic changes numpy might make to + # how argsort works in detail. + assert np.isclose(fwhm, 13.715780373024351) + if __name__ == "__main__": runtests(__file__) diff --git a/tests/test_catalog.py b/tests/test_catalog.py index 140dd8849a7..d79b9c8e12a 100644 --- a/tests/test_catalog.py +++ b/tests/test_catalog.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_cdmodel.py b/tests/test_cdmodel.py index 06cc1aa4321..ce6834f4248 100644 --- a/tests/test_cdmodel.py +++ b/tests/test_cdmodel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_celestial_galsim.py b/tests/test_celestial_galsim.py index e08d1a4cdf1..0d3d0dd169b 100644 --- a/tests/test_celestial_galsim.py +++ b/tests/test_celestial_galsim.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_chromatic.py b/tests/test_chromatic.py index 3c82b159d6f..bcbd09fa6cc 100644 --- a/tests/test_chromatic.py +++ b/tests/test_chromatic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -1489,23 +1489,34 @@ def test_analytic_integrator(): def test_gsparams(): """Check that gsparams actually gets processed by ChromaticObjects. """ - # Setting maximum_fft_size this low causes an exception to be raised for GSObjects, so + # Setting maximum_fft_size this low causes a warning to be emitted for GSObjects, so # make sure it does for ChromaticObjects too, thereby assuring that gsparams is really # getting properly forwarded through the internals of ChromaticObjects. gsparams = galsim.GSParams(maximum_fft_size=16) gal = galsim.Gaussian(fwhm=1, gsparams=gsparams) * bulge_SED - with assert_raises(galsim.GalSimFFTSizeError): + with assert_warns(galsim.GalSimFFTSizeWarning): gal.drawImage(bandpass) assert (galsim.Gaussian(fwhm=1) * bulge_SED) != gal assert (galsim.Gaussian(fwhm=1) * bulge_SED).withGSParams(gsparams) == gal assert (galsim.Gaussian(fwhm=1) * bulge_SED).withGSParams(maximum_fft_size=16) == gal + # Should raise an exception if raise_fft_size_error is True + galsim.errors.raise_fft_size_error = True + with assert_raises(galsim.GalSimFFTSizeError): + gal.drawImage(bandpass) + galsim.errors.raise_fft_size_error = False + # Repeat, putting the gsparams argument in after the ChromaticObject constructor. gal = galsim.Gaussian(fwhm=1) * bulge_SED psf = galsim.Gaussian(sigma=0.4) final = galsim.Convolve([gal, psf], gsparams=gsparams) + with assert_warns(galsim.GalSimFFTSizeWarning): + final.drawImage(bandpass) + + galsim.errors.raise_fft_size_error = True with assert_raises(galsim.GalSimFFTSizeError): final.drawImage(bandpass) + galsim.errors.raise_fft_size_error = False # Use a restrictive one this time, so we test the "most restrictive gsparams" feature gsp2 = galsim.GSParams(folding_threshold=1.e-4, maxk_threshold=1.e-4, maximum_fft_size=1.e4) @@ -2834,6 +2845,11 @@ def test_chromatic_invariant(): str(chrom) repr(chrom) + chrom = galsim.Transform(gsobj, jac = (0.5, 0.5, 1, -1), flux_ratio=bulge_SED) + expected_flux = flux*bulge_SED.calculateFlux(bandpass) + chromobj_flux = chrom.calculateFlux(bandpass) + np.testing.assert_allclose(expected_flux, chromobj_flux) + # ChromaticOpticalPSF chrom_opt = galsim.ChromaticOpticalPSF(lam=500.0, diam=2.0, tip=2.0, tilt=3.0, defocus=0.2, scale_unit='arcmin') diff --git a/tests/test_config_gsobject.py b/tests/test_config_gsobject.py index 6eba44ee8a5..66e0c881301 100644 --- a/tests/test_config_gsobject.py +++ b/tests/test_config_gsobject.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -669,8 +669,15 @@ def test_sersic(): # and would be rather slow. gal6a = galsim.config.BuildGSObject(config, 'gal6')[0] gal6b = galsim.Sersic(n=0.7, half_light_radius=1, flux=50) + with assert_warns(galsim.GalSimFFTSizeWarning): + gsobject_compare(gal6a, gal6b, conv=galsim.Gaussian(sigma=1)) + + # If galsim.errors.raise_fft_size_error is True, then it raises an exception instead. + # (This was the behavior until version 2.7.) + galsim.errors.raise_fft_size_error = True with assert_raises(galsim.GalSimFFTSizeError): gsobject_compare(gal6a, gal6b, conv=galsim.Gaussian(sigma=1)) + galsim.errors.raise_fft_size_error = False gal7a = galsim.config.BuildGSObject(config, 'gal7')[0] gsparams = galsim.GSParams(realspace_relerr=1.e-2, realspace_abserr=1.e-4) diff --git a/tests/test_config_image.py b/tests/test_config_image.py index 169f1be527c..5f245f09f54 100644 --- a/tests/test_config_image.py +++ b/tests/test_config_image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_config_input.py b/tests/test_config_input.py index 9f117d5c709..070a5ad6456 100644 --- a/tests/test_config_input.py +++ b/tests/test_config_input.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_config_noise.py b/tests/test_config_noise.py index f105691db24..50c47d1636d 100644 --- a/tests/test_config_noise.py +++ b/tests/test_config_noise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_config_output.py b/tests/test_config_output.py index 94215f3c978..5b8219eabcf 100644 --- a/tests/test_config_output.py +++ b/tests/test_config_output.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_config_value.py b/tests/test_config_value.py index a45c34a0004..a3a3df0ba4e 100644 --- a/tests/test_config_value.py +++ b/tests/test_config_value.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_convolve.py b/tests/test_convolve.py index e866b2d9766..f02834df1e9 100644 --- a/tests/test_convolve.py +++ b/tests/test_convolve.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_correlatednoise.py b/tests/test_correlatednoise.py index e4377a5d8c8..f6e06305dd6 100644 --- a/tests/test_correlatednoise.py +++ b/tests/test_correlatednoise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_deltafunction.py b/tests/test_deltafunction.py index 56477f6ad1e..c814df5545c 100644 --- a/tests/test_deltafunction.py +++ b/tests/test_deltafunction.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py index f9595b7f95d..9ed754a034d 100644 --- a/tests/test_deprecated.py +++ b/tests/test_deprecated.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -17,6 +17,7 @@ # import os +import warnings import numpy as np import galsim diff --git a/tests/test_des.py b/tests/test_des.py index 658a94f6cc5..796e19a7593 100644 --- a/tests/test_des.py +++ b/tests/test_des.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_detectors.py b/tests/test_detectors.py index 6543c5abc45..03f285ce4c7 100644 --- a/tests/test_detectors.py +++ b/tests/test_detectors.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_download.py b/tests/test_download.py index 516d15a4c1f..0998b4aec05 100644 --- a/tests/test_download.py +++ b/tests/test_download.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_draw.py b/tests/test_draw.py index 8d4990e7fd6..082ed16cc1b 100644 --- a/tests/test_draw.py +++ b/tests/test_draw.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_errors.py b/tests/test_errors.py index e457d6a84cd..a897598a61f 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -204,21 +204,6 @@ def test_galsim_hsm_error(): check_pickle(err) -@timer -def test_galsim_fft_size_error(): - """Test basic usage of GalSimFFTSizeError - """ - err = galsim.GalSimFFTSizeError("Test FFT is too big.", 10240) - print('str = ',str(err)) - print('repr = ',repr(err)) - assert str(err) == ("Test FFT is too big.\nThe required FFT size would be 10240 x 10240, " - "which requires 2.34 GB of memory.\nIf you can handle " - "the large FFT, you may update gsparams.maximum_fft_size.") - assert err.size == 10240 - np.testing.assert_almost_equal(err.mem, 2.34375) - assert isinstance(err, galsim.GalSimError) - check_pickle(err) - @timer def test_galsim_config_error(): @@ -297,6 +282,32 @@ def test_galsim_deprecation_warning(): assert isinstance(err, UserWarning) check_pickle(err) +@timer +def test_galsim_fftsize_warning(): + """Test basic usage of GalSimFFTSizeWarning + """ + err = galsim.GalSimFFTSizeWarning("Test", 10240) + print('str = ',str(err)) + print('repr = ',repr(err)) + assert str(err).startswith("Test") + assert isinstance(err, UserWarning) + check_pickle(err) + +@timer +def test_galsim_fft_size_error(): + """Test basic usage of GalSimFFTSizeError + """ + err = galsim.GalSimFFTSizeError("Test FFT is too big.", 10240) + print('str = ',str(err)) + print('repr = ',repr(err)) + assert str(err) == ("Test FFT is too big.\nThe required FFT size would be 10240 x 10240, " + "which requires 2.34 GB of memory.\nIf you can handle " + "the large FFT, you may update gsparams.maximum_fft_size.") + assert err.size == 10240 + np.testing.assert_almost_equal(err.mem, 2.34375) + assert isinstance(err, galsim.GalSimError) + check_pickle(err) + if __name__ == "__main__": runtests(__file__) diff --git a/tests/test_exponential.py b/tests/test_exponential.py index e64c2923ddc..68900e40f1d 100644 --- a/tests/test_exponential.py +++ b/tests/test_exponential.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -110,6 +110,11 @@ def test_exponential_properties(): outFlux = expon.flux np.testing.assert_almost_equal(outFlux, inFlux) + # Check that stepk and maxk scale correctly with radius + expon2 = galsim.Exponential(flux=test_flux, scale_radius=5*test_scale) + np.testing.assert_almost_equal(expon2.maxk, expon.maxk/5) + np.testing.assert_almost_equal(expon2.stepk, expon.stepk/5) + @timer def test_exponential_radii(): diff --git a/tests/test_fitsheader.py b/tests/test_fitsheader.py index 4c3568495a9..ec1aca404fd 100644 --- a/tests/test_fitsheader.py +++ b/tests/test_fitsheader.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -75,6 +75,11 @@ def check_tpv(header): header = galsim.FitsHeader(file_name=file_name, dir=dir, hdu=0) check_tpv(header) check_pickle(header) + # Can also pass the hdu itself. + with pyfits.open(os.path.join(dir,file_name)) as hdu_list: + header = galsim.FitsHeader(hdu_list=hdu_list[0]) + check_tpv(header) + check_pickle(header) # If you pass in a pyfits Header object, that should also work with pyfits.open(os.path.join(dir,file_name)) as hdu_list: header = galsim.FitsHeader(header=hdu_list[0].header) diff --git a/tests/test_fouriersqrt.py b/tests/test_fouriersqrt.py index 3dbcce2fd70..94f2db6b569 100644 --- a/tests/test_fouriersqrt.py +++ b/tests/test_fouriersqrt.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_galaxy_sample.py b/tests/test_galaxy_sample.py index 7da83ceaf59..747df8567ec 100644 --- a/tests/test_galaxy_sample.py +++ b/tests/test_galaxy_sample.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_gaussian.py b/tests/test_gaussian.py index 6435a50b634..9ad504bfa88 100644 --- a/tests/test_gaussian.py +++ b/tests/test_gaussian.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -150,7 +150,7 @@ def test_gaussian_properties(): np.testing.assert_almost_equal(gauss.xValue(cen), gauss.max_sb) # Check input flux vs output flux for inFlux in np.logspace(-2, 2, 10): - gauss = galsim.Gaussian(flux=inFlux, sigma=2.) + gauss = galsim.Gaussian(flux=inFlux, sigma=test_sigma) outFlux = gauss.flux np.testing.assert_almost_equal(outFlux, inFlux) @@ -169,6 +169,10 @@ def test_gaussian_properties(): assert_raises(TypeError, gauss.xValue, cen.x, cen.y, invalid=True) assert_raises(TypeError, gauss.xValue, pos=cen) + # Check that stepk and maxk scale correctly with radius + gauss2 = galsim.Gaussian(flux=test_flux, sigma=5*test_sigma) + np.testing.assert_almost_equal(gauss2.maxk, gauss.maxk/5) + np.testing.assert_almost_equal(gauss2.stepk, gauss.stepk/5) @timer diff --git a/tests/test_hsm.py b/tests/test_hsm.py index d57eea22b16..e7d54617f79 100644 --- a/tests/test_hsm.py +++ b/tests/test_hsm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_image.py b/tests/test_image.py index c80b47ff254..a2eb2e9e5d7 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -684,9 +684,9 @@ def test_Image_FITS_IO(run_slow): # Test rice # Avoid astropy 5.3 issue reading rice-compressed file. # cf. https://github.com/astropy/astropy/issues/15477 - # Hopefull they will fix it before 5.4 comes out... + # Fixed in version 7.3. import astropy - if astropy.__version__ >= "5.3" and astropy.__version__ < "5.4": continue + if astropy.__version__ >= "5.3" and astropy.__version__ < "7.3": continue test_file = os.path.join(datadir, "test"+tchar[i]+".fits.fz") test_image = galsim.fits.read(test_file, compression='rice') np.testing.assert_array_equal(ref_array.astype(types[i]), test_image.array, @@ -1789,6 +1789,19 @@ def test_Image_inplace_add(): err_msg="Inplace add in Image class does not match reference for dtypes = " +str(types[i])+" and "+str(types[j])) + # Adding via array: + image4 = image2.copy() + image4.array += image2.array + np.testing.assert_allclose(image4.array, 2*image2.array) + image4.array[:] += image2.array + np.testing.assert_allclose(image4.array, 3*image2.array) + image4.array = image4.array + image2.array + np.testing.assert_allclose(image4.array, 4*image2.array) + with assert_raises(ValueError): + image4.array += image2.array[:2,:] + with assert_raises(ValueError): + image4.array = image4.array[:2,:] + image2.array[:2,:] + with assert_raises(ValueError): image1 += image1.subImage(galsim.BoundsI(0,4,0,4)) @@ -1831,6 +1844,19 @@ def test_Image_inplace_subtract(): err_msg="Inplace subtract in Image class does not match reference for dtypes = " +str(types[i])+" and "+str(types[j])) + # Subtracting via array: + image4 = 5*image2 + image4.array -= image2.array + np.testing.assert_allclose(image4.array, 4*image2.array) + image4.array[:] -= image2.array + np.testing.assert_allclose(image4.array, 3*image2.array) + image4.array = image4.array - image2.array + np.testing.assert_allclose(image4.array, 2*image2.array) + with assert_raises(ValueError): + image4.array -= image2.array[:2,:] + with assert_raises(ValueError): + image4.array = image4.array[:2,:] - image2.array[:2,:] + with assert_raises(ValueError): image1 -= image1.subImage(galsim.BoundsI(0,4,0,4)) @@ -1962,6 +1988,17 @@ def test_Image_inplace_scalar_add(): err_msg="Inplace scalar add in Image class does not match reference for dtype = " +str(types[i])) + # Adding via array: + image4 = image1.copy() + image4.array += 1 + np.testing.assert_allclose(image4.array, image1.array + 1) + image4.array[:] += 1 + np.testing.assert_allclose(image4.array, image1.array + 2) + image4.array = image4.array + 1 + np.testing.assert_allclose(image4.array, image1.array + 3) + with assert_raises(ValueError): + image4.array = image4.array[:2,:] + 1 + @timer def test_Image_inplace_scalar_subtract(): @@ -2016,6 +2053,17 @@ def test_Image_inplace_scalar_multiply(): err_msg="Inplace scalar multiply in Image class does" +" not match reference for dtype = "+str(types[i])) + # Multiplying via array: + image4 = image2.copy() + image4.array *= 2 + np.testing.assert_allclose(image4.array, 2*image2.array) + image4.array[:] *= 2 + np.testing.assert_allclose(image4.array, 4*image2.array) + image4.array = image4.array * 2 + np.testing.assert_allclose(image4.array, 8*image2.array) + with assert_raises(ValueError): + image4.array = image4.array[:2,:] * 2 + @timer def test_Image_inplace_scalar_divide(): @@ -2043,6 +2091,36 @@ def test_Image_inplace_scalar_divide(): err_msg="Inplace scalar divide in Image class does" +" not match reference for dtype = "+str(types[i])) + # Dividing via array: + image4 = 16*image2 + if simple_types[i] is int: + with assert_raises(TypeError): + image4.array /= 2 + with assert_raises(TypeError): + image4.array[:] /= 2 + np.testing.assert_array_equal(image4.array, 16*image2.array) # unchanged yet + image4.array //= 2 + np.testing.assert_array_equal(image4.array, 8*image2.array) + image4.array[:] //= 2 + np.testing.assert_array_equal(image4.array, 4*image2.array) + image4.array = image4.array // 2 + np.testing.assert_array_equal(image4.array, 2*image2.array) + # The following works for integer by explicitly rounding and casting. + # The native numpy operation would use floor to cast to int, which is 1 smaller. + image4.array = (image4.array / 2.0001) + np.testing.assert_array_equal(image4.array, image2.array) + with assert_raises(ValueError): + image4.array = image4.array[:2,:] // 2 + else: + image4.array /= 2 + np.testing.assert_allclose(image4.array, 8*image2.array) + image4.array[:] /= 2 + np.testing.assert_allclose(image4.array, 4*image2.array) + image4.array = image4.array / 2 + np.testing.assert_allclose(image4.array, 2*image2.array) + with assert_raises(ValueError): + image4.array = image4.array[:2,:] / 2 + @timer def test_Image_inplace_scalar_pow(): diff --git a/tests/test_inclined.py b/tests/test_inclined.py index a323ff9e41c..3cae9a3f8ac 100644 --- a/tests/test_inclined.py +++ b/tests/test_inclined.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -528,6 +528,11 @@ def test_k_limits(run_slow): total_flux = np.sum(test_image.array) assert (total_flux-contained_flux)/total_flux <= gsparams.folding_threshold + # Check that stepk and maxk scale correctly with size + test_profile2 = get_prof(mode, inc_angle * galsim.radians, + 5*scale_radius, 5*scale_height) + np.testing.assert_almost_equal(test_profile2.maxk, test_profile.maxk/5) + np.testing.assert_almost_equal(test_profile2.stepk, test_profile.stepk/5) @timer def test_eq_ne(): diff --git a/tests/test_integ.py b/tests/test_integ.py index 1201f2bb8a4..88d0f5a1285 100644 --- a/tests/test_integ.py +++ b/tests/test_integ.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_interpolatedimage.py b/tests/test_interpolatedimage.py index cd7647a7d3f..96b98b6be08 100644 --- a/tests/test_interpolatedimage.py +++ b/tests/test_interpolatedimage.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_knots.py b/tests/test_knots.py index eab7837e53c..2c0ad59c7ca 100644 --- a/tests/test_knots.py +++ b/tests/test_knots.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_kolmogorov.py b/tests/test_kolmogorov.py index c535fe9cb30..8576a9766fa 100644 --- a/tests/test_kolmogorov.py +++ b/tests/test_kolmogorov.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -162,6 +162,11 @@ def test_kolmogorov_properties(): np.testing.assert_almost_equal(out_flux, test_flux, 3, err_msg="Flux of Kolmogorov (image array) is incorrect.") + # Check that stepk and maxk scale correctly with radius + psf2 = galsim.Kolmogorov(lam_over_r0=5*lor, flux=test_flux) + np.testing.assert_almost_equal(psf2.maxk, psf.maxk/5) + np.testing.assert_almost_equal(psf2.stepk, psf.stepk/5) + @timer def test_kolmogorov_radii(): diff --git a/tests/test_lensing.py b/tests/test_lensing.py index 4da39b615c0..01f20b873f6 100644 --- a/tests/test_lensing.py +++ b/tests/test_lensing.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_main.py b/tests/test_main.py index 2b9f78dc02a..c45deec0a0a 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_metacal.py b/tests/test_metacal.py index 7fba7847a66..1ae8a2c6c42 100644 --- a/tests/test_metacal.py +++ b/tests/test_metacal.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_moffat.py b/tests/test_moffat.py index 6a702a2f5b1..1d6c54cdd6d 100644 --- a/tests/test_moffat.py +++ b/tests/test_moffat.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -173,6 +173,19 @@ def test_moffat_properties(): outFlux = psfFlux.flux np.testing.assert_array_almost_equal(outFlux, inFlux) + # Check that stepk and maxk scale correctly with radius + psf2 = galsim.Moffat(beta=2.0, half_light_radius=5., + trunc=5*2*fwhm_backwards_compatible, flux=test_flux) + np.testing.assert_almost_equal(psf2.maxk, psf.maxk/5) + np.testing.assert_almost_equal(psf2.stepk, psf.stepk/5) + + # Repeat without truncation + psf = galsim.Moffat(beta=5.0, half_light_radius=1., flux=test_flux) + psf2 = galsim.Moffat(beta=5.0, half_light_radius=5., flux=test_flux) + np.testing.assert_almost_equal(psf2.maxk, psf.maxk/5) + np.testing.assert_almost_equal(psf2.stepk, psf.stepk/5) + + @timer def test_moffat_maxk(): """Check accuracy of maxk given maxk_threshold diff --git a/tests/test_noise.py b/tests/test_noise.py index 604b28ed517..a305b445adc 100644 --- a/tests/test_noise.py +++ b/tests/test_noise.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_optics.py b/tests/test_optics.py index d0de2ce3eeb..63a87821bdb 100644 --- a/tests/test_optics.py +++ b/tests/test_optics.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_phase_psf.py b/tests/test_phase_psf.py index c97940a924c..29124804fe1 100644 --- a/tests/test_phase_psf.py +++ b/tests/test_phase_psf.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -79,18 +79,20 @@ def test_aperture(): np.testing.assert_almost_equal(stepk, 2.*np.pi/size) np.testing.assert_almost_equal(maxk, np.pi/scale) - # If the constructed pupil plane would be too large, raise an error - with assert_raises(galsim.GalSimFFTSizeError): - ap = galsim.Aperture(1.7, pupil_plane_scale=1.e-4) + # If the constructed pupil plane would be too large, emit a warning + # For testing this and the next one, we change gsparams.maximum_fft_size, rather than try + # to build or load a really large image. + with assert_warns(galsim.GalSimFFTSizeWarning): + ap = galsim.Aperture(1.7, pupil_plane_scale=0.01, + gsparams=galsim.GSParams(maximum_fft_size=64)) ap._illuminated # Only triggers once we force it to build the illuminated array # Similar if the given image is too large. - # Here, we change gsparams.maximum_fft_size, rather than build a really large image to load. - with assert_raises(galsim.GalSimFFTSizeError): + with assert_warns(galsim.GalSimFFTSizeWarning): ap = galsim.Aperture(1.7, pupil_plane_im=im, gsparams=galsim.GSParams(maximum_fft_size=64)) ap._illuminated - # Other choices just give warnings about pupil scale or size being inappropriate + # Other choices give warnings about pupil scale or size being inappropriate with assert_warns(galsim.GalSimWarning): ap = galsim.Aperture(diam=1.7, pupil_plane_size=3, pupil_plane_scale=0.03) ap._illuminated @@ -1537,8 +1539,8 @@ def test_t_persistence(): nphot = 1_000_000 photons = psf.drawImage(save_photons=True, method='phot', n_photons=nphot).photons assert photons.hasAllocatedTimes() - assert np.min(photons.time) > 10.0 - assert np.max(photons.time) < 25.0 + assert np.min(photons.time) >= 10.0 + assert np.max(photons.time) <= 25.0 + 1.e-10 # slight slop to allow for numerical imprecision @timer diff --git a/tests/test_photon_array.py b/tests/test_photon_array.py index f3001d08c54..2f55f6e1755 100644 --- a/tests/test_photon_array.py +++ b/tests/test_photon_array.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -734,6 +734,12 @@ def test_dcr(): im2c = galsim.config.BuildImage(config) assert im2c == im2 + # Make sure it's ok if sky_pos is set. (This used to be a bug.) + config['sky_pos'] = galsim.CelestialCoord(15 * galsim.degrees, -25 * galsim.degrees) + galsim.config.RemoveCurrent(config) + im2d = galsim.config.BuildImage(config) + assert im2d == im2 + # Should work with fft, but not quite match (because of inexact photon locations). im3 = galsim.ImageF(50, 50, scale=pixel_scale) achrom.drawImage(image=im3, method='fft', rng=rng, photon_ops=photon_ops) diff --git a/tests/test_pse.py b/tests/test_pse.py index f5247e81d98..6e736032d64 100644 --- a/tests/test_pse.py +++ b/tests/test_pse.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_random.py b/tests/test_random.py index 7fe66fae8de..86e7a0c2f64 100644 --- a/tests/test_random.py +++ b/tests/test_random.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_real.py b/tests/test_real.py index eac1e8550bf..792d281b777 100644 --- a/tests/test_real.py +++ b/tests/test_real.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_roman.py b/tests/test_roman.py index 20415bfeed6..2c77bfbe010 100644 --- a/tests/test_roman.py +++ b/tests/test_roman.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -513,6 +513,43 @@ def test_roman_nonimaging_bandpass(): assert 'Grism_1stOrder' not in bp_imaging assert 'SNPrism' not in bp_imaging +@timer +def test_roman_bandpass_subsets(): + """Test that we can get a subset of Roman bandpasses. + """ + bandnames = ["J129", "H158"] + bp_dict = galsim.roman.getBandpasses(bandnames=bandnames) + + # Check that the imaging bandpasses are a subset of the all bandpasses + for bandname in bandnames: + assert bandname in bp_dict + bp_dict.pop(bandname) + + # Check that we have no bandpasses left + assert len(bp_dict) == 0 + + # Test that we get an error for invalid bandpasses + with assert_raises(galsim.GalSimValueError): + galsim.roman.getBandpasses(bandnames=["u", "g", "r", "i"]) + +@timer +def test_roman_single_bandpass(): + """Test getting a single bandpass from the Roman bandpass utility. + """ + bp = galsim.roman.getBandpass('F184') + assert bp.name == 'F184' + + # Check that the default values are the same for getBandpass and getBandpasses. + bp_dict = galsim.roman.getBandpasses() + assert bp == bp_dict[bp.name] + + # Explicitly check for the W-band, since that's a special case. + bp = galsim.roman.getBandpass("W146") + assert bp == bp_dict[bp.name] + + # Test for a non-imaging bandpass. + bp = galsim.roman.getBandpass("SNPrism") + assert bp.name == "SNPrism" @timer def test_roman_detectors(): diff --git a/tests/test_second_kick.py b/tests/test_second_kick.py index 7d22549ef01..f4f7c928594 100644 --- a/tests/test_second_kick.py +++ b/tests/test_second_kick.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -156,6 +156,40 @@ def test_limiting_cases(): rtol=1e-3, atol=1e-4) +@timer +def test_sk_properties(): + """Test some basic properties of the SecondKick profile. + """ + # Regression test based on v2.3.5 version of the code. + + test_flux = 1.8 + sk = galsim.SecondKick(lam=500, r0=0.2, diam=8, obscuration=0.6, kcrit=2, flux=test_flux) + + # Check various properties + np.testing.assert_equal(sk.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(sk.maxk, 487.3878716587337) + np.testing.assert_almost_equal(sk.stepk, 1.5080215526716452) + np.testing.assert_almost_equal(sk.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(sk.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(sk.flux, test_flux) + + # Check input flux vs output flux + for inFlux in np.logspace(-2, 2, 10): + skFlux = galsim.SecondKick(lam=500, r0=0.2, diam=8, obscuration=0.6, kcrit=2, flux=inFlux) + outFlux = skFlux.flux + np.testing.assert_almost_equal(outFlux, inFlux) + + # Check that stepk and maxk scale correctly with r0,L0 + sk2 = galsim.SecondKick(lam=500, r0=0.2/5, diam=8/5, obscuration=0.6, kcrit=2, flux=test_flux) + np.testing.assert_almost_equal(sk2.maxk, sk.maxk/5) + np.testing.assert_almost_equal(sk2.stepk, sk.stepk/5) + + # Equivalent if scale lam instead. + sk2 = galsim.SecondKick(lam=5*500, r0=0.2, diam=8, obscuration=0.6, kcrit=2, flux=test_flux) + np.testing.assert_almost_equal(sk2.maxk, sk.maxk/5) + np.testing.assert_almost_equal(sk2.stepk, sk.stepk/5) + + @timer def test_sk_phase_psf(run_slow): """Test that analytic second kick profile matches what can be obtained from PhaseScreenPSF with diff --git a/tests/test_sed.py b/tests/test_sed.py index 02c3973a769..7430fb04030 100644 --- a/tests/test_sed.py +++ b/tests/test_sed.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_sensor.py b/tests/test_sensor.py index c0d63ccce20..e37662dc8d7 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -930,18 +930,17 @@ def test_resume(run_slow): nx = 200 ny = 200 block_size = int(1.2e5) - nrecalc = 1.e6 + nrecalc = int(1.e6) else: flux_per_pixel = 40 nx = 20 ny = 20 block_size = int(1.3e3) - nrecalc = 1.e4 + nrecalc = int(1.e4) expected_num_photons = nx * ny * flux_per_pixel pd = galsim.PoissonDeviate(rng, mean=expected_num_photons) num_photons = int(pd()) # Poisson realization of the given expected number of photons. - #nrecalc = num_photons / 2 # Only recalc once. flux_per_photon = 1 print('num_photons = ',num_photons,' .. expected = ',expected_num_photons) @@ -954,6 +953,10 @@ def test_resume(run_slow): treering_func=treering_func, treering_center=treering_center) sensor3 = galsim.SiliconSensor(rng=rng.duplicate(), nrecalc=nrecalc, treering_func=treering_func, treering_center=treering_center) + sensor4 = galsim.SiliconSensor(rng=rng.duplicate(), nrecalc=0, + treering_func=treering_func, treering_center=treering_center) + sensor5 = galsim.SiliconSensor(rng=rng.duplicate(), nrecalc=0, + treering_func=treering_func, treering_center=treering_center) waves = galsim.WavelengthSampler(sed = galsim.SED('1', 'nm', 'fphotons'), bandpass = galsim.Bandpass('LSST_r.dat', 'nm')) @@ -962,6 +965,8 @@ def test_resume(run_slow): im1 = galsim.ImageF(nx,ny) # Will not use resume im2 = galsim.ImageF(nx,ny) # Will use resume im3 = galsim.ImageF(nx,ny) # Will run all photons in one pass + im4 = galsim.ImageF(nx,ny) # Will recalculate manually + im5 = galsim.ImageF(nx,ny) # Will recalculate manually with batches t_resume = 0 t_no_resume = 0 @@ -1021,12 +1026,39 @@ def test_resume(run_slow): sensor3.accumulate(all_photons, im3) np.testing.assert_array_equal(im2.array, im3.array) + # Check the manual recalculation version: + i1 = 0 + i2 = nrecalc + while i1 < len(all_photons): + i2 = min(i2, len(all_photons)) + some_photons = galsim.PhotonArray(i2-i1) + some_photons.copyFrom(all_photons, source_indices=slice(i1,i2)) + sensor4.accumulate(some_photons, im4, resume=(i1>0), recalc=True) + i1 = i2 + i2 += nrecalc + # This should also be equivalent to the above 2 and 3 versions. + np.testing.assert_array_equal(im2.array, im4.array) + + # Finally, do it again with batches smaller than nrecalc. + nbatch = nrecalc // 4 + i1 = 0 + i2 = nbatch + while i1 < len(all_photons): + i2 = min(i2, len(all_photons)) + some_photons = galsim.PhotonArray(i2-i1) + some_photons.copyFrom(all_photons, source_indices=slice(i1,i2)) + sensor5.accumulate(some_photons, im5, resume=(i1>0), recalc=(i1 % nrecalc == 0)) + i1 = i2 + i2 += nbatch + # This should also be equivalent + np.testing.assert_array_equal(im2.array, im5.array) + # If resume is used either with the wrong image or on the first call to accumulate, then # this should raise an exception. assert_raises(RuntimeError, sensor3.accumulate, all_photons, im1, resume=True) - sensor4 = galsim.SiliconSensor(rng=rng.duplicate(), nrecalc=nrecalc, + sensor6 = galsim.SiliconSensor(rng=rng.duplicate(), nrecalc=nrecalc, treering_func=treering_func, treering_center=treering_center) - assert_raises(RuntimeError, sensor4.accumulate, all_photons, im1, resume=True) + assert_raises(RuntimeError, sensor6.accumulate, all_photons, im1, resume=True) @timer def test_flat(run_slow): diff --git a/tests/test_sersic.py b/tests/test_sersic.py index 3ec7d508309..4b96708afde 100644 --- a/tests/test_sersic.py +++ b/tests/test_sersic.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -486,6 +486,90 @@ def test_sersic_1(): np.testing.assert_almost_equal(sersic.xValue(pos), expon.xValue(pos), decimal=5) np.testing.assert_almost_equal(sersic.kValue(pos), expon.kValue(pos), decimal=5) +@timer +def test_sersic_properties(): + """Test some basic properties of the Sersic profile. + """ + # Regression test based on v2.3.5 version of the code. + + test_flux = 1.8 + test_hlr = 2.3 + test_scale_radius_trunc = 0.04559626861897289 + test_scale_radius_notrunc = 0.009526646777227634 + test_n = 3.1 + prof = galsim.Sersic(n=test_n, half_light_radius=test_hlr, trunc=2*test_hlr, flux=test_flux) + + # Check various properties + np.testing.assert_equal(prof.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(prof.maxk, 24.663782559047256) + np.testing.assert_almost_equal(prof.stepk, 0.6829549246934334) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), 1.0238648164347117) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.xValue(0,0), prof.max_sb) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius_trunc) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Now create the same profile using scale_radius + prof = galsim.Sersic(n=test_n, scale_radius=test_scale_radius_trunc, trunc=2*test_hlr, + flux=test_flux) + np.testing.assert_almost_equal(prof.maxk, 24.663782559047256) + np.testing.assert_almost_equal(prof.stepk, 0.6829549246934334) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), 1.0238648164347117) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.xValue(0,0), prof.max_sb) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius_trunc) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Check that stepk and maxk scale correctly with radius + prof2 = galsim.Sersic(n=test_n, half_light_radius=5*test_hlr, trunc=5*2*test_hlr) + np.testing.assert_almost_equal(prof2.maxk, prof.maxk/5) + np.testing.assert_almost_equal(prof2.stepk, prof.stepk/5) + + # Check input flux vs output flux + for inFlux in np.logspace(-2, 2, 10): + prof3 = galsim.Sersic(n=test_n, half_light_radius=test_hlr, trunc=2*test_hlr, flux=inFlux) + outFlux = prof3.flux + np.testing.assert_almost_equal(outFlux, inFlux) + + # Repeat without truncation + prof = galsim.Sersic(n=test_n, half_light_radius=test_hlr, flux=test_flux) + + # Check various properties + np.testing.assert_almost_equal(prof.maxk, 50.35677579928042) + np.testing.assert_almost_equal(prof.stepk, 0.08358929429681608) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), 6.010654623502727) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.xValue(0,0), prof.max_sb) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius_notrunc) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Now create the same profile using scale_radius + prof = galsim.Sersic(n=test_n, scale_radius=test_scale_radius_notrunc, flux=test_flux) + np.testing.assert_almost_equal(prof.maxk, 50.35677579928042) + np.testing.assert_almost_equal(prof.stepk, 0.08358929429681608) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), 6.010654623502727) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.xValue(0,0), prof.max_sb) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius_notrunc) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Check that stepk and maxk scale correctly with radius + prof2 = galsim.Sersic(n=test_n, half_light_radius=5*test_hlr) + np.testing.assert_almost_equal(prof2.maxk, prof.maxk/5) + np.testing.assert_almost_equal(prof2.stepk, prof.stepk/5) + @timer def test_sersic_shoot(): diff --git a/tests/test_shapelet.py b/tests/test_shapelet.py index ff32e946e89..076c46207ad 100644 --- a/tests/test_shapelet.py +++ b/tests/test_shapelet.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -180,6 +180,10 @@ def test_shapelet_properties(): assert_raises(TypeError, galsim.Shapelet, order=order, bvec=bvec) assert_raises(ValueError, galsim.Shapelet, sigma=sigma, order=5, bvec=bvec) + # Check that stepk and maxk scale correctly with radius + shapelet2 = galsim.Shapelet(sigma=5*sigma, order=order, bvec=bvec) + np.testing.assert_almost_equal(shapelet2.maxk, shapelet.maxk/5) + np.testing.assert_almost_equal(shapelet2.stepk, shapelet.stepk/5) @timer def test_shapelet_fit(): diff --git a/tests/test_shear.py b/tests/test_shear.py index 13242eafefb..3492b80c73b 100644 --- a/tests/test_shear.py +++ b/tests/test_shear.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_shear_position.py b/tests/test_shear_position.py index 0cb7542797a..4f2ec70b7a7 100644 --- a/tests/test_shear_position.py +++ b/tests/test_shear_position.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_spergel.py b/tests/test_spergel.py index 4f0358a8137..0ee36524c95 100644 --- a/tests/test_spergel.py +++ b/tests/test_spergel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -106,23 +106,89 @@ def test_spergel(): def test_spergel_properties(): """Test some basic properties of the Spergel profile. """ + # Unlike some other similar tests that go back to Gary's original code, this one is based + # on v2.3.5, the earliest version that was easy for me to go back to and install. + # I also slightly modified the code for stepk and maxk to use the old _sbp version, + # since the Python version was already buggy at this point. (Inspired by issue #1324.) + test_flux = 17.9 - spergel = galsim.Spergel(nu=0.0, flux=test_flux, scale_radius=1.0) - # Check that we are centered on (0, 0) - cen = galsim.PositionD(0, 0) - np.testing.assert_equal(spergel.centroid, cen) - # # Check Fourier properties - np.testing.assert_almost_equal(spergel.kValue(cen), (1+0j) * test_flux) - maxk = spergel.maxk - assert spergel.kValue(maxk,0).real/test_flux <= galsim.GSParams().maxk_threshold - np.testing.assert_almost_equal(spergel.flux, test_flux) - np.testing.assert_almost_equal(spergel.xValue(cen), spergel.max_sb) + test_hlr = 2.3 + test_scale_radius = 1.6003703593406464 + test_nu = 0.2 # Note: nu<=0 has xValue(0,0) = inf. + prof = galsim.Spergel(nu=test_nu, half_light_radius=test_hlr, flux=test_flux) + + # Check various properties + np.testing.assert_equal(prof.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(prof.maxk, 11.094091231317272) + np.testing.assert_almost_equal(prof.stepk, 0.2731819698773733) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), 2.7808154838921206) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.xValue(0,0), prof.max_sb) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Now create the same profile using scale_radius + prof = galsim.Spergel(nu=test_nu, scale_radius=test_scale_radius, flux=test_flux) + np.testing.assert_almost_equal(prof.maxk, 11.094091231317272) + np.testing.assert_almost_equal(prof.stepk, 0.2731819698773733) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), 2.7808154838921206) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.xValue(0,0), prof.max_sb) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Check that stepk and maxk scale correctly with radius + prof2 = galsim.Spergel(nu=test_nu, half_light_radius=5*test_hlr, flux=test_flux) + np.testing.assert_almost_equal(prof2.maxk, prof.maxk/5) + np.testing.assert_almost_equal(prof2.stepk, prof.stepk/5) + # Check input flux vs output flux for inFlux in np.logspace(-2, 2, 10): - spergel = galsim.Spergel(nu=0.0, flux=inFlux, scale_radius=1.0) - outFlux = spergel.flux + prof3 = galsim.Spergel(nu=test_nu, half_light_radius=test_hlr, flux=inFlux) + outFlux = prof3.flux np.testing.assert_almost_equal(outFlux, inFlux) - np.testing.assert_almost_equal(spergel.xValue(cen), spergel.max_sb) + + # Repeat with nu < 0 + test_scale_radius2 = 2.1783499913527824 + test_nu2 = -0.2 + prof = galsim.Spergel(nu=test_nu2, half_light_radius=test_hlr, flux=test_flux) + + # Check various properties + np.testing.assert_equal(prof.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(prof.maxk, 34.42181161305098) + np.testing.assert_almost_equal(prof.stepk, 0.23712261251942787) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), np.inf) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.max_sb, np.inf) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius2) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Now create the same profile using scale_radius + prof = galsim.Spergel(nu=test_nu2, scale_radius=test_scale_radius2, flux=test_flux) + np.testing.assert_almost_equal(prof.maxk, 34.42181161305098) + np.testing.assert_almost_equal(prof.stepk, 0.23712261251942787) + np.testing.assert_almost_equal(prof.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + np.testing.assert_almost_equal(prof.xValue(0,0), np.inf) + np.testing.assert_almost_equal(prof.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(prof.flux, test_flux) + np.testing.assert_almost_equal(prof.max_sb, np.inf) + np.testing.assert_almost_equal(prof.scale_radius, test_scale_radius2) + np.testing.assert_almost_equal(prof.half_light_radius, test_hlr) + + # Check that stepk and maxk scale correctly with radius + prof2 = galsim.Spergel(nu=test_nu2, half_light_radius=5*test_hlr, flux=test_flux) + np.testing.assert_almost_equal(prof2.maxk, prof.maxk/5) + np.testing.assert_almost_equal(prof2.stepk, prof.stepk/5) @timer diff --git a/tests/test_sum.py b/tests/test_sum.py index 602c70ac74e..0e45d5e694e 100644 --- a/tests/test_sum.py +++ b/tests/test_sum.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_table.py b/tests/test_table.py index b9d816a97a8..68c54cf75dc 100644 --- a/tests/test_table.py +++ b/tests/test_table.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_transforms.py b/tests/test_transforms.py index 24c6e4aedc2..d4b60aac481 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_utilities.py b/tests/test_utilities.py index c65c4ebdca7..1f570e7e37c 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_vonkarman.py b/tests/test_vonkarman.py index 1030b93581f..9cf2d66cb89 100644 --- a/tests/test_vonkarman.py +++ b/tests/test_vonkarman.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -120,6 +120,44 @@ def test_vk_scale(): np.testing.assert_almost_equal(img1.array, img2.array) +@timer +def test_vk_properties(): + """Test some basic properties of the VonKarman profile. + """ + # Regression test based on v2.3.5 version of the code. + + test_flux = 1.8 + psf = galsim.VonKarman(lam=500, r0=0.2, L0=25.0, flux=test_flux) + + # Check various properties + np.testing.assert_equal(psf.centroid, galsim.PositionD(0,0)) + np.testing.assert_almost_equal(psf.maxk, 24.511275061996837) + np.testing.assert_almost_equal(psf.stepk, 1.1025979141287368, decimal=6) + np.testing.assert_almost_equal(psf.kValue(0,0), test_flux+0j) + np.testing.assert_almost_equal(psf.xValue(0,0), 7.91805413536067) + np.testing.assert_almost_equal(psf.kValue(0,0), (1+0j) * test_flux) + np.testing.assert_almost_equal(psf.flux, test_flux) + np.testing.assert_almost_equal(psf.xValue(0,0), psf.max_sb) + + # Check input flux vs output flux + for inFlux in np.logspace(-2, 2, 10): + psfFlux = galsim.VonKarman(lam=500, r0=0.2, L0=25.0, flux=inFlux) + outFlux = psfFlux.flux + np.testing.assert_almost_equal(outFlux, inFlux) + + # Check that stepk and maxk scale correctly with r0,L0 + psf2 = galsim.VonKarman(lam=500, r0=0.2/5, L0=25.0/5, flux=test_flux) + np.testing.assert_almost_equal(psf2.maxk, psf.maxk/5) + # This is not exact, since it's a computed quantity from the lookup table, so only + # equal to about 1%. + np.testing.assert_allclose(psf2.stepk, psf.stepk/5, rtol=0.01) + + # Equivalent if scale lam instead. + psf2 = galsim.VonKarman(lam=5*500, r0=0.2, L0=25.0, flux=test_flux) + np.testing.assert_almost_equal(psf2.maxk, psf.maxk/5) + np.testing.assert_allclose(psf2.stepk, psf.stepk/5, rtol=0.01) + + @timer def test_vk_shoot(): """Test VonKarman with photon shooting. Particularly the flux of the final image. diff --git a/tests/test_wcs.py b/tests/test_wcs.py index f852d2a75a2..b4fe8532537 100644 --- a/tests/test_wcs.py +++ b/tests/test_wcs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. diff --git a/tests/test_zernike.py b/tests/test_zernike.py index b1b9bf3845d..586c485d948 100644 --- a/tests/test_zernike.py +++ b/tests/test_zernike.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2023 by the GalSim developers team on GitHub +# Copyright (c) 2012-2026 by the GalSim developers team on GitHub # https://github.com/GalSim-developers # # This file is part of GalSim: The modular galaxy image simulation toolkit. @@ -881,6 +881,21 @@ def test_dz_val(): atol=2e-13, rtol=0 ) + zk_coefs = dz.xycoef(*uv_vector) + for zk, c in zip(zk_list, zk_coefs): + # Zk may have trailing zeros... + ncoef = len(c) + np.testing.assert_allclose( + zk.coef[:ncoef], + c, + atol=2e-13, rtol=0 + ) + for i, (u, v) in enumerate(zip(*uv_vector)): + np.testing.assert_equal( + zk_coefs[i], + dz.xycoef(u, v) + ) + # Check asserts with assert_raises(AssertionError): dz(0.0, [1.0]) @@ -1558,5 +1573,70 @@ def test_dz_mean(): ) +def test_large_j(run_slow): + # The analytic form for an annular Zernike of the form (n, m) = (n, n) or (n, -n) + # is: + # r^n sincos(n theta) sqrt((2n+2) / sum_i=0^n-1 eps^(2i)) + # where sincos is sin if n is even and cos if n is odd, and eps = R_inner/R_outer. + + rng = galsim.BaseDeviate(1234).as_numpy_generator() + x = rng.uniform(-1.0, 1.0, size=100) + y = rng.uniform(-1.0, 1.0, size=100) + + R_outer = 1.0 + R_inner = 0.5 + eps = R_inner/R_outer + + test_vals = [ + (10, 1e-12, 1e-12), # Z66 + (20, 1e-12, 1e-12), # Z231 + (40, 1e-9, 1e-12), # Z861 + ] + if run_slow: + test_vals += [ + (60, 1e-6, 1e-12), # Z1891 + (80, 1e-3, 1e-12), # Z3321 + (100, None, 1e-11), # Z5151 + (200, None, 1e-11), # Z20301 + ] + + print() + for n, tol, tol2 in test_vals: + j = (n+1)*(n+2)//2 + _, m = galsim.zernike.noll_to_zern(j) + print(f"Z{j} => (n, m) = ({n}, {m})") + assert n == abs(m) + coefs = [0]*j+[1] + zk = Zernike(coefs, R_outer=R_outer, R_inner=R_inner) + + def analytic_zk(x, y): + r = np.hypot(x, y) + theta = np.arctan2(y, x) + factor = np.sqrt((2*n+2) / np.sum([eps**(2*i) for i in range(n+1)])) + if m > 0: + return r**n * np.cos(n*theta) * factor + else: + return r**n * np.sin(n*theta) * factor + + analytic_vals = analytic_zk(x, y) + if n < 100: + np.testing.assert_allclose( + zk(x, y), + analytic_vals, + atol=tol, rtol=tol + ) + + robust_vals = zk.evalCartesianRobust(x, y) + np.testing.assert_allclose( + robust_vals, + analytic_vals, + atol=tol2, rtol=tol2 + ) + np.testing.assert_equal( + robust_vals, + zk(x, y, robust=True) + ) + + if __name__ == "__main__": runtests(__file__)