Package resokit.load
The ResoKit.load package includes tools to load planetary systems locally.
- resokit.load.from_binary(name: str, exact_match: bool = True, as_pandas: bool = False, soft: bool = False, add_period: bool = True, verbose: bool = True, rename: str | None = None) StaticBinaryStar[source]
Load a binary star system from the dataset.
- Parameters:
name (str) – Name of the binary star system to load.
exact_match (bool, optional. Default is True.) – If True, return the exact match only. If False, return the best match.
as_pandas (bool, optional. Default is False.) – If True, return the data as a pandas DataFrame.
soft (bool, optional. Default is False.) – If True, return None if the star is not found. If False, raise an error if the star is not found.
add_period (bool, optional. Default is True.) – If True, add the period of the binary system.
verbose (bool, optional. Default is True.) – If True, print messages.
rename (Union[str, None], optional. Default is None.) – If not None, set this value as the name of the stars.
- Returns:
The loaded binary star system.
- Return type:
- resokit.load.from_eu(name: str, is_planet: bool = False, file_path: str | Path | bool = True, drop: bool = True, store: bool = True, store_index: bool = True, verbose: bool = True, low_memory: bool = False, as_resokit: bool = False, alternative_names: bool = False, exact_match: bool = True, check_binary: bool | None = True, soft: bool = False) ResokitDataFrame | StaticSystem | None[source]
Load system from ExoplanetEU.
- Parameters:
name (str) – System/planet name. (Remember case sensitivity)
is_planet (bool, optional. Default: False.) – Whether to search for a planet or a star.
file_path (str, Path, bool, optional. Default: True) – Path to the file to load the dataset. If True, default filename is used. If False, the file is not loaded.
drop (bool, optional. Default: True.) – Whether to drop extra columns.
store (bool, optional. Default: True.) – Whether to store the whole dataset in memory.
store_index (bool, optional. Default: True.) – Whether to store the whole dataset index in memory. Automatically set to True if store is True.
verbose (bool, optional. Default: True.) – Whether to print information.
low_memory (bool, optional. Default: False.) – Whether to avoid loading the whole dataset into memory.
as_resokit (bool, optional. Default: False.) – Whether to return the dataset in ResoKit format.
alternative_names (bool, optional. Default: False.) – Whether to search for alternative names.
exact_match (bool, optional. Default: True.) – Whether to search for an exact match. If True verbose=True, suggestions will be printed in case of no exact match. If False, the search will be more flexible, and a very (very) similar name will be accepted. Useful for names with different characters (e.g., hyphens), or for names with extra information (e.g., “A” or “B”).
check_binary (bool, optional. Default: True.) – Whether to check if the system is a binary system. If it is a binary system indeed, then the final system created is a StaticBinarySystem instead of a StaticSystem. If None, the check will be performed only to print information (if verbose=True).
soft (bool, optional. Default: False.) – If True, return None if the system is not found. If False, raise an error if the system is not found.
- Returns:
system – Loaded system as
ResokitDataFrame(if as_resokit=True), orStaticSystem.- Return type:
- resokit.load.from_nasa(name: str, is_planet: bool = False, file_path: str | Path | bool = True, drop: bool = True, store: bool = True, store_index: bool = True, verbose: bool = True, low_memory: bool = False, controversial_set: bool | None = False, default_set: bool | None = True, as_resokit: bool = False, exact_match: bool = True, check_binary: bool | None = True, soft: bool = False) ResokitDataFrame | StaticSystem | None[source]
Load system from NASA.
- Parameters:
name (str) – System/planet name. (Remember case sensitivity)
is_planet (bool, optional. Default: False.) – Whether to search for a planet or a star.
file_path (str, Path, bool, optional. Default: True) – Path to the file to load the dataset. If True, default filename is used. If False, the file is not loaded.
drop (bool, optional. Default: True.) – Whether to drop extra columns.
store (bool, optional. Default: True.) – Whether to store the whole dataset in memory.
store_index (bool, optional. Default: True.) – Whether to store the whole dataset index in memory. Automatically set to True if store is True.
verbose (bool, optional. Default: True.) – Whether to print information.
low_memory (bool, optional. Default: False.) – Whether to avoid loading the whole dataset into memory.
controversial_set (bool, None, optional. Default: False.) – Whether to include controversial data. None to include all data.
default_set (bool, None, optional. Default: True.) – Whether to include default data. None to include all data.
as_resokit (bool, optional. Default: False.) – Whether to return the dataset in ResoKit format. If the output is not a single system, a ResoKitDataframe will be returned.
exact_match (bool, optional. Default: True.) – Whether to search for an exact match. If True verbose=True, suggestions will be printed in case of no exact match. If False, the search will be more flexible, and a very (very) similar name will be accepted. Useful for names with different characters (e.g., hyphens), or for names with extra information (e.g., “A” or “B”).
check_binary (bool, optional. Default: True.) – Whether to check if the system is a binary system. If it is a binary system indeed, then the final system created is a StaticBinarySystem instead of a StaticSystem. If None, the check will be performed only to print information (if verbose=True).
soft (bool, optional. Default: False.) – If True, return None if the system is not found. If False, raise an error if the system is not found.
- Returns:
system – Loaded system as
ResokitDataFrame(if as_resokit=True), orStaticSystem.- Return type: