Skip to content

Commit 953c8e9

Browse files
authored
Merge pull request #144 from Aasim-Jan/misc-changes-1
Misc changes 1 Checked against calmarg_in_loop for conflicts; ok
2 parents 27dc9e3 + 23fa104 commit 953c8e9

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

MonteCarloMarginalizeCode/Code/RIFT/lalsimutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3661,7 +3661,7 @@ def hlmoft(P, Lmax=2,nr_polarization_convention=False, fixed_tapering=False, sil
36613661
approx_string = P.approx
36623662
if not(isinstance(approx_string,str)):
36633663
approx_string = lalsim.GetStringFromApproximant(approx_string)
3664-
if 'NRSur' in approx_string:
3664+
if 'NRSur' in approx_string or 'NRHyb' in approx_string:
36653665
# some NRSur are aligned only and return only m>=0 modes, so reflect IF NEEDED
36663666
mode_keys = np.array([[l,m] for l,m in hlm_dict.keys()])[:,1]
36673667
check_if_only_positive_m = not((mode_keys < 0).any())

MonteCarloMarginalizeCode/Code/bin/helper_LDG_Events.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,15 +1718,12 @@ def lambda_m_estimate(m):
17181718

17191719

17201720
if opts.propose_flat_strategy:
1721-
# All iterations of CIP use the same as the last
1722-
instructions_cip = map(lambda x: x.rstrip().split(' '), helper_cip_arg_list)#np.loadtxt("helper_cip_arg_list.txt", dtype=str)
1723-
n_iterations =0
1724-
lines = []
1725-
for indx in np.arange(len(instructions_cip)):
1726-
n_iterations += int(instructions_cip[indx][0])
1727-
lines.append(' '.join(instructions_cip[indx][1:])) # merge back together
1728-
helper_cip_arg_list = [str(n_iterations) + " " + lines[-1]] # overwrite with new setup
1721+
instructions_cip = [line.rstrip().split() for line in helper_cip_arg_list]
17291722

1723+
n_iterations = sum(int(instr[0]) for instr in instructions_cip)
1724+
last_line = " ".join(instructions_cip[-1][1:])
1725+
1726+
helper_cip_arg_list = [f"{n_iterations} {last_line}"]
17301727

17311728
if opts.propose_converge_last_stage:
17321729
helper_cip_last_it = '1 ' + ' '.join(helper_cip_arg_list[-1].split()[1:])

MonteCarloMarginalizeCode/Code/bin/util_RIFT_pseudo_pipe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def unsafe_parse_arg_string_dict(my_argstr):
330330
parser.add_argument("--archive-pesummary-label",default=None,help="If provided, creates a 'pesummary' directory and fills it with this run's final output at the end of the run")
331331
parser.add_argument("--archive-pesummary-event-label",default="this_event",help="Label to use on the pesummary page itself")
332332
parser.add_argument("--internal-mitigate-fd-J-frame",default="L_frame",help="L_frame|rotate, choose method to deal with ChooseFDWaveform being in wrong frame. Default is to request L frame for inputs")
333+
parser.add_argument("--internal-force-puff-iterations", default=4, type=int, help="Number of iterations to be puffed")
333334
opts= parser.parse_args()
334335

335336
config_stored=None; config_dict=None
@@ -1329,7 +1330,7 @@ def unsafe_parse_arg_string_dict(my_argstr):
13291330

13301331
# Write puff file
13311332
#puff_params = " --parameter mc --parameter delta_mc --parameter chieff_aligned "
1332-
puff_max_it =4
1333+
puff_max_it = opts.internal_force_puff_iterations
13331334
# Read puff args from file, if present
13341335
try:
13351336
with open("helper_puff_max_it.txt",'r') as f:

0 commit comments

Comments
 (0)