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()
skyArray[j] = Number(data[3]);
modelArray[j] = Number(data[4]);
//calculate a clipped version of the mean of the flux
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
if ( fluxArray[j] < y0 ) y0 = fluxArray[j];
if ( fluxArray[j] > y1 ) y1 = fluxArray[j];
if ( fluxArray[j] > -1e10) {
fluxMean = fluxMean + Number(fluxArray[j]);
nfluxMean++;
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
if ( fluxArray[j] < y0 ) y0 = fluxArray[j];
if ( fluxArray[j] > y1 ) y1 = fluxArray[j];
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