{"id":19647415,"url":"https://github.com/danielvartan/entrainment","last_synced_at":"2025-04-30T16:08:20.830Z","repository":{"id":65374525,"uuid":"589814857","full_name":"danielvartan/entrainment","owner":"danielvartan","description":"☀️ Rule-Based Model of the 24h Light/Dark Cycle Entrainment Phenomenon","archived":false,"fork":false,"pushed_at":"2025-04-30T04:05:32.000Z","size":10539,"stargazers_count":5,"open_issues_count":16,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T16:08:06.782Z","etag":null,"topics":["chronobiology","chronotype","complex-systems","entrainment","model","python","rule-based-model"],"latest_commit_sha":null,"homepage":"https://entrainment.readthedocs.io","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/danielvartan.png","metadata":{"files":{"readme":"README.Rmd","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["danielvartan"]}},"created_at":"2023-01-17T01:59:29.000Z","updated_at":"2025-04-30T04:05:36.000Z","dependencies_parsed_at":"2024-05-02T04:34:56.086Z","dependency_job_id":"3948d8a9-02d6-4b2d-883d-45181e385afe","html_url":"https://github.com/danielvartan/entrainment","commit_stats":null,"previous_names":["danielvartan/entrainment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielvartan%2Fentrainment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielvartan%2Fentrainment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielvartan%2Fentrainment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielvartan%2Fentrainment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielvartan","download_url":"https://codeload.github.com/danielvartan/entrainment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251739652,"owners_count":21635892,"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","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":["chronobiology","chronotype","complex-systems","entrainment","model","python","rule-based-model"],"created_at":"2024-11-11T14:44:05.383Z","updated_at":"2025-04-30T16:08:20.778Z","avatar_url":"https://github.com/danielvartan.png","language":"Python","funding_links":["https://github.com/sponsors/danielvartan"],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r}\n#| label = \"setup\",\n#| include = FALSE\n\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"docs/source/_static/readme_\",\n  out.width = \"100%\"\n)\n```\n\n# entrainment\n\n\u003c!-- badges: start --\u003e\n[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n[![Documentation Status](https://readthedocs.org/projects/entrainment/badge/?version=latest)](https://entrainment.readthedocs.io/en/latest/?badge=latest)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://choosealicense.com/licenses/mit/)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)\n\u003c!-- badges: end --\u003e\n\n\u003c!-- TODO: Add Code Coverage, Build check, fair-software.eu, and CII Best Practices --\u003e\n\n## Overview\n\n`entrainment` is a rule-based model created on Python to test and to demonstrate the 24h light/dark cycle [entrainment phenomenon](https://en.wikipedia.org/wiki/Entrainment_(chronobiology)).\n\n## Prerequisites\n\nYou need to have some familiarity with the [Python programming language](https://www.python.org/) to use `entrainment` main functions.\n\nIn case you don't feel comfortable with Python, we strongly recommend checking Jake VanderPlas free and online book [Python Data Science Handbook](https://jakevdp.github.io/PythonDataScienceHandbook/) and the Coursera course from Google [Crash Course on Python](https://www.coursera.org/learn/python-crash-course) (free for audit students).\n\n## Installation\n\nYou can install `entrainment` from GitHub with:\n\n```bash\npip install git+https://github.com/giperbio/entrainment.git#egg=entrainment\n```\n\nWe don't intend to publish this package on [PyPI](https://pypi.org/).\n\n## Usage\n\nThe following example illustrates how to run the model.\n\nPlease note that in this example all of the model arguments are assigned. You don't need to assign values to all arguments, you can just use the default values. Check [`run_model()`](https://entrainment.readthedocs.io/en/latest/reference.html#entrainment.run_model) documentation to learn more.\n\n```{python}\n#| label = \"setup-python\",\n#| include = FALSE\n\nimport numpy as np\n\nnp.random.seed(1000)\n```\n\n```{python}\n#| label = \"usage-example\",\n#| results = FALSE,\n#| fig.alt = \"24h light/dark cycle entrainment of a population located at the south of Brazil by season\"\n\nimport entrainment\n\nmodel = entrainment.run_model(\n    n = 10**3, # Number of subjects/turtles to create\n    tau_range = (23.5, 24.6), # Limits for assigning 'Tau' values\n    tau_mean = 24.15, # Mean value for the 'Tau' distribution\n    tau_sd = 0.2, # Standard deviation value for the 'Tau' distribution\n    k_range = (0.001, 0.01), # Limits for assigning the 'k' values\n    k_mean = 0.001, # Mean value for the 'k' distribution\n    k_sd = 0.005, # Standard deviation value for the 'k' distribution\n    lam_c = 3750, # Critical 'lambda' value\n    labren_id = 1, # LABREN id of the global horizontal irradiation means\n    by = \"season\", # Series resolution (choices: \"month\", \"season\", \"year\")\n    n_cycles = 3, # Number of cycles to run\n    start_at = 0, # Index number indicating the start of the series\n    repetitions = 10**2, # Number of repetitions\n    plot = True, # Activate or deactivate the plot output\n    show_progress = True # Activate or deactivate verbose mode\n    )\n```\n\nYou can learn more about the available functions going to the [package documentation website](https://entrainment.readthedocs.io).\n\n## Citation\n\nIf you use `entrainment` in your research, please consider citing it. We put a lot of work to build and maintain a free and open-source Python package. You can find the citation below.\n\n``` \nVartanian, D. (2023). {entrainment}: rule-based model of the 24h light/dark cycle entrainment phenomenon. Python package version 0.0.0.9000. https://github.com/giperbio/entrainment\n```\n\nA BibTeX entry for LaTeX users is\n\n```\n@Unpublished{,\n    title = {{entrainment}: rule-based model of the 24h light/dark cycle entrainment phenomenon},\n    author = {Daniel Vartanian},\n    year = {2023},\n    url = {https://github.com/giperbio/entrainment},\n    note = {Python package version 0.0.0.9000},\n}\n```\n\n## Contributing\n\nWe welcome contributions, including bug reports.\n\nTake a moment to review our [Guidelines for Contributing](https://entrainment.readthedocs.io/en/latest/contributing.html).\n\n## Acknowledgments\n\nThe initial development of `entrainment` was supported by a scholarship provided by the [University of Sao Paulo (USP)](http://usp.br/) (❤️).\n\nThis model was initially created for the [SCX5002 - Complex System I](https://uspdigital.usp.br/janus/Disciplina?tipo=D\u0026sgldis=SCX5002\u0026nomdis=\u0026origem=C) class of the [Graduate Program in Modeling Complex Systems (PPG-SCX)](https://www.prpg.usp.br/pt-br/faca-pos-na-usp/programas-de-pos-graduacao/621-modelagem-de-sistemas-complexos) of the [University of Sao Paulo (USP)](https://www5.usp.br/), under the guidance of [Prof. Dr. Camilo Rodrigues Neto](https://orcid.org/0000-0001-6783-6695).\n\n\u003cbr\u003e\n\nBecome an `entrainment` supporter!\n\nClick [here](https://github.com/sponsors/danielvartan) to make a donation. Please indicate the `entrainment` package in your donation message.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielvartan%2Fentrainment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielvartan%2Fentrainment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielvartan%2Fentrainment/lists"}