Exemplo n.º 1
0
def main():
    input_dir, group, x_data_type, y_data_type = parse_args()
    if x_data_type in common_complexity.COMPLEXITY_TYPES:
        x_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[
            x_data_type] + ')'
    else:
        x_label = common_metric.get_name(x_data_type)
    if y_data_type in common_complexity.COMPLEXITY_TYPES:
        y_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[
            y_data_type] + ')'
    else:
        y_label = common_metric.get_name(y_data_type)
    title = y_label + ' vs. ' + x_label + ' - Temporal Traces'
    bounds = (0.1, 0.5, 0.0, 3.0)  # (x_min, x_max, y_min, y_max)
    size = (11.0, 8.5)  # (width, height)
    ax = plot_init(title, x_label, y_label, bounds, size)

    if group == 'passive' or group == 'both':
        plot_dirs(ax, get_run_dirs(input_dir, 'passive'), x_data_type,
                  y_data_type, 'passive')
    if group == 'driven' or group == 'both':
        plot_dirs(ax, get_run_dirs(input_dir, 'driven'), x_data_type,
                  y_data_type, 'driven')

    plot_finish(ax, bounds)

    pylab.show()
Exemplo n.º 2
0
def main():
	run_dir, group, x_data_type, y_data_type = parse_args()
	if x_data_type in common_complexity.COMPLEXITY_TYPES:
		x_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[x_data_type] + ')'
	else:
		x_label = common_metric.get_name(x_data_type)
	if y_data_type in common_complexity.COMPLEXITY_TYPES:
		y_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[y_data_type] + ')'
	else:
		y_label = common_metric.get_name(y_data_type)
	title = y_label + ' vs. ' + x_label + ' - Temporal Traces'
	bounds = (0.0, 0.8, 0.0, 8.0)  # (x_min, x_max, y_min, y_max)
	size = (11.0, 8.5)  # (width, height)
	ax = plot_init(title, x_label, y_label, bounds, size)
	
	if group == 'passive':
		plot_dirs(ax, get_timestep_dirs(run_dir, 'passive'), x_data_type, y_data_type, 'passive')
	if group == 'driven':
		plot_dirs(ax, get_timestep_dirs(run_dir, 'driven'), x_data_type, y_data_type, 'driven')
	if group == 'both':
		if 'passive' in os.path.basename(run_dir):
			passive_dir = run_dir
			start = run_dir.rfind('passive')
			driven_dir = run_dir[:start] + 'driven' + run_dir[start+7:]
		else:
			driven_dir = run_dir
			start = run_dir.rfind('driven')
			passive_dir = run_dir[:start] + 'passive' + run_dir[start+6:]
		plot_dirs(ax, get_timestep_dirs(passive_dir, 'passive'), x_data_type, y_data_type, 'passive')
		plot_dirs(ax, get_timestep_dirs(driven_dir, 'driven'), x_data_type, y_data_type, 'driven')
	
	pylab.show()
Exemplo n.º 3
0
def gen_plot(run_dir, group, x_data_type, y_data_type, z_data_type, elev, azim):
	if x_data_type in common_complexity.COMPLEXITY_TYPES:
		x_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[x_data_type] + ')'
	else:
		x_label = common_metric.get_name(x_data_type)
	if y_data_type in common_complexity.COMPLEXITY_TYPES:
		y_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[y_data_type] + ')'
	else:
		y_label = common_metric.get_name(y_data_type)
	if z_data_type in common_complexity.COMPLEXITY_TYPES:
		z_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[z_data_type] + ')'
	else:
		z_label = common_metric.get_name(z_data_type)
	title = x_label + ', ' + y_label + ', ' + z_label + ' - Scatter Plot'
	bounds = (0.0, 0.8, 0.0, 8.0, 0.0, 8.0)  # (x_min, x_max, y_min, y_max, z_min, z_max)
	size = (11.0, 8.5)  # (width, height)
	
	ax = plot_init(title, x_label, y_label, z_label, bounds, size, elev, azim)
	
	if group == 'passive':
		plot_dirs(ax, get_timestep_dirs(run_dir, 'passive'), x_data_type, y_data_type, z_data_type, 'passive')
	if group == 'driven':
		plot_dirs(ax, get_timestep_dirs(run_dir, 'driven'), x_data_type, y_data_type, z_data_type, 'driven')
	if group == 'both':
		if 'passive' in os.path.basename(run_dir):
			passive_dir = run_dir
			start = run_dir.rfind('passive')
			driven_dir = run_dir[:start] + 'driven' + run_dir[start+7:]
		else:
			driven_dir = run_dir
			start = run_dir.rfind('driven')
			passive_dir = run_dir[:start] + 'passive' + run_dir[start+6:]
		plot_dirs(ax, get_timestep_dirs(passive_dir, 'passive'), x_data_type, y_data_type, z_data_type, 'passive')
		plot_dirs(ax, get_timestep_dirs(driven_dir, 'driven'), x_data_type, y_data_type, z_data_type, 'driven')
