Midterm project for Parallel Computing
APIs:
parse_input module: inputs: args: A list of arguments containg both options and values. Optional arguments are -s, -a, and -M. Required arguments are -N, -y, and -i. -N is the number of columns found in the input file. -y is the column number of the dependent variable. -i is the input file containing the data. -s outputs the ratio between average of y variables divided by the average of each of the x variables. -a outputs the average and the mean square of each column. -M outputs the min and max of the y column. At least one optional argument must be called. Options can be called in any order and in compact form, but cannot contain two required arguments in a single compact option.
Outputs: return_value: a list of six elements corrsponding to the six options in the form [-N,-y, -M, -a, -s, -i]. A value of 0 indicates the option was not called. A value of 1 for the optional arguments indicate that the option was called. The value of the element corresponding to the mandatory options corresponds to the input value given by the user.
parse_file module: inputs: arg: A list of six elements corresponding to the six options [-N,-y, -M, -a, -s, -i]. This list is generated by the parse_input module.
output: return_data: A numpy ndarray with dimensions corresponding to (number of lines of -i, -N). This array contains only numbers, with all other values from -i scrubbed.
M module: inputs: data: a numpy ndarray A numpy ndarray with dimensions corresponding to (number of lines of -i, -N). y: an int corresponding to the value of the -y argument
output: The output as defined as the minimum and maximum values of the y column. This is returned as two numbers.
a module: inputs: data: a numpy ndarray A numpy ndarray with dimensions corresponding to (number of lines of -i, -N). y: an int corresponding to the value of the -y argument
outputs: averages: an np array of size -N with each value equal to the mean of the corresponding column of the data mean_square: an np array of shape (,-N) with each value equal to the mean square of the corresponding column of the data
s module: inputs: inputs: data: a numpy ndarray A numpy ndarray with dimensions corresponding to (number of lines of -i, -N). y: an int corresponding to the value of the -y argument
outputs: ratios: an np array of shape (, -N -1) with each value equal to the ratio of the mean of the y column divided by the corresponding column of the x values.