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

problem(s) within POLY_FIT when X is not float + status always (??) equal to 1 #1888

Open
alaingdl opened this issue Oct 15, 2024 · 0 comments
Assignees

Comments

@alaingdl
Copy link
Contributor

I have some data (eg. Zanardo 1.4 GHz --I provided below the data--) and :

  • POLY_FIT don't converge when X array is in integer type.
  • Furthermore in my tests the STATUS keyword (return value) is always at value 1
  • When degre is =< 3, and input float, numerical fitted parameters are simular with IDL, but not when degre > 3
GDL> help, d,z
D               INT       = Array[37]
Z               FLOAT     = Array[37]
GDL> print, poly_fit(d,z, 4,yf=yf, st=st) & plot, d,z,/yno & oplot, d, yf, psy=-2
      -497.61505      0.11287219  -6.8974248e-05   0.00011488228   0.00016039931
GDL> print, poly_fit(float(d),z, 4,yf=yf, st=st) & plot, d,z,/yno & oplot, d, yf, psy=-2 & print, st
       1.0000000     -0.48175898   0.00022248133  -3.2847313e-08   1.6740198e-12

but

IDL> print, poly_fit(float(d),z, 4,yf=yf, st=st) & plot, d,z,/yno & oplot, d, yf, psy=-2 & print, st
% Compiled module: POLY_FIT.
% Loaded DLM: LAPACK.
     -46525.3
      26.0033
  -0.00541547
  4.99087e-07
 -1.70948e-11
           0
IDL> print, poly_fit(d,z, 4,yf=yf, st=st) & plot, d,z,/yno & oplot, d, yf, psy=-2 & print, st
     -46525.3
      26.0033
  -0.00541547
  4.99087e-07
 -1.70948e-11
           0
GDL> print, d, z
    6139    6172    6199    6244    6283    6355    6461    6494    6526    6603    6627    6690    6770    6836    6889    6967
    6989    7039    7084    7202    7231    7283    7297    7370    7437    7486    7558    7580    7622    7692    7730    7802
    7847    7901    7932    7991    8014
      206.500      208.700      208.500      217.400      213.000      224.900      235.000      242.800      237.000
      252.600      251.500      251.500      258.600      264.500      272.500      276.400      281.300      294.900
      287.100      312.800      304.400      285.200      315.200      332.400      342.500      339.700      355.800
      348.300      361.000      371.000      379.200      385.800      389.900      414.300      414.600      421.600
      421.500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant