original_docstring: 
      The matrix `w_tilde_curvature` is a matrix of dimensions [image_pixels, image_pixels] that encodes the PSF
      convolution of every pair of image pixels given the noise map. This can be used to efficiently compute the
      curvature matrix via the mappings between image and source pixels, in a way that omits having to perform the
      PSF convolution on every individual source pixel. This provides a significant speed up for inversions of imaging
      datasets.
  
      The limitation of this matrix is that the dimensions of [image_pixels, image_pixels] can exceed many 10s of GB's,
      making it impossible to store in memory and its use in linear algebra calculations extremely. The method
      `w_tilde_curvature_preload_imaging_from` describes a compressed representation that overcomes this hurdles. It is
      advised `w_tilde` and this method are only used for testing.
  
      Parameters
      ----------
      noise_map_native
          The two dimensional masked noise-map of values which w_tilde is computed from.
      kernel_native
          The two dimensional PSF kernel that w_tilde encodes the convolution of.
      native_index_for_slim_index
          An array of shape [total_x_pixels*sub_size] that maps pixels from the slimmed array to the native array.
  
      Returns
      -------
      ndarray
          A matrix that encodes the PSF convolution values between the noise map that enables efficient calculation of
          the curvature matrix.
      
docstring: The matrix `w_tilde_curvature` is a matrix of dimensions [image_pixels, image_pixels] that encodes the PSF
  convolution of every pair of image pixels given the noise map. This can be used to efficiently compute the
  curvature matrix via the mappings between image and source pixels, in a way that omits having to perform the
  PSF convolution on every individual source pixel. This provides a significant speed up for inversions of imaging
  datasets.
  
  The limitation of this matrix is that the dimensions of [image_pixels, image_pixels] can exceed many 10s of GB's,
  making it impossible to store in memory and its use in linear algebra calculations extremely. The method
  `w_tilde_curvature_preload_imaging_from` describes a compressed representation that overcomes this hurdles. It is
  advised `w_tilde` and this method are only used for testing.
docstring_tokens: The matrix ` w_tilde_curvature ` is a matrix of dimensions [ image_pixels image_pixels ] that encodes the PSF convolution of every pair of image pixels given the noise map . This can be used to efficiently compute the curvature matrix via the mappings between image and source pixels in a way that omits having to perform the PSF convolution on every individual source pixel . This provides a significant speed up for inversions of imaging datasets . The limitation of this matrix is that the dimensions of [ image_pixels image_pixels ] can exceed many 10s of GB ' s making it impossible to store in memory and its use in linear algebra calculations extremely . The method ` w_tilde_curvature_preload_imaging_from ` describes a compressed representation that overcomes this hurdles . It is advised ` w_tilde ` and this method are only used for testing .
code: def w_tilde_curvature_imaging_from(
      noise_map_native: np.ndarray, kernel_native: np.ndarray, native_index_for_slim_index
  ) -> np.ndarray:
      """
      The matrix `w_tilde_curvature` is a matrix of dimensions [image_pixels, image_pixels] that encodes the PSF
      convolution of every pair of image pixels given the noise map. This can be used to efficiently compute the
      curvature matrix via the mappings between image and source pixels, in a way that omits having to perform the
      PSF convolution on every individual source pixel. This provides a significant speed up for inversions of imaging
      datasets.
  
      The limitation of this matrix is that the dimensions of [image_pixels, image_pixels] can exceed many 10s of GB's,
      making it impossible to store in memory and its use in linear algebra calculations extremely. The method
      `w_tilde_curvature_preload_imaging_from` describes a compressed representation that overcomes this hurdles. It is
      advised `w_tilde` and this method are only used for testing.
  
      Parameters
      ----------
      noise_map_native
          The two dimensional masked noise-map of values which w_tilde is computed from.
      kernel_native
          The two dimensional PSF kernel that w_tilde encodes the convolution of.
      native_index_for_slim_index
          An array of shape [total_x_pixels*sub_size] that maps pixels from the slimmed array to the native array.
  
      Returns
      -------
      ndarray
          A matrix that encodes the PSF convolution values between the noise map that enables efficient calculation of
          the curvature matrix.
      """
      image_pixels = len(native_index_for_slim_index)
  
      w_tilde_curvature = np.zeros((image_pixels, image_pixels))
  
      for ip0 in range(w_tilde_curvature.shape[0]):
  
          ip0_y, ip0_x = native_index_for_slim_index[ip0]
  
          for ip1 in range(ip0, w_tilde_curvature.shape[1]):
  
              ip1_y, ip1_x = native_index_for_slim_index[ip1]
  
              w_tilde_curvature[ip0, ip1] += w_tilde_curvature_value_from(
                  value_native=noise_map_native,
                  kernel_native=kernel_native,
                  ip0_y=ip0_y,
                  ip0_x=ip0_x,
                  ip1_y=ip1_y,
                  ip1_x=ip1_x,
              )
  
      for ip0 in range(w_tilde_curvature.shape[0]):
          for ip1 in range(ip0, w_tilde_curvature.shape[1]):
              w_tilde_curvature[ip1, ip0] = w_tilde_curvature[ip0, ip1]
  
      return w_tilde_curvature
