Coverage for python/lsst/sims/maf/metrics/chipVendorMetric.py : 21%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" See what happens if we have chips from different vendors """
if cols is None: cols = [] super(ChipVendorMetric,self).__init__(col=cols, metricDtype=float, units='1,2,3:v1,v2,both', **kwargs)
""" given a list of chipnames, convert to 1 or 2, representing different vendors """ vendors=[] for chip in chipName: # Parse the chipName string. if int(chip[2]) % 2 == 0: vendors.append(1) else: vendors.append(2) return vendors
if 'chipNames' not in list(slicePoint.keys()): raise ValueError('No chipname info, need to set useCamera=True with a spatial slicer.')
uvendorIDs = np.unique(self._chipNames2vendorID(slicePoint['chipNames'])) if np.size(uvendorIDs) == 1: result = uvendorIDs else: result = 3 return result |