Function
Static Public Summary | ||
public |
balance_subconditions(balancing_type: string, name: experiment_name, length: dataset_length): [] Returns the balanced order of the subconditions given balancing type, experiment, and number of subconditions. |
|
public |
create_condition_dataset(base_data: *, condition_data: *): * Appends condition-specific data to the dataset. |
|
public |
create_distractor_scatter_plot(attributes: object) D3 code for setting up scatter plot chart area with distractor dataset (so two-populations per graph) |
|
public |
create_estimation_bisection_plot(experiment: object) Plots a bisection estimation condition (e.g. |
|
public |
create_estimation_interference_plot(experiment: object) Plots an interference estimation condition (e.g. |
|
public |
create_estimation_multi_interference_plot(experiment: object) Plots a multi interference estimation condition (e.g. |
|
public |
create_estimation_plot(experiment: object) Plots a regular estimation condition |
|
public |
create_ring_plot(attributes: object) D3 code for plotting a ring plot. |
|
public |
create_scatter_plot(attributes: object) D3 code for setting up scatter plot chart area |
|
public |
create_shape_plot(attributes: object) D3 code for setting up shape plot chart area |
|
public |
create_strip_plot(attributes: object) D3 code for plotting a strip plot. |
|
public |
force_greater_right_position(trial: *): * Forces the right graph to always have the greater correlation. |
|
public |
generateDistribution(correlation: *, error: *, size: *, numsd: *, mean: *, sd: *): * |
|
public |
generateRandomDistribution(row: *): * Generates a random population, that can exclude a coordinate set if desired. |
|
public |
get_color_paths(color: *): * |
|
public |
get_data(experiment: *): * Retrieves the data for the corresponding experiment object. |
|
public |
get_data_subset(experiment: *): * Retrieves a smaller dataset (4 subconditions) given experiment, trial structure and condition. |
|
public |
get_instructions(experiment: object): string Generates the instructions html for the given experiment. |
|
public |
get_subconditions(experiment: *): * |
|
public |
hex_to_color(color_hex: *): * |
|
public |
initialize_latin_square(size: *): * |
|
public |
initialize_random_order(length: *): * |
|
public |
is_custom_plot(experiment: object): boolean Checks if the experiment needs a custom plot. |
|
public |
plot_distributions(experiment: object): * Main point of entry to determine whether there is a custom plotting code for the condition, or we use one of the standard supported graph plots. |
|
public |
plot_scatter_points(chart: object, xscale: function, yscale: function, data: array, properties: assoc. array) D3 code for appending data to the graph depending on point shape type. |
|
public |
prepare_custom_plot(experiment: object): boolean Routes to the correct plotting code in /d3-custom-plots depending on experiment condition. |
|
public |
randomize_position(trial: *): * Randomizes the position of the base and adjusted coordinates being displayed on the left or right graphs, and returns the coordinates for the graphs. |
|
public |
randomize_radius_position(trial: *, base_radius: *, adjusted_radius: *): * |
Static Public
public balance_subconditions(balancing_type: string, name: experiment_name, length: dataset_length): [] source
import {balance_subconditions} from 'VCL-Web-Framework/scripts/experiment-properties/balancing/balancing_controller.js'
Returns the balanced order of the subconditions given balancing type, experiment, and number of subconditions.
Params:
Name | Type | Attribute | Description |
balancing_type | string | ||
name | experiment_name | of experiment |
|
length | dataset_length | of dataset AKA number of subconditions |
Return:
[] | array of indices, representing each subcondition in the dataset. |
public create_condition_dataset(base_data: *, condition_data: *): * source
import {create_condition_dataset} from 'VCL-Web-Framework/scripts/experiment-properties/data/data_controller.js'
Appends condition-specific data to the dataset.
Params:
Name | Type | Attribute | Description |
base_data | * | [{assoc}, {assoc}, .... ] dataset with base experiment constants |
|
condition_data | * | [{assoc}, {assoc}, .... ] condition set for that experiment |
Return:
* | dataset [{assoc}, {assoc}, .... ] |
public create_distractor_scatter_plot(attributes: object) source
import {create_distractor_scatter_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-custom-plots/distractor_scatter_plot.js'
D3 code for setting up scatter plot chart area with distractor dataset (so two-populations per graph)
Params:
Name | Type | Attribute | Description |
attributes | object |
public create_estimation_bisection_plot(experiment: object) source
import {create_estimation_bisection_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-custom-plots/estimation_plot.js'
Plots a bisection estimation condition (e.g. conditions with "bisection" in their name)
Params:
Name | Type | Attribute | Description |
experiment | object | {object} attributes |
public create_estimation_interference_plot(experiment: object) source
import {create_estimation_interference_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-custom-plots/estimation_plot.js'
Plots an interference estimation condition (e.g. conditions with "interference" in their name but are not multi)
Params:
Name | Type | Attribute | Description |
experiment | object | {object} attributes |
public create_estimation_multi_interference_plot(experiment: object) source
import {create_estimation_multi_interference_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-custom-plots/estimation_plot.js'
Plots a multi interference estimation condition (e.g. conditions with "interference" and "multi" in their name)
Params:
Name | Type | Attribute | Description |
experiment | object | {object} attributes |
public create_estimation_plot(experiment: object) source
import {create_estimation_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-custom-plots/estimation_plot.js'
Plots a regular estimation condition
Params:
Name | Type | Attribute | Description |
experiment | object | {object} attributes |
public create_ring_plot(attributes: object) source
import {create_ring_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-base-plots/ring_plot.js'
D3 code for plotting a ring plot.
Params:
Name | Type | Attribute | Description |
attributes | object |
public create_scatter_plot(attributes: object) source
import {create_scatter_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-base-plots/scatter_plot.js'
D3 code for setting up scatter plot chart area
Params:
Name | Type | Attribute | Description |
attributes | object |
public create_shape_plot(attributes: object) source
import {create_shape_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-base-plots/shape_plot.js'
D3 code for setting up shape plot chart area
Params:
Name | Type | Attribute | Description |
attributes | object |
public create_strip_plot(attributes: object) source
import {create_strip_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-base-plots/strip_plot.js'
D3 code for plotting a strip plot.
Params:
Name | Type | Attribute | Description |
attributes | object |
public force_greater_right_position(trial: *): * source
import {force_greater_right_position} from 'VCL-Web-Framework/scripts/helpers/experiment_helpers.js'
Forces the right graph to always have the greater correlation. Used for testing purposes.
Params:
Name | Type | Attribute | Description |
trial | * | {object}
base_coordinates { {x_values: [], y_values: []} } |
Return:
* | result { {left: [coordinates], right: [coordinates]} } |
public generateDistribution(correlation: *, error: *, size: *, numsd: *, mean: *, sd: *): * source
import {generateDistribution} from 'VCL-Web-Framework/scripts/experiment-properties/distribution/gaussian_distribution_generator.js'
Params:
Name | Type | Attribute | Description |
correlation | * | ||
error | * | ||
size | * | ||
numsd | * | ||
mean | * | ||
sd | * |
Return:
* |
public generateRandomDistribution(row: *): * source
import {generateRandomDistribution} from 'VCL-Web-Framework/scripts/experiment-properties/distribution/random_distribution_generator.js'
Generates a random population, that can exclude a coordinate set if desired.
Params:
Name | Type | Attribute | Description |
row | * | {int} The number of possible unique x coordinates the points can land on col {int} Same as above but for y coordinates num_points {int} The number of target points to be plotted excluding_coordinates {array of coordinates to exclude} Set this to null if do not want to exclude anything |
Return:
* | coordinates [ [x1, y1], [x2, y2] ... ] |
public get_color_paths(color: *): * source
import {get_color_paths} from 'VCL-Web-Framework/scripts/experiments/visual_search/visual_search.js'
Params:
Name | Type | Attribute | Description |
color | * |
Return:
* |
public get_data(experiment: *): * source
import {get_data} from 'VCL-Web-Framework/scripts/experiment-properties/data/data_controller.js'
Retrieves the data for the corresponding experiment object.
Params:
Name | Type | Attribute | Description |
experiment | * | {object} Model object of the experiment |
Return:
* | dataset [{assoc}, {assoc}, .... ] |
public get_data_subset(experiment: *): * source
import {get_data_subset} from 'VCL-Web-Framework/scripts/experiment-properties/data/data_controller.js'
Retrieves a smaller dataset (4 subconditions) given experiment, trial structure and condition.
Params:
Name | Type | Attribute | Description |
experiment | * | {string} "jnd", "stevens", etc. |
Return:
* | dataset [{assoc}, {assoc}, .... ] |
public get_instructions(experiment: object): string source
import {get_instructions} from 'VCL-Web-Framework/scripts/experiment-properties/instructions/instructions_controller.js'
Generates the instructions html for the given experiment.
Params:
Name | Type | Attribute | Description |
experiment | object |
public get_subconditions(experiment: *): * source
import {get_subconditions} from 'VCL-Web-Framework/scripts/experiment-properties/data/custom_subcondition_generator.js'
Params:
Name | Type | Attribute | Description |
experiment | * |
Return:
* |
public hex_to_color(color_hex: *): * source
import {hex_to_color} from 'VCL-Web-Framework/scripts/experiments/visual_search/visual_search.js'
Params:
Name | Type | Attribute | Description |
color_hex | * |
Return:
* |
public initialize_latin_square(size: *): * source
import {initialize_latin_square} from 'VCL-Web-Framework/scripts/experiment-properties/balancing/generators/latin_square_generator.js'
Params:
Name | Type | Attribute | Description |
size | * |
Return:
* |
public initialize_random_order(length: *): * source
import {initialize_random_order} from 'VCL-Web-Framework/scripts/experiment-properties/balancing/generators/random_generator.js'
Params:
Name | Type | Attribute | Description |
length | * |
Return:
* |
public is_custom_plot(experiment: object): boolean source
import {is_custom_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/custom_graphing_controller.js'
Checks if the experiment needs a custom plot.
Params:
Name | Type | Attribute | Description |
experiment | object |
public plot_distributions(experiment: object): * source
import {plot_distributions} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/graphing_controller.js'
Main point of entry to determine whether there is a custom plotting code for the condition, or we use one of the standard supported graph plots.
Params:
Name | Type | Attribute | Description |
experiment | object |
Return:
* |
public plot_scatter_points(chart: object, xscale: function, yscale: function, data: array, properties: assoc. array) source
import {plot_scatter_points} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/d3-base-plots/scatter_plot.js'
D3 code for appending data to the graph depending on point shape type.
public prepare_custom_plot(experiment: object): boolean source
import {prepare_custom_plot} from 'VCL-Web-Framework/scripts/experiment-properties/graphing/custom_graphing_controller.js'
Routes to the correct plotting code in /d3-custom-plots depending on experiment condition.
Params:
Name | Type | Attribute | Description |
experiment | object |
public randomize_position(trial: *): * source
import {randomize_position} from 'VCL-Web-Framework/scripts/helpers/experiment_helpers.js'
Randomizes the position of the base and adjusted coordinates being displayed on the left or right graphs, and returns the coordinates for the graphs.
Params:
Name | Type | Attribute | Description |
trial | * | {object}
base_coordinates { {x_values: [], y_values: []} } |
Return:
* | result { {left: [coordinates], right: [coordinates]} } |
public randomize_radius_position(trial: *, base_radius: *, adjusted_radius: *): * source
import {randomize_radius_position} from 'VCL-Web-Framework/scripts/helpers/experiment_helpers.js'
Params:
Name | Type | Attribute | Description |
trial | * | ||
base_radius | * | ||
adjusted_radius | * |
Return:
* |