Example #1
0
    def onDateChange(self, qdatetime):
        """Updates the images when the date is changed"""
        dt = qdatetime.toPyDateTime()

        r = hv.get_jp2_image(dt, sourceId=self._datasources['304']['sourceId'])
        g = hv.get_jp2_image(dt, sourceId=self._datasources['193']['sourceId'])
        b = hv.get_jp2_image(dt, sourceId=self._datasources['171']['sourceId'])
        
        self.red = sunpy.make_map(r)
        self.green = sunpy.make_map(g)
        self.blue = sunpy.make_map(b)
        
        self._updateRedPreview()
        self._updateGreenPreview()
        self._updateBluePreview()

        self._updateCompositeImage()
Example #2
0
 def _load_defaults(self):
     """Load initial images"""
     now = datetime.datetime.utcnow()
     self.ui.dateTimeEdit.setDateTime(now)
     
     r = hv.get_jp2_image(now, sourceId=self._datasources['304']['sourceId'])
     g = hv.get_jp2_image(now, sourceId=self._datasources['193']['sourceId'])
     b = hv.get_jp2_image(now, sourceId=self._datasources['171']['sourceId'])
     
     self.red = sunpy.make_map(r)
     self.green = sunpy.make_map(g)
     self.blue = sunpy.make_map(b)
     
     self._updateRedPreview()
     self._updateGreenPreview()
     self._updateBluePreview()
     
     self._createCompositeImage()