{"id":24573103,"url":"https://github.com/perazz/fitpack","last_synced_at":"2026-02-19T12:04:18.006Z","repository":{"id":61854822,"uuid":"547106365","full_name":"perazz/fitpack","owner":"perazz","description":"A Modern Fortran translation of the FITPACK package for curve and surface fitting","archived":false,"fork":false,"pushed_at":"2026-02-13T11:48:04.000Z","size":5662,"stargazers_count":68,"open_issues_count":4,"forks_count":12,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-02-13T20:33:37.857Z","etag":null,"topics":["curve-fitting","fortran","smoothing","smoothing-splines","spline-approximation","spline-curve","spline-interpolation","splines","surface-fitting"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perazz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-07T06:26:54.000Z","updated_at":"2026-02-13T11:48:07.000Z","dependencies_parsed_at":"2024-04-13T14:33:35.795Z","dependency_job_id":"a138b6d4-d504-4671-8527-333d3c2f0873","html_url":"https://github.com/perazz/fitpack","commit_stats":{"total_commits":262,"total_committers":2,"mean_commits":131.0,"dds":0.007633587786259555,"last_synced_commit":"d30ee7d23e2dd4fcc5e4621aac738cb04d1cffd6"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/perazz/fitpack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffitpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffitpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffitpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffitpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perazz","download_url":"https://codeload.github.com/perazz/fitpack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffitpack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29506249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curve-fitting","fortran","smoothing","smoothing-splines","spline-approximation","spline-curve","spline-interpolation","splines","surface-fitting"],"created_at":"2025-01-23T19:55:47.297Z","updated_at":"2026-02-16T10:38:41.398Z","avatar_url":"https://github.com/perazz.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"fitpack\n===\n\nThis is a Modern Fortran translation of the FITPACK package for curve and surface fitting.\nThe functions are modernized and translated from the original Fortran77 code [FITPACK](http://www.netlib.org/dierckx) by Paul Dierckx.\nThe starting code used the double precision version of FITPACK distributed with [scipy](http://www.scipy.org).\n\nAn object-oriented interface wrapper was also built. A C/C++ interface is also being built. \n\n### 1D Spline interpolators:\n\nClass      | Description | Degree\n---        | ---         | ---\n`fitpack_curve` | 1D spline interpolation of scattered data, $y = s(x)$ | up to 5\n`fitpack_periodic_curve` | 1D spline interpolation of scattered data on a periodic domain, $y = s(x), s(0) = s(x_{per})$ | up to 5\n`fitpack_parametric_curve` | Parametric 1D curves in N dimensions, $x_i = s_i(u)$, $i=1,\\ldots,n$ | up to 5\n`fitpack_closed_curve` | Closed parametric 1D curves in N dimensions, $x_i = s_i(u)$, $i=1,\\ldots,n$, $x_i(0)=x_i(1)$ | up to 5\n`fitpack_constrained_curve` | Parametric 1D curves in N dimensions with value/derivative constraints at the endpoints $x_i = s_i(u)$, $i=1,\\ldots,n$, $x_{i}^{(j)}(0)=u_{L,i}^{(j)}$ , $x_{i}^{(j)}(1)=u_{R,i}^{(j)}$, $0\\le j \\le 2$| up to 5\n\nHere is an example from the `mncurf` 1D generic curve fitting test:\n\n![General Curve Fitting](media/mncurf.gif)\n\nThis is an example from the parametric curve test `mnpara`: \n\n![Parametric Curve Fitting](media/mnpara.gif)\n\n### 2D Spline interpolators:\n\nClass      | Description | Degree\n---        | ---         | ---\n`fitpack_surface` | 2D spline interpolation of scattered data, $z = s(x,y)$ | up to 5\n`fitpack_polar` | 2D spline interpolation of scattered data in a user-defined polar domain $z = s(u,v)$, $u\\in[0,1]$, $v\\in[-\\pi,\\pi]$, user-defined domain radius as a function of polar angle $r=r(v)$ | 3\n`fitpack_sphere` | 2D spline interpolation of scattered data on a sphere domain $z = s(u,v)$ with latitude $u \\in [0,\\pi]$, longitude $v \\in [-\\pi,\\pi]$ | 3\n`fitpack_grid_surface` | 2D spline interpolation of rectangular 2D data $z = s(x,y)$ with gridded fitting coordinates $x_i, i=1,\\ldots,n_x$,  $y_j, j=1,\\ldots,n_y$  | up to 5\n`fitpack_grid_polar` | 2D spline interpolation of polar data $z = s(u,v)$ in the fixed-radius circular polar domain $u\\in[0,r]$, $v\\in[-\\pi,\\pi]$, with user-control of function and derivatives at the origin and the boundaries | 3\n\n### `C`, `C++` interfaces\n\nThe C and C++ header-only interfaces are found in the `include` folder. The following scheme shows a comparison between the Fortran, C++ and C struct names for the currently available classes: \n\nFortran      | C | C++\n---        | ---         | ---\n`fitpack_curve` | `fitpack_curve_c` | `fpCurve`\n`fitpack_periodic_curve` | `fitpack_periodic_curve_c` | `fpPeriodicCurve`\n`fitpack_parametric_curve` | `fitpack_parametric_curve_c` | `fpParametricCurve`\n`fitpack_closed_curve` | `fitpack_closed_curve_c` | `fpClosedCurve`\n`fitpack_constrained_curve` | `fitpack_constrained_curve_c` | `fpConstrainedCurve`\n\nThe choice to provide a header-only `C++` implementation is motivated by the need to keep the library C-ABI compatible whatever compiler is being used to build it. For example, on macOS, one may build the library with g++/gfortran, that is not ABI-compatible with clang++. So, it is important that no C++ code is compiled together with the Fortran code in the library.\n\nBuilding, using\n===============\n\nAn automated build is available via the Fortran Package Manager. To use FITPACK within your FPM project, add the following to your fpm.toml file:\n\n```\n[dependencies]\nfitpack = { git=\"https://github.com/perazz/fitpack.git\" }\n```\n\nOtherwise, a simple command line build script that builds all modules in the src/ folder is possible. \n\nSeveral test programs are available through the Fortran Package manager. To run them, just type\n```\nfpm test\n```\n \nReferences\n----------\nFitpack contains very robust algorithms for curve interpolation and fitting, based on algorithms described by Paul Dierckx in Ref [1-4]:\u003cbr\u003e\n\n[1] P. Dierckx, \"An algorithm for smoothing, differentiation and integration of experimental data using spline functions\", J.Comp.Appl.Maths 1 (1975) 165-184.\n\n[2] P. Dierckx, \"A fast algorithm for smoothing data on a rectangular grid while using spline functions\", SIAM J.Numer.Anal. 19 (1982) 1286-1304.\n\n[3] P. Dierckx, \"An improved algorithm for curve fitting with spline functions\", report tw54, Dept. Computer Science,K.U. Leuven, 1981.\n\n[4] P. Dierckx, \"Curve and surface fitting with splines\", Monographs on Numerical Analysis, Oxford University Press, 1993.\n\n[5] P. Dierckx, R. Piessens, \"Calculation of Fourier coefficients of discrete functions using cubic splines\", Journal of Computational and Applied Mathematics  3(3), 207-209, 1977.\n\nSee also\n--------\n- [Dierckx.jl](https://github.com/kbarbary/Dierckx.jl), a Julia interface to FITPACK\n- [scipy.interpolate](https://docs.scipy.org/doc/scipy/reference/interpolate.html), which includes interfaces to FITPACK\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperazz%2Ffitpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperazz%2Ffitpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperazz%2Ffitpack/lists"}