Very starnge problem in python

2021-02-10 Thread Priya Singh
def closset_match(check, arr, itr): id_min = [] for ii in range(itr): id_min_tmp = np.argmin( abs(arr - check) ) id_min.append(id_min_tmp) arr[id_min_tmp] = float('-inf') id_min = np.array(id_min) return id_min def get_match(arr1, arr2, tol, itr):

2 sample chi-square test

2020-12-29 Thread Priya Singh
Hi all, I have two spectra with wavelength, flux, and error on flux. I want to find out the variability of these two spectra based on the 2 sample Chi-square test. I am using following code: def compute_chi2_var(file1,file2,zemi,vmin,vmax): w1,f1,e1,c1,vel1 =

python lmfit.minimizer not working

2018-06-13 Thread Priya Singh
Dear All, I am trying to fit a spectrum using a power law model. I am using lmfit.minimizer. But the problem is that the value of parameter I am getting is same as the initial value. Means minimizer is not working. Here is the part of my code: p = Parameters() p.add('b', value=10)

Fitting cubic spline on 2D array

2018-05-30 Thread Priya Singh
Hello all, Can anyone tell me how can I get the functional form of the fitted cubic spline function on to my 2D array? For eg. when we fit the Gaussian on to an array so we have the functional form with the parameters best fitted to my data likewise how can we do for the cubic spline function?

Re: Levenberg-Marquardt Algorithm

2018-04-14 Thread Priya Singh
On Wednesday, April 11, 2018 at 12:49:59 PM UTC+5:30, Christian Gollwitzer wrote: > Am 11.04.18 um 08:38 schrieb Priya Singh: > > I have two 2D arrays one R and another T (which is also a 2D array). > > Do you know how can I fit T with R in order to find central > > c

Re: Levenberg-Marquardt Algorithm

2018-04-14 Thread Priya Singh
On On Wednesday, April 11, 2018 at 12:49:59 PM UTC+5:30, Christian Gollwitzer wrote: > Am 11.04.18 um 08:38 schrieb Priya Singh: > > I have two 2D arrays one R and another T (which is also a 2D array). > > Do you know how can I fit T with R in order to find central >

Levenberg-Marquardt Algorithm

2018-04-11 Thread Priya Singh
Good morning. I need some suggestion from you if you have encountered this problem ever. I have two 2D arrays one R and another T (which is also a 2D array). Do you know how can I fit T with R in order to find central coordinate x0,y0 for T relative to R??? So the main question is do you know