{"id":25854777,"url":"https://github.com/jchristopherson/peaks","last_synced_at":"2026-04-01T18:58:40.350Z","repository":{"id":225142270,"uuid":"611462937","full_name":"jchristopherson/peaks","owner":"jchristopherson","description":"PEAKS is a peak detection library meant to locate peaks and valleys in a signal.","archived":false,"fork":false,"pushed_at":"2026-03-19T23:43:08.000Z","size":793,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-20T14:26:39.394Z","etag":null,"topics":["fortran","peak-detection","signal-analysis"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jchristopherson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-03-08T21:57:18.000Z","updated_at":"2026-03-19T23:42:16.000Z","dependencies_parsed_at":"2024-02-29T14:09:08.641Z","dependency_job_id":null,"html_url":"https://github.com/jchristopherson/peaks","commit_stats":null,"previous_names":["jchristopherson/peaks"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jchristopherson/peaks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchristopherson%2Fpeaks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchristopherson%2Fpeaks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchristopherson%2Fpeaks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchristopherson%2Fpeaks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jchristopherson","download_url":"https://codeload.github.com/jchristopherson/peaks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jchristopherson%2Fpeaks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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":["fortran","peak-detection","signal-analysis"],"created_at":"2025-03-01T16:18:07.015Z","updated_at":"2026-04-01T18:58:40.325Z","avatar_url":"https://github.com/jchristopherson.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# peaks\nPEAKS is a peak detection library meant to locate peaks and valleys in a signal.  This library works on both smooth data and on noisy data where other routines, especially those that rely upon derivatives, have difficulties.  This library contains routines that are a re-implementation of the peak detection routine presented by Eli Billauer, which can be found [here](http://billauer.co.il/peakdet.html).\n\n## Status\n[![CMake](https://github.com/jchristopherson/peaks/actions/workflows/cmake.yml/badge.svg)](https://github.com/jchristopherson/peaks/actions/workflows/cmake.yml)\n[![FPM](https://github.com/jchristopherson/peaks/actions/workflows/fpm.yml/badge.svg)](https://github.com/jchristopherson/peaks/actions/workflows/fpm.yml)\n\n## Building PEAKS with CMake\nThis library can be built using CMake.  For instructions see [Running CMake](https://cmake.org/runningcmake/).\n\n## Building PEAKS with FPM\nThis library can be built using Fortran Package Manager (fpm) using the supplied `fpm.toml`.\n```bash\nfpm build\nfpm test --list\nfpm test \u003ctest_name, see `fpm.toml` or list\u003e\n```\n\n## Documentation\nThe documentation can be found [here](https://jchristopherson.github.io/peaks/).\n\n## Example\nThe following graph illustrates the example presented by Eli Billauer, and shows the ability of the library to locate the local maxima and minima, even in the presence of noise.\n![](images/example_1.png?raw=true)\n\n```fortran\nprogram example\n    use iso_fortran_env\n    use peaks\n    use fplot_core\n    implicit none\n\n    ! Parameters\n    integer(int32), parameter :: npts = 10000\n    real(real64), parameter :: dt = 1.0d-3\n    real(real64), parameter :: delta = 0.5d0\n\n    ! Local Variables\n    integer(int32), allocatable, dimension(:) :: imx, imn\n    real(real64) :: t(npts), x(npts), r(npts)\n    real(real64), allocatable, dimension(:) :: mx, mn, tmx, tmn\n    type(plot_2d) :: plt\n    type(plot_data_2d) :: d1, d2, d3\n    class(plot_axis), pointer :: xAxis, yAxis\n\n    ! Build a signal\n    call random_number(r)\n    t = linspace(0.0d0, dt * (npts - 1), npts)\n    x = 0.3d0 * sin(t) + sin(1.3d0 * t) + 0.9d0 * sin(4.2d0 * t) + 2.0d-1 * r\n\n    ! Locate peaks\n    call peak_detect(x, delta, imx, mx, imn, mn)\n\n    ! Get the t values at which the peaks/valleys were found\n    tmx = t(imx)\n    tmn = t(imn)\n\n    ! Plot\n    call plt%initialize()\n    xAxis =\u003e plt%get_x_axis()\n    yAxis =\u003e plt%get_y_axis()\n\n    call xAxis%set_title(\"t\")\n    call yAxis%set_title(\"x(t)\")\n\n    call d1%define_data(t, x)\n    call plt%push(d1)\n\n    call d2%define_data(tmx, mx)\n    call d2%set_draw_line(.false.)\n    call d2%set_draw_markers(.true.)\n    call d2%set_marker_style(MARKER_EMPTY_CIRCLE)\n    call d2%set_marker_scaling(1.5)\n    call d2%set_line_width(2.0)\n    call plt%push(d2)\n\n    call d3%define_data(tmn, mn)\n    call d3%set_draw_line(.false.)\n    call d3%set_draw_markers(.true.)\n    call d3%set_marker_style(MARKER_EMPTY_SQUARE)\n    call d3%set_marker_scaling(1.5)\n    call d3%set_line_width(2.0)\n    call plt%push(d3)\n\n    call plt%draw()\nend program\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchristopherson%2Fpeaks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjchristopherson%2Fpeaks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjchristopherson%2Fpeaks/lists"}