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

Add magnitude function #88

Open
lizliz opened this issue Feb 29, 2024 · 0 comments · Fixed by #94
Open

Add magnitude function #88

lizliz opened this issue Feb 29, 2024 · 0 comments · Fixed by #94
Assignees
Labels
enhancement New feature or request

Comments

@lizliz
Copy link
Collaborator

lizliz commented Feb 29, 2024

Add the magnitude function for a given input distance matrix $D$. This is related to Sara Kalisnik's work, one example of which is here: https://www.sciencedirect.com/science/article/pii/S0022404923000798

A starting point for the code is below.

def MagnitudeFunction(D,t_range = [.1,10], t_n = 100):
    T = np.linspace(t_range[0],t_range[1],t_n)
    M = []
    for t in T:
        tZ = np.exp(-t*D)
        tZinv = inv(tZ)
        m = np.sum(tZinv)
        M.append(m)
    return T,M

T,M = MagnitudeFunction(D, t_range = [.1,100])
plt.plot(T,M)
@lizliz lizliz added the enhancement New feature or request label Feb 29, 2024
@lizliz lizliz self-assigned this Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant