Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in redcal solver #866

Open
steven-murray opened this issue Jan 26, 2023 · 0 comments
Open

Bug in redcal solver #866

steven-murray opened this issue Jan 26, 2023 · 0 comments
Labels

Comments

@steven-murray
Copy link
Contributor

There is an error that comes up in the test_redcal_run test sometimes:

     def get_weighted_data(self):
        '''Return y = data * wgt**.5 as a 2D vector, regardless of original data/wgt shape.'''
        dtype = self.dtype # default
        if self.re_im_split:
            if dtype == np.float32:
                dtype = np.complex64
            else:
                dtype = np.complex128
        d = np.array([self.data[k] for k in self.keys], dtype=dtype)
        if len(self.wgts) > 0:
            w = np.array([self.wgts[k] for k in self.keys])
            w.shape += (1,) * (d.ndim-w.ndim)
            d.shape += (1,) * (w.ndim-d.ndim)
            d = d*(w**.5)
            # this is w**.5 because A already has a factor of w**.5 in it, so
            # (At N^-1 A)^1 At N^1 y ==> (At A)^1 At d (where d is the result of this
            # function and A is redefined to include half of the weights)
        self._data_shape = d.shape[1:] # store for reshaping sols to original
>       d.shape = (d.shape[0],-1) # Flatten
E       ValueError: cannot reshape array of size 0 into shape (0,newaxis)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant