{"id":27057601,"url":"https://github.com/enzoperesafonso/exotransit","last_synced_at":"2026-01-18T22:33:47.328Z","repository":{"id":285923519,"uuid":"959771909","full_name":"enzoperesafonso/ExoTransit","owner":"enzoperesafonso","description":"Python tool to generate configurable animations \u0026 sonifications (audio) of exoplanet transits using batman-package.","archived":false,"fork":false,"pushed_at":"2025-04-03T11:33:59.000Z","size":812,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T11:34:19.836Z","etag":null,"topics":["astronomy","exoplanets","sonification"],"latest_commit_sha":null,"homepage":"","language":null,"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/enzoperesafonso.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}},"created_at":"2025-04-03T10:27:08.000Z","updated_at":"2025-04-03T11:34:03.000Z","dependencies_parsed_at":"2025-04-03T11:34:22.783Z","dependency_job_id":"d18a2c96-fbb4-4de5-9a82-a9de33a01313","html_url":"https://github.com/enzoperesafonso/ExoTransit","commit_stats":null,"previous_names":["enzoperesafonso/exotransit_sonification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/enzoperesafonso/ExoTransit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzoperesafonso%2FExoTransit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzoperesafonso%2FExoTransit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzoperesafonso%2FExoTransit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzoperesafonso%2FExoTransit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enzoperesafonso","download_url":"https://codeload.github.com/enzoperesafonso/ExoTransit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzoperesafonso%2FExoTransit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28552785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T20:59:07.572Z","status":"ssl_error","status_checked_at":"2026-01-18T20:59:02.799Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["astronomy","exoplanets","sonification"],"created_at":"2025-04-05T11:28:27.434Z","updated_at":"2026-01-18T22:33:47.311Z","avatar_url":"https://github.com/enzoperesafonso.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExoTransit 🌌🔊\n\nGenerate animations of exoplanet transits with embedded sonification (audio representation of flux), primarily designed as an outreach tool for the blind and visually impaired community.\n\n![Animation of uniform brightness star transit](https://raw.githubusercontent.com/enzoperesafonso/ExoTransit/main/transit_animation_spots_dark_sound.gif)\n\n## Overview\n\nExoTransit simulates and visualizes exoplanet transits using the `batman-package`. It creates compelling dark-mode MP4 animations suitable for presentations and educational purposes.\n\nA key feature is the **sonification** of the transit light curve. The changing brightness of the star as the planet passes in front is mapped to changes in audio pitch, providing an auditory representation of the transit event. This feature aims to make the fascinating phenomenon of exoplanet transits more accessible to individuals who are blind or visually impaired.\n\n## Features\n\n*   **Transit Simulation:** Simulates light curves for various scenarios:\n    *   Uniform brightness star (No Limb Darkening)\n    *   Star with Quadratic Limb Darkening\n    *   Star with Limb Darkening and Starspots\n*   **Dark Mode Animation:** Generates visually appealing MP4 videos optimized for dark backgrounds.\n*   **Sonification for Accessibility:** Embeds an audio track in the video where the light curve flux is mapped to audio frequency (lower flux = lower pitch), aiding understanding for the blind and visually impaired.\n*   **Configurable:** Most simulation, animation, and audio parameters are controlled via a simple `config.yaml` file.\n*   **Command-Line Interface:** Easy selection of scenarios and option to override configuration file settings.\n*   **Smooth Audio:** Uses phase continuity in audio generation to minimize clicks and jitter.\n\n## Requirements\n\n*   **Python 3.7+**\n*   **FFmpeg:** Essential for combining the generated audio and video into the final MP4 file. Must be installed and accessible in your system's PATH.\n    *   Download from [ffmpeg.org](https://ffmpeg.org/download.html).\n    *   Verify the `ffmpeg` command works in your terminal.\n*   **Python Libraries:** See `requirements.txt`. Install using pip.\n\n## Setup\n\n1.  **Clone the repository:**\n    ```bash\n    git clone https://github.com/enzoperesafonso/ExoTransit.git # Use your actual repo URL!\n    cd exotransit_sonification\n    ```\n\n2.  **Create a Virtual Environment (Recommended):**\n    ```bash\n    python -m venv venv\n    # Activate it:\n    # Windows: .\\venv\\Scripts\\activate\n    # macOS/Linux: source venv/bin/activate\n    ```\n\n3.  **Install Python dependencies:**\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4.  **Verify FFmpeg:**\n    Open your terminal/command prompt and run:\n    ```bash\n    ffmpeg -version\n    ```\n    If this command is not found, you need to install FFmpeg and ensure it's added to your system's PATH environment variable. Audio embedding will fail without it.\n\n## Configuration (`config.yaml`)\n\nModify the `config.yaml` file to customize the simulation and output:\n\n*   **`system_params`:** Planet/orbit properties (`batman` parameters).\n*   **`star_params`:** Stellar radius and rotation period.\n*   **`spots`:** Define starspots (only used for `spots` scenario).\n*   **`animation_settings`:** Video output details (filename base, FPS, frame count, quality DPI).\n*   **`sonification_settings`:** Audio parameters (sample rate, frequency mapping, volume).\n*   **`ffmpeg_settings`:** Codecs and bitrates for video/audio merging.\n*   **`visual_settings`:** Override default dark mode colors.\n\nDetailed comments explaining each parameter are included within the `config.yaml` file.\n\n## Usage\n\nExecute the script from your terminal (within the activated virtual environment if you created one).\n\n**Select the desired scenario:**\n\n```bash\n# Generate Limb Darkening scenario using defaults from config.yaml\npython exotransit.py ld\n\n# Generate Spots scenario\npython exotransit.py spots\n\n# Generate No Limb Darkening scenario\npython exotransit.py none\n```\n*Output video will be named according to `output_basename` in `config.yaml` (e.g., `transit_animation_ld_dark_sound.mp4`).*\n\n**Command-Line Options:**\n\n```bash\n# Use a specific configuration file\npython exotransit.py ld --config my_custom_config.yaml\n\n# Override the output filename\npython exotransit.py spots --outfile custom_transit_with_spots.mp4\n\n# Disable sound generation/embedding for this specific run\npython exotransit.py ld --nosound\n\n# Combine options\npython exotransit.py spots --config big_planet.yaml --outfile big_planet_transit.mp4 --nosound\n```\n\n## Output\n\nThe script produces an `.mp4` video file. If sound generation is enabled (and FFmpeg is available), the sonified light curve audio track will be included in the video, allowing the transit event to be both seen and heard.\n\n## Troubleshooting\n\n*   **`FileNotFoundError: ... 'ffmpeg'`:** FFmpeg is not installed correctly or not found in your PATH. Verify your FFmpeg installation.\n*   **`soundfile.LibsndfileNotFoundError`:** The `libsndfile` backend library might be missing. Installation methods vary: `brew install libsndfile` (macOS), `sudo apt-get install libsndfile1` (Debian/Ubuntu), check `soundfile` documentation for others.\n*   **Video saves, but no sound:** Review the console output for errors during the \"Merging video and audio\" step. This usually indicates an FFmpeg problem or that the temporary audio file wasn't created successfully.\n*   **`ModuleNotFoundError`:** Ensure your virtual environment is active and you've installed requirements via `pip install -r requirements.txt`.\n*   **Audio sounds jittery/clicky:** This *should* be minimized by the phase continuity fix, but if issues persist, experiment with `VIDEO_FPS` and `num_frames` in the config.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenzoperesafonso%2Fexotransit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenzoperesafonso%2Fexotransit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenzoperesafonso%2Fexotransit/lists"}