Skip to content

Commit

Permalink
Rename DESI Y1 template to DESI-2024_z_2.33.fits
Browse files Browse the repository at this point in the history
  • Loading branch information
andreicuceu committed Feb 9, 2024
1 parent e777559 commit 1ccedfc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 74 deletions.
10 changes: 7 additions & 3 deletions bin/make_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def xi_to_pk(r, xi, ell=0, extrap=False):
return InterpolatedUnivariateSpline(kk, Pk)


def main(ini, out, fid_H0, fid_Ok, fid_wl, z_ref):
def main(ini, out, fid_H0, fid_Ok, fid_wl, z_ref, no_extrap):
minkh = 1.e-4
maxkh = 1.1525e3
npoints = 814
Expand Down Expand Up @@ -114,7 +114,8 @@ def f_xiSB(r, am3, am2, am1, a0, a1):
ww = (r >= sb1_rmin) & (r < sb2_rmax)
xiSB[ww] = model[ww]

pkSB = xi_to_pk(r, xiSB)
extrap = not no_extrap
pkSB = xi_to_pk(r, xiSB, extrap=extrap)
pkSB = pkSB(k)
pkSB *= pk[-1] / pkSB[-1]

Expand Down Expand Up @@ -145,6 +146,9 @@ def f_xiSB(r, am3, am2, am1, a0, a1):
parser.add_argument('--z-ref', type=float, default=None, required=False,
help='Power-spectrum redshift, default use the one from the config file')

parser.add_argument('--no-extrap', default=False, required=False, action='store_true',
help='Turn off extrapolation in xi to pk')

args = parser.parse_args()

main(args.ini, args.out, args.fid_H0, args.fid_Ok, args.fid_wl, args.z_ref)
main(args.ini, args.out, args.fid_H0, args.fid_Ok, args.fid_wl, args.z_ref, args.no_extrap)
File renamed without changes.
Loading

0 comments on commit 1ccedfc

Please sign in to comment.