Closed rhayes777 closed 1 month ago
Obviously requires more testing and generalisation to support tuple input; I just wanted to check I've understood correctly
I have tested the implementation by using the following code in the relevent part of the PyAutoLens source code:
@property
def y(self) -> List[float]:
"""
The y coordinates of the physical values of the subhalo grid, where each value is the centre of a grid cell.
These are the `centre` coordinates of the dark matter subhalo priors.
"""
return self.physical_centres_lists_from(
path="galaxies.subhalo.mass.centre.centre_0"
)
@property
def x(self) -> List[float]:
"""
The x coordinates of the physical values of the subhalo grid, where each value is the centre of a grid cell.
These are the `centre` coordinates of the dark matter subhalo priors.
"""
return self.physical_centres_lists_from(
path="galaxies.subhalo.mass.centre.centre_1"
)
This PR gives the desired behaviour, in that it recovers the values for y and x correctly and can be used for other quantities in the model.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.60%. Comparing base (
4e2d1e7
) to head (d29e8b2
). Report is 76 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Pretty sure this does what you want as it uses the model passed to the samples for each grid search run. For any prior which is a grid prior this new function would give you the mean of that prior for each model