convert_units
Convert a value between physical units (e.g., distance, velocity, parallax) using validated conversions and rejecting mismatches.
Instructions
Convert a value between physical units with astropy's tested conversions.
Example: convert a parallax in mas, a distance in pc to ly, a velocity in km/s. Returns the converted value tagged with its new unit. Rejects unit mismatches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| to_unit | Yes | ||
| from_unit | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | ||
| error | No | ||
| value | Yes |