Example #1
0
def sample_lat_lon(N=1):
    if lat_min == lat_max or lon_min == lon_max:
        return SU.uniform_bound(lat_min, lat_max, N),\
               SU.uniform_bound(lon_min, lon_max, N)
    lat, lon = SU.CubeToUniformOnS2(np.random.uniform(0, 1, N),
                                    np.random.uniform(0, 1, N))
    while lat > lat_max or lat < lat_min or lon > lon_max or lon < lon_min:
        lat, lon = SU.CubeToUniformOnS2(np.random.uniform(0, 1, N),
                                        np.random.uniform(0, 1, N))
    return lat, lon
Example #2
0
def sample_pol(N=1):
    return SU.uniform_bound(pol_min, pol_max, N)
Example #3
0
def sample_inc(N=1):
    return SU.uniform_bound(inc_min, inc_max, N)
Example #4
0
def sample_dist(N=1):
    return SU.uniform_in_volume_distance(N, dist_min, dist_max)
Example #5
0
def sample_long_asc_nodes(N=1):
    return SU.uniform_bound(long_asc_nodes_min, long_asc_nodes_max, N)
Example #6
0
def sample_coa_phase(N=1):
    return SU.uniform_bound(coa_phase_min, coa_phase_max, N)
Example #7
0
def sample_ecc(N=1):
    return SU.uniform_bound(ecc_min, ecc_max, N)
Example #8
0
def sample_mean_per_ano(N=1):
    return SU.uniform_bound(mean_per_ano_min, mean_per_ano_max, N)
Example #9
0
def sample_sxyz(N=1):
    return SU.uniform_bound(sxyz_min, sxyz_max, N)
Example #10
0
def sample_smag(N=1):
    return SU.uniform_spin_magnitude(N, smag_min, smag_max)
Example #11
0
def sample_q_uniform(N=1):
    return SU.uniform_CompactObject_massratio(N, q_min, q_max)
Example #12
0
def sample_eta_uniform(N=1):
    return SU.uniform_CompactObject_massratio(N, eta_min, eta_max)
Example #13
0
def sample_mchirp(N=1):
    return SU.uniform_CompactObject_mass(N, mchirp_min, mchirp_max)