TidalPy package
Subpackages
- TidalPy.Extending package
- Subpackages
- TidalPy.Extending.burnman package
- Subpackages
- Submodules
- TidalPy.Extending.burnman.build module
- TidalPy.Extending.burnman.burnman_defaultc module
- TidalPy.Extending.burnman.burnman_layer module
- TidalPy.Extending.burnman.burnman_world module
- TidalPy.Extending.burnman.conversion module
- TidalPy.Extending.burnman.defaults module
- TidalPy.Extending.burnman.package module
- TidalPy.Extending.burnman package
- Subpackages
- TidalPy.Material package
- TidalPy.RadialSolver package
- Subpackages
- Submodules
- TidalPy.RadialSolver.constants module
- TidalPy.RadialSolver.helpers module
- TidalPy.RadialSolver.love module
- TidalPy.RadialSolver.matrix module
- TidalPy.RadialSolver.rs_solution module
RadialSolverSolutionRadialSolverSolution.QRadialSolverSolution.bulk_modulus_arrayRadialSolverSolution.central_pressureRadialSolverSolution.degree_lRadialSolverSolution.density_arrayRadialSolverSolution.density_bulkRadialSolverSolution.eos_call()RadialSolverSolution.eos_error_codeRadialSolverSolution.eos_iterationsRadialSolverSolution.eos_messageRadialSolverSolution.eos_pressure_errorRadialSolverSolution.eos_steps_takenRadialSolverSolution.eos_successRadialSolverSolution.error_codeRadialSolverSolution.get_result_by_ytype_name()RadialSolverSolution.gravity_arrayRadialSolverSolution.hRadialSolverSolution.kRadialSolverSolution.lRadialSolverSolution.lagRadialSolverSolution.layer_upper_radius_arrayRadialSolverSolution.loveRadialSolverSolution.massRadialSolverSolution.mass_arrayRadialSolverSolution.messageRadialSolverSolution.moiRadialSolverSolution.moi_arrayRadialSolverSolution.moi_factorRadialSolverSolution.num_layersRadialSolverSolution.num_ytypesRadialSolverSolution.plot_interior()RadialSolverSolution.plot_ys()RadialSolverSolution.pressure_arrayRadialSolverSolution.print_diagnostics()RadialSolverSolution.radiusRadialSolverSolution.radius_arrayRadialSolverSolution.resultRadialSolverSolution.shear_modulus_arrayRadialSolverSolution.steps_takenRadialSolverSolution.successRadialSolverSolution.surface_gravityRadialSolverSolution.surface_pressureRadialSolverSolution.volume
- TidalPy.RadialSolver.shooting module
- TidalPy.RadialSolver.solver module
- TidalPy.cooling package
get_cooling_model_default_inputs()- Submodules
- TidalPy.cooling.cooling module
CoolingModelCoolingModel.bltCoolingModel.boundary_layer_thicknessCoolingModel.clear_state()CoolingModel.coolingCoolingModel.cooling_fluxCoolingModel.density_bulkCoolingModel.gravityCoolingModel.known_model_const_argsCoolingModel.known_model_live_argsCoolingModel.known_modelsCoolingModel.model_config_keyCoolingModel.nusseltCoolingModel.rayleighCoolingModel.surface_areaCoolingModel.temperatureCoolingModel.temperature_surfCoolingModel.thermal_conductivityCoolingModel.thermal_diffusivityCoolingModel.thermal_expansionCoolingModel.thicknessCoolingModel.viscosity
- TidalPy.cooling.cooling_models module
- TidalPy.dynamics package
- TidalPy.numba_scipy package
- TidalPy.orbit package
- TidalPy.radiogenics package
get_radiogenic_model_default_inputs()- Submodules
- TidalPy.radiogenics.radiogenic_models module
- TidalPy.radiogenics.radiogenics module
RadiogenicsRadiogenics.clear_state()Radiogenics.heatingRadiogenics.isos_concentrationRadiogenics.isos_halflifeRadiogenics.isos_hprRadiogenics.isos_massfracRadiogenics.isos_nameRadiogenics.known_model_const_argsRadiogenics.known_model_live_argsRadiogenics.known_modelsRadiogenics.massRadiogenics.model_config_keyRadiogenics.radiogenic_layer_mass_fracRadiogenics.reinit()Radiogenics.time
- TidalPy.rheology package
- Subpackages
- Submodules
- TidalPy.rheology.base module
- TidalPy.rheology.models module
- TidalPy.rheology.rheology module
RheologyRheology.betaRheology.clear_state()Rheology.complex_compliance_modelRheology.complex_compliancesRheology.complex_compliances_changed()Rheology.complianceRheology.default_configRheology.layer_config_keyRheology.liquid_viscosityRheology.liquid_viscosity_modelRheology.melt_fractionRheology.partial_melting_modelRheology.postmelt_complianceRheology.postmelt_shear_modulusRheology.postmelt_viscosityRheology.premelt_shearRheology.premelt_viscosityRheology.quality_factorRheology.set_state()Rheology.shearRheology.shear_modulusRheology.strength_changed()Rheology.temperature_pressure_changed()Rheology.tidal_frequencies_changed()Rheology.unique_tidal_frequenciesRheology.viscosityRheology.viscosity_model
- TidalPy.stellar package
- TidalPy.structures package
- Subpackages
- Submodules
- TidalPy.structures.physical module
PhysicalObjSphericalPhysicalObjSpherical.MPhysicalObjSpherical.RPhysicalObjSpherical.VPhysicalObjSpherical.betaPhysicalObjSpherical.beta_innerPhysicalObjSpherical.beta_middlePhysicalObjSpherical.beta_outerPhysicalObjSpherical.densitiesPhysicalObjSpherical.density_bulkPhysicalObjSpherical.density_innerPhysicalObjSpherical.density_middlePhysicalObjSpherical.density_outerPhysicalObjSpherical.density_slicesPhysicalObjSpherical.depthsPhysicalObjSpherical.dxPhysicalObjSpherical.gPhysicalObjSpherical.gravitiesPhysicalObjSpherical.gravity_innerPhysicalObjSpherical.gravity_middlePhysicalObjSpherical.gravity_outerPhysicalObjSpherical.gravity_slicesPhysicalObjSpherical.gravity_surfPhysicalObjSpherical.gravity_surfacePhysicalObjSpherical.massPhysicalObjSpherical.mass_belowPhysicalObjSpherical.mass_below_slicesPhysicalObjSpherical.mass_slicesPhysicalObjSpherical.massesPhysicalObjSpherical.mid_slice_indexPhysicalObjSpherical.moiPhysicalObjSpherical.moi_factorPhysicalObjSpherical.moi_idealPhysicalObjSpherical.num_slicesPhysicalObjSpherical.pressure_abovePhysicalObjSpherical.pressure_innerPhysicalObjSpherical.pressure_middlePhysicalObjSpherical.pressure_outerPhysicalObjSpherical.pressure_slicesPhysicalObjSpherical.pressuresPhysicalObjSpherical.radiiPhysicalObjSpherical.radiusPhysicalObjSpherical.radius_innerPhysicalObjSpherical.radius_middlePhysicalObjSpherical.radius_outerPhysicalObjSpherical.reinit()PhysicalObjSpherical.sa_slicesPhysicalObjSpherical.set_geometry()PhysicalObjSpherical.set_static_pressure()PhysicalObjSpherical.surface_areaPhysicalObjSpherical.surface_area_innerPhysicalObjSpherical.surface_area_middlePhysicalObjSpherical.surface_area_outerPhysicalObjSpherical.surface_areasPhysicalObjSpherical.temperature_innerPhysicalObjSpherical.temperature_outerPhysicalObjSpherical.thicknessPhysicalObjSpherical.volumePhysicalObjSpherical.volume_slicesPhysicalObjSpherical.volumes
- TidalPy.tides package
- Subpackages
- TidalPy.tides.ctl_funcs package
- TidalPy.tides.eccentricity_funcs package
- TidalPy.tides.inclination_funcs package
get_inclination_func()- Submodules
- TidalPy.tides.inclination_funcs.orderl2 module
- TidalPy.tides.inclination_funcs.orderl3 module
- TidalPy.tides.inclination_funcs.orderl4 module
- TidalPy.tides.inclination_funcs.orderl5 module
- TidalPy.tides.inclination_funcs.orderl6 module
- TidalPy.tides.inclination_funcs.orderl7 module
- TidalPy.tides.methods package
- TidalPy.tides.modes package
- TidalPy.tides.multilayer package
- TidalPy.tides.potential package
- Submodules
- TidalPy.tides.potential.nsr_med_eccen_gen_obliquity module
- TidalPy.tides.potential.nsr_med_eccen_med_obliquity module
- TidalPy.tides.potential.nsr_med_eccen_no_obliquity module
- TidalPy.tides.potential.nsr_modes_low_eccen_gen_obliquity module
- TidalPy.tides.potential.nsr_modes_med_eccen_gen_obliquity module
- TidalPy.tides.potential.nsr_modes_med_eccen_med_obliquity module
- TidalPy.tides.potential.nsr_modes_med_eccen_no_obliquity module
- TidalPy.tides.potential.synchronous_low_e module
- Submodules
- TidalPy.tides.dissipation module
- TidalPy.tides.heating module
- TidalPy.tides.love1d module
- TidalPy.tides.universal_coeffs module
- Subpackages
- TidalPy.toolbox package
- TidalPy.utilities package
- Subpackages
- TidalPy.utilities.arrays package
- TidalPy.utilities.classes package
- TidalPy.utilities.conversions package
- TidalPy.utilities.dimensions package
- TidalPy.utilities.exoplanets package
- TidalPy.utilities.graphics package
- TidalPy.utilities.integration package
- TidalPy.utilities.io package
- TidalPy.utilities.math package
- TidalPy.utilities.multiprocessing package
- TidalPy.utilities.numpy_helper package
- TidalPy.utilities.performance package
- TidalPy.utilities.spherical_helper package
- TidalPy.utilities.string_helper package
- Submodules
- TidalPy.utilities.dictionary_utils module
- TidalPy.utilities.types module
- TidalPy.utilities.types_x module
- Subpackages
Submodules
TidalPy.cache module
TidalPy.configurations module
Helper functions for loading TidalPy’s configurations.
It is recommended that you only change these once you have some experience with the package You can check their default values by examining the same file at https://github.com/jrenaud90/TidalPy/TidalPy/defaultc.py
- TidalPy.configurations.check_config_version(config_path: str, allow_bugfix_difference: bool = True, warn_on_false: bool = True, raise_on_false: bool = False) bool[source]
Checks a TidalPy configuration file to ensure that it is compatible with this version of TidalPy.
- Parameters:
config_path (str) – Path to the configuration file to test.
allow_bugfix_difference (bool, default = True) – If true, then a config with version A.B.C will still be allowed for TidalPy version A.B.D
warn_on_false (bool, default = True) – If true, then a warning message will be shown if the config version check fails.
raise_on_false (bool, default = False) – If true, then an error message will be raised if the config version check fails.
- Returns:
compatible – Flag for if this configuration file is compatible.
- Return type:
bool
- TidalPy.configurations.get_default_config() dict[source]
Loads TidalPy configurations that are found on the local disk. If no configuration file is found (likely when TidalPy is used for the first time) then default configurations will be saved to disk first.
- TidalPy.configurations.get_default_world_dir() str[source]
Find the directory containing TidalPy’s world configuration files. If no directory is found (likely when TidalPy is used for the first time) then default configurations will be saved to disk first.
- TidalPy.configurations.save_dict_to_toml(dict_to_save: dict, file_path: str, overwrite: bool = True)[source]
Saves a python dictionary to a toml file at the specified file path.
- Parameters:
dict_to_save (dict) – Python dictionary.
file_path (str) – Filepath to save to.
overwrite (bool, default = True) – If True, then the file will be overwritten if already present. by default True
TidalPy.constants module
TidalPy.defaultc module
TidalPy.exceptions module
- exception TidalPy.exceptions.ArgumentException(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'There was an error with one or more of a function or method arguments.'
- exception TidalPy.exceptions.AttributeException(*args, **kwargs)[source]
Bases:
TidalPyOOPException- default_message = 'There was a problem with one or more class attributes or methods.'
- exception TidalPy.exceptions.AttributeNotSetError(*args, **kwargs)[source]
Bases:
AttributeException- default_message = 'An attribute has not been changed from its default value.'
- exception TidalPy.exceptions.BadArrayShape(*args, **kwargs)[source]
Bases:
TidalPyValueException- default_message = 'TidalPy requires certain arrays maintain the same shape for all layers and planets. It has found an array with an unexpected shape.'
- exception TidalPy.exceptions.BadAttributeValueError(*args, **kwargs)[source]
Bases:
AttributeException- default_message = 'Bad value found in attribute setter.'
- exception TidalPy.exceptions.BadValueError(*args, **kwargs)[source]
Bases:
TidalPyValueException- default_message = 'An unrealistic value was encountered.'
- exception TidalPy.exceptions.BadWorldSignature(*args, **kwargs)[source]
Bases:
TidalPyOrbitError- default_message = 'A bad world signature was provided to an orbit class.'
- exception TidalPy.exceptions.BadWorldSignatureType(*args, **kwargs)[source]
Bases:
BadWorldSignature- default_message = 'An unexpected type was encountered for a world signature provided to an orbit class.'
- exception TidalPy.exceptions.ConfigPropertyChangeError(*args, **kwargs)[source]
Bases:
ImproperPropertyHandling- default_message = "Attempted to change a configuration class property. These must be changed in the world/layer's configuration (`<instance>.config`) followed by a call to its `reinit` method."
- exception TidalPy.exceptions.ConfigurationException(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'An error was encountered when handling a configuration, parameter, or model.'
- exception TidalPy.exceptions.FailedForcedStateUpdate(*args, **kwargs)[source]
Bases:
TidalPyOOPException- default_message = 'The state of a class was forced to update but was unable to do so.'
- exception TidalPy.exceptions.IOException(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'An issue arose when accessing system disk (either loading or saving data)'
- exception TidalPy.exceptions.ImplementedBySubclassError(*args, **kwargs)[source]
Bases:
TidalPyOOPException- default_message = 'Trying to access sub-class functionality from a base class.'
- exception TidalPy.exceptions.ImproperGeometryPropertyHandling(*args, **kwargs)[source]
Bases:
ConfigPropertyChangeError- default_message = 'The attribute you are attempting to set must be set by the set_geometry method or in the configurations.'
- exception TidalPy.exceptions.ImproperPropertyHandling(*args, **kwargs)[source]
Bases:
AttributeException- default_message = 'The attribute you are attempting to set must be set by a different class or method.'
- exception TidalPy.exceptions.IncompatibleModelConfigError(*args, **kwargs)[source]
Bases:
ConfigurationException- default_message = 'One or more model parameters are not compatible with each other'
- exception TidalPy.exceptions.IncompatibleModelError(*args, **kwargs)[source]
Bases:
ModelException- default_message = 'One or more model parameters are not compatible with each other'
- exception TidalPy.exceptions.IncorrectArgumentType(*args, **kwargs)[source]
Bases:
ArgumentException- default_message = 'A method or function argument was provided the incorrect type.'
- exception TidalPy.exceptions.IncorrectAttributeType(*args, **kwargs)[source]
Bases:
AttributeException- default_message = 'An attribute was set with incorrect type.'
- exception TidalPy.exceptions.IncorrectMethodToSetStateProperty(*args, **kwargs)[source]
Bases:
ImproperPropertyHandling- default_message = 'This particular state property is set by a different method than the one attempted. It may be set by a different object entirely.'
- exception TidalPy.exceptions.InitializationError(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'An issue occurred during TidalPy initialization.'
- exception TidalPy.exceptions.InitiatedPropertyChangeError(*args, **kwargs)[source]
Bases:
ImproperPropertyHandling- default_message = "Attempted to change an initiated class property. These are set when an instance is created and can only be changed by that object's methods (or not at all). Try to make a new instance or use the object's methods instead of changing its initiated properties."
- exception TidalPy.exceptions.InnerscopePropertySetError(*args, **kwargs)[source]
Bases:
ImproperPropertyHandling- default_message = 'Attempted to set a property of an object that is inside the scope of the object where the setter was called from. Try to set this property to the object of interest.'
- exception TidalPy.exceptions.IntegrationFailed(*args, **kwargs)[source]
Bases:
TidalPyIntegrationException- default_message = 'Integration was not successful'
- exception TidalPy.exceptions.IntegrationTimeOut(*args, **kwargs)[source]
Bases:
TidalPyIntegrationException- default_message = 'Integration was stopped due to long integration time'
- exception TidalPy.exceptions.MissingArgumentError(*args, **kwargs)[source]
Bases:
ArgumentException- default_message = 'One or more required argument(s) and/or key-word argument(s) were not provided.'
- exception TidalPy.exceptions.MissingAttributeError(*args, **kwargs)[source]
Bases:
AttributeException- default_message = 'The attribute you are attempting to access has not been set.'
- exception TidalPy.exceptions.ModelException(*args, **kwargs)[source]
Bases:
ConfigurationException- default_message = 'An error was encountered when handling a model.'
- exception TidalPy.exceptions.NotYetImplementedError(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'Tried to use functionality that is not yet implemented.'
- exception TidalPy.exceptions.OuterscopePropertySetError(*args, **kwargs)[source]
Bases:
ImproperPropertyHandling- default_message = 'Attempted to set a property of an object from a separate object that is inside the scope of the first. Try to set this property to the outer object.'
- exception TidalPy.exceptions.ParameterException(*args, **kwargs)[source]
Bases:
ConfigurationException- default_message = 'An error was encountered when handling a parameter.'
- exception TidalPy.exceptions.ParameterMissingError(*args, **kwargs)[source]
Bases:
ParameterException- default_message = 'One or more parameter(s) or configuration(s) are missing and have no defaults. Check that keys have correct spelling and capitalization.'
- exception TidalPy.exceptions.ParameterTypeError(*args, **kwargs)[source]
Bases:
ParameterException- default_message = 'One or more parameters were found to have an incorrect type.'
- exception TidalPy.exceptions.ParameterValueError(*args, **kwargs)[source]
Bases:
ParameterException- default_message = 'One or more parameter values are invalid or not supported.'
- exception TidalPy.exceptions.ReinitError(*args, **kwargs)[source]
Bases:
TidalPyOOPException- default_message = 'One or more critical parameters have changed since planet was made. Construct new planet instead.'
- exception TidalPy.exceptions.ReinitNotAllowedError(*args, **kwargs)[source]
Bases:
ReinitError- default_message = 'This class should be fully re-initialized upon load. Partial reinit (via self.reinit()) is not supported.'
- exception TidalPy.exceptions.SolutionFailedError(*args, **kwargs)[source]
Bases:
TidalPyIntegrationException- default_message = 'A solution was not able to be found.'
- exception TidalPy.exceptions.TidalPyException(*args, **kwargs)[source]
Bases:
ExceptionDefault exception for all TidalPy-specific errors
- default_message = 'A Default TidalPy Error Occurred.'
- exception TidalPy.exceptions.TidalPyIntegrationException(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'An issue arose during time integration.'
- exception TidalPy.exceptions.TidalPyLayerError(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'There was a problem related to the functionality or building of a TidalPy layer.'
- exception TidalPy.exceptions.TidalPyOOPException(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'There was an error with a TidalPy class or OOP process.'
- exception TidalPy.exceptions.TidalPyOrbitError(*args, **kwargs)[source]
Bases:
TidalPyOOPException- default_message = 'There was a problem related to the functionality or building of a TidalPy orbit.'
- exception TidalPy.exceptions.TidalPyValueException(*args, **kwargs)[source]
Bases:
TidalPyException- default_message = 'There is an issue with the value of a variable.'
- exception TidalPy.exceptions.TidalPyWorldError(*args, **kwargs)[source]
Bases:
TidalPyOOPException- default_message = 'There was a problem related to the functionality or building of a TidalPy world.'
- exception TidalPy.exceptions.UnknownModelError(*args, **kwargs)[source]
Bases:
ModelException- default_message = 'A selected model, parameter, or switch is not currently supported.'
- exception TidalPy.exceptions.UnknownTidalPyConfigValue(*args, **kwargs)[source]
Bases:
ConfigurationException- default_message = 'A configuration set in TidalPy.configurations is not know or has not yet been implemented.'
- exception TidalPy.exceptions.UnknownWorld(*args, **kwargs)[source]
Bases:
TidalPyWorldError- default_message = 'User provided world name does not match any prebuilt world configs. Check name or provide a manual configuration dictionary.'
- exception TidalPy.exceptions.UnknownWorldType(*args, **kwargs)[source]
Bases:
TidalPyWorldError- default_message = 'A world type was encountered that is either unknown, contains a typo, or is not yet implemented.'
- exception TidalPy.exceptions.UnusualRealValueError(*args, **kwargs)[source]
Bases:
TidalPyValueException- default_message = 'An usually large or small value was encountered for a parameter. Confirm proper dimensional units.'
TidalPy.initialize module
Functions used to initialize/reinitialize TidalPy
- TidalPy.initialize.initialize(provided_config_file=None)[source]
Initialize (or reinitialize) TidalPy based on information stored in TidalPy.config
- Items in TidalPy.config are identical to those in the TidalPy_Config.toml unless the user changed them and called
TidalPy.reinit()
See more information about TidalPy_Config.toml in TidalPy.configurations.py
TidalPy.logger module
- class TidalPy.logger.DeltaTimeFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]
Bases:
Formatter- format(record)[source]
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.
TidalPy.output module
TidalPy.paths module
- TidalPy.paths.get_worlds_dir() str[source]
TidalPy directory containing configurations for various pre-built worlds.
- TidalPy.paths.timestamped_str(string_to_stamp: str = '', date: bool = True, time: bool = True, second: bool = False, millisecond: bool = False, preappend: bool = True, separation: str = '_', provided_datetime=None) str[source]
Creates a timestamp string at the current time and date.
- Parameters:
string_to_stamp (str = None) – Another string to add before or after timestamp
date (bool = True) – Whether or not the date will be included in the timestamp
time (bool = True) – Whether or not the time will be included in the timestamp
second (bool = False) – Whether or not the second will be included in the timestamp
millisecond (bool = False) – Whether or not the date will be included in the timestamp
preappend (bool = True) – Determines where the timestamp will be appended relative to the provided string
separation (str = '_') – Character that separates the timestamp and any provided string
provided_datetime (datetime.datetime = None) – A datetime.datetime object. If none provided the function will use call time
- Returns:
timestamped_str – String with the current date and/or time added on.
- Return type:
str
- TidalPy.paths.unique_path(attempt_path: str, is_dir: bool = None, make_dir: bool = False) str[source]
Creates a unique directory or filename with appended numbers if file/dir already exists.
- Parameters:
attempt_path (str) – Desired Name. This could be a path itself.
is_dir (bool = None) – Is this a directory or file? If left as None the function will try to guess.
make_dir (bool = False) – If is_dir and make_dir are both True then an attempt to mkdir will be made.
- Returns:
dir_file_path – The new, unique, path to the directory or file.
- Return type:
str