[go: nahoru, domu]

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

problems with POLY_FIT & test_poly_fit #1413

Open
alaingdl opened this issue Nov 28, 2022 · 0 comments
Open

problems with POLY_FIT & test_poly_fit #1413

alaingdl opened this issue Nov 28, 2022 · 0 comments
Assignees

Comments

@alaingdl
Copy link
Contributor

I have no time to go in details and look at the code but :

  • in GDL and in IDL, test_poly_fit returns error !!
    % TEST_POLY_FIT: = 1 errors encountered during TEST_POLY_FIT tests =

  • for higher orders, results in GDL are all unity, we should improve that (warning or AOB)

  • more serious, the value is expected to be [1,n] dim, and status values are bad in GDL

code :

x=[0.0, 1.0, 2.0, 3.0,  4.0,  5.0]
y=[0.0, 0.8, 0.9, 0.1, -0.8, -1.0]
print, poly_fit(y, x,7, sta=sta) & print, sta
print, poly_fit(y, x,5, sta=sta) & print, sta
print, poly_fit(y, x,3, sta=sta) & print, sta

Results :

GDL> print, poly_fit(y, x,7, sta=sta) & print, sta
       1.0000000       1.0000000       1.0000000       1.0000000       1.0000000       1.0000000
       1.0000000       1.0000000
           0
GDL> print, poly_fit(y, x,5, sta=sta) & print, sta
   2.6656455e-13      0.63333353      0.62499967     -0.57499982      0.12499996   -0.0083333302
       2
GDL> print, poly_fit(y, x,3, sta=sta) & print, sta
    -0.039682537       1.6931217     -0.81349207     0.087037038
       1
IDL> print, poly_fit(y, x,7, sta=sta) & print, sta
 -1.13687e-12
      20.0000
      128.000
     -80.0000
     -256.000
      96.0000
      192.000
     -48.0000
           2
IDL> print, poly_fit(y, x,5, sta=sta) & print, sta
 -3.97904e-13
      30.9203
    -0.360212
     -89.6933
      6.66635
      60.0791
           0
IDL> print, poly_fit(y, x,3, sta=sta) & print, sta
      1.49251
    -0.754134
      1.86346
    -0.993396
           0
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