예제 #1
0
    def add_to_skyimage(skyimage, image):
        """ Take in a two dimensional numpy array representing the
            fits data and put it into the skyimage. """
        temp = image.reshape(image.shape[0] * image.shape[1])

        wsdl = skyimage.get_wsdl()
        PythonUtilities.set_wsdl_weights(temp, wsdl)
        skyimage.set_wsdl(wsdl)
예제 #2
0
    def fill(self):
        self.wsdl = self.skyimage.get_wsdl()

        self.solid_angle = np.radians(self.pixelsize)**2

        model_counts = np.zeros(len(self.wsdl), dtype=float)

        model_counts += self.all_point_source_counts()
        model_counts += self.all_diffuse_sources_counts()
        model_counts *= self.roi.phase_factor  # don't forget about the phase factor!
        #NB -- this will need to be fixed if want to account for bracketing IRFs

        PythonUtilities.set_wsdl_weights(model_counts, self.wsdl)

        self.skyimage.set_wsdl(self.wsdl)