예제 #1
0
cinefile = ask(datafolder)

savefolder = '/media/ldupuy/DATA/Experimental_data/Turbulence3d/' + date + '/' + os.path.basename(
    cinefile).rsplit('.', 1)[0]

# get the datafile associated to that cine. If the cine was not found, just look for it in the list
if cinefile is not None:
    datafile = ask(datafolder,
                   ext='/20*' + os.path.basename(cinefile).rsplit(".", 1)[0] +
                   '.hdf5')
else:
    datafile = ask(datafolder, ext='20*' + '.hdf5')

# load the datafile
f = lh5py.ouverture_fichier(datafile)
d = lh5py.h5py_in_Data(f)
#d2 = lh5py.h5py_in_Data(f)
f.close()

#compute the volume on the first 200 frames
m = lmesure.Mesure(d)

#compute the volumes
v = lvolume.Volume(d)
v = v.volume(nb_im=440)

m.add_measurement(v)

###generate Piv3D object
piv3 = lpiv3d.Piv3D(d)
piv3.data.nb_im = 440  #re set the number of images that will be processed by the 3d piv
예제 #2
0
savefolder = '/Users/stephane/Documents/JRC_ENS/Data/Turbulence3d/' + date + '/'

base = os_base()
folder = base + 'Turbulence3d/' + date + '/'
cinefile = ask(folder)
datafile = ask(folder,
               ext='/20*' + os.path.basename(cinefile).rsplit(".", 1)[0] +
               '.hdf5')
paramfile = ask(folder, ext='*.txt')

print(datafile)
print(paramfile)

#cree un data à partir d'un fichier hdf5 existant
f = h5pylea.ouverture_fichier(datafile)
Data = h5pylea.h5py_in_Data(f)
f.close()

#recree un param à partir d'un fichier .txt (spécifié) et du nom du cinefile associé
param = lparam.Param(p=paramfile, spec=cinefile)
print(param.__dict__.keys())

param = update_param(param)

#update le fichier param du data
Data.param = param

#update l'emplacement du cinefile
Data.fichier = cinefile

#sauvegarde le fichier Data