Skip to content

Raise exceptions for known errors #241

Closed

Description

@Sparks29032
  • On squeeze, if the polynomial squeeze causes the function grid to be non-strictly-increasing, an error is thrown. Let's wrap the CubicSpline call in morphsqueeze.py with a try catch to throw a custom warning to the user.
  • If the grids of the morphed and target functions after the first iterations are too far separated (e.g. there is no overlap, or only one point overlap), then it is possible for the number of parameters to be smaller than the number of points we are regressing to fit over. This causes an error. In refine.py in the _residual function, let's throw a custom error to the user if len(rvec) < len(pvals).

Activity

  1. sbillinge commented on Sep 30, 2025

    @sbillinge
    Contributor

    @Sparks29032 @ycexiao can this be closed?

  2. ycexiao commented on Sep 30, 2025

    @ycexiao
    Collaborator

    The situation described in the first unchecked item will be addressed differently in #256.

  3. sbillinge commented on Sep 30, 2025

    @sbillinge
    Contributor

    Thanks @ycexiao . Per your comment I am closing this as completed or moved to #256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions