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

Feature/point smbh binary #99

Merged
merged 21 commits into from
May 17, 2023
Merged

Feature/point smbh binary #99

merged 21 commits into from
May 17, 2023

Conversation

Jammy2211
Copy link
Owner

Adds a SMBHBinary mass profile, which fits two SMBHs in the centre of a galaxy (e.g. a SMBH binary merger).


self.mass = mass

cosmology = Planck15()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the no possibility somebody would want to customise the cosmology?

redshift_source: float = 1.0,
):
"""
Represents a supermassive black hole (SMBH) binary (e.g. two merging SMBH's at the centre of a galaxy).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this better than simply adding two SMBHs to a model?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that values computed from this object are usually just the sum of the two implicit objects it might be better to model the two objects explicitly and then compute their relative properties?

Copy link
Owner Author

Choose a reason for hiding this comment

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

We want to parameterize it as two objects which are separated from one another about a centre, with an input angle and whatnot.

If you input two SMBH's in the model, they could move anywhere over the image-plane and thus now be a binary rotating around one another.

Comment on lines +31 to +56
assert smbh_binary.smbh_0.centre == pytest.approx((0.5, 0.0), 1e-2)
assert smbh_binary.smbh_1.centre == pytest.approx((-0.5, 0.0), 1e-2)

smbh_binary = ag.mp.SMBHBinary(
centre=(0.0, 0.0),
separation=1.0,
angle_binary=180.0,
)

assert smbh_binary.smbh_0.centre == pytest.approx((0.0, -0.5), 1e-2)
assert smbh_binary.smbh_1.centre == pytest.approx((0.0, 0.5), 1e-2)

smbh_binary = ag.mp.SMBHBinary(
centre=(0.0, 0.0),
separation=1.0,
angle_binary=270.0,
)

assert smbh_binary.smbh_0.centre == pytest.approx((-0.5, 0.0), 1e-2)
assert smbh_binary.smbh_1.centre == pytest.approx((0.5, 0.0), 1e-2)

smbh_binary = ag.mp.SMBHBinary(
centre=(0.0, 0.0),
separation=1.0,
angle_binary=359.999,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be separate tests

Copy link
Collaborator

Choose a reason for hiding this comment

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

@pytest.parametrize(
    'angle_binary, centre_0, centre_1',
    [
        (180, (0.5, 0.0), (-0.5, 0.0)),
        ...
    ]
)
def test__x2_smbhs__centres_correct_based_on_angle__init(
    angle_binary, centre_0, centre_1
):
    ...

@Jammy2211 Jammy2211 merged commit d7f8d76 into main May 17, 2023
1 of 7 checks passed
@Jammy2211 Jammy2211 deleted the feature/point_smbh_binary branch June 12, 2023 15:36
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.

None yet

2 participants