예제 #1
0
def batch_process_harddrive(path='/media/SA1_videos/sa1_movies_3/', movie_info=None, dataset=None):

    movie_dataset_filename = None

    if movie_info is None:
        obj_id_list, movie_info = sa1a.sa1_analysis()
    
    for MOVIE_ID in movie_info.keys():
        #if movie_info[MOVIE_ID]['Path'] == path:
        print 'loading id: ', MOVIE_ID

        npmovie = process_movie(MOVIE_ID, movie_info, dataset=dataset)
        print 'trajectory: ', npmovie.trajec
        mnpmovie = pm.MiniNPM(npmovie)
        print 'mini trajectory: ', mnpmovie.trajec
        del(npmovie)
        
        if movie_dataset_filename is not None:
            movie_dataset = pm.load(movie_dataset_filename)
        else:
            movie_dataset = {}
            movie_dataset_filename = 'movie_dataset_3'
        movie_dataset.setdefault(MOVIE_ID, mnpmovie)
        pm.save(movie_dataset, movie_dataset_filename)
        del(movie_dataset)
예제 #2
0
def test(n):
    
    o, m = sa1a.sa1_analysis()
    print 'processing: ', m.keys()[n]
    dataset = pm.load('/home/floris/data/sa1_movie_data/h5_files/reduced_dataset')
    npmovie = process_movie(m.keys()[n], m, dataset)
    
    return npmovie