Skip to content

Commit

Permalink
Change to using fast augmenter, add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisherlevine committed Sep 12, 2023
1 parent 4c17287 commit 830bfef
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions python/lsst/summit/utils/blockUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import re
import time
import logging
import pandas as pd
from dataclasses import dataclass
from astropy.time import Time
Expand Down Expand Up @@ -176,6 +177,10 @@ class BlockParser:
"""

def __init__(self, dayObs, client=None):
# TODO change mode of operation to not take dayObs on init, but instead
# to work like the TMAEventMaker where the EFD data is cached as long
# as the day isn't current.
self.log = logging.getLogger("lsst.summit.utils.blockUtils.BlockParser")
self.dayObs = dayObs

self.client = client
Expand All @@ -184,11 +189,11 @@ def __init__(self, dayObs, client=None):

t0 = time.time()
self.getDataForDayObs()
print(f"Getting data took {(time.time()-t0):.2f} seconds")
self.log.debug(f"Getting data took {(time.time()-t0):.2f} seconds")
t0 = time.time()
# self.augmentData()
self.augmentDataSlow()
print(f"Parsing data took {(time.time()-t0):.5f} seconds")
self.augmentData()
# self.augmentDataSlow()
self.log.debug(f"Parsing data took {(time.time()-t0):.5f} seconds")

def getDataForDayObs(self):
"""Retrieve the data for the specified dayObs from the EFD.
Expand Down

0 comments on commit 830bfef

Please sign in to comment.