{"id":17191025,"url":"https://github.com/dfm/python-bls","last_synced_at":"2025-09-03T02:20:00.428Z","repository":{"id":8991329,"uuid":"10740174","full_name":"dfm/python-bls","owner":"dfm","description":"Python bindings to BLS","archived":false,"fork":false,"pushed_at":"2020-06-12T18:24:59.000Z","size":20,"stargazers_count":16,"open_issues_count":4,"forks_count":8,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-13T19:54:02.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfm.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2013-06-17T15:12:16.000Z","updated_at":"2024-04-23T13:58:45.000Z","dependencies_parsed_at":"2022-08-27T01:11:08.636Z","dependency_job_id":null,"html_url":"https://github.com/dfm/python-bls","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dfm/python-bls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fpython-bls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fpython-bls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fpython-bls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fpython-bls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfm","download_url":"https://codeload.github.com/dfm/python-bls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfm%2Fpython-bls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273377669,"owners_count":25094618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-15T01:24:40.506Z","updated_at":"2025-09-03T02:20:00.370Z","avatar_url":"https://github.com/dfm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Box Least Squares\n=================\n\nThese are Python bindings for the original Fortran implementation of Box Least\nSquares (BLS) algorithm from `Kovács et al. (2002)\n\u003chttp://arxiv.org/abs/astro-ph/0206099\u003e`_.\n\nInstallation\n------------\n\nClone the source code from `the GitHub repository\n\u003chttps://github.com/dfm/python-bls\u003e`_ and install using the standard python\ntools:\n\n.. code-block:: bash\n\n    git clone https://github.com/dfm/python-bls.git\n    cd python-bls\n    python setup.py install\n\nFor testing in development, you can use\n\n.. code-block:: bash\n\n    python setup.py build_ext --inplace\n\nto build the bindings directly in the ``bls`` directory.\n\nAuthors\n-------\n\nThese Python bindings were developed—building directly on the code released by\n`Kovács \u003chttp://www.konkoly.hu/staff/kovacs/eebls.f\u003e`_—at the `SAMSI\n\u003chttp://samsi.info\u003e`_ workshop `Modern Statistical and Computational Methods\nfor Analysis of Kepler\n\u003chttp://www.samsi.info/working-groups/kepler-working-group\u003e`_ by\n\n* `Ruth Angus (Oxford) \u003chttps://github.com/RuthAngus\u003e`_\n* `Dan Foreman-Mackey (NYU) \u003chttps://github.com/dfm\u003e`_\n\nLicense\n-------\n\nThe Python bindings are licensed under the `MIT License\n\u003chttps://github.com/dfm/python-bls/blob/master/LICENSE\u003e`_.\n\nBasic Usage\n-----------\n\nTODO: describe Pythonic binding.\n\nAdvanced Usage\n--------------\n\nYou can get direct access to `the Fortran subroutine provided by Kovács\n\u003chttp://www.konkoly.hu/staff/kovacs/eebls.f\u003e`_ through the ``eebls()``\nfunction:\n\n.. code-block:: python\n\n    import bls\n    results = bls.eebls(time, flux, u, v, nf, fmin, df, nb, qmi, qma)\n\nwhere\n\n* ``time`` is an ``N``-dimensional array of timestamps for the light curve,\n* ``flux`` is the ``N``-dimensional light curve array,\n* ``u`` and ``v`` are ``N``-dimensional empty work arrays,\n* ``nf`` is the number of frequency bins to test,\n* ``fmin`` is the minimum frequency to test,\n* ``df`` is the frequency grid spacing,\n* ``nb`` is the number of bins to use in the folded light curve,\n* ``qmi`` is the minimum transit duration to test, and\n* ``qma`` is the maximum transit duration to test.\n\nThe returned values are\n\n.. code-block:: python\n\n    power, best_period, best_power, depth, q, in1, in2 = results\n\nwhere\n\n* ``power`` is the ``nf``-dimensional power spectrum array at frequencies ``f\n  = fmin + arange(nf) * df``,\n* ``best_period`` is the best-fit period in the same units as ``time``,\n* ``best_power`` is the power at ``best_period``,\n* ``depth`` is the depth of the transit at ``best_period``,\n* ``q`` is the fractional transit duration,\n* ``in1`` is the bin index at the start of transit, and\n* ``in2`` is the bin index at the end of transit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfm%2Fpython-bls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfm%2Fpython-bls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfm%2Fpython-bls/lists"}