Beispiel #1
0
# Description: shows compressible plots

from read_files import read
import matplotlib.pyplot as plt
import matplotlib.image as img

images = read()
images = images[6:]

fig = plt.figure()
plt.suptitle('FV4', fontsize=16)
plt.subplots_adjust(left=0.2,bottom=0.2,right=0.8,top=0.8,wspace=0,hspace=0)

loc = plt.MaxNLocator(4)
xticks = ['', '', '0.25', '', '0.75']
yticks = ['', '', '0.75', '', '0.25', '']
empticks = ['', '', '', '', '']

for n, lst in enumerate(images):
    for i, pic in enumerate(lst):
        a = fig.add_subplot(2,4,4*n+(i+1))
        im = a.imshow(pic, aspect='auto')
        a.xaxis.set_major_locator(loc)
        a.yaxis.set_major_locator(loc)
        if n==1 and i==0:
            a.set_xticklabels(xticks)
            a.set_yticklabels(yticks)
        elif n==1 and i!=0:
            a.set_xticklabels(xticks)
            a.set_yticklabels(empticks)
        elif n!=1 and i==0:
Beispiel #2
0
import read_files as reader
import person, book

# CZYTANIE OSÓB Z PLIKU
lista_osob_str = reader.read(file_name="people_file")
people = [] #lista obiektóœ typu Person
for os in lista_osob_str:
    people.append(person.Person(os[0],os[1],os[2],os[3]))


#CZYTANIE KSIĄŻEK Z PLIKÓW
books = [] #lista obiektów typu '# Book
lista_ksiazek_str = reader.read(file_name="books_file")
for b in lista_ksiazek_str:
    books.append(book.Book(b[0],b[1],b[2],b[3]))


# W TYM MIEJSCU MAMY :
#  books - lista obiektów typu Book (wyczytany z pliku books_file)
#  people - lista obiektów typu Person (wyczytany z pliku people_file)

#ŚCIĄGA
kubus = books[1]
wiedzmin = books[2]
daniel = people[3]
michal = people[0]
daniel.rent_book(kubus)
michal.rent_book(kubus)
daniel.give_back_all_books()
michal.rent_book(kubus)
Fixation-Correction-Sourcecode is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Fixation-Correction-Sourcecode.  If not, see <http://www.gnu.org/licenses/>.

Copyright 2015
Author: Chris Palmer
"""

import os
import read_files

# variables used globally

# TODO modify this so that it gives the root directory of project
# current directory... might actually be the directory of globalVariables
current_directory = os.path.dirname(os.path.realpath(__file__))+"/eye-tracking-data"
files = read_files.read(current_directory)
AOI_FILES = {}

# settings that will be modified by testing
LOOKBACK_SIZE_MS = 15000
MINIMUM_CLUSTER_SIZE = 3

# between -1 and 1
MEDIAN_OFFSET = .175
Beispiel #4
0
import matplotlib.image as img
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import scipy.misc as misc
from read_files import read

images = read() # sedov, quad, bubble, rt
cropped_imgs = []
img_titles = ['compressible', 'compressible_rk', 'compressible_fv4']
png_names = ['sedov.png', 'sedov_rk.png', 'sedov_fv4.png', 'quad.png', 'quad_rk.png', 'quad_fv4.png', 'bubble.png', 'bubble_rk.png', 'bubble_fv4.png', 'rt.png', 'rt_rk.png', 'rt_fv4.png']

plt.gca().set_axis_off()
plt.subplots_adjust(top=1, bottom=0, right=1, left=0, hspace=0, wspace=0)
plt.margins(0,0)
plt.gca().xaxis.set_major_locator(ticker.NullLocator())
plt.gca().yaxis.set_major_locator(ticker.NullLocator())

for list in images[:2]:
    for im in list:
        cropped_im = im[20:450, 160:650, :]
        cropped_imgs.append(cropped_im)
for list in images[2:3]:
    for im in list:
        cropped_im = im[20:450, 240:590, :]
        cropped_imgs.append(cropped_im)
for list in images[3:]:
    for im in list:
        cropped_im = im[80:390, 50:750, :]
        cropped_imgs.append(cropped_im)

for n, im in enumerate(cropped_imgs):
Beispiel #5
0
Fixation-Correction-Sourcecode is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Fixation-Correction-Sourcecode.  If not, see <http://www.gnu.org/licenses/>.

Copyright 2015
Author: Chris Palmer
"""

import os
import read_files

# variables used globally

# TODO modify this so that it gives the root directory of project
# current directory... might actually be the directory of globalVariables
current_directory = os.path.dirname(
    os.path.realpath(__file__)) + "/eye-tracking-data"
files = read_files.read(current_directory)
AOI_FILES = {}

# settings that will be modified by testing
LOOKBACK_SIZE_MS = 15000
MINIMUM_CLUSTER_SIZE = 3

# between -1 and 1
MEDIAN_OFFSET = .175