sep-x 1.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. sep_x-1.5.0/.clang-format +108 -0
  2. sep_x-1.5.0/.github/workflows/build-wheels-upload-pypi.yml +157 -0
  3. sep_x-1.5.0/.github/workflows/python-package-tox.yml +31 -0
  4. sep_x-1.5.0/.gitignore +59 -0
  5. sep_x-1.5.0/.pre-commit-config.yaml +34 -0
  6. sep_x-1.5.0/.readthedocs.yaml +39 -0
  7. sep_x-1.5.0/AUTHORS.md +12 -0
  8. sep_x-1.5.0/CHANGES.md +90 -0
  9. sep_x-1.5.0/CMakeLists.txt +50 -0
  10. sep_x-1.5.0/FindSEP.cmake +52 -0
  11. sep_x-1.5.0/MANIFEST.in +10 -0
  12. sep_x-1.5.0/Makefile +130 -0
  13. sep_x-1.5.0/PKG-INFO +344 -0
  14. sep_x-1.5.0/README.md +313 -0
  15. sep_x-1.5.0/benchmarks/README.md +52 -0
  16. sep_x-1.5.0/benchmarks/bench.py +262 -0
  17. sep_x-1.5.0/benchmarks/bench_aperture_performance.py +161 -0
  18. sep_x-1.5.0/benchmarks/bench_psf_detection.py +592 -0
  19. sep_x-1.5.0/benchmarks/check_grouped_psf_noisy_catalog.py +719 -0
  20. sep_x-1.5.0/benchmarks/compare_aperture_photometry.py +437 -0
  21. sep_x-1.5.0/benchmarks/compare_optimal_grouped_ungrouped.py +138 -0
  22. sep_x-1.5.0/benchmarks/compare_optimal_photometry.py +267 -0
  23. sep_x-1.5.0/benchmarks/compare_psf_photometry.py +424 -0
  24. sep_x-1.5.0/benchmarks/deblend_crowded_pairs.py +275 -0
  25. sep_x-1.5.0/benchmarks/deblend_fluxratio_pairs.py +291 -0
  26. sep_x-1.5.0/benchmarks/fwhm_estimation.py +231 -0
  27. sep_x-1.5.0/benchmarks/grouped_optimal_stability.py +244 -0
  28. sep_x-1.5.0/benchmarks/winpos_crowded_stability.py +295 -0
  29. sep_x-1.5.0/codemeta.json +23 -0
  30. sep_x-1.5.0/ctest/compare.py +75 -0
  31. sep_x-1.5.0/ctest/test_image.c +413 -0
  32. sep_x-1.5.0/data/README.md +10 -0
  33. sep_x-1.5.0/data/back.fits +596 -1
  34. sep_x-1.5.0/data/default.conv +5 -0
  35. sep_x-1.5.0/data/default.nnw +28 -0
  36. sep_x-1.5.0/data/default.param +19 -0
  37. sep_x-1.5.0/data/default.sex +80 -0
  38. sep_x-1.5.0/data/image.cat +84 -0
  39. sep_x-1.5.0/data/image.fits +253 -0
  40. sep_x-1.5.0/data/rms.fits +587 -0
  41. sep_x-1.5.0/docs/Makefile +178 -0
  42. sep_x-1.5.0/docs/apertures.rst +291 -0
  43. sep_x-1.5.0/docs/changelogs/changelog.rst +22 -0
  44. sep_x-1.5.0/docs/changelogs/changes_to_c_api.rst +131 -0
  45. sep_x-1.5.0/docs/changelogs/new_changes.rst +7 -0
  46. sep_x-1.5.0/docs/changelogs/original_changes.md +179 -0
  47. sep_x-1.5.0/docs/conf.py +297 -0
  48. sep_x-1.5.0/docs/filter.rst +153 -0
  49. sep_x-1.5.0/docs/index.rst +142 -0
  50. sep_x-1.5.0/docs/matched_filter_example.png +0 -0
  51. sep_x-1.5.0/docs/psf.rst +263 -0
  52. sep_x-1.5.0/docs/reference.rst +88 -0
  53. sep_x-1.5.0/docs/rtd-pip-requirements +8 -0
  54. sep_x-1.5.0/docs/tutorial.ipynb +415 -0
  55. sep_x-1.5.0/licenses/BSD_LICENSE.txt +25 -0
  56. sep_x-1.5.0/licenses/LGPL_LICENSE.txt +165 -0
  57. sep_x-1.5.0/licenses/MIT_LICENSE.txt +22 -0
  58. sep_x-1.5.0/paper/paper.bib +21 -0
  59. sep_x-1.5.0/paper/paper.md +64 -0
  60. sep_x-1.5.0/pyproject.toml +91 -0
  61. sep_x-1.5.0/sep.c +94684 -0
  62. sep_x-1.5.0/sep.pyx +4857 -0
  63. sep_x-1.5.0/setup.cfg +4 -0
  64. sep_x-1.5.0/setup.py +106 -0
  65. sep_x-1.5.0/src/analyse.c +429 -0
  66. sep_x-1.5.0/src/aperture.c +4066 -0
  67. sep_x-1.5.0/src/aperture.i +217 -0
  68. sep_x-1.5.0/src/background.c +1146 -0
  69. sep_x-1.5.0/src/convolve.c +269 -0
  70. sep_x-1.5.0/src/deblend.c +1045 -0
  71. sep_x-1.5.0/src/extract.c +1803 -0
  72. sep_x-1.5.0/src/extract.h +218 -0
  73. sep_x-1.5.0/src/lutz.c +347 -0
  74. sep_x-1.5.0/src/overlap.h +544 -0
  75. sep_x-1.5.0/src/psf.c +4758 -0
  76. sep_x-1.5.0/src/sep.h +987 -0
  77. sep_x-1.5.0/src/sep_x.egg-info/PKG-INFO +344 -0
  78. sep_x-1.5.0/src/sep_x.egg-info/SOURCES.txt +85 -0
  79. sep_x-1.5.0/src/sep_x.egg-info/dependency_links.txt +1 -0
  80. sep_x-1.5.0/src/sep_x.egg-info/requires.txt +13 -0
  81. sep_x-1.5.0/src/sep_x.egg-info/scm_file_list.json +82 -0
  82. sep_x-1.5.0/src/sep_x.egg-info/scm_version.json +8 -0
  83. sep_x-1.5.0/src/sep_x.egg-info/top_level.txt +1 -0
  84. sep_x-1.5.0/src/sepcore.h +104 -0
  85. sep_x-1.5.0/src/util.c +302 -0
  86. sep_x-1.5.0/test.py +3559 -0
  87. sep_x-1.5.0/tox.ini +20 -0
@@ -0,0 +1,108 @@
1
+ # SPDX-License-Identifier: MIT
2
+ #
3
+ # Copyright (c) 2023 Intercreate, Inc.
4
+ # Author: J.P. Hutchins <jp@intercreate.io>
5
+ #
6
+ # Python(black)-inspired .clang-format for C repositories
7
+ #
8
+ # Includes Zephyr and Arm macro compatibility
9
+
10
+ ---
11
+ BasedOnStyle: Google
12
+
13
+ AlignAfterOpenBracket: BlockIndent
14
+ AlignTrailingComments: false
15
+ AllowAllArgumentsOnNextLine: true
16
+ AllowAllParametersOfDeclarationOnNextLine: true
17
+ AllowShortBlocksOnASingleLine: Never
18
+ AllowShortCaseLabelsOnASingleLine: false
19
+ AllowShortEnumsOnASingleLine: false
20
+ AllowShortFunctionsOnASingleLine: Empty
21
+ AllowShortIfStatementsOnASingleLine: Never
22
+ AllowShortLoopsOnASingleLine: false
23
+ AttributeMacros:
24
+ - __aligned
25
+ - __deprecated
26
+ - __packed
27
+ - __printf_like
28
+ - __syscall
29
+ - __syscall_always_inline
30
+ - __subsystem
31
+ BinPackArguments: false
32
+ BinPackParameters: false
33
+ BraceWrapping:
34
+ AfterCaseLabel: false
35
+ AfterClass: false
36
+ AfterControlStatement: MultiLine
37
+ AfterEnum: false
38
+ AfterFunction: false
39
+ AfterNamespace: false
40
+ AfterObjCDeclaration: false
41
+ AfterStruct: false
42
+ AfterUnion: false
43
+ AfterExternBlock: false
44
+ BeforeCatch: false
45
+ BeforeElse: false
46
+ IndentBraces: false
47
+ SplitEmptyFunction: false
48
+ SplitEmptyRecord: false
49
+ SplitEmptyNamespace: false
50
+ BeforeLambdaBody: false
51
+ BeforeWhile: false
52
+ BitFieldColonSpacing: After
53
+ BreakBeforeBinaryOperators: NonAssignment
54
+ BreakBeforeBraces: Custom
55
+ BreakStringLiterals: true
56
+ ColumnLimit: 88
57
+ DerivePointerAlignment: false
58
+ ForEachMacros:
59
+ - 'FOR_EACH'
60
+ - 'FOR_EACH_FIXED_ARG'
61
+ - 'FOR_EACH_IDX'
62
+ - 'FOR_EACH_IDX_FIXED_ARG'
63
+ - 'FOR_EACH_NONEMPTY_TERM'
64
+ - 'RB_FOR_EACH'
65
+ - 'RB_FOR_EACH_CONTAINER'
66
+ - 'SYS_DLIST_FOR_EACH_CONTAINER'
67
+ - 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
68
+ - 'SYS_DLIST_FOR_EACH_NODE'
69
+ - 'SYS_DLIST_FOR_EACH_NODE_SAFE'
70
+ - 'SYS_SFLIST_FOR_EACH_CONTAINER'
71
+ - 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
72
+ - 'SYS_SFLIST_FOR_EACH_NODE'
73
+ - 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
74
+ - 'SYS_SLIST_FOR_EACH_CONTAINER'
75
+ - 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
76
+ - 'SYS_SLIST_FOR_EACH_NODE'
77
+ - 'SYS_SLIST_FOR_EACH_NODE_SAFE'
78
+ - '_WAIT_Q_FOR_EACH'
79
+ - 'Z_FOR_EACH'
80
+ - 'Z_FOR_EACH_ENGINE'
81
+ - 'Z_FOR_EACH_EXEC'
82
+ - 'Z_FOR_EACH_FIXED_ARG'
83
+ - 'Z_FOR_EACH_FIXED_ARG_EXEC'
84
+ - 'Z_FOR_EACH_IDX'
85
+ - 'Z_FOR_EACH_IDX_EXEC'
86
+ - 'Z_FOR_EACH_IDX_FIXED_ARG'
87
+ - 'Z_FOR_EACH_IDX_FIXED_ARG_EXEC'
88
+ - 'Z_GENLIST_FOR_EACH_CONTAINER'
89
+ - 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
90
+ - 'Z_GENLIST_FOR_EACH_NODE'
91
+ - 'Z_GENLIST_FOR_EACH_NODE_SAFE'
92
+ - 'STRUCT_SECTION_FOREACH'
93
+ - 'TYPE_SECTION_FOREACH'
94
+ IncludeBlocks: Preserve
95
+ IfMacros:
96
+ - 'CHECKIF'
97
+ IndentCaseBlocks: true
98
+ IndentCaseLabels: false
99
+ IndentWidth: 2
100
+ InsertBraces: true
101
+ MaxEmptyLinesToKeep: 2
102
+ PointerAlignment: Middle
103
+ SortIncludes: CaseSensitive
104
+ SpaceBeforeParens: ControlStatementsExceptControlMacros
105
+ UseTab: Never
106
+ WhitespaceSensitiveMacros:
107
+ - STRINGIFY
108
+ - Z_STRINGIFY
@@ -0,0 +1,157 @@
1
+ # GitHub action for building the distribution and wheels of the sep package
2
+ # and uploading them to the PyPI package index.
3
+
4
+ name: build-wheels-upload-pypi
5
+
6
+ on: [push, workflow_dispatch]
7
+ # push:
8
+ # # Run this action on the trigger event when *any* tag is pushed
9
+ # tags:
10
+ # - '*'
11
+
12
+ jobs:
13
+
14
+ # This action is split into three jobs:
15
+ # - Building the source distribution
16
+ # - Building the wheels for the distribution
17
+ # - Uploading the artifacts to PyPI package
18
+ # The first and second job run in parallel.
19
+ # The uploading jos needs to have the other two finished without error.
20
+
21
+ # From now on, we run the tests before continuing with these jobs.
22
+
23
+ run_tests:
24
+ uses: ./.github/workflows/python-package-tox.yml
25
+
26
+ build_sdist:
27
+ needs: [run_tests]
28
+
29
+ # First the source distribution is done on ubuntu. This is not related
30
+ # to any operating system, so we could do it on the default os.
31
+
32
+ runs-on: ubuntu-24.04
33
+
34
+ steps:
35
+ - name: checkout
36
+ uses: actions/checkout@v4
37
+ with:
38
+ fetch-depth: 0
39
+ fetch-tags: true
40
+
41
+ - name: install_python
42
+ uses: actions/setup-python@v5
43
+ with:
44
+ python-version: '3.12'
45
+
46
+ # For the build, sep needs numpy and cython and we add twine and wheel
47
+ # for better testing and checking.
48
+
49
+ - name: Install dependencies
50
+ run: python -m pip install setuptools twine numpy wheel build
51
+
52
+ - name: Build sdist
53
+ run: python -m build --sdist
54
+
55
+ - name: Show files
56
+ run: ls -lh dist
57
+ shell: bash
58
+
59
+ - name: Check metadata
60
+ run: twine check dist/*
61
+
62
+ - name: Upload sdist
63
+ uses: actions/upload-artifact@v4
64
+ with:
65
+ name: dist
66
+ path: dist/*.tar.gz
67
+
68
+ build_wheels:
69
+ needs: [run_tests]
70
+
71
+ # Second the wheels are build for different OS and python versions. This is
72
+ # done with the help of the `cibuildwheel` package.
73
+ #
74
+ # The wheels are built for Windows, Linux and MacOS and the python versions
75
+ # 3.9 - 3.13.
76
+ #
77
+ # The three operating system could be done in parallel.
78
+ name: Build wheels on ${{ matrix.os }}
79
+ runs-on: ${{ matrix.os }}
80
+ env:
81
+ CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
82
+
83
+ strategy:
84
+ max-parallel: 4
85
+ matrix:
86
+ python-version: ["3.12"]
87
+ os: [windows-latest, macos-latest, ubuntu-24.04, ubuntu-24.04-arm]
88
+
89
+ steps:
90
+ - uses: actions/checkout@v4
91
+
92
+ - name: checkout
93
+ uses: actions/checkout@v4
94
+ with:
95
+ fetch-depth: 0
96
+ fetch-tags: true
97
+
98
+ - name: Setup Python ${{ matrix.python-version }}
99
+ uses: actions/setup-python@v5
100
+ with:
101
+ python-version: ${{ matrix.python-version }}
102
+
103
+ - name: Install cibuildwheel
104
+ run: python -m pip install cibuildwheel
105
+
106
+ - name: Build wheels
107
+ run: python -m cibuildwheel --output-dir wheelhouse
108
+ env:
109
+ CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
110
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
111
+ CIBW_MANYLINUX_I686_IMAGE: manylinux_2_28
112
+ CIBW_BUILD_VERBOSITY: 1
113
+ CIBW_SKIP: '*-musllinux_*'
114
+ CIBW_ARCHS_LINUX: "auto"
115
+
116
+ - name: Show files
117
+ run: ls -lh wheelhouse
118
+ shell: bash
119
+
120
+ - name: Upload wheels
121
+ uses: actions/upload-artifact@v4
122
+ with:
123
+ name: dist-${{ matrix.os }}
124
+ path: ./wheelhouse/*.whl
125
+
126
+ upload_to_pypi:
127
+
128
+ # Finally we collect all out data from the artifacts and put them back to
129
+ # dist directory for upload. The final step waits for the other jobs to be
130
+ # finished and starts only if the trigger event of the action was a push
131
+ # of a tag starting with <v> as version separation. All other jobs run
132
+ # without heading <v>
133
+
134
+ runs-on: [ubuntu-latest]
135
+ needs: [build_wheels, build_sdist]
136
+ environment:
137
+ name: pypi
138
+ url: https://pypi.org/p/sep-x
139
+ permissions:
140
+ id-token: write
141
+
142
+ # upload to PyPI on every tag starting with 'v'
143
+ if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
144
+
145
+ steps:
146
+ - uses: actions/setup-python@v5
147
+
148
+ - uses: actions/download-artifact@v4
149
+ with:
150
+ pattern: dist*
151
+ merge-multiple: true
152
+ path: dist
153
+
154
+ - name: upload_to_pypi
155
+ uses: pypa/gh-action-pypi-publish@release/v1
156
+ # with:
157
+ # repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,31 @@
1
+ # This workflow will install tox and use it to run tests.
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
+
4
+ name: CI
5
+
6
+ on: [push, workflow_call, workflow_dispatch, pull_request]
7
+
8
+ jobs:
9
+ build:
10
+
11
+ runs-on: ${{ matrix.os }}
12
+ strategy:
13
+ matrix:
14
+ python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
15
+ os: [windows-latest, macos-latest, ubuntu-latest]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Setup Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python }}
23
+ - name: Install Tox and any other packages
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ python -m pip install tox tox-gh-actions
27
+ - name: Run Tox
28
+ # Run tox using the version of Python in `PATH`, append platform
29
+ run: tox
30
+ env:
31
+ PLATFORM: ${{ matrix.os }}
sep_x-1.5.0/.gitignore ADDED
@@ -0,0 +1,59 @@
1
+ # emacs
2
+ *~
3
+
4
+ # --------------------------------------------
5
+ # C
6
+
7
+ *.o
8
+ *.os
9
+ *.so
10
+ *.so.*
11
+ *.dylib
12
+ *.dylib.*
13
+ *.a
14
+ ctest/test_image
15
+
16
+ # generated by tests
17
+ data/sep.cat
18
+ data/sepback.fits
19
+
20
+ # scons
21
+ .sconsign.dblite
22
+
23
+ # tarball
24
+ sep-*.tar.gz
25
+
26
+ # -------------------------------------------
27
+ # Python
28
+
29
+ __pycache__
30
+
31
+ docs/_build
32
+ docs/api
33
+ build/
34
+
35
+ MANIFEST
36
+ *.egg-info
37
+
38
+ # pytest
39
+ .pytest_cache
40
+ .cache
41
+
42
+ # generated C file
43
+ sep.c
44
+
45
+ # PyCharm
46
+ .idea
47
+ .project
48
+
49
+ # Eclipse
50
+ .pydevproject
51
+
52
+ # Jupyter
53
+ .ipynb_checkpoints
54
+
55
+ # tox
56
+ .tox
57
+
58
+ # version
59
+ *_version.py
@@ -0,0 +1,34 @@
1
+ exclude: "^data/"
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v5.0.0
5
+ hooks:
6
+ - id: trailing-whitespace
7
+ - id: end-of-file-fixer
8
+ - id: check-yaml
9
+ - id: check-added-large-files
10
+ - repo: https://github.com/pycqa/isort
11
+ rev: 5.13.2
12
+ hooks:
13
+ - id: isort
14
+ name: isort (python)
15
+ - repo: https://github.com/psf/black
16
+ rev: 24.10.0
17
+ hooks:
18
+ - id: black
19
+ args: [--preview]
20
+ - repo: https://github.com/numpy/numpydoc
21
+ rev: v1.8.0
22
+ hooks:
23
+ - id: numpydoc-validation
24
+ - repo: https://github.com/sphinx-contrib/sphinx-lint
25
+ rev: v1.0.0
26
+ hooks:
27
+ - id: sphinx-lint
28
+ args: [--enable=all, --disable=default-role, --max-line-length=75, -v]
29
+ files: ^docs\/|^.*\.(rst$|md$)
30
+ - repo: https://github.com/pre-commit/mirrors-clang-format
31
+ rev: v19.1.4
32
+ hooks:
33
+ - id: clang-format
34
+ types_or: [c++, c, cuda]
@@ -0,0 +1,39 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version and other tools you might need
8
+ build:
9
+ os: ubuntu-22.04
10
+ tools:
11
+ python: "3.12"
12
+ # You can also specify other tool versions:
13
+ # nodejs: "20"
14
+ # rust: "1.70"
15
+ # golang: "1.20"
16
+
17
+ # Build documentation in the "docs/" directory with Sphinx
18
+ sphinx:
19
+ configuration: docs/conf.py
20
+ # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21
+ # builder: "dirhtml"
22
+ # Fail on all warnings to avoid broken references
23
+ # fail_on_warning: true
24
+
25
+ # Optionally build your docs in additional formats such as PDF and ePub
26
+ # formats:
27
+ # - pdf
28
+ # - epub
29
+
30
+ # Optional but recommended, declare the Python requirements required
31
+ # to build your documentation
32
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33
+ python:
34
+ install:
35
+ # - requirements: docs/requirements.txt
36
+ - method: pip
37
+ path: .
38
+ extra_requirements:
39
+ - docs
sep_x-1.5.0/AUTHORS.md ADDED
@@ -0,0 +1,12 @@
1
+ * Emmanuel Bertin (bertin@iap.fr) : original SExtractor code
2
+ * Kyle Barbary (@kbarbary) : Conversion of SExtractor code to library
3
+ * Kyle Boone (@kboone) : Bugfix, matched filter
4
+ * Thomas Robitaille (@astrofrog) : Exact aperture overlap code
5
+ * Matt Craig (@mwcraig) : Windows & OS X support
6
+ * Curtis McCully (@cmccully): Parameter uncertainties
7
+ * Evert Rol (@evertrol): setup.py fixes
8
+ * Joe Lyman (@lyalpha): Make deblending limit settable
9
+ * Michael Wuertenberger (@mworion): PyPI wheels
10
+ * Ingvar Stepanyan (@rreverser): Build system, public API and thread safety fixes.
11
+ * Gabe Brammer (@gbrammer): Fix memory addressing with large arrays.
12
+ * Peter Watson (@PJ-Watson): Add extraction from existing segmentation map.
sep_x-1.5.0/CHANGES.md ADDED
@@ -0,0 +1,90 @@
1
+ Unreleased
2
+ ==========
3
+
4
+ * Add optimal-extraction circular photometry (`sum_circle_optimal`) with
5
+ auto-grouping for overlapping apertures and configurable grouping radius.
6
+ * Add sigma-clipped annulus statistics (`stats_circann`, `stats_ellipann`)
7
+ for robust local background estimation.
8
+ * Add sigma-clipped annulus background controls (`clip_sigma`, `clip_iters`)
9
+ to `sum_circle`, `sum_ellipse`, and `sum_circle_optimal`, with a fast
10
+ legacy fallback when `clip_iters=0`.
11
+
12
+ v1.3.7 (8 November 2024)
13
+ ========================
14
+
15
+ * Test against Python 3.13.
16
+ * Update the Makefile to support Semantic Versioning from git tags.
17
+ * Update the C libraries to allow for passing the version as a compiler
18
+ flag.
19
+ * Update `setup.py` to pass the SCM version to the Cython compiler.
20
+ * Include C tests in the Tox suite (for linux and macos only).
21
+ * Document any and all changes to the C API since forking.
22
+ * Restructure changelog documentation.
23
+
24
+ v1.3.6 (7 October 2024)
25
+ =======================
26
+
27
+ * Fix wrong int type in Windows
28
+ ([#2](https://github.com/PJ-Watson/sep-pjw/issues/2), thanks to
29
+ @acenko for pointing this out).
30
+ * Update tests to run on multiple operating systems.
31
+
32
+ v1.3.5 (12 June 2024)
33
+ =====================
34
+
35
+ * Small fixes and updates to ensure compatibility with NumPy 2.0.
36
+
37
+ v1.3.4 (21 February 2024)
38
+ ========================
39
+
40
+ * Include .clang-format as a pre-commit hook, to ensure consistent code
41
+ style (improved readability, easier maintenance).
42
+ * Fixed `make test` to account for the changes in
43
+ [v1.3.0](https://github.com/PJ-Watson/sep-pjw/releases/tag/v1.3.0).
44
+ * All header files include the correct definitions.
45
+
46
+ v1.3.3 (7 February 2024)
47
+ ========================
48
+
49
+ * Add changelog to documentation.
50
+ * Add tests for re-running with seg map.
51
+ * Fix array boundary bugs when re-running with seg map.
52
+ * Fix bug with precision loss when calculating threshold.
53
+ * Improve error handling when object pixels exceed pix stack.
54
+
55
+ v1.3.2 (5 February 2024)
56
+ ========================
57
+
58
+ * Move documentation to new location, fix package names and imports.
59
+ * Add wheels for Python 3.11/3.12.
60
+ * Fix C compilation errors on windows (VLAs).
61
+ * Publish updated version to PyPI under new name.
62
+
63
+ v1.3.1 (31 January 2024)
64
+ ========================
65
+
66
+ * Formatting changes (follow [black](https://github.com/psf/black)
67
+ formatting style).
68
+ * Fix `bench.py` and `test.py`, removing deprecated functions.
69
+ * Move metadata into `pyproject.toml`.
70
+ * Add pre-commit hooks for code and docstring validation.
71
+ * Change to dynamic versioning (git tag/commit based).
72
+
73
+ v1.3.0 (1 December 2023)
74
+ ========================
75
+
76
+ * The `segmentation_map` argument of `sep.extract()` will now accept
77
+ either an array or boolean. If an existing segmentation map is passed,
78
+ the object detection stage is skipped, and sources will be individually
79
+ analysed according to the provided map. This change is
80
+ backwards-compatible with respect to the Python module.
81
+
82
+ Please note that as no deblending is performed, the calculated
83
+ thresholds (and any dependent parameters) may not be the same as
84
+ originally derived.
85
+
86
+ * Use 64-bit integers throughout, to fix memory addressing with large
87
+ arrays
88
+ ([#122](https://github.com/kbarbary/sep/issues/122 "Original issue"),
89
+ inspired by [Gabe Brammer's fork](https://github.com/gbrammer/sep)
90
+ with additional fixes).
@@ -0,0 +1,50 @@
1
+ cmake_minimum_required(VERSION 2.6)
2
+
3
+ project(sep C)
4
+
5
+ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/")
6
+ include(GNUInstallDirs)
7
+
8
+ set(SOURCES
9
+ ${CMAKE_SOURCE_DIR}/src/analyse.c
10
+ ${CMAKE_SOURCE_DIR}/src/convolve.c
11
+ ${CMAKE_SOURCE_DIR}/src/deblend.c
12
+ ${CMAKE_SOURCE_DIR}/src/extract.c
13
+ ${CMAKE_SOURCE_DIR}/src/lutz.c
14
+ ${CMAKE_SOURCE_DIR}/src/aperture.c
15
+ ${CMAKE_SOURCE_DIR}/src/background.c
16
+ ${CMAKE_SOURCE_DIR}/src/psf.c
17
+ ${CMAKE_SOURCE_DIR}/src/util.c
18
+ )
19
+
20
+ include_directories(${CMAKE_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/src ${CFITSIO_INCLUDE_DIR})
21
+
22
+ link_directories(${CMAKE_LIBRARY_PATH} ${CMAKE_SOURCE_DIR}/src)
23
+
24
+ add_library(sep SHARED ${SOURCES})
25
+ set_target_properties(sep PROPERTIES OUTPUT_NAME sep)
26
+ set_target_properties(sep PROPERTIES VERSION 0.6.0 SOVERSION 0)
27
+ set_target_properties(sep PROPERTIES C_VISIBILITY_PRESET hidden)
28
+
29
+ option(SEP_USE_OPENMP "Enable OpenMP acceleration" ON)
30
+ if (SEP_USE_OPENMP)
31
+ find_package(OpenMP QUIET)
32
+ if (OpenMP_C_FOUND)
33
+ if (OpenMP_C_FLAGS)
34
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
35
+ endif()
36
+ if (OpenMP_C_LIBRARIES)
37
+ target_link_libraries(sep ${OpenMP_C_LIBRARIES})
38
+ endif()
39
+ endif()
40
+ endif()
41
+
42
+ if (MSVC)
43
+ add_definitions(-D_USE_MATH_DEFINES)
44
+ else ()
45
+ add_compile_options(-Wcast-qual)
46
+ target_link_libraries(sep m)
47
+ endif()
48
+
49
+ install(TARGETS sep LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
50
+ install(FILES ${CMAKE_SOURCE_DIR}/src/sep.h DESTINATION include)
@@ -0,0 +1,52 @@
1
+ # - Try to find SEP
2
+ # Once done this will define
3
+ #
4
+ # SEP_FOUND - system has SEP
5
+ # SEP_INCLUDE_DIR - the SEP include directory
6
+ # SEP_LIBRARIES - Link these to use SEP
7
+ # SEP_VERSION_STRING - Human readable version number of sep
8
+ # SEP_VERSION_MAJOR - Major version number of sep
9
+ # SEP_VERSION_MINOR - Minor version number of sep
10
+
11
+ # Copyright (c) 2017, Ilia Platone, <info@iliaplatone.com>
12
+ # Based on FindLibfacile by Carsten Niehaus, <cniehaus@gmx.de>
13
+ #
14
+ # Redistribution and use is allowed according to the terms of the BSD license.
15
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
16
+
17
+ if (SEP_LIBRARIES)
18
+
19
+ # in cache already
20
+ set(SEP_FOUND TRUE)
21
+ message(STATUS "Found SEP: ${SEP_LIBRARIES}")
22
+
23
+
24
+ else (SEP_LIBRARIES)
25
+
26
+ find_library(SEP_LIBRARIES NAMES sep
27
+ PATHS
28
+ ${_obLinkDir}
29
+ ${GNUWIN32_DIR}/lib
30
+ /usr/local/lib
31
+ )
32
+
33
+ if(SEP_LIBRARIES)
34
+ set(SEP_FOUND TRUE)
35
+ else (SEP_LIBRARIES)
36
+ set(SEP_FOUND FALSE)
37
+ endif(SEP_LIBRARIES)
38
+
39
+
40
+ if (SEP_FOUND)
41
+ if (NOT SEP_FIND_QUIETLY)
42
+ message(STATUS "Found SEP: ${SEP_LIBRARIES}")
43
+ endif (NOT SEP_FIND_QUIETLY)
44
+ else (SEP_FOUND)
45
+ if (SEP_FIND_REQUIRED)
46
+ message(FATAL_ERROR "SEP not found. Please install libsep-dev")
47
+ endif (SEP_FIND_REQUIRED)
48
+ endif (SEP_FOUND)
49
+
50
+ mark_as_advanced(SEP_LIBRARIES)
51
+
52
+ endif (SEP_LIBRARIES)
@@ -0,0 +1,10 @@
1
+ include README.md
2
+ include CHANGES.md
3
+ include AUTHORS.md
4
+ include licenses/*
5
+ include pyproject.toml
6
+
7
+ include src/*.[c,h,i]
8
+ include sep.pyx
9
+ include sep.c
10
+ recursive-include benchmarks *.py *.md