Skip to content

Commit

Permalink
Merge pull request #7 from lincc-frameworks/update-ppt
Browse files Browse the repository at this point in the history
Update ppt to 2.0.2
  • Loading branch information
hombit committed Sep 11, 2024
2 parents b8e2edd + ddb418a commit 41b0a72
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v2.0.1
_commit: v2.0.2
_src_path: gh:lincc-frameworks/python-project-template
author_email: [email protected]
author_name: LINCC Frameworks
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/1-bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ assignees: ''
Please check the following:

- [ ] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead.
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
# This hook should always pass. It will print a message if the local version
# is out of date.
- repo: https://github.com/lincc-frameworks/pre-commit-hooks
rev: v0.1.1
rev: v0.1.2
hooks:
- id: check-lincc-frameworks-template-version
name: Check template version
Expand Down
19 changes: 11 additions & 8 deletions docs/notebooks/boundaries.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,34 +93,37 @@
"\n",
"# return np.degrees(phi), z\n",
"\n",
"\n",
"def phi_z(k, kp):\n",
" # return np.degrees(polar(k, kp)[0]), polar(k, kp)[1]\n",
" eq_phi, eq_z = eq(k, kp)\n",
" polar_phi, polar_z = polar(k, kp)\n",
" z = np.where(eq_z <= 2/3, eq_z, polar_z)\n",
" phi = np.where(eq_z <= 2/3, eq_phi, polar_phi)\n",
" z = np.where(eq_z <= 2 / 3, eq_z, polar_z)\n",
" phi = np.where(eq_z <= 2 / 3, eq_phi, polar_phi)\n",
" return np.degrees(phi), z\n",
"\n",
"\n",
"def eq(k, kp):\n",
" z = 2/3 * (2 - (kp + k) / nside)\n",
" phi = np.pi/4/nside * (nside - kp + k)\n",
" z = 2 / 3 * (2 - (kp + k) / nside)\n",
" phi = np.pi / 4 / nside * (nside - kp + k)\n",
" return phi, z\n",
"\n",
"\n",
"def polar(k, kp):\n",
" j = np.abs(k) - 0.5\n",
" i = np.abs(kp) + np.abs(k)\n",
"\n",
" z = 1 - (i / nside)**2 / 3\n",
" z = 1 - (i / nside) ** 2 / 3\n",
" phi = 0.5 * np.pi * (j + 0.5) / i\n",
"\n",
" eq_phi, eq_z = eq(np.abs(k), np.abs(kp))\n",
" \n",
"\n",
" z = np.where(np.abs(kp) + np.abs(k) <= nside, z, eq_z)\n",
" phi = np.where(np.abs(kp) + np.abs(k) <= nside, phi, eq_phi)\n",
" \n",
"\n",
" phi = np.where(kp >= 0, phi, np.pi - phi)\n",
" phi = np.where(k >= 0, phi, -phi)\n",
" \n",
"\n",
" return phi, z\n",
"\n",
"\n",
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ select = [
"D300",
"D417",
"D419",

# Numpy v2.0 compatibility
"NPY201",
]

ignore = [
Expand Down

0 comments on commit 41b0a72

Please sign in to comment.