code: def array2image(self, array, subgrid_res=1):
          
          nx, ny = self._nx * subgrid_res, self._ny * subgrid_res
          if self._idex_mask_bool is True:
              idex_mask = self._idex_mask
              grid1d = np.zeros((nx * ny))
              if subgrid_res > 1:
                  idex_mask_subgrid = self._idex_mask_sub
              else:
                  idex_mask_subgrid = idex_mask
              grid1d[idex_mask_subgrid == 1] = array
          else:
              grid1d = array
          grid2d = util.array2image(grid1d, nx, ny)
          return grid2d
docs: maps a 1d array into a (nx, ny) 2d grid with array populating the idex_mask indices
          :param array: 1d array
          :param idex_mask: 1d array of length nx*ny
          :param nx: x-axis of 2d grid
          :param ny: y-axis of 2d grid
          :return: