Ejemplo n.º 1
0
def main():
    filename = sys.argv[1]

    if len(sys.argv) > 2:
        frequency = float(sys.argv[2])
    else:
        frequency = 38000

    a, r = ek60.raw_to_sv(filename, frequency)

    title = "{} kHz echogram".format(frequency / 1000)
    echogram.egshow(a, range=r)

    cbar = plt.colorbar()
    cbar.set_label('Sv (dB)', rotation=90)

    plt.xlabel('Sample')
    plt.ylabel('Range /m')

    plt.title(filename)

    plt.show()
Ejemplo n.º 2
0
#!/usr/bin/env python3

import matplotlib.pyplot as plt
from echonix import ek60, echogram, imaging

# Displays a composite echogram

filename = r'../data/ek60/krill_swarm_20091215/JR230-D20091215-T121917.raw'

Sv38, r = ek60.raw_to_sv(filename, 38000)
Sv120, r = ek60.raw_to_sv(filename, 120000)
Sv200, r = ek60.raw_to_sv(filename, 200000)

im = imaging.composite(Sv38, Sv120, Sv200, min=-95, max=-50)

echogram.imshow(im, range=r)

plt.xlabel('Sample')
plt.ylabel('Range /m')

plt.title('Antarctic krill swarm')

plt.show()
Ejemplo n.º 3
0
#!/usr/bin/env python3

import matplotlib.pyplot as plt
from echonix import ek60, echogram

# Displays an echogram of an interesting krill swarm at 120kHz

filename = r'../data/ek60/krill_swarm_20091215/JR230-D20091215-T121917.raw'
frequency = 120000

Sv, r = ek60.raw_to_sv(filename, frequency)
echogram.egshow(Sv, max = -50, min = -95, range=r)

cbar = plt.colorbar()
cbar.set_label('Sv (dB)', rotation=90)

plt.xlabel('Sample')
plt.ylabel('Range /m')

plt.title('Antarctic krill swarm')

plt.show()
Ejemplo n.º 4
0
Sac = -0.49
rangeCorrected = 0
pr = 15.204366577872175

assert math.isclose(ek60.volume_backscatter(pr, f, G, phi, cv, t, alpha, pt,
                                            tau, Sac, rangeCorrected),
                    6.70580814796725)


# Test 2 - Read RAW datagrams

datagrams = raw.load_raw('../data/ek60/jr16003/ek60-sample.raw')

assert datagrams[0].dgheader.datagramtype == "CON0"
assert datagrams[0].configurationheader.surveyname == "JR16003_"
assert len(datagrams[0].configurationtransducer) == 4
assert math.isclose(datagrams[0].configurationtransducer[0].gain,
                    25.92, abs_tol=0.001)
assert len(datagrams) == 4693


# Test 3 - Compute volume backscatter and plot echogram

m, r = ek60.raw_to_sv('../data/ek60/jr16003/ek60-sample.raw', 38000)
echogram.show(m, range=r)

# Test 4 - Load an EK80 file

datagrams = raw.load_raw('../data/ek80/EK80_Example_Data_01/EK80_SimradEcho_WC381_Sequential-D20150513-T090935.raw')
assert len(datagrams) == 461