Decomposes the Chromatogram into a collection of Traces.

        Returns
        -------
        list
513878
def traces(self):
        
        traces = []
        for v, c in zip(self.values.T, self.columns):
            traces.append(Trace(v, self.index, name=c))
        return traces
504736
def clean_value(self):
        
        result = []
        for mdl in self:
            result.append(super(ListNode, mdl).clean_value())
        return result
580332
def sequences(self):
        
        seqs = [x.sequence for x in self._molecules if hasattr(x, 'sequence')]
        return seqs
1304015
def to_list(self):
        
        src = self._source or ''
        coll = self._collection or ''
        desc = self._description or ''

        l = [self._id, src, coll, self._name,
             ','.join(sorted(self._genes)), desc]
        return l
1267356
def toList(self):
        
        if self.getNumCols() > 1:
            return [
                tuple(self.getRowByIndex(i))
                for i in range(self.getNumRows())
            ]
        else:
            return [
                self.getRowByIndex(i)[0]
                for i in range(self.getNumRows())
            ]
591051
def photometry(
            self):
        
        photResultsList = []
        photResultsList[:] = [dict(l) for l in self.photResultsList]
        return photResultsList
1257152
def from_detections_assignment(detections_1, detections_2, assignments):
        
        traces = []

        for d1n, d2n in six.iteritems(assignments):
            # check if the match is between existing cells
            if d1n < len(detections_1) and d2n < len(detections_2):
                traces.append(Trace(detections_1[d1n], detections_2[d2n]))

        return traces
1054627
def get_lowest_decomposition(self, composition):
        

        entries_list = []
        elements = [e.symbol for e in composition.elements]
        for i in range(len(elements)):
            for combi in itertools.combinations(elements, i + 1):
                chemsys = [Element(e) for e in combi]
                x = self.costdb.get_entries(chemsys)
                entries_list.extend(x)
        try:
            pd = PhaseDiagram(entries_list)
            return pd.get_decomposition(composition)
        except IndexError:
            raise ValueError("Error during PD building; most likely, "
                             "cost data does not exist!")
471593
def decompose_space(H, A):
    
    return OperatorTrace.create(
        OperatorTrace.create(A, over_space=H.operands[-1]),
        over_space=ProductSpace.create(*H.operands[:-1]))
752624
def data(self) -> Sequence[Tuple[int, float]]:
        
        return [(num, prob) for num, prob in zip(self._num_cfds_seq,
                                                 self._gnd_state_probs)]
734172
def to_twodim_list(self):
        
        if self._timestampFormat is None:
            return self._timeseriesData

        datalist = []
        append   = datalist.append
        convert  = TimeSeries.convert_epoch_to_timestamp
        for entry in self._timeseriesData:
            append([convert(entry[0], self._timestampFormat), entry[1:]])

        return datalist
1350453
def _dbg_output(self):
        
        s = "["
        lst = []
        for segment in self._list:
            lst.append(repr(segment))
        s += ", ".join(lst)
        s += "]"
        return s
662168
def _format_data(self, data):
        
        return [spectrum for spectrum in \
            sorted(data if isinstance(data, (list, tuple)) else [data],
                key=lambda x: x.disp[0]) if np.any(np.isfinite(spectrum.flux))]
846281
def chain_output_files(self):
        
        ret_list = []
        for key, val in self.file_dict.items():
            # For pure input files we only want output files that were not
            # marked as internal or temp
            if val & FileFlags.out_ch_mask == FileFlags.output_mask:
                ret_list.append(key)
        return ret_list
1073500
def split(self):
        
        # TODO: Investigate why a small number of entries are lost every time this method is run.
        min_x, max_x, min_y, max_y = self.bounds
        mid_x, mid_y = (min_x + max_x) / 2, (min_y + max_y) / 2
        q1 = (min_x, mid_x, mid_y, max_y)
        q2 = (min_x, mid_x, min_y, mid_y)
        q3 = (mid_x, max_x, mid_y, max_y)
        q4 = (mid_x, max_x, min_y, mid_y)
        return [QuadTree(self.data, bounds=q1), QuadTree(self.data, bounds=q2), QuadTree(self.data, bounds=q3),
                QuadTree(self.data, bounds=q4)]
19330
def cleanup(self):
        
        plots = self.traverse(lambda x: x, [BokehPlot])
        for plot in plots:
            if not isinstance(plot, (GenericCompositePlot, GenericElementPlot, GenericOverlayPlot)):
                continue
            streams = list(plot.streams)
            plot.streams = []
            plot._document = None

            if plot.subplots:
                plot.subplots.clear()

            if isinstance(plot, GenericElementPlot):
                for callback in plot.callbacks:
                    streams += callback.streams
                    callback.cleanup()

            for stream in set(streams):
                stream._subscribers = [
                    (p, subscriber) for p, subscriber in stream._subscribers
                    if get_method_owner(subscriber) not in plots
                ]

        if self.comm and self.root is self.handles.get('plot'):
            self.comm.close()
1333140
def _decompose(net, wv_map, mems, block_out):
    

    def arg(x, i):
        # return the mapped wire vector for argument x, wire number i
        return wv_map[(net.args[x], i)]

    def destlen():
        # return iterator over length of the destination in bits
        return range(len(net.dests[0]))

    def assign_dest(i, v):
        # assign v to the wiremap for dest[0], wire i
        wv_map[(net.dests[0], i)] <<= v

    one_var_ops = {
        'w': lambda w: w,
        '~': lambda w: ~w,
    }
    c_two_var_ops = {
        '&': lambda l, r: l & r,
        '|': lambda l, r: l | r,
        '^': lambda l, r: l ^ r,
        'n': lambda l, r: l.nand(r),
    }

    if net.op in one_var_ops:
        for i in destlen():
            assign_dest(i, one_var_ops[net.op](arg(0, i)))
    elif net.op in c_two_var_ops:
        for i in destlen():
            assign_dest(i, c_two_var_ops[net.op](arg(0, i), arg(1, i)))
    elif net.op == 's':
        for i in destlen():
            selected_bit = arg(0, net.op_param[i])
            assign_dest(i, selected_bit)
    elif net.op == 'c':
        arg_wirelist = []
        # generate list of wires for vectors being concatenated
        for arg_vector in net.args:
            arg_vector_as_list = [wv_map[(arg_vector, i)] for i in range(len(arg_vector))]
            arg_wirelist = arg_vector_as_list + arg_wirelist
        for i in destlen():
            assign_dest(i, arg_wirelist[i])
    elif net.op == 'r':
        for i in destlen():
            args = (arg(0, i),)
            dests = (wv_map[(net.dests[0], i)],)
            new_net = LogicNet('r', None, args=args, dests=dests)
            block_out.add_net(new_net)
    elif net.op == 'm':
        arg0list = [arg(0, i) for i in range(len(net.args[0]))]
        addr = concat_list(arg0list)
        new_mem = _get_new_block_mem_instance(net.op_param, mems, block_out)[1]
        data = as_wires(new_mem[addr])
        for i in destlen():
            assign_dest(i, data[i])
    elif net.op == '@':
        addrlist = [arg(0, i) for i in range(len(net.args[0]))]
        addr = concat_list(addrlist)
        datalist = [arg(1, i) for i in range(len(net.args[1]))]
        data = concat_list(datalist)
        enable = arg(2, 0)
        new_mem = _get_new_block_mem_instance(net.op_param, mems, block_out)[1]
        new_mem[addr] <<= MemBlock.EnabledWrite(data=data, enable=enable)
    else:
        raise PyrtlInternalError('Unable to synthesize the following net '
                                 'due to unimplemented op :\n%s' % str(net))
    return