lib/fn.js
function (stemG, wsVI, laVI, SLA) {
    if (stemG < 10) {
      stemG=10;
    }
    var VI = Math.pow( (stemG / wsVI.stems_per_stump / wsVI.constant),(1 / wsVI.power) );

    // Add up for all stems
    var la = laVI.constant * Math.pow(VI,laVI.power) * wsVI.stems_per_stump;
    var wf = 1000 * (la / SLA);  // Foilage Weight in g;
    var pfs = wf/stemG;
    return pfs;
  }
function (stemG, wsVI, laVI, SLA) {
    if (stemG < 10) {
      stemG=10;
    }
    var VI = Math.pow( (stemG / wsVI.stems_per_stump / wsVI.constant),(1 / wsVI.power) );

    // Add up for all stems
    var la = laVI.constant * Math.pow(VI,laVI.power) * wsVI.stems_per_stump;
    var wf = 1000 * (la / SLA);  // Foilage Weight in g;
    var pfs = wf/stemG;
    return pfs;
  }
function ( stemG , wsVI , laVI , SLA ) { if ( stemG < 10 ) { stemG = 10 ; } var VI = Math . pow ( ( stemG / wsVI . stems_per_stump / wsVI . constant ) , ( 1 / wsVI . power ) ) ; // Add up for all stems var la = laVI . constant * Math . pow ( VI , laVI . power ) * wsVI . stems_per_stump ; var wf = 1000 * ( la / SLA ) ; // Foilage Weight in g; var pfs = wf / stemG ; return pfs ; }
Calculates the pfs based on stem with in G.  Uses volume Index as guide
Calculates the pfs based on stem with in G . Uses volume Index as guide