Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
f2b2329a
Commit
f2b2329a
authored
6 years ago
by
Reimar H Leike
Browse files
Options
Downloads
Patches
Plain Diff
corrected docu, made some cosmetic changes
parent
d5be0fbf
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty5/library/los_response.py
+5
-7
5 additions, 7 deletions
nifty5/library/los_response.py
with
5 additions
and
7 deletions
nifty5/library/los_response.py
+
5
−
7
View file @
f2b2329a
...
@@ -33,7 +33,7 @@ from ..operators.linear_operator import LinearOperator
...
@@ -33,7 +33,7 @@ from ..operators.linear_operator import LinearOperator
def
_gaussian_error_function
(
x
):
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
):
def
_comp_traverse
(
start
,
end
,
shp
,
dist
,
lo
,
mid
,
hi
,
erf
):
ndim
=
start
.
shape
[
0
]
ndim
=
start
.
shape
[
0
]
...
@@ -101,10 +101,7 @@ def apply_erf(wgt, dist, lo, mid, hi, erf):
...
@@ -101,10 +101,7 @@ def apply_erf(wgt, dist, lo, mid, hi, erf):
wgt
[
mask
]
=
0.
wgt
[
mask
]
=
0.
mask
=
(
dist
>
lo
)
&
(
dist
<=
hi
)
mask
=
(
dist
>
lo
)
&
(
dist
<=
hi
)
sig
=
(
1
/
lo
-
1
/
mid
)
/
3
sig
=
(
1
/
lo
-
1
/
mid
)
/
3
wgt
[
mask
]
*=
erf
((
-
1
/
dist
[
mask
]
+
1
/
mid
)
/
sig
/
2
)
wgt
[
mask
]
*=
erf
((
-
1
/
dist
[
mask
]
+
1
/
mid
)
/
sig
)
#wgt[mask] *= erf((dist[mask]-mid)/(hi-mid))
#mask = (dist <= mid) & (dist > lo)
#wgt[mask] *= erf((dist[mask]-mid)/(mid-lo))
return
wgt
return
wgt
...
@@ -125,10 +122,11 @@ class LOSResponse(LinearOperator):
...
@@ -125,10 +122,11 @@ class LOSResponse(LinearOperator):
has dimensions. The second dimensions must be identical for both arrays
has dimensions. The second dimensions must be identical for both arrays
and indicated the total number of lines of sight.
and indicated the total number of lines of sight.
sigmas_low, sigmas_up : numpy.ndarray(float) (optional)
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.
error is assumed to be Gaussian distributed.
sigmas_up is the distance at which the weight is truncated.
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.
If unsure, leave blank.
Notes
Notes
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment