Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-41648: Write a Plugin for computing higher-order moments #44

Merged
merged 14 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Check Python formatting

on:
push:
branches:
- main
pull_request:

jobs:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/formatting.yaml@main
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.12.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: "python3.11"
- repo: https://github.com/pycqa/isort
rev: 5.13.1
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
3 changes: 3 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Copyright 2023 The Trustees of Princeton University
Copyright 2023 The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory
Copyright 2023 University of Pittsburgh
File renamed without changes.
15 changes: 11 additions & 4 deletions config/enable.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
#
# The 'config' should be a SourceMeasurementConfig.
#
# We activate the REGAUSS PSF-corrected shape measurement, and the adaptive moments of the source and PSF.
# We activate the REGAUSS PSF-corrected shape measurement, the adaptive moments of the source and PSF and the
# higher-order moments measurements of the same.

import lsst.meas.extensions.shapeHSM
config.plugins.names |= ["ext_shapeHSM_HsmShapeRegauss", "ext_shapeHSM_HsmSourceMoments",
"ext_shapeHSM_HsmPsfMoments", "ext_shapeHSM_HsmSourceMomentsRound",]

config.plugins.names |= [
"ext_shapeHSM_HsmShapeRegauss",
"ext_shapeHSM_HsmSourceMoments",
"ext_shapeHSM_HsmPsfMoments",
"ext_shapeHSM_HsmSourceMomentsRound",
"ext_shapeHSM_HigherOrderMomentsSource",
"ext_shapeHSM_HigherOrderMomentsPSF",
]
config.slots.shape = "ext_shapeHSM_HsmSourceMoments"
config.slots.psfShape = "ext_shapeHSM_HsmPsfMoments"

227 changes: 0 additions & 227 deletions doc/meas_shape.README

This file was deleted.

9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tool.black]
line-length = 110

[tool.isort]
profile = "black"
line_length = 110

[tool.lsst_versions]
write_to = "python/lsst/analysis/tools/version.py"
1 change: 1 addition & 0 deletions python/lsst/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import pkgutil

__path__ = pkgutil.extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions python/lsst/meas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import pkgutil

__path__ = pkgutil.extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions python/lsst/meas/extensions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import pkgutil

__path__ = pkgutil.extend_path(__path__, __name__)
3 changes: 2 additions & 1 deletion python/lsst/meas/extensions/shapeHSM/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

"""lsst.meas.extensions.shapeHSM
"""
from ._hsm_higher_moments import *
from ._hsm_moments import *
from ._hsm_shape import *
from .version import *
from .version import * # generated by sconsUtils