Skip to content
Snippets Groups Projects
Commit 75e06d9d authored by Philipp Arras's avatar Philipp Arras
Browse files

Notes

parent 8ce1eca2
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,9 @@ def main(): ...@@ -32,6 +32,9 @@ def main():
parser.add_argument("diffusefluxlevel", type=float) parser.add_argument("diffusefluxlevel", type=float)
args = parser.parse_args() args = parser.parse_args()
############################################################################
# Define likelihood(s)
############################################################################
if splitext(args.ms)[1] == ".npz": if splitext(args.ms)[1] == ".npz":
obs = rve.Observation.load(args.ms) obs = rve.Observation.load(args.ms)
else: else:
...@@ -79,6 +82,10 @@ def main(): ...@@ -79,6 +82,10 @@ def main():
plotter.add("bayesian weighting", logwgt.exp()) plotter.add("bayesian weighting", logwgt.exp())
plotter.add("power spectrum bayesian weighting", logwgt.power_spectrum) plotter.add("power spectrum bayesian weighting", logwgt.power_spectrum)
############################################################################
# MINIMIZATION
############################################################################
if rve.mpi.master: if rve.mpi.master:
if args.point is not None: if args.point is not None:
# MAP points with original weights # MAP points with original weights
...@@ -118,7 +125,7 @@ def main(): ...@@ -118,7 +125,7 @@ def main():
plotter.plot("stage1", state) plotter.plot("stage1", state)
state.save("stage1") state.save("stage1")
# MGVI weights # Only weights
lh = rve.ImagingLikelihoodVariableCovariance(obs, sky, weightop) lh = rve.ImagingLikelihoodVariableCovariance(obs, sky, weightop)
plotter.add_histogram( plotter.add_histogram(
"normalized residuals (learned weights)", lh.normalized_residual "normalized residuals (learned weights)", lh.normalized_residual
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment