def to_json(self, simple=False):
        if simple:
            return dict()
            
        sdict = dict(
            state=self.state, 
            attrs=self.attrs.copy(), 
            desc=self.description)
        try:
            sdict.update(dict(
                cmap=[self.cmap], 
                vmin=[self.vmin if self.vmin is not None else np.percentile(np.nan_to_num(self.data), 1)], 
                vmax=[self.vmax if self.vmax is not None else np.percentile(np.nan_to_num(self.data), 99)]
                ))
        except __HOLE__:
            pass
        return sdict
dataset/ETHPy150Open gallantlab/pycortex/cortex/dataset/views.py/Dataview.to_json