From 248c2bc02cf33d20f6d8efc151450370d27271b8 Mon Sep 17 00:00:00 2001 From: ric-evans Date: Mon, 28 Oct 2024 16:05:50 -0500 Subject: [PATCH] nest `recos/` under `client/` - 3 (imports) --- skymap_scanner/client/reco_icetray.py | 3 ++- skymap_scanner/client/recos/crash_dummy.py | 2 +- skymap_scanner/client/recos/dummy.py | 5 ++--- .../client/recos/millipede_original.py | 17 ++++++++--------- skymap_scanner/client/recos/millipede_wilks.py | 8 ++++---- skymap_scanner/client/recos/splinempe.py | 4 ++-- 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/skymap_scanner/client/reco_icetray.py b/skymap_scanner/client/reco_icetray.py index 9e8ad3ea3..bd65e86db 100644 --- a/skymap_scanner/client/reco_icetray.py +++ b/skymap_scanner/client/reco_icetray.py @@ -22,7 +22,8 @@ from icecube.icetray import I3Tray # type: ignore[import-not-found] from wipac_dev_tools import argparse_tools, logging_tools -from .. import config as cfg, recos +from .. import config as cfg +from . import recos from ..utils import messages from ..utils.data_handling import get_gcd_datastager from ..utils.load_scan_state import get_baseline_gcd_frames diff --git a/skymap_scanner/client/recos/crash_dummy.py b/skymap_scanner/client/recos/crash_dummy.py index 3060c421c..58af5f27e 100644 --- a/skymap_scanner/client/recos/crash_dummy.py +++ b/skymap_scanner/client/recos/crash_dummy.py @@ -7,7 +7,7 @@ from icecube import icetray # type: ignore[import] # noqa: F401 from . import RecoInterface, dummy -from ..config import ENV +from ...config import ENV class CrashDummy(dummy.Dummy): diff --git a/skymap_scanner/client/recos/dummy.py b/skymap_scanner/client/recos/dummy.py index a753ffc09..8cc8ed4be 100644 --- a/skymap_scanner/client/recos/dummy.py +++ b/skymap_scanner/client/recos/dummy.py @@ -1,6 +1,5 @@ """IceTray segment for a dummy reco.""" - import datetime import random import time @@ -21,8 +20,8 @@ from icecube.icetray import I3Frame # type: ignore[import] -from .. import config as cfg -from ..utils.pixel_classes import RecoPixelVariation +from ... import config as cfg +from ...utils.pixel_classes import RecoPixelVariation from . import RecoInterface, VertexGenerator diff --git a/skymap_scanner/client/recos/millipede_original.py b/skymap_scanner/client/recos/millipede_original.py index dd22abadc..57b718eae 100644 --- a/skymap_scanner/client/recos/millipede_original.py +++ b/skymap_scanner/client/recos/millipede_original.py @@ -27,15 +27,14 @@ ) from icecube.icetray import I3Frame -from .. import config as cfg -from ..utils.data_handling import DataStager -from ..utils.pixel_classes import RecoPixelVariation +from ... import config as cfg +from ...utils.pixel_classes import RecoPixelVariation from . import RecoInterface, VertexGenerator from .common.pulse_proc import late_pulse_cleaning class MillipedeOriginal(RecoInterface): """Reco logic for millipede.""" - + @staticmethod def get_vertex_variations() -> List[dataclasses.I3Position]: @@ -45,9 +44,9 @@ def get_vertex_variations() -> List[dataclasses.I3Position]: if cfg.ENV.SKYSCAN_MINI_TEST: return VertexGenerator.mini_test(variation_distance=variation_distance) - else: + else: return VertexGenerator.octahedron(radius=variation_distance) - + pulsesName = cfg.INPUT_PULSES_NAME pulsesName_cleaned = pulsesName+'LatePulseCleaned' @@ -79,8 +78,8 @@ def extract_seed(frame): tray.Add(extract_seed, "ExtractSeed", If = lambda frame: frame.Has("HESE_VHESelfVeto")) - - # Generates the vertex seed for the initial scan. + + # Generates the vertex seed for the initial scan. # Only run if HESE_VHESelfVeto is not present in the frame. # VertexThreshold is 250 in the original HESE analysis (Tianlu) # If HESE_VHESelfVeto is already in the frame, is likely using implicitly a VertexThreshold of 250 already. To be determined when this is not the case. @@ -101,7 +100,7 @@ def setup_reco(self): datastager = self.get_datastager() datastager.stage_files(self.SPLINE_REQUIREMENTS) - + abs_spline = datastager.get_filepath(self.MIE_ABS_SPLINE) prob_spline = datastager.get_filepath(self.MIE_PROB_SPLINE) diff --git a/skymap_scanner/client/recos/millipede_wilks.py b/skymap_scanner/client/recos/millipede_wilks.py index 55c998f3f..06a4601c7 100644 --- a/skymap_scanner/client/recos/millipede_wilks.py +++ b/skymap_scanner/client/recos/millipede_wilks.py @@ -25,8 +25,8 @@ ) from icecube.icetray import I3Frame -from .. import config as cfg -from ..utils.pixel_classes import RecoPixelVariation +from ... import config as cfg +from ...utils.pixel_classes import RecoPixelVariation from . import RecoInterface, VertexGenerator from .common.pulse_proc import mask_deepcore, pulse_cleaning @@ -84,7 +84,7 @@ def setup_reco(self): @classmethod @icetray.traysegment def prepare_frames(cls, tray, name, logger): - # Generates the vertex seed for the initial scan. + # Generates the vertex seed for the initial scan. # Only run if HESE_VHESelfVeto is not present in the frame. # VertexThreshold is 250 in the original HESE analysis (Tianlu) # If HESE_VHESelfVeto is already in the frame, is likely using implicitly a VertexThreshold of 250 already. To be determined when this is not the case. @@ -112,7 +112,7 @@ def extract_seed(frame): OutputVertexTime=cfg.INPUT_TIME_NAME, OutputVertexPos=cfg.INPUT_POS_NAME, If=lambda frame: not frame.Has("HESE_VHESelfVeto")) - + tray.Add(mask_deepcore, origpulses=cfg.INPUT_PULSES_NAME, maskedpulses=cls.pulsesName) diff --git a/skymap_scanner/client/recos/splinempe.py b/skymap_scanner/client/recos/splinempe.py index fc7472fb4..7e9bf0137 100644 --- a/skymap_scanner/client/recos/splinempe.py +++ b/skymap_scanner/client/recos/splinempe.py @@ -18,8 +18,8 @@ from . import RecoInterface, VertexGenerator from .common.pulse_proc import mask_deepcore -from .. import config as cfg -from ..utils.pixel_classes import RecoPixelVariation +from ... import config as cfg +from ...utils.pixel_classes import RecoPixelVariation class SplineMPE(RecoInterface):