2,205 questions
0
votes
0
answers
40
views
Why doesn’t the barycenter method detect subpixel displacements where correlation does?
I’m working with X-ray imaging data.
I have a reference image containing a structured pattern, and a sample image where this pattern is slightly distorted due to the presence of a physical sample.
My ...
0
votes
1
answer
30
views
Cutover point between two CDF implementations
My goal is to implement a CDF (cumulative distribution function) for the Standard Normal Distribution and to do so with the best possible numeric accuracy.
This is my starting point: (1 + erf(x / sqrt(...
3
votes
5
answers
230
views
Why no floating point error occurs in print(0.1* 100000) vs (Decimal(0.1)*100000) due to FP representation of 0.1?
I am studying numerical analysis and I have come across this dilemma.
Running the following script,
from decimal import Decimal
a = 0.1 ;
N = 100000 ;
# product calculation
P = N*a
# Print product ...
2
votes
2
answers
97
views
Find correct root of parametrized function given solution for one set of parameters
Let's say I have a function foo(x, a, b) and I want to find a specific one of its (potentially multiple) roots x0, i.e. a value x0 such that foo(x0, a, b) == 0. I know that for (a, b) == (0, 0) the ...
-1
votes
0
answers
18
views
PySHtools library script
I have two perfectly defined sets of SH coefficients obtained through rigorous models in two text files.
I have read that PyShtools has the necessary classes and functions to plot them in a restricted ...
0
votes
0
answers
53
views
Phase Portrait of Coupled ODEs Not Matching Expected Graph in Python (SciPy)
I’m trying to generate a phase portrait for a system of coupled ordinary differential equations (ODEs) using Python’s scipy.integrate.solve_ivp. The system models the frequency of cooperators (x) and ...
0
votes
1
answer
50
views
Producing bifurcation diagram of logistic map including unstable points
I'm trying to produce a bifurcation diagram such as this one.
Typical bifurcation diagrams only include stable fixed points, which are attractive (nearby points get pulled towards the fixed point upon ...
0
votes
1
answer
62
views
Difference in output of sympy.binomial vs scipy.special.comb
Why does the following code that calls comb produce the wrong output?
from scipy.special import comb
from sympy import binomial
def coup(n=100, m=10):
expectation = 0
for j in range(1, n + 1):
...
0
votes
0
answers
24
views
multivariate Fox-H numerical computation
I have some troubles in numerically calculating PDF below:
SNR of particular system model
This PDF is the expression of SNR of practical RIS-aided system: https://ieeexplore.ieee.org/document/9387559 (...
0
votes
0
answers
29
views
Partial derivative of logistic function for Levenberg-Marquardt
I am trying to write code that will fit logistic function to set of data. I am using Levenberg-Marquardt routine (as given in Numerical Recipes 3rd edition) and that requires me to supply a function ...
0
votes
1
answer
119
views
Smooth numerical AND function with N > 2 parameters for a C++ optimization engine
Consider an optimization engine that uses target functions and constraints that requires smooth functions (with at least first-order continuous derivative) to work well.
Now consider a boolean ...
0
votes
0
answers
45
views
How to simulate in python the superconducting density of states of a BCS superconductor with YSR (yu-shiba-rusinov) with 1D chain tight binding model
I try to simulate the following problem:
Compute the density of states numerically of a BCS superconductor with magnetic impurities using the tight binding model of 1D chain with periodically border ...
0
votes
0
answers
80
views
Minimum image convention for a MD simulation in Python
I'm trying to implement a simple molecular dynamic simulation in Python for N atoms with periodic boundary conditions using minimum image convention.
Here is my code:
import numpy as np
import ...
0
votes
0
answers
33
views
Simple MD simulation for N atoms with PBC in Python
I'm trying to implement a simple molecular dynamic simulation in Python for N atoms with periodic boundary conditions while allowing coordinate wrapping to visualize the atoms interacting through
...
0
votes
1
answer
65
views
Molecular dynamic simulation using velocity verlet in Python
I'm trying to implement a simple MD simulation in Python (I'm new to this),I'm using LJ potential and force equations along with Verlet method.
I posted another question about the same code yesterday ...