Skip to content

gh-1116: add resample_shapes()#1143

Merged
ntessore merged 3 commits into
mainfrom
nt/1116
Jun 24, 2026
Merged

gh-1116: add resample_shapes()#1143
ntessore merged 3 commits into
mainfrom
nt/1116

Conversation

@ntessore

Copy link
Copy Markdown
Collaborator

Description

Adds a new function glass.resample_shapes() that takes an array of ellipticity and randomises them. The function can optionally compensate for the intrinsic variance varg or vargamma of the (reduced) shear field (i.e., the variance of the ellipticities will be equal to the input array after applying a (reduced) shear).

Closes: #1116

Changelog entry

Added: A new function glass.resample_shapes() for resampling an existing catalogue of ellipticities.

Checks

  • Is your code passing linting?
  • Is your code passing tests?
  • Have you added additional tests (if required)?
  • Have you modified/extended the documentation (if required)?
  • Have you added a one-liner changelog entry above (if required)?

@ntessore ntessore requested a review from connoraird June 23, 2026 09:10
Comment thread tests/core/test_shapes.py
Comment thread tests/core/test_shapes.py Outdated
Comment thread tests/core/test_shapes.py

@connoraird connoraird left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I was also experiencing the failing examples, I'm not sure what's causing it.

@ntessore ntessore merged commit a124dae into main Jun 24, 2026
12 of 14 checks passed
@ntessore ntessore deleted the nt/1116 branch June 24, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resampling galaxy shapes

2 participants