sfsimodels package¶
Subpackages¶
- sfsimodels.models package
- Submodules
- sfsimodels.models.abstract_models module
- sfsimodels.models.buildings module
- sfsimodels.models.foundations module
- sfsimodels.models.hazards module
- sfsimodels.models.material module
- sfsimodels.models.soils module
- sfsimodels.models.systems module
- sfsimodels.models.time module
- Module contents
Submodules¶
sfsimodels.build_model_descriptions module¶
-
sfsimodels.build_model_descriptions.
all_descriptions
()[source]¶ Generates a list of descriptions of all the models
Returns:
-
sfsimodels.build_model_descriptions.
build_parameter_descriptions
(obj, user_p=None, output='csv', show_none=True, ignore=None, plist=None)[source]¶ Creates a list of the decription of all the inputs of an object
Parameters: - obj – object, that has parameters
- user_p – dict, user defined parameter descriptions
- show_none – if false, only shows descriptions of parameters that are not None
- ignore – list of parameters to not build
Returns:
sfsimodels.checking_tools module¶
sfsimodels.exceptions module¶
sfsimodels.files module¶
-
class
sfsimodels.files.
Output
[source]¶ Bases:
object
-
add_to_dict
(an_object, extras=None)[source]¶ Convert models to json serialisable output
Parameters: - an_object – An instance of a model object
- extras – A dictionary of extra variables that should be
Returns:
-
add_to_output
(mtype, m_id, serialisable_dict)[source]¶ Can add additional objects or dictionaries to output file that don’t conform to standard objects.
Parameters: - mtype –
- m_id –
- serialisable_dict –
Returns:
-
comments
= ''¶
-
compression
= True¶
-
doi
= ''¶
-
models
¶ Unhashed
-
name
= ''¶
-
sfsimodels_version
= ''¶
-
units
= ''¶
-
-
sfsimodels.files.
ecp_dict_to_objects
(ecp_dict, custom_map=None, verbose=0)[source]¶ Given an ecp dictionary, build a dictionary of sfsi objects
Parameters: - ecp_dict – dict, engineering consistency project dictionary
- custom – dict, used to load custom objects, {model type: custom object}
- verbose – int, console output
Returns: dict
-
sfsimodels.files.
load_json
(ffp, custom=None, verbose=0)[source]¶ Given a json file it creates a dictionary of sfsi objects
Parameters: - ffp – str, Full file path to json file
- custom – dict, used to load custom objects, {model type: custom object}
- verbose – int, console output
Returns: dict
-
sfsimodels.files.
loads_json
(p_str, custom=None, meta=False, verbose=0)[source]¶ Given a json string it creates a dictionary of sfsi objects
Parameters: - ffp – str, Full file path to json file
- custom – dict, used to load custom objects, {model type: custom object}
- meta – bool, if true then also return all ecp meta data in separate dict
- verbose – int, console output
Returns: dict
sfsimodels.functions module¶
-
sfsimodels.functions.
add_to_obj
(obj, dictionary, objs=None, exceptions=None, verbose=0)[source]¶ Cycles through a dictionary and adds the key-value pairs to an object.
Parameters: - obj –
- dictionary –
- exceptions –
- verbose –
Returns:
sfsimodels.loader module¶
-
sfsimodels.loader.
add_inputs_to_object
(obj, values)[source]¶ A generic function to load object parameters based on a dictionary list. :param obj: Object :param values: Dictionary :return:
-
sfsimodels.loader.
load_building_sample_data
(bd)[source]¶ Sample data for the Building object :param bd: :return:
-
sfsimodels.loader.
load_foundation_sample_data
(fd)[source]¶ Sample data for the Foundation object :param fd: Foundation Object :return:
-
sfsimodels.loader.
load_frame_building_sample_data
()[source]¶ Sample data for the BuildingFrame object
Returns:
-
sfsimodels.loader.
load_hazard_sample_data
(hz)[source]¶ Sample data for the Hazard object :param hz: Hazard Object :return:
-
sfsimodels.loader.
load_sample_data
(sss)[source]¶ Sample data for the SoilStructureSystem object :param sss: :return:
sfsimodels.make_migrations module¶
sfsimodels.output module¶
-
sfsimodels.output.
add_table_ends
(para, oformat='latex', caption='caption-text', label='table')[source]¶ Adds the latex table ends
Parameters: - para –
- oformat –
- caption –
- label –
Returns:
-
sfsimodels.output.
format_name
(name)[source]¶ format parameter names for output
Parameters: name – Cleans a name for output Returns:
-
sfsimodels.output.
format_value
(value, sf=3)[source]¶ convert a parameter value into a formatted string with certain significant figures
Parameters: - value – the value to be formatted
- sf – number of significant figures
Returns: str
-
sfsimodels.output.
output_to_table
(obj, olist='inputs', oformat='latex', table_ends=False, prefix='')[source]¶ Compile the properties to a table.
Parameters: - olist – list, Names of the parameters to be in the output table
- oformat – str, The type of table to be output
- table_ends – bool, Add ends to the table
- prefix – str, A string to be added to the start of each parameter name
Returns: para, str, table as a string