7
7
8
8
from .gcdata import GCData
9
9
from .dataops import make_stacked_radial_profile
10
+ from .utils import DiffArray
10
11
11
12
12
13
class ClusterEnsemble :
@@ -27,7 +28,7 @@ class ClusterEnsemble:
27
28
28
29
* "tan_sc" : tangential component computed with sample covariance
29
30
* "cross_sc" : cross component computed with sample covariance
30
- * "tan_jk " : tangential component computed with bootstrap
31
+ * "tan_bs " : tangential component computed with bootstrap
31
32
* "cross_bs" : cross component computed with bootstrap
32
33
* "tan_jk" : tangential component computed with jackknife
33
34
* "cross_jk" : cross component computed with jackknife
@@ -46,7 +47,7 @@ def __init__(self, unique_id, gc_list=None, **kwargs):
46
47
else :
47
48
raise TypeError (f"unique_id incorrect type: { type (unique_id )} " )
48
49
self .unique_id = unique_id
49
- self .data = GCData (meta = {"bin_units" : None })
50
+ self .data = GCData (meta = {"bin_units" : None , "radius_min" : None , "radius_max" : None })
50
51
if gc_list is not None :
51
52
self ._add_values (gc_list , ** kwargs )
52
53
self .stacked_data = None
@@ -198,6 +199,9 @@ def add_individual_radial_profile(
198
199
"""
199
200
cl_bin_units = profile_table .meta .get ("bin_units" , None )
200
201
self .data .update_info_ext_valid ("bin_units" , self .data , cl_bin_units , overwrite = False )
202
+ for col in ("radius_min" , "radius_max" ):
203
+ value = DiffArray (profile_table [col ])
204
+ self .data .update_info_ext_valid (col , self .data , value , overwrite = False )
201
205
202
206
cl_cosmo = profile_table .meta .get ("cosmo" , None )
203
207
self .data .update_info_ext_valid ("cosmo" , self .data , cl_cosmo , overwrite = False )
@@ -248,9 +252,14 @@ def make_stacked_radial_profile(self, tan_component="gt", cross_component="gx",
248
252
[self .data [tan_component ], self .data [cross_component ]],
249
253
)
250
254
self .stacked_data = GCData (
251
- [radius , * components ],
252
- meta = self .data .meta ,
253
- names = ("radius" , tan_component , cross_component ),
255
+ [
256
+ self .data .meta ["radius_min" ].value ,
257
+ self .data .meta ["radius_max" ].value ,
258
+ radius ,
259
+ * components ,
260
+ ],
261
+ meta = {k : v for k , v in self .data .meta .items () if k not in ("radius_min" , "radius_max" )},
262
+ names = ("radius_min" , "radius_max" , "radius" , tan_component , cross_component ),
254
263
)
255
264
256
265
def compute_sample_covariance (self , tan_component = "gt" , cross_component = "gx" ):
0 commit comments