Exemplo n.º 1
0
    def modifyData(self, data_model: MapModel) -> DataModel:
        data_model.norm.vmin = self._model.min
        data_model.norm.vmax = self._model.max

        data_model.cmap_preferences["over"] = None
        data_model.cmap_preferences["under"] = None
        if self._ui.color_clipped.isChecked():
            if self._ui.over_check.isChecked():
                c = self._ui.over_color.color()
                data_model.cmap_preferences["over"] = c.name() if c else None
            if self._ui.under_check.isChecked():
                c = self._ui.under_color.color()
                data_model.cmap_preferences["under"] = c.name() if c else None

        return data_model
Exemplo n.º 2
0
    def modifyData(self, data_model: MapModel) -> MapModel:
        old_norm = data_model.norm
        clip = old_norm.clip
        vmin = old_norm.vmin
        vmax = old_norm.vmax

        data_model.norm = self._getNorm(clip, vmax, vmin)
        return data_model
Exemplo n.º 3
0
    def modifyData(self, data_model: MapModel) -> MapModel:
        old_norm = data_model.norm
        clip = old_norm.clip
        vmin = old_norm.vmin
        vmax = old_norm.vmax

        norm = mpl_normalize.ImageNormalize(vmin=vmin,
                                            vmax=vmax,
                                            clip=clip,
                                            stretch=self._getStretch())
        data_model.norm = norm
        return data_model
Exemplo n.º 4
0
    def fromFile(cls, file):
        s_map = Map(file)
        s_map.path = file

        model = MapModel(s_map)
        return cls(model)
Exemplo n.º 5
0
 def modifyData(self, data_model: MapModel) -> DataModel:
     rotated_map = data_model.map.rotate(angle=self._ui.angle_spin.value() * u.deg)
     data_model.map = rotated_map
     return data_model