Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
skamann
pampelmuse
Commits
3d511e11
Commit
3d511e11
authored
Dec 07, 2021
by
skamann
Browse files
Added option to set magnitude of faintest PSF star relative to brightest star in field.
parent
b3905765
Changes
1
Hide whitespace changes
Inline
Side-by-side
pampelmuse/core/source_selector.py
View file @
3d511e11
...
...
@@ -1126,7 +1126,10 @@ class SourceSelector(object):
A list of source IDs that should be excluded from the PSF star
search, e.g. because they are saturated in the IFS data.
max_mag : float, optional
The maximum allowed magnitude of a PSF star.
The maximum allowed magnitude of a PSF star. If a negative value
is provided, the maximum allowed magnitude is obtained by sub-
tracting the value from the magnitude of the brightest star in
the field of view.
psf_radius : float, optional
The radius out to which the PSF profiles are calculated. The
isolation criterion will be checked in a circle with this radius.
...
...
@@ -1162,8 +1165,10 @@ class SourceSelector(object):
# measure distances of sources to edge of field of view
distance_to_edge
=
pd
.
Series
(
self
.
ifs_data
.
distance_to_edge
(
xy
.
values
),
index
=
xy
.
index
)
# find magnitude of brightest star in field of view
# find magnitude of brightest star in field of view
, adjust maximum allowed magnitude if requested
min_mag
=
self
.
sources
.
mag
[(
self
.
sources
.
status
==
2
)
&
(
distance_to_edge
>
0
)].
min
()
if
max_mag
is
not
None
and
max_mag
<
0
:
mag_mag
=
min_mag
-
max_mag
logger
.
info
(
'IDs of stars that fulfill criteria for PSF stars:'
)
logger
.
info
(
' ID| mag| d_edge [pixel]| shoulder_drop '
)
...
...
@@ -1194,7 +1199,7 @@ class SourceSelector(object):
# check if PSF radius should be adapted based on predicted flux
if
psf_radius_scaling
is
not
None
:
r_i
=
psf_radius
*
(
2
**
(
-
0.4
*
(
mag
-
min_mag
)
/
np
.
log10
(
1.
/
psf_radius_scaling
)))
r_i
=
psf_radius
*
(
2
**
(
0.4
*
(
mag
-
min_mag
)
/
np
.
log10
(
psf_radius_scaling
)))
else
:
r_i
=
psf_radius
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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