Example #1
0
 def _build_separable_array(self):
     """
     Combine the information on seprability from the forward transform with
     copupling information from the output frames.
     """
     mseparable = separable.is_separable(self.gwcs.forward_transform)
     coupled = self._get_coupled_axes()
     mseparable[tuple(coupled)] = False
     return mseparable
Example #2
0
def test_separable(compound_model, result):
    assert_allclose(is_separable(compound_model), result[0])
    assert_allclose(separability_matrix(compound_model), result[1])
Example #3
0
def test_separable(compound_model, result):
    assert_allclose(is_separable(compound_model), result[0])
    assert_allclose(separability_matrix(compound_model), result[1])
Example #4
0
def tree_is_separable(tree):
    """
    Given a tree, convert it to a `CompoundModel` and then return the
    separability of the inputs.
    """
    return separable.is_separable(tree.evaluate(OPERATORS))