diff --git a/.github/workflows/production_ci.yaml b/.github/workflows/production_ci.yaml index a7866916e..609d28bb4 100644 --- a/.github/workflows/production_ci.yaml +++ b/.github/workflows/production_ci.yaml @@ -281,7 +281,7 @@ jobs: poetry run python main.py deploy add-package correction-step --chart=correction-step --values=correction_step-helm-values --chart-folder=correction_step poetry run python main.py deploy add-package early-classifier-step --chart=early-classifier --values=early_classification_step-helm-values --chart-folder=early_classification_step # feature step from main - poetry run python main.py deploy add-package feature-step --chart=feature-step --values=feature_step-helm-values --chart-folder=feature_step + # poetry run python main.py deploy add-package feature-step --chart=feature-step --values=feature_step-helm-values --chart-folder=feature_step # feature step freezed 23.x version poetry run python main.py deploy add-package feature-step-23.x --chart=feature-step --values=feature_step-helm-values:13 --chart-folder=feature_step poetry run python main.py deploy add-package lc-classifier-step --chart=lc-classifier-step --values=lc_classification_step_ztf-helm-values --chart-folder=lc_classification_step diff --git a/prv_candidates_step/prv_candidates_step/core/strategy/ztf.py b/prv_candidates_step/prv_candidates_step/core/strategy/ztf.py index ee0d9f1db..b397c0d4e 100644 --- a/prv_candidates_step/prv_candidates_step/core/strategy/ztf.py +++ b/prv_candidates_step/prv_candidates_step/core/strategy/ztf.py @@ -179,6 +179,21 @@ def extract_detections_and_non_detections(alert: dict) -> dict: pickle.loads(forced_photometries) if forced_photometries else [] ) + # filter forced photometry by value + # potencial bugs from ztf + def filter_fp(fp): + forcediffimflux_bad_values = [None, 0] + # if the value is not close to -99999 return true + good_fp = fp[ + "forcediffimflux" + ] not in forcediffimflux_bad_values and not np.isclose( + fp["forcediffimflux"], -99999 + ) + return good_fp + + # use the filter funcion to remove bad fp + forced_photometries = list(filter(filter_fp, forced_photometries)) + acopy = copy.deepcopy(alert) detections = [acopy] non_detections = []