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

another small tweak to better determine the mean flux

parent 5529d6d4
...@@ -312,13 +312,16 @@ function readSpecFileASCII() ...@@ -312,13 +312,16 @@ 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. )
{ // the numeric value is the number of multiples of model flux to accept {
if ( fluxArray[j] < y0 ) y0 = fluxArray[j]; if ( Math.abs(fluxerrArray[j] - modelArray[j]) < 1.0 * Math.abs(modelArray[j]))
if ( fluxArray[j] > y1 ) y1 = fluxArray[j]; { // the numeric value is the number of multiples of model flux to accept
if ( fluxArray[j] > -1e10) { if ( fluxArray[j] < y0 ) y0 = fluxArray[j];
fluxMean = fluxMean + Number(fluxArray[j]); if ( fluxArray[j] > y1 ) y1 = fluxArray[j];
nfluxMean++; if ( fluxArray[j] > -1e10) {
fluxMean = fluxMean + Number(fluxArray[j]);
nfluxMean++;
}
} }
} }
} }
......
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