mars-time-utils


Namemars-time-utils JSON
Version 0.1.7 PyPI version JSON
download
home_pageNone
SummaryUtilities for converting Martian time (Mars24, Piqueux, SolCal...)
upload_time2025-10-22 17:17:39
maintainerNone
docs_urlNone
authorPaneureka
requires_python>=3.8
licenseNone
keywords mars time conversion planetary astronomy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mars_time_utils

Python tools for converting between Earth and Martian time. This package provides time conversion algorithms based on Mars24, Piqueux et al. (2015), and SolCal for space exploration applications.

## Installation

To install the package, use the command:

```bash
pip install mars_time_utils
```

## Usage

### Basic conversion between date formats

```python
import datetime
from mon_paquet import calendarConversion

# Convert an Earth date to Martian SolCal time
date_terrestre = datetime.datetime(2025, 10, 16, 10, 0, 0)
temps_solcal = calendarConversion(date_terrestre, "solcal")
print(f"Date SolCal: MY {temps_solcal[0]}, Sol {temps_solcal[1]}, {temps_solcal[2]}")

# Conversion to tropical format (Ls, MY)
temps_tropical = calendarConversion(date_terrestre, "tropical")
print(f"Date tropicale: Ls={temps_tropical[0]:.2f}°, MY {temps_tropical[1]}")

# Conversion to Julian Days
jd = calendarConversion(date_terrestre, "ed_jd")
print(f"Julian Day: {jd}")
```

### Supported Formats

- `"ed_dt"`: Earth Dates (datetime.datetime)
- `"ed_jd"`: Earth Julian Days (float)
- `"solcal"`: Martian SolCal format (MY, Sol, MUT)
- `"solcal_m"`: SolCal format with Martian months
- `"tropical"`: Martian Tropical Format (Ls, MY)

### Available Algorithms

The package supports several calculation algorithms:
- **Mars24**: NASA Reference Algorithm
- **Piqueux et al. (2015)**: Improved algorithm for calculating Ls
- **SolCal**: Standardized Martian Calendar System

### Advanced Options

```python
# Use the Piqueux algorithm for greater precision
temps_tropical = calendarConversion(date_terrestre, "tropical", piqueuxEtAl=True)

# Also obtain Martian Mean Universal Time (MUT)
result = calendarConversion(date_terrestre, "tropical", giveMUT=True)

# Calculate Local True Solar Time (LTST) for a given longitude
ltst = calendarConversion(date_terrestre, "tropical", giveLTST=True, planeto_longitude=137.4)
```

## Prerequisites

- Python 3.8+
- NumPy >= 1.25
- SciPy >= 1.11
- Astropy >= 6.0

## Description

The `mars_time_utils` package provides utility functions for converting between Earth time and Martian time. It is primarily intended for developers, researchers, and space exploration enthusiasts who need to manipulate Mars-related time formats in their Python applications.

The conversions support all time formats commonly used in Martian planetology, with an accuracy suitable for space missions.

## Documentation

