Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tom Dwelly
speccy
Commits
ffe45b23
Commit
ffe45b23
authored
Mar 16, 2016
by
Tom Dwelly
Browse files
another small tweak to better determine the mean flux
parent
5529d6d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
speccy.js
View file @
ffe45b23
...
...
@@ -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
]
>
-
1
e10
)
{
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
]
>
-
1
e10
)
{
fluxMean
=
fluxMean
+
Number
(
fluxArray
[
j
]);
nfluxMean
++
;
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment