-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
|
||
self.mass = mass | ||
|
||
cosmology = Planck15() |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be separate tests
There was a problem hiding this comment.
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
):
...
Adds a
SMBHBinary
mass profile, which fits twoSMBH
s in the centre of a galaxy (e.g. a SMBH binary merger).