Skip to content

Commit

Permalink
Merge pull request #29 from bgmeulem/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bgmeulem authored Feb 26, 2025
2 parents 26d08d4 + e7b1f60 commit 00307a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 40 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
branches:
- master


jobs:
publish:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,30 +35,4 @@ jobs:
- name: Publish to TestPyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: v${{ github.run_number }}
release_name: Release v${{ github.run_number }}
body: |
Release notes for version v${{ github.run_number }}.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Git Tag
uses: actions/github-script@v6
with:
script: |
const tagName = `v${{ github.run_number }}`;
const sha = process.env.GITHUB_SHA;
await github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tagName}`,
sha: sha
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
repository-url: https://test.pypi.org/legacy/
12 changes: 1 addition & 11 deletions luminet/black_hole.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, mass=1.0, incl=1.5, acc=1.0, outer_edge=None):
r"""float: critical impact parameter for the photon sphere :math:`3 \sqrt{3} M`"""
self.settings = {} # All settings: see below
self.ir_parameters = {}
self._read_parameters()
self.ir_parameters = {"angular_precision": 200}

self.isoradial_template = partial(
Isoradial,
Expand Down Expand Up @@ -66,16 +66,6 @@ def __init__(self, mass=1.0, incl=1.5, acc=1.0, outer_edge=None):
self.isoredshifts = []
"""List[Isoredshift]: list of calculated isoredshifts"""

def _read_parameters(self):
pardir = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
config = configparser.ConfigParser(inline_comment_prefixes="#")
config.read(os.path.join(pardir, "parameters.ini"))
for i, section in enumerate(config.sections()):
self.settings[section] = {
key: eval(val) for key, val in config[section].items()
}
self.ir_parameters = self.settings["isoradial_angular_parameters"]

def _calc_inner_isoradial(self, order=0):
"""Calculate the isoradial that defines the inner edge of the accretion disk"""
ir = self.isoradial_template(radius=self.disk_inner_edge, order=order)
Expand Down
2 changes: 1 addition & 1 deletion luminet/black_hole_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def calc_k_squared(p: float, bh_mass: float):
k^2 = m = \frac{Q - P + 6M}{2Q}
Attention:
:cite:t:`Luminet1979` uses the non-squared modulus in the elliptic integrals.
:cite:t:`Luminet_1979` uses the non-squared modulus in the elliptic integrals.
This is just a convention. However, ``scipy`` asks for the squared modulus :math:`m=k^2`, not the modulus.
Args:
Expand Down

0 comments on commit 00307a9

Please sign in to comment.