stdpipe 0.4.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stdpipe-0.4.0/stdpipe.egg-info → stdpipe-0.4.1}/PKG-INFO +1 -1
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/__init__.py +1 -1
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/photometry.py +1 -1
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/photometry_model.py +21 -7
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/pipeline.py +6 -6
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/plots.py +1 -1
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/realbogus_features.py +3 -1
- {stdpipe-0.4.0 → stdpipe-0.4.1/stdpipe.egg-info}/PKG-INFO +1 -1
- {stdpipe-0.4.0 → stdpipe-0.4.1}/LICENSE.md +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/MANIFEST.in +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/README.md +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/pyproject.toml +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/setup.cfg +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/setup.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/artefacts.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/astrometry.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/astrometry_quad.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/astrometry_wcs.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/catalogs.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/cutouts.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/data/legacysurvey_bricks.fits.gz +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/data/ps1skycells.txt +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/db.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/fringe_removal.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/lcs.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/photometry_background.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/photometry_iraf.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/photometry_measure.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/photometry_psf.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/photometry_quality.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/psf.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/realbogus.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/reproject.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/resolve.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/sfft.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/simulation.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/smoothing.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/subtraction.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/templates.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe/utils.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe.egg-info/SOURCES.txt +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe.egg-info/dependency_links.txt +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe.egg-info/not-zip-safe +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe.egg-info/requires.txt +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/stdpipe.egg-info/top_level.txt +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_artefacts.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_astrometry.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_astrometry_quad.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_astrometry_wcs.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_background_estimation.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_background_fringes.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_background_gradients.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_background_nongrid.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_background_polynomial.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_catalogs.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_fringe_removal.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_fringe_removal_fourier.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_lcs.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_moffat_photometry_limits.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_photometry.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_photometry_biases.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_photometry_iraf.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_photometry_measure.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_photometry_model.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_photometry_psf.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_photometry_quality.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_pipeline.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_plots.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_psf.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_realbogus.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_realbogus_features.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_reproject.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_resolve.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_sep_psf_bias.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_sfft.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_simulation.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_smoothing.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_templates.py +0 -0
- {stdpipe-0.4.0 → stdpipe-0.4.1}/tests/test_utils.py +0 -0
|
@@ -1082,7 +1082,7 @@ def get_objects_sep(
|
|
|
1082
1082
|
# pixel outside each source's footprint, so the winpos aperture always
|
|
1083
1083
|
# overlaps masked pixels by construction. Keep TRUNC / ALLMASKED /
|
|
1084
1084
|
# NONPOSITIVE — those still convey real centroiding-quality info.
|
|
1085
|
-
flag_win &= ~
|
|
1085
|
+
flag_win &= ~int(sep.APER_HASMASKED)
|
|
1086
1086
|
else:
|
|
1087
1087
|
# Use initial positions from extraction
|
|
1088
1088
|
xwin, ywin = obj0['x'], obj0['y']
|
|
@@ -18,6 +18,12 @@ from statsmodels.tools.sm_exceptions import ConvergenceWarning
|
|
|
18
18
|
|
|
19
19
|
from . import astrometry
|
|
20
20
|
|
|
21
|
+
# Smallest fit scale still carrying usable scatter information. The fits are
|
|
22
|
+
# performed on residuals normalized by the noise model, so the scale is
|
|
23
|
+
# dimensionless and ~1 when the noise model describes the data; anything this
|
|
24
|
+
# small means the fit is perfect down to floating-point roundoff.
|
|
25
|
+
_MIN_FIT_SCALE = 1e-8
|
|
26
|
+
|
|
21
27
|
|
|
22
28
|
def make_series(mul=1.0, x=1.0, y=1.0, order=1, sum=False, zero=True):
|
|
23
29
|
x = np.atleast_1d(x)
|
|
@@ -592,7 +598,9 @@ def match(
|
|
|
592
598
|
& np.isfinite(cmag)
|
|
593
599
|
& np.isfinite(cmag_err)
|
|
594
600
|
& (zero_err > 0) # Zero errors would give infinite weights in the fit
|
|
595
|
-
|
|
601
|
+
# Cast to signed int: NumPy 2 (NEP 50) raises OverflowError when a
|
|
602
|
+
# negative Python int (~accept_flags) meets an unsigned flags column
|
|
603
|
+
& ((np.asarray(oflags, int) & ~int(accept_flags)) == 0)
|
|
596
604
|
) # initial mask
|
|
597
605
|
if cat_color is not None and (fit_color_term or force_color_term is not None):
|
|
598
606
|
idx0 &= np.isfinite(ccolor)
|
|
@@ -617,10 +625,8 @@ def match(
|
|
|
617
625
|
else:
|
|
618
626
|
C = sm.WLS(zero[idx], X[idx], weights=1 / total_err[idx] ** 2).fit()
|
|
619
627
|
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
if not np.isfinite(C.scale) or (C.scale == 0.0 and (robust or scale_noise)):
|
|
623
|
-
log('Fit failed - fit scale collapsed to zero, model is degenerate')
|
|
628
|
+
if not np.isfinite(C.scale):
|
|
629
|
+
log('Fit failed - fit scale is not finite, model is degenerate')
|
|
624
630
|
return None
|
|
625
631
|
|
|
626
632
|
# RLM scale is a standard deviation while WLS one is a variance
|
|
@@ -650,8 +656,16 @@ def match(
|
|
|
650
656
|
|
|
651
657
|
if scale_noise:
|
|
652
658
|
# The fit scale measures residual scatter relative to the noise
|
|
653
|
-
# model used in this fit, so the applied scaling is cumulative
|
|
654
|
-
|
|
659
|
+
# model used in this fit, so the applied scaling is cumulative.
|
|
660
|
+
# Both fit branches normalize the residuals by the noise model, so
|
|
661
|
+
# fit_scale is dimensionless and ~1 for a well-described fit. A
|
|
662
|
+
# vanishing value means the model reproduces the data down to
|
|
663
|
+
# roundoff, leaving no scatter information to rescale with -- keep
|
|
664
|
+
# the noise model as is instead of collapsing it to zero.
|
|
665
|
+
if fit_scale > _MIN_FIT_SCALE:
|
|
666
|
+
scale_err = scale_err * fit_scale
|
|
667
|
+
else:
|
|
668
|
+
log('Fit scale is negligible - keeping the noise model unscaled')
|
|
655
669
|
|
|
656
670
|
intrinsic_rms = (
|
|
657
671
|
get_intrinsic_scatter((zero - zero_model)[idx], (zero_err * scale_err)[idx], max=max_intrinsic_rms)
|
|
@@ -601,10 +601,10 @@ def filter_transient_candidates(
|
|
|
601
601
|
xidx = vizier_checker_fn(xobj, xcat, catname)
|
|
602
602
|
xcat = xcat[xidx]
|
|
603
603
|
|
|
604
|
-
cand_idx &= ~np.
|
|
604
|
+
cand_idx &= ~np.isin(obj[col_id], xcat[col_id])
|
|
605
605
|
|
|
606
606
|
if remove == False:
|
|
607
|
-
obj_in['candidate_vizier_' + catname][np.
|
|
607
|
+
obj_in['candidate_vizier_' + catname][np.isin(obj[col_id], xcat[col_id])] = True
|
|
608
608
|
|
|
609
609
|
log(
|
|
610
610
|
np.sum(cand_idx),
|
|
@@ -626,10 +626,10 @@ def filter_transient_candidates(
|
|
|
626
626
|
obj[cand_idx], time=time, col_ra=obj_col_ra, col_dec=obj_col_dec, col_id=col_id
|
|
627
627
|
)
|
|
628
628
|
if xcat is not None and len(xcat):
|
|
629
|
-
cand_idx &= ~np.
|
|
629
|
+
cand_idx &= ~np.isin(obj[col_id], xcat[col_id])
|
|
630
630
|
|
|
631
631
|
if remove == False:
|
|
632
|
-
obj_in['candidate_skybot'][np.
|
|
632
|
+
obj_in['candidate_skybot'][np.isin(obj[col_id], xcat[col_id])] = True
|
|
633
633
|
|
|
634
634
|
log(np.sum(cand_idx), 'remains after matching with SkyBot')
|
|
635
635
|
|
|
@@ -647,10 +647,10 @@ def filter_transient_candidates(
|
|
|
647
647
|
col_dec=obj_col_dec,
|
|
648
648
|
)
|
|
649
649
|
if xcat is not None and len(xcat):
|
|
650
|
-
cand_idx &= ~np.
|
|
650
|
+
cand_idx &= ~np.isin(obj[col_id], xcat[col_id])
|
|
651
651
|
|
|
652
652
|
if remove == False:
|
|
653
|
-
obj_in['candidate_ned'][np.
|
|
653
|
+
obj_in['candidate_ned'][np.isin(obj[col_id], xcat[col_id])] = True
|
|
654
654
|
|
|
655
655
|
log(np.sum(cand_idx), 'remains after matching with NED')
|
|
656
656
|
|
|
@@ -1313,7 +1313,7 @@ def plot_mag_histogram(
|
|
|
1313
1313
|
mag = obj[obj_col_mag]
|
|
1314
1314
|
mag_sn = 1 / obj[obj_col_mag_err]
|
|
1315
1315
|
|
|
1316
|
-
idx = (obj['flags'] & ~accept_flags) == 0
|
|
1316
|
+
idx = (np.asarray(obj['flags'], int) & ~int(accept_flags)) == 0
|
|
1317
1317
|
|
|
1318
1318
|
vmin = np.nanmin(mag)
|
|
1319
1319
|
vmax = np.nanmax(mag)
|
|
@@ -1402,7 +1402,9 @@ def classify(
|
|
|
1402
1402
|
if "flags" not in obj.colnames:
|
|
1403
1403
|
obj.add_column(Column(np.zeros(len(obj), dtype=np.int32), name="flags"))
|
|
1404
1404
|
# Reset existing bogus bit so output reflects this classification pass.
|
|
1405
|
-
|
|
1405
|
+
# Cast to signed int: NumPy 2 (NEP 50) raises OverflowError when a
|
|
1406
|
+
# negative Python int (~FLAG_BOGUS) meets an unsigned flags column
|
|
1407
|
+
obj["flags"] = np.asarray(obj["flags"], int) & ~int(FLAG_BOGUS)
|
|
1406
1408
|
obj["flags"][predictions < 0] |= FLAG_BOGUS
|
|
1407
1409
|
|
|
1408
1410
|
return obj
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|