Testing new set of modules 20180415r

import numpy as np
import matplotlib.pyplot as plt
import math
import os
import bim as USTk
for filename in os.listdir("./"):
    if filename.endswith(".DAT"):
        DATFile = os.path.join("", filename).split(".")[0]
        if not os.path.isfile(DATFile+".npz"):
            Arf = USTk.CreateUsPack(DATFile+".DAT")
lit-tbo.DAT

png

png

## Creates the npz files from the DAT files, with reshaped signal, and filtered images
#  USTk.CreateUsPack(DATFile+".DAT") 
Docs = []
Files = []
Img = []
for filename in os.listdir("./"):
    if filename.endswith(".npz"):
        print filename
        Files.append(filename)
        DATFile = os.path.join("", filename).split(".")[0]   

        DATA = np.load(DATFile+".npz") 
        Image, rawSignal = DATA['arr_1'], DATA['arr_0']

        t = [x/22.0 for x in range(10000)]
        plt.plot(t[0:2000],rawSignal[15000:17000],"g") 
        plt.plot(t[0:2000],rawSignal[10000:12000],"c") 
        plt.xlabel("Time in us")
        plt.title("Reading raw data from "+filename)
        plt.savefig('Raw_'+filename+'.jpg', bbox_inches='tight')
        plt.show()

        plt.plot(t[0:2000],Image[3][0:2000],"g") 
        plt.plot(t[0:2000],Image[2][0:2000],"c") 
        plt.xlabel("Time in us")
        plt.title("Reading enveloppe from "+filename)
        plt.savefig('enveloppe_signal_'+filename+'.jpg', bbox_inches='tight')
        plt.show()
lit-tbo.npz

png

png





results matching ""

    No results matching ""