Exemple #1
0
LAM_GEXF_FILE = 'lamina.gexf.gz'

INPUT_FILE = 'vision_input.h5'
IMAGE_FILE = 'image1.mat'
RET_OUTPUT_FILE = 'retina_output'
LAM_OUTPUT_FILE = 'lamina_output'
RET_OUTPUT_GPOT = RET_OUTPUT_FILE + '_gpot.h5'
LAM_OUTPUT_GPOT = LAM_OUTPUT_FILE + '_gpot.h5'
RET_OUTPUT_PNG = 'retina_output.png'
LAM_OUTPUT_PNG = 'lamina_output.png'
RET_OUTPUT_AVI = 'retina_output.avi'
LAM_OUTPUT_AVI = 'lamina_output.avi'
RET_OUTPUT_MPEG = 'retina_output.mp4'
LAM_OUTPUT_MPEG = 'lamina_output.mp4'

eyemodel = EyeGeomImpl(args.num_layers, retina_only=args.retina_only)

#current implementation of output manipulation depends on input
if args.output:
    args.input = True

if args.input:
    print('Generating input of model from image file')
    _dummy = eyemodel.get_intensities(IMAGE_FILE,
                                      {'type': args.video_type,
                                       'steps': args.steps,
                                       'dt': dt, 'output_file': INPUT_FILE,
                                       'factors': [1, 5, 10, 20, 50, 100]})
if args.gexf:
    print('Writing retina lpu')
    eyemodel.write_retina(RET_GEXF_FILE)
RET_OUTPUT_GPOT = RET_OUTPUT_FILE + '_gpot.h5'
LAM_OUTPUT_GPOT = LAM_OUTPUT_FILE + '_gpot.h5'
MED_OUTPUT_GPOT = MED_OUTPUT_FILE + '_gpot.h5'
RET_OUTPUT_PNG = 'retina_output.png'
LAM_OUTPUT_PNG = 'lamina_output.png'
RET_OUTPUT_AVI = 'retina_output.avi'
LAM_OUTPUT_AVI = 'lamina_output.avi'
RET_OUTPUT_MPEG = 'retina_output.mp4'
LAM_OUTPUT_MPEG = 'lamina_output.mp4'

# XXX eyemodel's calculations that depend on model are checked internally
# that will cause some messages to be printed, like  'Writing retina lpu'
# without that necessarily taking place

print('Instantiating eye geometry')
eyemodel = EyeGeomImpl(args.num_layers, model=args.model)

if args.input:
    print('Generating input of model')

    config = {'type': args.type, 'steps': args.steps,
              'dt': dt, 'output_file': RET_INPUT}
    '''
    replace with above for bar generation
    config = {'type': 'bar', 'steps': args.steps,
              'dt': dt, 'shape': (100,100),
              'width': 20, 'speed': 100, 'dir':0}
    '''
    _dummy = eyemodel.get_intensities(file=None, config=config)

if args.gexf:
Exemple #3
0
LAM_GEXF_FILE = 'lamina.gexf.gz'

INPUT_FILE = 'vision_input.h5'
IMAGE_FILE = 'image1.mat'
RET_OUTPUT_FILE = 'retina_output'
LAM_OUTPUT_FILE = 'lamina_output'
RET_OUTPUT_GPOT = RET_OUTPUT_FILE + '_gpot.h5'
LAM_OUTPUT_GPOT = LAM_OUTPUT_FILE + '_gpot.h5'
RET_OUTPUT_PNG = 'retina_output.png'
LAM_OUTPUT_PNG = 'lamina_output.png'
RET_OUTPUT_AVI = 'retina_output.avi'
LAM_OUTPUT_AVI = 'lamina_output.avi'
RET_OUTPUT_MPEG = 'retina_output.mp4'
LAM_OUTPUT_MPEG = 'lamina_output.mp4'

eyemodel = EyeGeomImpl(args.num_layers, retina_only=args.retina_only)

#current implementation of output manipulation depends on input
if args.output:
    args.input = True

if args.input:
    print('Generating input of model from image file')
    _dummy = eyemodel.get_intensities(
        IMAGE_FILE, {
            'type': args.video_type,
            'steps': args.steps,
            'dt': dt,
            'output_file': INPUT_FILE,
            'factors': [1, 5, 10, 20, 50, 100]
        })
Exemple #4
0
RET_OUTPUT_GPOT = RET_OUTPUT_FILE + '_gpot.h5'
LAM_OUTPUT_GPOT = LAM_OUTPUT_FILE + '_gpot.h5'
MED_OUTPUT_GPOT = MED_OUTPUT_FILE + '_gpot.h5'
RET_OUTPUT_PNG = 'retina_output.png'
LAM_OUTPUT_PNG = 'lamina_output.png'
RET_OUTPUT_AVI = 'retina_output.avi'
LAM_OUTPUT_AVI = 'lamina_output.avi'
RET_OUTPUT_MPEG = 'retina_output.mp4'
LAM_OUTPUT_MPEG = 'lamina_output.mp4'

# XXX eyemodel's calculations that depend on model are checked internally
# that will cause some messages to be printed, like  'Writing retina lpu'
# without that necessarily taking place

print('Instantiating eye geometry')
eyemodel = EyeGeomImpl(args.num_layers, model=args.model)

if args.input:
    print('Generating input of model')

    config = {'type': args.type, 'steps': args.steps,
              'dt': dt, 'output_file': RET_INPUT}
    '''
    replace with above for bar generation
    config = {'type': 'bar', 'steps': args.steps,
              'dt': dt, 'shape': (100,100),
              'width': 20, 'speed': 100, 'dir':0}
    '''
    _dummy = eyemodel.get_intensities(file=None, config=config)

if args.gexf:
Exemple #5
0
RET_OUTPUT_GPOT = RET_OUTPUT_FILE + '_gpot.h5'
LAM_OUTPUT_GPOT = LAM_OUTPUT_FILE + '_gpot.h5'
MED_OUTPUT_GPOT = MED_OUTPUT_FILE + '_gpot.h5'
RET_OUTPUT_PNG = 'retina_output.png'
LAM_OUTPUT_PNG = 'lamina_output.png'
RET_OUTPUT_AVI = 'retina_output.avi'
LAM_OUTPUT_AVI = 'lamina_output.avi'
RET_OUTPUT_MPEG = 'retina_output.mp4'
LAM_OUTPUT_MPEG = 'lamina_output.mp4'

# XXX eyemodel's calculations that depend on model are checked internally
# that will cause some messages to be printed, like  'Writing retina lpu'
# without that necessarily taking place

print('Instantiating eye geometry')
eyemodel = EyeGeomImpl(args.num_layers, model=args.model)

if args.input:
    print('Generating input of model')

    config = {
        'type': args.type,
        'steps': args.steps,
        'dt': dt,
        'output_file': RET_INPUT
    }
    '''
    replace with above for bar generation
    config = {'type': 'bar', 'steps': args.steps,
              'dt': dt, 'shape': (100,100),
              'width': 20, 'speed': 100, 'dir':0}
Exemple #6
0
RET_OUTPUT_GPOT = RET_OUTPUT_FILE + '_gpot.h5'
LAM_OUTPUT_GPOT = LAM_OUTPUT_FILE + '_gpot.h5'
MED_OUTPUT_GPOT = MED_OUTPUT_FILE + '_gpot.h5'
RET_OUTPUT_PNG = 'retina_output.png'
LAM_OUTPUT_PNG = 'lamina_output.png'
RET_OUTPUT_AVI = 'retina_output.avi'
LAM_OUTPUT_AVI = 'lamina_output.avi'
RET_OUTPUT_MPEG = 'retina_output.mp4'
LAM_OUTPUT_MPEG = 'lamina_output.mp4'

# XXX eyemodel's calculations that depend on model are checked internally
# that will cause some messages to be printed, like  'Writing retina lpu'
# without that necessarily taking place

print('Instantiating eye geometry')
eyemodel = EyeGeomImpl(args.num_layers, model=args.model)

if args.input:
    print('Generating input of model')

    config = {
        'type': args.type,
        'steps': args.steps,
        'dt': dt,
        'output_file': RET_INPUT
    }
    '''
    replace with above for bar generation
    config = {'type': 'bar', 'steps': args.steps,
              'dt': dt, 'shape': (100,100),
              'width': 20, 'speed': 100, 'dir':0}