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
ift
NIFTy
Commits
f2b2329a
Commit
f2b2329a
authored
Dec 05, 2018
by
Reimar H Leike
Browse files
corrected docu, made some cosmetic changes
parent
d5be0fbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/los_response.py
View file @
f2b2329a
...
...
@@ -33,7 +33,7 @@ from ..operators.linear_operator import LinearOperator
def
_gaussian_error_function
(
x
):
return
0.5
*
erfc
(
x
*
np
.
sqrt
(
2.
))
return
0.5
*
erfc
(
x
/
np
.
sqrt
(
2.
))
def
_comp_traverse
(
start
,
end
,
shp
,
dist
,
lo
,
mid
,
hi
,
erf
):
ndim
=
start
.
shape
[
0
]
...
...
@@ -101,10 +101,7 @@ def apply_erf(wgt, dist, lo, mid, hi, erf):
wgt
[
mask
]
=
0.
mask
=
(
dist
>
lo
)
&
(
dist
<=
hi
)
sig
=
(
1
/
lo
-
1
/
mid
)
/
3
wgt
[
mask
]
*=
erf
((
-
1
/
dist
[
mask
]
+
1
/
mid
)
/
sig
/
2
)
#wgt[mask] *= erf((dist[mask]-mid)/(hi-mid))
#mask = (dist <= mid) & (dist > lo)
#wgt[mask] *= erf((dist[mask]-mid)/(mid-lo))
wgt
[
mask
]
*=
erf
((
-
1
/
dist
[
mask
]
+
1
/
mid
)
/
sig
)
return
wgt
...
...
@@ -125,10 +122,11 @@ class LOSResponse(LinearOperator):
has dimensions. The second dimensions must be identical for both arrays
and indicated the total number of lines of sight.
sigmas_low, sigmas_up : numpy.ndarray(float) (optional)
sigmas_low is 1/(parallax+3*parallax_error), where the parallax
sigmas_low is
1/parallax-
1/(parallax+3*parallax_error), where the parallax
error is assumed to be Gaussian distributed.
sigmas_up is the distance at which the weight is truncated.
Should be at least 1/(parllax-3*parallax_error), but could be higher.
Should be at least 1/(parallax-3*parallax_error)-1/parallax,
but could be higher.
If unsure, leave blank.
Notes
...
...
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