code_tokens: def w_tilde_curvature_imaging_from ( noise_map_native : np . ndarray , kernel_native : np . ndarray , native_index_for_slim_index ) -> np . ndarray : image_pixels = len ( native_index_for_slim_index ) w_tilde_curvature = np . zeros ( ( image_pixels , image_pixels ) ) for ip0 in range ( w_tilde_curvature . shape [ 0 ] ) : ip0_y , ip0_x = native_index_for_slim_index [ ip0 ] for ip1 in range ( ip0 , w_tilde_curvature . shape [ 1 ] ) : ip1_y , ip1_x = native_index_for_slim_index [ ip1 ] w_tilde_curvature [ ip0 , ip1 ] += w_tilde_curvature_value_from ( value_native = noise_map_native , kernel_native = kernel_native , ip0_y = ip0_y , ip0_x = ip0_x , ip1_y = ip1_y , ip1_x = ip1_x , ) for ip0 in range ( w_tilde_curvature . shape [ 0 ] ) : for ip1 in range ( ip0 , w_tilde_curvature . shape [ 1 ] ) : w_tilde_curvature [ ip1 , ip0 ] = w_tilde_curvature [ ip0 , ip1 ] return w_tilde_curvature
short_docstring: The matrix `w_tilde_curvature` is a matrix of dimensions [image_pixels, image_pixels] that encodes the PSF
  convolution of every pair of image pixels given the noise map.
short_docstring_tokens: The matrix ` w_tilde_curvature ` is a matrix of dimensions [ image_pixels image_pixels ] that encodes the PSF convolution of every pair of image pixels given the noise map .
comment: """
      The matrix `w_tilde_curvature` is a matrix of dimensions [image_pixels, image_pixels] that encodes the PSF
      convolution of every pair of image pixels given the noise map. This can be used to efficiently compute the
      curvature matrix via the mappings between image and source pixels, in a way that omits having to perform the
      PSF convolution on every individual source pixel. This provides a significant speed up for inversions of imaging
      datasets.
  
      The limitation of this matrix is that the dimensions of [image_pixels, image_pixels] can exceed many 10s of GB's,
      making it impossible to store in memory and its use in linear algebra calculations extremely. The method
      `w_tilde_curvature_preload_imaging_from` describes a compressed representation that overcomes this hurdles. It is
      advised `w_tilde` and this method are only used for testing.
  
      Parameters
      ----------
      noise_map_native
          The two dimensional masked noise-map of values which w_tilde is computed from.
      kernel_native
          The two dimensional PSF kernel that w_tilde encodes the convolution of.
      native_index_for_slim_index
          An array of shape [total_x_pixels*sub_size] that maps pixels from the slimmed array to the native array.
  
      Returns
      -------
      ndarray
          A matrix that encodes the PSF convolution values between the noise map that enables efficient calculation of
          the curvature matrix.
      """