Rogii Solo.Base¶
method convert_xy(value, measure_units, force_to_meters) |
Convert an XY-coordinate value based on changes of XY coordinate measurement units. |
method convert_z(value, measure_units) |
Convert a given Z value based on the specified measurement units. |
method convert_angle(value) |
Convert a given angle value from radians to degrees. |
method safe_round(value, precision) |
Safely rounds a given value to the specified number of decimal places. |
method to_dict(*args, **kwargs) |
Expected to convert object to dictionary |
method to_df(*args, **kwargs) |
Expected to convert object to Pandas DataFrame |
method to_dict(*args, **kwargs) |
Return empty dictionary |
method to_df(*args, **kwargs) |
Return empty DataFrame |
method to_dict(*args, **kwargs) |
Convert inherited object to the list of dictionaries |
method to_df(*args, **kwargs) |
Convert inherited object to the Pandas DataFrame |
method find_by_id(value) |
Find an object by its unique identifier (UUID). |
method find_by_name(value) |
Find an object by its name. |
Module Contents¶
- class Convertible¶
Convertibleis used to convert values of inherited objects by changing measure units.- static convert_xy(value: float, measure_units: rogii_solo.calculations.enums.EMeasureUnits, force_to_meters: bool = False) float | None¶
Convert an XY-coordinate value based on changes of XY coordinate measurement units.
- Parameters:
value – The XY-coordinate value to be converted.
measure_units – The measurement units of XY coordinates.
force_to_meters – If True, forces the conversion to meters regardless of the current units.
- Returns:
The converted XY coordinate value.
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a well well = project.wells.find_by_name('Well1') # Convert Y coordinate to meters y_srf = well.y_srf y_srf_in_meters = well.convert_xy(value=y_srf, measure_units=project.measure_unit, force_to_meters=True) print(y_srf_in_meters)
- static convert_z(value: float, measure_units: rogii_solo.calculations.enums.EMeasureUnits) float | None¶
Convert a given Z value based on the specified measurement units.
- Parameters:
value – The Z value to be converted.
measure_units – The measurement units to use for the conversion.
- Returns:
The converted Z coordinate value, or None if the input value is None.
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a well well = project.wells.find_by_name('Well1') # Convert kb based on measure unit kb = well.kb kb_converted = well.convert_z(value=kb, measure_units=project.measure_unit) print(kb_converted)
- static convert_angle(value: float) float | None¶
Convert a given angle value from radians to degrees.
- Parameters:
value – The angle value in radians to be converted.
- Returns:
The converted angle value in degrees, or None if the input value is None.
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a well well = project.wells.find_by_name('Well1') # Convert azimuth to degrees azimuth = well.azimuth azimuth_converted = well.convert_angle(value=azimuth) print(azimuth_converted)
- static safe_round(value, precision: int = ROUNDING_PRECISION)¶
Safely rounds a given value to the specified number of decimal places.
- Parameters:
value – The value to be rounded.
precision – The number of decimal places to round to.
- Returns:
The rounded value, or None if the input value is None.
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a well well = project.wells.find_by_name('Well1') # Round kb kb_rounded = well.safe_round(value=well.kb, precision=2) print(kb_rounded)
- class BaseObject¶
Bases:
abc.ABC,ConvertibleClass with private and abstract methods.
- abstract to_df(*args, **kwargs) pandas.DataFrame¶
Expected to convert object to Pandas DataFrame
- class ComplexObject(papi_client: rogii_solo.papi.client.PapiClient)¶
Bases:
BaseObjectClass with methods to convert inherited objects to Pandas DataFrame
- to_df(*args, **kwargs) pandas.DataFrame¶
Return empty DataFrame
- class ObjectRepository(objects: List[T] = None)¶
Bases:
list[T]ObjectRepositoryis used to detect objects by name and id. Moreover, it has methods to convert objects to Dictionary and Pandas DataFrame. It is inherited by all main objects in the documentation, which represent a group of geological objects.- to_dict(*args, **kwargs) rogii_solo.types.DataList¶
Convert inherited object to the list of dictionaries
- Returns:
List of dictionaries
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a group of wells wells = project.wells # Convert wells to the list of dictionaries wells_to_dict = wells.to_dict() print(wells_to_dict)
- to_df(*args, **kwargs) pandas.DataFrame¶
Convert inherited object to the Pandas DataFrame
- Returns:
Pandas DataFrame
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a group of wells wells = project.wells # Convert wells to the list of Pandas DataFrame wells_to_df = wells.to_df() print(wells_to_df)
- find_by_id(value) T | None¶
Find an object by its unique identifier (UUID).
- Parameters:
value – The object UUID to search for.
- Returns:
The object with the matching UUID, or None if not found.
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a group of wells wells = project.wells # Get a well by ID well = wells.find_by_id('WellID') print(well.to_dict())
- find_by_name(value) T | None¶
Find an object by its name.
- Parameters:
value – The object name to search for.
- Returns:
The object with the matching name, or None if not found.
- Example:
from rogii_solo import SoloClient client_id = ... # Input your client ID client_secret = ... # Input your client secret solo_client = SoloClient(client_id=client_id, client_secret=client_secret) project = solo_client.set_project_by_name('Project1') # Get a group of wells wells = project.wells # Get a well by name well = wells.find_by_name('Well1') print(well.to_dict())