Exemplo n.º 1
0
    def serialize_to_dict(self):
        serDict = Serializable.serialize_to_dict(self)
        serDict[SerializedKeys.FADE_TIME] = self.__fadeTime
        serDict[SerializedKeys.SCENE_TIME] = self.__sceneTime

        serDict[SerializedKeys.EFFECT_LIST] = []
        for effect in self.getEffects():
            serDict[SerializedKeys.EFFECT_LIST].append(effect.serialize_to_dict())

        return serDict
Exemplo n.º 2
0
    def serialize_to_dict(self):
        serializedDict = Serializable.serialize_to_dict(self)
        serializedFramesList = []

        for frame in self._frames:
            frameDict = frame.serialize_to_dict()
            serializedFramesList.append(frameDict)
        serializedDict[SerializedKeys.FRAME_LIST] = serializedFramesList

        return serializedDict
Exemplo n.º 3
0
    def __call__(self, exp_name, subject, contrast, contrast_data):

        contrast_data.vmax = 3
        contrast_data.vmin = -3

        contrast_data.data[subject.voxels_predicted == 0] = np.nan
        res_dict = {'contrast': contrast_data}

        if contrast.do_perm:
            res_dict['pmap'] = contrast_data.threshold_05
            res_dict['pmap'].data[subject.voxels_predicted == 0] = np.nan
            res_dict['pmap'].cmap = 'Blues'
            res_dict['pmap'].vmin = 0
            res_dict['pmap'].vmax = 1.25

        result = make_static_light(res_dict)

        return Serializable({clsname(self): json.dumps(result)})
Exemplo n.º 4
0
    def __call__(self,
                 exp_name,
                 subjects,
                 contrast,
                 contrast_results,
                 mean_volume,
                 mean_perm_volume,
                 **kwargs):

        if not contrast.do_perm:
            mean_volume.vmin = -1
            mean_volume.vmax = 2
            mean_volume.data[mean_volume.data == 0] = np.nan
            res_dict = {'contrast': mean_volume}
        else:
            mean_volume.vmin = -2
            mean_volume.vmax = 2
            mean_volume.data[mean_volume.data == 0] = np.nan
            res_dict = {'contrast': mean_volume, 'pmap': mean_perm_volume}

        result = make_static_light(res_dict)

        return Serializable({clsname(self): json.dumps(result)})
Exemplo n.º 5
0
    def serialize_to_dict(self):
        serializedDict = Serializable.serialize_to_dict(self)
        serializedDict = dict(serializedDict.items() + self.__frameHandler.serialize_to_dict().items())

        return serializedDict