예제 #1
0
    )


#-----------------------------#
# Clean out "Bad Doms"
#-----------------------------#

tray.AddModule("I3DOMLaunchCleaning","BadDomCleaning")(
    ("InIceInput", "InIceRawData"),
    ("IceTopInput", "IceTopRawData"),
    ("InIceOutput", "CleanInIceRawData"),
    ("IceTopOutput", "CleanIceTopRawData"),
    ("FirstLaunchCleaning",False),
    ("CleanedKeysList",""),
    ("IcePickServiceKey",""),
    ("CleanedKeys",bad_dom_list_static.IC86_static_bad_dom_list())
    )



userPrint("First round of cleaning added")

#-----------------------------#
# Clean the launches
# TODO: Look at what this does!!
#-----------------------------#
cleanedKeys = [] # empty for IC86
if m_MCOpt.StringConfig == "IC79":
    cleanedKeys = backToIC79()

tray.AddModule("I3DOMLaunchCleaning","LaunchCleaning")(
    status_frame = infile.pop_frame()
status = status_frame.Get('I3DetectorStatus')
badDOMList = list()
badDOMListSLC = list()
if "BadDomsList" in status_frame:
    print("Found a BadDomsList in the frame.")
    print("Using this one instead.")
    badDOMList = status_frame.Get("BadDomsList")
    badDOMListSLC = status_frame.Get("BadDomsListSLC")
    print("len(badDOMList) = ", len(badDOMList))
    print("len(badDOMListSLC) = ", len(badDOMListSLC))
else:
    print(status_frame)
    try:
        from icecube.BadDomList import bad_dom_list_static
        badDOMList = bad_dom_list_static.IC86_static_bad_dom_list()
    except ImportError:
        print("ERROR : BadDomsList wasn't found in the frame")
        print("and either the BadDomList doesn't exist or")
        print("there's no static_bad_dom_list.")
        sys.exit(1)

from icecube.sim_services.sim_utils.gcd_utils import get_omgeo, get_domcal, get_domstatus

omgeo = get_omgeo(dataio.I3File(options.INFILE))
domcal = get_domcal(dataio.I3File(options.INFILE))
domstat = get_domstatus(dataio.I3File(options.INFILE))
goodDOMList = [omkey for omkey,g in omgeo \
               if omkey not in badDOMList and omkey.string > 0]

counter = 0
예제 #3
0
def gcd_extract(gcd_filename):

    gcdfile = dataio.I3File(gcd_filename)

    frame = gcdfile.pop_frame()
    while not frame.Has('I3Geometry'):
        frame = gcdfile.pop_frame()
    geometry = frame.Get('I3Geometry')

    while not frame.Has('I3Calibration'):
        frame = gcdfile.pop_frame()
    calibration = frame.Get('I3Calibration')

    status_frame = gcdfile.pop_frame()
    while not status_frame.Has('I3DetectorStatus'):
        status_frame = gcdfile.pop_frame()
    status = status_frame.Get('I3DetectorStatus')

    dom_geo_map = geometry.omgeo
    dom_cal_map = calibration.dom_cal
    dom_status_map = status.dom_status
    trigger_status_map = status.trigger_status
    #for IceTop
    vem_cal_map = calibration.vem_cal
    station_geo_map = geometry.stationgeo

    bad_dom_list = list()
    if "BadDomsList" in status_frame:
        print("Found a BadDomsList in the frame.  Gonna use it.")
        bad_dom_list = status_frame.Get("BadDomsList")
    else:
        print(status_frame)
        try:
            from icecube.BadDomList import bad_dom_list_static
            bad_dom_list = bad_dom_list_static.IC86_static_bad_dom_list()
        except ImportError:
            print("ERROR : BadDomsList wasn't found in the frame")
            print("and either the BadDomList doesn't exist or")
            print("there's no static_bad_dom_list.")
            sys.exit(1)

    high_qe_dom_list = [icetray.OMKey(36,d) for d in range(44,60) \
               if (d != 45 and d!= 47) ]
    high_qe_dom_list += [ icetray.OMKey( 79, i ) for i in range(30, 45) \
                 if i not in [ 32, 41, 43 ] ]
    high_qe_dom_list += ([icetray.OMKey(80, i) for i in range(30, 44)])
    for s in range(81, 87):
        high_qe_dom_list += [icetray.OMKey(s, d) for d in range(1, 61)]
        high_qe_dom_list += [icetray.OMKey(43, 55)]

    result_dict = dict()
    result_dict['dom_geo_map'] = dom_geo_map
    result_dict['dom_cal_map'] = dom_cal_map
    result_dict['dom_status_map'] = dom_status_map
    result_dict['trigger_status_map'] = trigger_status_map
    result_dict['vem_cal_map'] = vem_cal_map
    result_dict['station_geo_map'] = station_geo_map
    result_dict['bad_dom_list'] = bad_dom_list
    result_dict['high_qe_dom_list'] = high_qe_dom_list

    return result_dict
예제 #4
0
calibration = cal_frame.Get('I3Calibration')

status_frame = infile.pop_frame()
while not status_frame.Has('I3DetectorStatus'):
    status_frame = infile.pop_frame()
status = status_frame.Get('I3DetectorStatus')

badOMs = list()
if "BadDomsList" in status_frame:
    logfile.write("Found a BadDomsList in the frame.  Gonna use it.\n")
    badOMs = status_frame.Get("BadDomsList")
else:
    print(status_frame)
    try:
        from icecube.BadDomList import bad_dom_list_static
        badOMs = bad_dom_list_static.IC86_static_bad_dom_list()
    except ImportError:
        logfile.write("ERROR : BadDomsList wasn't found in the frame\n")
        logfile.write("and either the BadDomList doesn't exist or\n")
        logfile.write("there's no static_bad_dom_list.\n")
        sys.exit(1)

dom_geo = geometry.omgeo
dom_cal = calibration.dom_cal
dom_status = status.dom_status

low_noise_DOMs_l = [ icetray.OMKey(82,54),  \
                     icetray.OMKey(84,54),  \
                     icetray.OMKey(85,55)]

strings_IC86 = [1, 7, 14, 22, 31, 79, 80]
예제 #5
0
파일: FilterBase.py 프로젝트: mrelich/SCAna
tray.AddModule(count, "count")

#-----------------------------#
# ADD UTC FILTER
#-----------------------------#
if m_config.cutUTC:
    tray.AddModule(utctimes, "utctimes")
    userPrint("Cutting on UTC times")

#-----------------------------#
# DOM Tools
# Will be first cleaning for doms
# by getting rid of bad DOMs
#-----------------------------#
tray.AddModule("I3OMSelection<I3DOMLaunchSeries>", "BadDoms")(
    ("OmittedKeys", bad_dom_list_static.IC86_static_bad_dom_list()),
    ("OmittedStrings", [81, 82, 83, 84, 85, 86, 87]),  #omit deep core strings
    ("OutputOMSelection", "BadDomsListOffline"),
    ("InputResponse", "InIceRawData"),
    ("OutputResponse", "CleanInIceRawData"))
userPrint("DOM Selection added")

#-----------------------------#
# ADD NDOM CHECK
#-----------------------------#
if m_config.cutNDOM:
    tray.AddModule(checkndom, "ndomcheck")
    userPrint("Cutting on number of DOMs")

#-----------------------------#
# Wave Calibrator