For more information on the algorithms used:
- [Mars24 Algorithm](https://www.giss.nasa.gov/tools/mars24/)
- Piqueux et al. (2015) "Enumeration of Mars years and seasons since 1874"

## Contribution

"to be defined"

## Licence

This project is licensed under a "to be defined" license. See the [LICENSE](LICENSE) file for more details.

## Authors

- **Victorien Guyon** - Lead Algorithm Developer - victorien.guyon@protonmail.com
- **University Group of the University of Savoie Mont-Blanc, First Year Master's in Computer Science**
    Development of the Python, CLI, and executable packages
    - **Timéo Chatelain** - chatelain.timeo@gmail.com
    - **Nathan Roi** - nathan.roi@etu.univ-savoie.fr
    - **Guillaume Boissier** - guillaume.boissier@etu.univ-savoie.fr
    - **Ronan Mcmanus** - ronan.mcmanus@etu.univ-savoie.fr
    - **Jonathan Thca** - jonathan.tcha@etu.univ-savoie.frfr

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mars-time-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "mars, time, conversion, planetary, astronomy",
    "author": "Paneureka",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/cd/dd/61160dd0b840b2419c3bdeebd88a25f16697fefe627d39f1dad1e1ccb8b4/mars_time_utils-0.1.7.tar.gz",
    "platform": null,
    "description": "# mars_time_utils\r\n\r\nPython tools for converting between Earth and Martian time. This package provides time conversion algorithms based on Mars24, Piqueux et al. (2015), and SolCal for space exploration applications.\r\n\r\n## Installation\r\n\r\nTo install the package, use the command:\r\n\r\n```bash\r\npip install mars_time_utils\r\n```\r\n\r\n## Usage\r\n\r\n### Basic conversion between date formats\r\n\r\n```python\r\nimport datetime\r\nfrom mon_paquet import calendarConversion\r\n\r\n# Convert an Earth date to Martian SolCal time\r\ndate_terrestre = datetime.datetime(2025, 10, 16, 10, 0, 0)\r\ntemps_solcal = calendarConversion(date_terrestre, \"solcal\")\r\nprint(f\"Date SolCal: MY {temps_solcal[0]}, Sol {temps_solcal[1]}, {temps_solcal[2]}\")\r\n\r\n# Conversion to tropical format (Ls, MY)\r\ntemps_tropical = calendarConversion(date_terrestre, \"tropical\")\r\nprint(f\"Date tropicale: Ls={temps_tropical[0]:.2f}\u00b0, MY {temps_tropical[1]}\")\r\n\r\n# Conversion to Julian Days\r\njd = calendarConversion(date_terrestre, \"ed_jd\")\r\nprint(f\"Julian Day: {jd}\")\r\n```\r\n\r\n### Supported Formats\r\n\r\n- `\"ed_dt\"`: Earth Dates (datetime.datetime)\r\n- `\"ed_jd\"`: Earth Julian Days (float)\r\n- `\"solcal\"`: Martian SolCal format (MY, Sol, MUT)\r\n- `\"solcal_m\"`: SolCal format with Martian months\r\n- `\"tropical\"`: Martian Tropical Format (Ls, MY)\r\n\r\n### Available Algorithms\r\n\r\nThe package supports several calculation algorithms:\r\n- **Mars24**: NASA Reference Algorithm\r\n- **Piqueux et al. (2015)**: Improved algorithm for calculating Ls\r\n- **SolCal**: Standardized Martian Calendar System\r\n\r\n### Advanced Options\r\n\r\n```python\r\n# Use the Piqueux algorithm for greater precision\r\ntemps_tropical = calendarConversion(date_terrestre, \"tropical\", piqueuxEtAl=True)\r\n\r\n# Also obtain Martian Mean Universal Time (MUT)\r\nresult = calendarConversion(date_terrestre, \"tropical\", giveMUT=True)\r\n\r\n# Calculate Local True Solar Time (LTST) for a given longitude\r\nltst = calendarConversion(date_terrestre, \"tropical\", giveLTST=True, planeto_longitude=137.4)\r\n```\r\n\r\n## Prerequisites\r\n\r\n- Python 3.8+\r\n- NumPy >= 1.25\r\n- SciPy >= 1.11\r\n- Astropy >= 6.0\r\n\r\n## Description\r\n\r\nThe `mars_time_utils` package provides utility functions for converting between Earth time and Martian time. It is primarily intended for developers, researchers, and space exploration enthusiasts who need to manipulate Mars-related time formats in their Python applications.\r\n\r\nThe conversions support all time formats commonly used in Martian planetology, with an accuracy suitable for space missions.\r\n\r\n## Documentation\r\n\r\nFor more information on the algorithms used:\r\n- [Mars24 Algorithm](https://www.giss.nasa.gov/tools/mars24/)\r\n- Piqueux et al. (2015) \"Enumeration of Mars years and seasons since 1874\"\r\n\r\n## Contribution\r\n\r\n\"to be defined\"\r\n\r\n## Licence\r\n\r\nThis project is licensed under a \"to be defined\" license. See the [LICENSE](LICENSE) file for more details.\r\n\r\n## Authors\r\n\r\n- **Victorien Guyon** - Lead Algorithm Developer - victorien.guyon@protonmail.com\r\n- **University Group of the University of Savoie Mont-Blanc, First Year Master's in Computer Science**\r\n    Development of the Python, CLI, and executable packages\r\n    - **Tim\u00e9o Chatelain** - chatelain.timeo@gmail.com\r\n    - **Nathan Roi** - nathan.roi@etu.univ-savoie.fr\r\n    - **Guillaume Boissier** - guillaume.boissier@etu.univ-savoie.fr\r\n    - **Ronan Mcmanus** - ronan.mcmanus@etu.univ-savoie.fr\r\n    - **Jonathan Thca** - jonathan.tcha@etu.univ-savoie.frfr\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Utilities for converting Martian time (Mars24, Piqueux, SolCal...)",
    "version": "0.1.7",
    "project_urls": {
        "Homepage": "https://gitlab.com/paneureka-mars/paneureka-marscalconv",
        "Issues": "https://gitlab.com/paneureka-mars/paneureka-marscalconv/issues",
        "Repository": "https://gitlab.com/paneureka-mars/paneureka-marscalconv"
    },
    "split_keywords": [
        "mars",
        " time",
        " conversion",
        " planetary",
        " astronomy"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9c9a9238b51b888fe445fcb8d7d13be3eed68caa6d31f8c8c01ed16aa3f176c0",
                "md5": "e6dd443da889599b8a03d23d7a32a3cf",
                "sha256": "ea130f4ec61fddbf2cba6aceff86e89fd1eee514881835d769b108268b99b0ca"
            },
            "downloads": -1,
            "filename": "mars_time_utils-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6dd443da889599b8a03d23d7a32a3cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19639,
            "upload_time": "2025-10-22T17:17:38",
            "upload_time_iso_8601": "2025-10-22T17:17:38.344634Z",
            "url": "https://files.pythonhosted.org/packages/9c/9a/9238b51b888fe445fcb8d7d13be3eed68caa6d31f8c8c01ed16aa3f176c0/mars_time_utils-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cddd61160dd0b840b2419c3bdeebd88a25f16697fefe627d39f1dad1e1ccb8b4",
                "md5": "1c1890e3a0f7f1801f133295df83c99d",
                "sha256": "db074c078e8c3ed4580cf8783f8a5e9d0e171c2503438df72db9adeb593fe929"
            },
            "downloads": -1,
            "filename": "mars_time_utils-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "1c1890e3a0f7f1801f133295df83c99d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 23886,
            "upload_time": "2025-10-22T17:17:39",
            "upload_time_iso_8601": "2025-10-22T17:17:39.635615Z",
            "url": "https://files.pythonhosted.org/packages/cd/dd/61160dd0b840b2419c3bdeebd88a25f16697fefe627d39f1dad1e1ccb8b4/mars_time_utils-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-22 17:17:39",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "paneureka-mars",
    "gitlab_project": "paneureka-marscalconv",
    "lcname": "mars-time-utils"
}
        
Elapsed time: 2.50238s