cut.logger.info(f'Continuing phase 1 from traj nb {n_traj_already_run} for {l_end-l_start} more trajectories.')

try:

fortraj_indexinrange(l_start,l_end):

# generation of epsilon according to a Gaussian law with limitations between 0.001 and 0.01

# I import Yann's random numbers generated here since I can't use the same random number generator as his. This way I should be able to reproduce exactly the same chain and compare my results with his precisely.

# Generation of epsilon according to a Gaussian law with limitations between 0.001 and 0.01

rannum=randGen.normal(loc=0,scale=1.5)

epsilon=sampler.epsilon0+rannum*1.0e-3

ifepsilon<=0.001:epsilon=0.001

ifepsilon>=0.01:epsilon=0.01

# Run a numerical trajectory and retrieve the data.

# Very circonvoluted way of setting the matched filter snr value of the new point in the chain. If trajectory was accepted as here, we use the last value computed of the trajectory and otherwise don't modify mf_snr which will keep the previous value.

# Update the `mf_snr` variable with the value that was computed at the end of the trajectory.

# Otherwise (ie `if Accept == 0`), `mf_snr` keeps the same value as before.

# However this assumes that the network_snr is indeed updated at the end of each trajectory