Commit ffe45b23 authored by Tom Dwelly's avatar Tom Dwelly
Browse files

another small tweak to better determine the mean flux

parent 5529d6d4
...@@ -312,7 +312,9 @@ function readSpecFileASCII() ...@@ -312,7 +312,9 @@ function readSpecFileASCII()
skyArray[j] = Number(data[3]); skyArray[j] = Number(data[3]);
modelArray[j] = Number(data[4]); modelArray[j] = Number(data[4]);
//calculate a clipped version of the mean of the flux //calculate a clipped version of the mean of the flux
if ( Math.abs(fluxerrArray[j] - modelArray[j]) < 1.0 * Math.abs(modelArray[j] )) if ( lambdaArray[j] >= 3800. && lambdaArray[j] <= 10000. )
{
if ( Math.abs(fluxerrArray[j] - modelArray[j]) < 1.0 * Math.abs(modelArray[j]))
{ // the numeric value is the number of multiples of model flux to accept { // the numeric value is the number of multiples of model flux to accept
if ( fluxArray[j] < y0 ) y0 = fluxArray[j]; if ( fluxArray[j] < y0 ) y0 = fluxArray[j];
if ( fluxArray[j] > y1 ) y1 = fluxArray[j]; if ( fluxArray[j] > y1 ) y1 = fluxArray[j];
...@@ -322,6 +324,7 @@ function readSpecFileASCII() ...@@ -322,6 +324,7 @@ function readSpecFileASCII()
} }
} }
} }
}
j ++; j ++;
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment