handle_input
- erwans3.io_tools.handle_input(input: Any, format: Any, unit: Optional[Union[Quantity, str]] = None, default: Optional[Any] = None) Any
Convert the input value to the desired format with specified units.
Parameters: - input (
Any): The input value to be converted. - format (Any): The desired format for the output value. - unit (Quantity,str, optional): The unit to apply to the output. Defaults to None. - default (Any, optional): The default value if the input is None. Defaults to None.Returns: - output (
Any): The converted output value.Raises: - TypeError: If the input type or format is not supported or if there is an issue with units.
Notes: - Supported formats include u.Quantity, BaseRepresentation subclasses, Time, and SkyCoord.