TextIntoWellioJSON:function (files_array){
  //   //// For each well log file, turn into text, then convert text into wellio style JSON using wellio.js
  //   let logs_in_json = []
  //   for (let i = 0; i < files_array.length; i++) {
  //     logs_in_json.push(module.exports.fileToJSON(files_array[i]))
  //   }
  //   return logs_in_json
  // },


  /** 
   * fromJSONofWEllGetThingsForPlotting is a function that takes in wellio style JSON of all LAS file well log information, 
   * and returns an object that contains 3 things in an object format that are used in function ___ for plotting.
   * the data array of objects that D3.js likes for data used in plotting.
   * @param {object} jsonWell a full wellio style JSON
   * @param {string} depth_curve_name String for the depth curve name
   * @returns {array} returns an object of 3 things that will eventually be used in plotting. {"well_log_curves_reformatted_for_d3":well_log_curves_reformatted_for_d3,"curve_names":curve_names,"uwi":uwi}
  */
  fromJSONofWEllGetThingsForPlotting: function(jsonWell,depth_curve_name){
    curve_names = Object.keys(jsonWell["CURVES"])
    uwi = jsonWell["WELL INFORMATION BLOCK"]["UWI"]["DATA"]
    depth_curve_name = depth_curve_name
    well_log_curves_reformatted_for_d3 = module.exports.convertWellJSONToObj(jsonWell,curve_names,uwi,depth_curve_name)
    return {"well_log_curves_reformatted_for_d3":well_log_curves_reformatted_for_d3,"curve_names":curve_names,"uwi":uwi}
  },



  

  ///////////////////////////////
  //// Functions for reformatting data other than wellio.js style JSON
  ///////////////////////////////


 /** 
   * createDepthArray is a function that takes in a min float, max float, and step float value.  
   * and returns an array or depth values from the min to the max value going by the step value each step. 
   * This function is used to create a depth array for plotting when only the max, min, and depth is given explicitly in the input data. This might be done to avoid sending the depth curve from the backend to the front-end. 
   * @param {float} min a float or integer that represents the top depth of an eventual array of depth values that this function creates.
   * @param {float} max a float or integer that represents the bottom depth of an array of depth values this function creates.
   * @param {float} step a float or integer that represents the interval the depth curve increases as you go from the top to the bottom of the depth curve this function creates. 
   * @returns {array} returns an array of depth values from the min to the max by the step. AN EXAMPLE = [10,10.5,11,11.5,12]
  */
 createDepthArray: function (min,max,step){
  //// Returns an array of depth values from min to max, including both, with each being different by step value
  //// ran like: depthArray = createDepthArray(data2[0]["min_depth"],data2[0]["max_depth"],data2[0]["step"])
  let depth = []
  min = parseFloat(min)
  max = parseFloat(max)
  step = parseFloat(step)
  let number_of_points = ((max-min)/step) +1
  let temp_depth = min
  for (let i = 0; i < number_of_points; i++) {
    temp_depth = (min+(i*step)).toFixed(7)
    depth.push(parseFloat(temp_depth))
  }
  return depth},

/**
 * curveBoxTemplateExamples gives an example of the template giving to the plotting functions and definitions of the fields.
 * A string of either "help" "example" or "definitions" is given as function argument and either a string or Object is returned depending on string provided as input parameter. 
 * This is used to help construct the JSON object that is given to the curveBox plotting function.
 * Someone might run this function with "example" as the parameter, give back the JSON template, replace a few pieces with their own data or format choices and then pass it as the argument into the curveBox function.
 * @param {string} string_of_either__help_example_definitions_mandatories A string of either "help" "example" or "definitions" 
 */
curveBoxTemplateExamples: function (string_of_either__help_example_definitions_mandatories){
  let request_string = string_of_either__help_example_definitions_mandatories
  if(request_string=="help"){
    return "The curveBoxTemplateExamples function returns example templates based on an input argument. Possible argument values are 'example' 'defintions' or'mandatories'" 
  }
  if(request_string=="example"){
    return [{
  "curve_box":{
    "show_well_name":"yes", /// not built yet
    "show_depth_type":"no", /// not built yet
    "show_curve_units":"yes", /// not built yet
    "curve_box_depth_min":-999, /// not built yet
    "curve_box_depth_max":-999, /// not built yet
    "take_out_null_or_visualize":"no", /// not built yet
    "show_title":"no", 
    "width": 260, 
    "height": 500, 
    "height_multiplier_components":2,
    "margin": {"top": 10, "right": 10, "bottom": 30, "left": 60}, 
    "title": {"text": "", "title_font_size": "10px"}, /// not built yet
    "div_id": "well_holder_3", /// Should be skip-able // default=random str? What happens if div doesn't exist?
    "order_of_component":["curves","rectanges","lines"], /// not built yet
    "lines_connected_across_curveboxes":"no", /// not built yet
    "header_sep_svg_or_not":"yes",
    "svg_header_height":"4em",
    "gridlines":"yes",
    "gridlines_color":'#D3D3D3',
    "gridlines_stroke_width":0.20,
    "grouped_or_independent_x_scales":"independent"
},
 "components":[{
   "curves":[
    { "data_type":"curve", 
      "curve_names":["RHOB"],
      "curve_colors":["black"],
      "curve_stroke_dasharray":["solid"],
     "stroke_linecap":["butt"],
     "stroke_width":[1],
      "fill":[
                {"curve_name":"RHOB","fill":"yes","fill_direction":"left","cutoffs":[0.21,2.23,2.24],"fill_colors":["gray","beige","white"],"curve2":""}
              ],
       "curve_units":["g/cm3"],
       "depth_limits":[{"min":"autocalculate","max":"autocalculate"}],
       "curve_limits":[{"curve_name":"","min":-10000000,"max":3}],
        "data":[{"depth":1598.3,"RHOB":2.2322},{"depth":1598.4,"RHOB":2.0513},{"depth":1598.5,"RHOB":2.2548},{"depth":1598.6,"RHOB":2.9445},{"depth":1598.7,"RHOB":2.2223},{"depth":1598.8,"RHOB":2.447},{"depth":1598.9,"RHOB":2.598},{"depth":1599,"RHOB":2.8088},{"depth":1599.1,"RHOB":2.2248},{"depth":1599.2,"RHOB":2.2399},{"depth":1599.3,"RHOB":2.251},{"depth":1599.4,"RHOB":2.255},{"depth":1599.5,"RHOB":2.2526},{"depth":1599.6,"RHOB":2.2322},{"depth":1599.7,"RHOB":2.2513},{"depth":1599.8,"RHOB":2.2548},{"depth":1599.9,"RHOB":2.2445},{"depth":1600,"RHOB":