Begin testing TFR likelihood
This commit is contained in:
parent
7ce772730a
commit
674ccc3a90
21 changed files with 1708 additions and 45 deletions
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "40ad2d23-227d-4101-a195-f3b70fe0e33b",
|
||||
"cell_type": "raw",
|
||||
"id": "274fbd8b-2272-443c-b71d-4fcbc8946167",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import numpy as np\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -327,17 +327,18 @@ def crop_velmass_to_borg(ini_file, field_type):
|
|||
return true_field
|
||||
|
||||
|
||||
def get_spectra(ini_name, dirname, nframe, iter_max, iter_min, which_field='delta', cut_field=True, mock_type='borg'):
|
||||
def get_spectra(ini_name, dirname, nframe, iter_max, iter_min, which_field='delta', cut_field=True, mock_type='borg', MAS=''):
|
||||
|
||||
# Which steps to use
|
||||
all_mcmc = get_mcmc_steps(dirname, nframe, iter_max, iter_min=iter_min)
|
||||
|
||||
if which_field == 'delta':
|
||||
MAS = "CIC"
|
||||
elif which_field == 'ics':
|
||||
MAS = None
|
||||
else:
|
||||
raise NotImplementedError
|
||||
if MAS == '':
|
||||
if which_field == 'delta':
|
||||
MAS = "CIC"
|
||||
elif which_field == 'ics':
|
||||
MAS = None
|
||||
else:
|
||||
raise NotImplementedError
|
||||
|
||||
# Compute original power spectrum
|
||||
if mock_type == 'borg':
|
||||
|
@ -350,6 +351,11 @@ def get_spectra(ini_name, dirname, nframe, iter_max, iter_min, which_field='delt
|
|||
boxsize = get_borg_Lbox(ini_name)
|
||||
else:
|
||||
raise NotImplementedError
|
||||
|
||||
# Turn to overdensity
|
||||
if which_field == 'delta':
|
||||
delta1 = (1. + delta1) / (1. + delta1).mean() - 1.
|
||||
|
||||
print("BOXSIZE", boxsize)
|
||||
Pk = PKL.Pk(delta1.astype(np.float32), boxsize, axis=0, MAS=MAS, threads=1, verbose=True)
|
||||
k = Pk.k3D
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue