Set the attribute self.mask to a mask based on
        the conditions.

        clean: bool
            If not True, let the current mask be a condition as well. If
            True, the mask is set solely on the pack's current
            conditions

        dry: bool
            If True, only try to make a mask, but don't touch self.mask

        This method is called automatically unless ``no_auto`` is set to
        True, whenever conditions are updated.

        .. seealso::
           :meth:`~channelpack.ChannelPack.pprint_conditions`

def make_mask(self, clean=True, dry=False):
        """Set the attribute self.mask to a mask based on
        the conditions.

        clean: bool
            If not True, let the current mask be a condition as well. If
            True, the mask is set solely on the pack's current
            conditions

        dry: bool
            If True, only try to make a mask, but don't touch self.mask

        This method is called automatically unless ``no_auto`` is set to
        True, whenever conditions are updated.

        .. seealso::
           :meth:`~channelpack.ChannelPack.pprint_conditions`
        """

        cc = self.conconf
        # All True initially.
        mask = np.ones(self.rec_cnt) == True  # NOQA
        for cond in cc.conditions_list('cond'):
            try:
                mask = mask & self._mask_array(cond)
            except Exception:
                print cond
                print 'produced an error:'
                raise           # re-raise

        mask = mask & datautils.startstop_bool(self)

        samplerate = cc.get_condition('samplerate')
        if samplerate is not None:
            samplerate = float(samplerate)
        mask = datautils.duration_bool(mask, cc.get_condition('duration'),
                                       samplerate)

        if dry:
            return
        if not clean and self.mask is not None:
            self.mask = self.mask & mask
        else:
            self.mask = mask