Skip to content

Add KVM hertz model and make it compatible with numpy v2 #1

Description

@PinkShnack

AFM-analysis/nanite#30

As discussed in a previous PR, it would be good to have the external Hertz KVM model in this repository.

Todo

  • The KVM model should have two versions, one (original from paper) for numpy v1 and one for numpy v2. Reason:
    • fit\_stop = int(np.argwhere(force < (max\_force * fraction_force))[0])\ fails for numpy v2
    • # numpy 1 and 2 compatible code
      _mask = force < (max_force * fraction_force)
      if not np.any(_mask):
          raise ValueError("No force values below threshold")
      fit_stop = int(np.argmax(_mask))

Activity

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions