@@ -283,7 +283,7 @@ def __init__(self, dynamic=False):
283283 # these are special since their length
284284 # is == the number of batches
285285 'batch_nlive' , # number of live points added in batch
286- 'batch_bounds ' # loglikelihood bounds used in batch
286+ 'batch_logl_bounds ' # loglikelihood bounds used in batch
287287 ])
288288 for k in keys :
289289 D [k ] = []
@@ -606,7 +606,7 @@ def print_fn_fallback(results,
606606 'niter' ),
607607 ('samples_batch' , 'array[int]' ,
608608 "Tracks the batch during which the samples were proposed" , 'niter' ),
609- ('batch_bounds ' , 'array[tuple]' ,
609+ ('batch_logl_bounds ' , 'array[tuple]' ,
610610 "The log-likelihood bounds used to run a batch." , 'nbatch' ),
611611 ('batch_nlive' , 'array[int]' ,
612612 "The number of live points used for given batch" , 'nbatch' ),
@@ -1363,7 +1363,7 @@ def resample_run(res, rstate=None, return_idx=False):
13631363 # Check if the number of live points explicitly changes.
13641364 samples_n = res .samples_n
13651365 samples_batch = res .samples_batch
1366- batch_bounds = res .batch_bounds
1366+ batch_logl_bounds = res .batch_logl_bounds
13671367 added_final_live = True
13681368 else :
13691369 # If the number of live points is constant, compute `samples_n` and
@@ -1380,8 +1380,8 @@ def resample_run(res, rstate=None, return_idx=False):
13801380 raise ValueError ("Final number of samples differs from number of "
13811381 "iterations and number of live points." )
13821382 samples_batch = np .zeros (len (samples_n ), dtype = int )
1383- batch_bounds = np .array ([(- np .inf , np .inf )])
1384- batch_llmin = batch_bounds [:, 0 ]
1383+ batch_logl_bounds = np .array ([(- np .inf , np .inf )])
1384+ batch_llmin = batch_logl_bounds [:, 0 ]
13851385 # Identify unique particles that make up each strand.
13861386 ids = np .unique (res .samples_id )
13871387
@@ -1629,7 +1629,7 @@ def unravel_run(res, print_progress=True):
16291629 # Add on batch information (if available).
16301630 try :
16311631 rdict ['samples_batch' ] = res .samples_batch [strand ]
1632- rdict ['batch_bounds ' ] = res .batch_bounds
1632+ rdict ['batch_logl_bounds ' ] = res .batch_logl_bounds
16331633 except AttributeError :
16341634 pass
16351635
@@ -1858,15 +1858,15 @@ def _prepare_for_merge(res):
18581858 "iterations and number of live points in `res1`." )
18591859
18601860 # Batch information (if available).
1861- # note we also check for existance of batch_bounds
1861+ # note we also check for existance of batch_logl_bounds
18621862 # because unravel_run makes 'static' runs of 1 livepoint
18631863 # but some will have bounds
1864- if res .isdynamic () or 'batch_bounds ' in res .keys ():
1864+ if res .isdynamic () or 'batch_logl_bounds ' in res .keys ():
18651865 run_info ['batch' ] = res .samples_batch
1866- run_info ['bounds ' ] = res .batch_bounds
1866+ run_info ['batch_logl_bounds ' ] = res .batch_logl_bounds
18671867 else :
18681868 run_info ['batch' ] = np .zeros (nrun , dtype = int )
1869- run_info ['bounds ' ] = np .array ([(- np .inf , np .inf )])
1869+ run_info ['batch_logl_bounds ' ] = np .array ([(- np .inf , np .inf )])
18701870 return run_nlive , run_info
18711871
18721872
@@ -1910,20 +1910,22 @@ def _merge_two(res1, res2, compute_aux=False):
19101910
19111911 # These are merged batch bounds
19121912 combined_bounds = np .unique (np .concatenate (
1913- (base_info ['bounds ' ], new_info ['bounds ' ])),
1913+ (base_info ['batch_logl_bounds ' ], new_info ['batch_logl_bounds ' ])),
19141914 axis = 0 )
19151915 # Here we try to find where the new bounds are in the combined bounds
19161916 new_bound_map = {}
19171917 base_bound_map = {}
1918- for i in range (len (new_info ['bounds ' ])):
1918+ for i in range (len (new_info ['batch_logl_bounds ' ])):
19191919 new_bound_map [i ] = np .where (
1920- np .all (new_info ['bounds' ][i ] == combined_bounds , axis = 1 ))[0 ][0 ]
1921- for i in range (len (base_info ['bounds' ])):
1920+ np .all (new_info ['batch_logl_bounds' ][i ] == combined_bounds ,
1921+ axis = 1 ))[0 ][0 ]
1922+ for i in range (len (base_info ['batch_logl_bounds' ])):
19221923 base_bound_map [i ] = np .where (
1923- np .all (base_info ['bounds' ][i ] == combined_bounds , axis = 1 ))[0 ][0 ]
1924+ np .all (base_info ['batch_logl_bounds' ][i ] == combined_bounds ,
1925+ axis = 1 ))[0 ][0 ]
19241926
1925- base_lowedge = np .min (base_info ['bounds ' ][base_info ['batch' ]])
1926- new_lowedge = np .min (new_info ['bounds ' ][new_info ['batch' ]])
1927+ base_lowedge = np .min (base_info ['batch_logl_bounds ' ][base_info ['batch' ]])
1928+ new_lowedge = np .min (new_info ['batch_logl_bounds ' ][new_info ['batch' ]])
19271929
19281930 # Iteratively walk through both set of samples to simulate
19291931 # a combined run.
@@ -2021,7 +2023,7 @@ def _merge_two(res1, res2, compute_aux=False):
20212023 samples = np .asarray (combined_info ['v' ]),
20222024 logl = np .asarray (combined_info ['logl' ]),
20232025 logvol = np .asarray (combined_info ['logvol' ]),
2024- batch_bounds = np .asarray (combined_bounds ),
2026+ batch_logl_bounds = np .asarray (combined_bounds ),
20252027 blob = np .asarray (combined_info ['blob' ]))
20262028
20272029 for curk in ['id' , 'it' , 'n' , 'u' , 'batch' ]:
0 commit comments