# Number of noise photons
        noise = noise_photons(wavelength=wavelength,
                              z=distance * au / u.meter,
                              d0=diameter,
                              fractional_bandwidth=fractional_bandwidth)

        # Classucal aperture equivalent
        aperture = classical_aperture(wavelength=wavelength,
                                      z=distance * au / u.meter,
                                      d0=diameter)

        # number of signal photons
        signal = photons_received(D_r=aperture,
                                  D_t=1,
                                  P=power,
                                  wavelength=wavelength,
                                  R=1.3 * pc / u.meter,
                                  Q_R=1.22)

        M = signal / modes  # Number of photons per mode (the signal)
        N_th = noise / modes  # average number of noise photons per mode (the noise)
        capacity = holevo_thermal(M=M, N_th=N_th, eta=receiver_efficiency)

        SNR = signal / noise
        data_rate = (capacity * signal) / 10**6  # Mbits/s
        image[dist_id - 1, diam_id - 1] = data_rate
        # print(diameter, distance, SNR, capacity, data_rate)
    print(distance)

print(numpy.amax(image), numpy.amin(image))
plt.rc('font', family='serif', serif='Computer Modern Roman')
Exemplo n.º 2
0
# Move it to z=2200 to compare influence of z
eq8_at_z_2200 = integrated_flux(wavelength=wavelength,
                                z=2200 * au / u.meter,
                                d0=d)
print('Gain at z=2200 {:.2e}'.format(eq8_at_z_2200))
print('Ratio z=600 / z=2200 {:.2f}'.format(eq8_at_z_2200 / eq8_at_z_600))

# Equivalent classical aperture
ap_600 = classical_aperture(wavelength=wavelength, z=600 * au / u.meter, d0=d)
print('Classical aperture at z=600 {:.2f} [km]'.format(ap_600 / 1000))

### Section 3.1 Photon flux
flux = photons_received(D_r=1,
                        D_t=1,
                        P=1,
                        wavelength=wavelength,
                        R=1.3 * pc / u.meter,
                        Q_R=1.22)
print(
    'Signal photons received (d_r=d_t=1m, P=1W, Alpha Cen) {:.2e} [m^-2 s^-1]'.
    format(flux))

### Section 4.6 Noise calculations
noise = noise_photons(wavelength=wavelength,
                      z=600 * au / u.meter,
                      d0=d,
                      fractional_bandwidth=1 / 2700.)
print('Noise photons received {:.2e} [s^-1]'.format(noise))

### Section 5.1 Capacity
Exemplo n.º 3
0
if math.isclose(result, expected_result, rel_tol=1e-6):
    print('PASS b_of_t test case 1, result', result)
else:
    print('FAILED b_of_t test case 1, result', result)

result = z_of_b(b=2.0) / au * u.meter
expected_result = 2189.2121278750956
if math.isclose(result, expected_result, rel_tol=1e-6):
    print('PASS z_of_b, result', result)
else:
    print('FAILED z_of_b, result', result)


"""Test photons_received"""
wavelength = 1000 * 10**-9  # 1000 nm = 1um = 10**-6m
result = photons_received(D_r=39, D_t=1, P=1, wavelength=wavelength, R=3.09E+16, Q_R=1.22)
expected_result = 1.3469636550722477
if math.isclose(result, expected_result, rel_tol=1e-6):
    print('PASS photons_received, result', result)
else:
    print('FAILED photons_received, result', result)


"""Test noise_photons"""
result = noise_photons(
    wavelength=0.000001,
    z=600 * au / u.meter,
    d0=1,
    fractional_bandwidth=1/2700.)
expected_result = 1905694.5888717826
if math.isclose(result, expected_result, rel_tol=1e-6):
Exemplo n.º 4
0
gridsize = 500
image = numpy.zeros(shape=(gridsize, gridsize))
distances = numpy.logspace(start=0, stop=4, num=gridsize)
wavelengths = numpy.logspace(start=2, stop=4, num=gridsize)
dist_id = 0
wave_id = 0

for distance in distances:
    dist_id = dist_id + 1
    wave_id = 0
    for wavelength in wavelengths:
        real_wavelength = wavelength * 10**-9  # [m], Q is in [m], extinction in [nm]
        wave_id = wave_id + 1
        p = photons_received(D_r=D_r,
                             D_t=D_t,
                             P=P,
                             wavelength=wavelength,
                             R=distance * pc / u.meter,
                             Q_R=Q(real_wavelength))
        e = get_extinction(distance=distance, wavelength=wavelength)
        t = transparency(wavelength=wavelength)
        Noise = sky_background(wavelength=wavelength)
        M = p / modes  # Number of photons per mode (the signal)
        N_th = Noise / modes  # average number of noise photons per mode (the noise)
        bits_per_photon = holevo_thermal(M=M, N_th=N_th, eta=eta)
        #bits_per_photon = 1
        tot = p * e * t * bits_per_photon
        # print(distance, wavelength, p, M, N_th, bits_per_photon)
        image[dist_id - 1, wave_id - 1] = tot
    print(distance)

print(numpy.amin(image), numpy.amax(image))