I have written some code to extract P_gg directly from the emulator (rather than w_p or deltaSigma). In that code I have called self._compute_p_2hcc
etc. but I am getting the following error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-f74c1312f5c2> in <module>
21 Pk_dq_mg = DarkQuest.get_p_gm(hod, ks, z)
22 if DQ_gg:
---> 23 Pk_dq_gg = DarkQuest.get_p_gg(hod, ks, z)
24 else:
25 Pk_dq_gg = np.copy(Pk_dq_mg)
~/Code/python_library/mead_DarkQuest.py in get_p_gg(self, k, redshift)
724 self._compute_p_1hcs(redshift)
725 self._compute_p_1hss(redshift)
--> 726 self._compute_p_2hcc(redshift)
727 self._compute_p_2hcs(redshift)
728 self._compute_p_2hss(redshift)
/usr/local/lib/python3.9/site-packages/dark_emulator/model_hod/hod_interface.py in _compute_p_2hcc(self, redshift)
860 self._compute_ng()
861 if self.p_hh_computed == False:
--> 862 self._compute_p_hh(redshift)
863
864 poff = self.gparams["poff"]
/usr/local/lib/python3.9/site-packages/dark_emulator/model_hod/hod_interface.py in _compute_p_hh(self, redshift)
521
522 def _compute_p_hh(self, redshift):
--> 523 self._compute_p_hh_spl(redshift)
524
525 logdens_de = self.g1.logdens_list
/usr/local/lib/python3.9/site-packages/dark_emulator/model_hod/hod_interface.py in _compute_p_hh_spl(self, redshift)
439 logdens2.append([logdens_m[j], logdens_p[j],
440 logdens_m[j], logdens_p[j]])
--> 441 xi_dir_all = self._get_xiauto_direct_noint(np.concatenate(
442 logdens1), np.concatenate(logdens2), redshift)
443
/usr/local/lib/python3.9/site-packages/dark_emulator/model_hod/hod_interface.py in _get_xiauto_direct_noint(self, logdens1, logdens2, redshift)
212 logdens2_mod = np.copy(logdens2)
213 logdens2_mod[sel2] = -5.75
--> 214 xi_dir = self.xi_auto.getNoInterpol(
215 redshift, logdens1_mod, logdens2_mod).transpose()
216 if sel1.sum() != 0:
/usr/local/lib/python3.9/site-packages/dark_emulator/darkemu/auto.py in getNoInterpol(self, redshift, logdens1, logdens2)
89 elif sindex >= 20:
90 s0 = 20
---> 91 xia0 = np.array([rbs(-self.logdens_list, -self.logdens_list,
92 self.xih_mat[:, :, s0, i])(-logdens1, -logdens2) for i in range(21)])
93 return xia0
/usr/local/lib/python3.9/site-packages/dark_emulator/darkemu/auto.py in <listcomp>(.0)
89 elif sindex >= 20:
90 s0 = 20
---> 91 xia0 = np.array([rbs(-self.logdens_list, -self.logdens_list,
92 self.xih_mat[:, :, s0, i])(-logdens1, -logdens2) for i in range(21)])
93 return xia0
/usr/local/lib/python3.9/site-packages/scipy/interpolate/fitpack2.py in __call__(self, x, y, dx, dy, grid)
905
906 if (x.size >= 2) and (not np.all(np.diff(x) >= 0.0)):
--> 907 raise ValueError("x must be strictly increasing when `grid` is True")
908 if (y.size >= 2) and (not np.all(np.diff(y) >= 0.0)):
909 raise ValueError("y must be strictly increasing when `grid` is True")
ValueError: x must be strictly increasing when `grid` is True