Exemplo n.º 4
0
def get_axis_label(data_type):
    if data_type == 'time':
        label = 'Time'
    elif data_type[0] in common_complexity.COMPLEXITY_TYPES:
        label = 'Complexity (' + common_complexity.get_name(data_type) + ')'
    else:
        label = common_metric.get_name(data_type)

    return label
def get_axis_label(data_type):
    if data_type == "time":
        label = "Time"
    elif data_type[0] in common_complexity.COMPLEXITY_TYPES:
        label = "Complexity (" + common_complexity.get_name(data_type) + ")"
    else:
        label = common_metric.get_name(data_type)

    return label
Exemplo n.º 6
0
def get_axis_label(data_type):
	if data_type == 'time':
		label = 'Time'
	elif data_type in common_complexity.COMPLEXITY_TYPES:
		label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[data_type] + ')'
	else:
		label = common_metric.get_name(data_type)
	
	return label
Exemplo n.º 7
0
def gen_plot(run_dir, group, x_data_type, y_data_type, z_data_type, elev,
             azim):
    if x_data_type in common_complexity.COMPLEXITY_TYPES:
        x_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[
            x_data_type] + ')'
    else:
        x_label = common_metric.get_name(x_data_type)
    if y_data_type in common_complexity.COMPLEXITY_TYPES:
        y_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[
            y_data_type] + ')'
    else:
        y_label = common_metric.get_name(y_data_type)
    if z_data_type in common_complexity.COMPLEXITY_TYPES:
        z_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[
            z_data_type] + ')'
    else:
        z_label = common_metric.get_name(z_data_type)
    title = x_label + ', ' + y_label + ', ' + z_label + ' - Scatter Plot'
    bounds = (0.0, 0.8, 0.0, 8.0, 0.0, 8.0
              )  # (x_min, x_max, y_min, y_max, z_min, z_max)
    size = (11.0, 8.5)  # (width, height)

    ax = plot_init(title, x_label, y_label, z_label, bounds, size, elev, azim)

    if group == 'passive':
        plot_dirs(ax, get_timestep_dirs(run_dir, 'passive'), x_data_type,
                  y_data_type, z_data_type, 'passive')
    if group == 'driven':
        plot_dirs(ax, get_timestep_dirs(run_dir, 'driven'), x_data_type,
                  y_data_type, z_data_type, 'driven')
    if group == 'both':
        if 'passive' in os.path.basename(run_dir):
            passive_dir = run_dir
            start = run_dir.rfind('passive')
            driven_dir = run_dir[:start] + 'driven' + run_dir[start + 7:]
        else:
            driven_dir = run_dir
            start = run_dir.rfind('driven')
            passive_dir = run_dir[:start] + 'passive' + run_dir[start + 6:]
        plot_dirs(ax, get_timestep_dirs(passive_dir, 'passive'), x_data_type,
                  y_data_type, z_data_type, 'passive')
        plot_dirs(ax, get_timestep_dirs(driven_dir, 'driven'), x_data_type,
                  y_data_type, z_data_type, 'driven')
Exemplo n.º 8
0
def get_axis_label(data_type):
	if data_type == 'time':
		label = 'Time'
	elif data_type == 'neuronCount':
		label = 'Neuron Count'
	elif data_type == 'synapseCount':
		label = 'Synapse Count'
	elif data_type[0] in common_complexity.COMPLEXITY_TYPES:
		label = 'Complexity (' + common_complexity.get_name(data_type) + ')'
	else:
		label = common_metric.get_name(data_type)
	
	return label
Exemplo n.º 9
0
def main():
	input_dir, group, x_data_type, y_data_type = parse_args()
	if x_data_type in common_complexity.COMPLEXITY_TYPES:
		x_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[x_data_type] + ')'
	else:
		x_label = common_metric.get_name(x_data_type)
	if y_data_type in common_complexity.COMPLEXITY_TYPES:
		y_label = 'Complexity (' + common_complexity.COMPLEXITY_NAMES[y_data_type] + ')'
	else:
		y_label = common_metric.get_name(y_data_type)
	title = y_label + ' vs. ' + x_label + ' - Temporal Traces'
	bounds = (0.1, 0.5, 0.0, 3.0)  # (x_min, x_max, y_min, y_max)
	size = (11.0, 8.5)  # (width, height)
	ax = plot_init(title, x_label, y_label, bounds, size)
	
	if group == 'passive' or group == 'both':
		plot_dirs(ax, get_run_dirs(input_dir, 'passive'), x_data_type, y_data_type, 'passive')
	if group == 'driven' or group == 'both':
		plot_dirs(ax, get_run_dirs(input_dir, 'driven'), x_data_type, y_data_type, 'driven')

	plot_finish(ax, bounds)

	pylab.show()