Skip to content

Commit

Permalink
clean up, flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
tilmantroester committed Oct 20, 2023
1 parent 885982f commit 08d8ffd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions examples/des_y1_3x2pt/des_y1_cosmic_shear_pk_modifier.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Example of a Firecrown likelihood using the DES Y1 cosmic shear data TATT."""

import os
from typing import Optional, Tuple
from typing import Tuple

import pyccl
import sacc
Expand Down Expand Up @@ -182,23 +182,18 @@ def run_likelihood() -> None:

def make_plot(ell, cl_dm, cl_baryons, two_point_0):
"""Create and show a diagnostic plot."""
import numpy as np # pylint: disable-msg=import-outside-toplevel
import matplotlib.pyplot as plt # pylint: disable-msg=import-outside-toplevel

cl_firecrown = two_point_0.cells[("shear", "shear")]

plt.plot(ell, cl_firecrown/cl_dm, label="firecrown w/ baryons")
plt.plot(ell, cl_baryons/cl_dm, ls="--", label="CCL w/ baryons")
# plt.plot(ell, cl_dm, label="CCL w/o baryons")

plt.xscale("log")
# plt.yscale("log")
plt.xlabel(r"$\ell$")
plt.ylabel(r"$C_\ell^\mathrm{baryons} / C_\ell^\mathrm{DM-only}$")
plt.legend()
# plt.xlim(right=5e3)
# plt.ylim(bottom=1e-12)
# plt.title("TATT IA")
plt.savefig("plots/vD19_baryons.png", facecolor="white", dpi=300)
plt.show()

Expand Down
2 changes: 1 addition & 1 deletion firecrown/connector/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,6 @@ def mapping_builder(*, input_style: str, **kwargs):
recognized raise an exception."""

if input_style not in mapping_classes:
raise ValueError(f"input_style must be {*mapping_classes,}, not {input_style}")
raise ValueError(f"input_style must be {*mapping_classes, }, not {input_style}")

return mapping_classes[input_style](**kwargs)

0 comments on commit 08d8ffd

Please sign in to comment.