Esempio n. 1
0
def plot_axon_lines(neurites):

    nRows, nCols = size2x2(neurites)

    if nRows > 50:

        lineWidth = 0.5

    elif nRows > 25:

        lineWidth = 1.0

    else:

        lineWidth = 2.0

    for row in range(nRows):

        for col in range(nCols):

            if (neurites[row, col] == 1.0) | (neurites[row, col] == 3.0):

                plt.plot([col + 0.1, col + 0.9], [row + 0.5, row + 0.5],
                         "w",
                         linewidth=lineWidth)
Esempio n. 2
0
def plot_hatch_lines(matrix):

    nRows, nCols = size2x2(matrix)
    
    if nRows > 50:
        lineWidth = 0.5
    elif nRows > 25:
        lineWidth = 1.0
    else:
        lineWidth = 2.0
    
    for row in range(nRows+1):
        for col in range(nCols+1):
            plt.plot([col, col], [0, nRows], "k", linewidth=lineWidth)
            plt.plot([0, nCols], [row, row], "k", linewidth=lineWidth)
Esempio n. 3
0
def plot_axon_lines(neurites):

    nRows, nCols = size2x2(neurites)
    
    if nRows > 50:
        lineWidth = 0.5
    elif nRows > 25:
        lineWidth = 1.0
    else:
        lineWidth = 2.0
    
    for row in range(nRows):
        for col in range(nCols):
            if (neurites[row,col] == 1.0) | (neurites[row,col] == 3.0):
                plt.plot([col+0.1, col+0.9], [row+0.5, row+0.5], "w", linewidth=lineWidth)
Esempio n. 4
0
def plot_hatch_lines(matrix):

    nRows, nCols = size2x2(matrix)

    if nRows > 50:
        lineWidth = 0.5
    elif nRows > 25:
        lineWidth = 1.0
    else:
        lineWidth = 2.0

    for row in range(nRows + 1):
        for col in range(nCols + 1):
            plt.plot([col, col], [0, nRows], "k", linewidth=lineWidth)
            plt.plot([0, nCols], [row, row], "k", linewidth=lineWidth)
Esempio n. 5
0
from diek_functions import size2x2
from diek_functions import pause

from file_functions import load_csv

from plot_patterns import plot_patterns

print

fileName = "FP_matrix.csv"
#fileName = "test.csv"

fpMatrix = load_csv(fileName)

nAllRows, nAllColumns = size2x2(fpMatrix)

nSkipRows = 1
nSkipColumns = 6
ABCorderingColumnNo = 0
HCorderingColumnNo = 1
cellIDorderingColumnNo = 3
labelColumnNo = 5
patternLabelsRowNo = 0

nCells = nAllRows - nSkipRows # account for header row   
nPatterns = nAllColumns - nSkipColumns # account for header columns

patternLabels = [""] * nPatterns
cellLabelsSorted = [""] * nCells
nPatternOccurrencesSorted = [[None for j in range(nPatterns)] for i in range(nCells)]
Esempio n. 6
0
import numpy as np

from file_functions import read_from_csv

from diek_functions import size2x2
from diek_functions import pause

print

fileName = 'FP_matrix.csv'
fileName = 'test.csv'

fpDataFrame = read_from_csv(fileName)

nFpRows, nFpColumns = size2x2(fpDataFrame.values)
print 'nFpRows ', nFpRows
print

nSkipRows = 1

nSkipColumns = 6

ABCorderingColumnNo = 0

HCorderingColumnNo = 1

cellIDorderingColumnNo = 3

labelColumnNo = 5

patternLabelsRowNo = 0
Esempio n. 7
0
import numpy as np

from file_functions import read_from_csv

from diek_functions import size2x2
from diek_functions import pause

print

fileName = 'FP_matrix.csv'
fileName = 'test.csv'

fpDataFrame = read_from_csv(fileName)

nFpRows, nFpColumns = size2x2(fpDataFrame.values)
print 'nFpRows ', nFpRows
print

nSkipRows = 1

nSkipColumns = 6

ABCorderingColumnNo = 0

HCorderingColumnNo = 1

cellIDorderingColumnNo = 3

labelColumnNo = 5

patternLabelsRowNo = 0
Esempio n. 8
0
import csv

from file_functions import load_csv
from file_functions import write_csv

from diek_functions import size2x2
from diek_functions import pause
from diek_functions import time_stamp

print

namesFileName = "data/neuron_type_names.csv"

namesMatrix = load_csv(namesFileName)

nNamesRows, nNamesColumns = size2x2(namesMatrix)

nNames = nNamesRows - 1  # account for names header row

namesHeaderRowNo = 0  # python indexing starts at zero

namesCellIdColumnNo = 3  # python indexing starts at zero

nNamesHeaderRows = 1

nNamesHeaderColumns = 6

patternsFileName = "data/FP_patterns.csv"

patternsMatrix = load_csv(patternsFileName)
import numpy as np

from file_functions import read_from_csv

from diek_functions import size2x2
from diek_functions import pause

print

fileName = 'FP_matrix.csv'
fileName = 'test.csv'

fpMatrix = read_from_csv(fileName)

nFpRows, nFpColumns = size2x2(fpMatrix)

nSkipRows = 1

nSkipColumns = 6

ABCorderingColumnNo = 0

HCorderingColumnNo = 1

cellIDorderingColumnNo = 3

labelColumnNo = 5

patternLabelsRowNo = 0

Esempio n. 10
0
import numpy as np

from file_functions import read_from_csv

from diek_functions import size2x2
from diek_functions import pause

print

fileName = 'FP_matrix.csv'
fileName = 'test.csv'

fpMatrix = read_from_csv(fileName)

nFpRows, nFpColumns = size2x2(fpMatrix)

nSkipRows = 1

nSkipColumns = 6

ABCorderingColumnNo = 0

HCorderingColumnNo = 1

cellIDorderingColumnNo = 3

labelColumnNo = 5

patternLabelsRowNo = 0

#orderingColumnNo = ABCorderingColumnNo
Esempio n. 11
0
from diek_functions import size2x2
from diek_functions import pause

from file_functions import dictRead_from_csv

from plot_patterns import plot_patterns

print

fileName = "FP_matrix.csv"
fileName = "test.csv"

fpDict = dictRead_from_csv(fileName)
	
nAllRows, nAllColumns = size2x2(fpDict)

nSkipRows = 1
nSkipColumns = 6
ABCorderingColumnNo = 0
HCorderingColumnNo = 1
cellIDorderingColumnNo = 3
labelColumnNo = 5
patternLabelsRowNo = 0

#orderingColumn = "ABC ordering"
orderingColumn = "HC ordering"
#orderingColumn = "Cell ID"

nCells = nAllRows   
nPatterns = nAllColumns - nSkipColumns # account for header columns
Esempio n. 12
0
from diek_functions import size2x2
from diek_functions import pause

from file_functions import dictRead_from_csv

from plot_patterns import plot_patterns

print

fileName = "FP_matrix.csv"
fileName = "test.csv"

fpDict = dictRead_from_csv(fileName)

nAllRows, nAllColumns = size2x2(fpDict)

nSkipRows = 1
nSkipColumns = 6
ABCorderingColumnNo = 0
HCorderingColumnNo = 1
cellIDorderingColumnNo = 3
labelColumnNo = 5
patternLabelsRowNo = 0

#orderingColumn = "ABC ordering"
orderingColumn = "HC ordering"
#orderingColumn = "Cell ID"

nCells = nAllRows
nPatterns = nAllColumns - nSkipColumns  # account for header columns