Repository navigation
馃殌 Property Availability Checking
馃殌 New Features
Property Availability Checking
This release introduces new methods to check property availability in your data tables and equations. These methods help you quickly verify if a specific property (by symbol or column name) exists in your data or equation objects.
Methods Added
is_property_available(property_name, search_mode='SYMBOL', 'COLUMN', or 'BOTH')
Checks if a property is available in the table or equation, either by its symbol or column name.
馃摑 Usage Examples
For TableData
# ...existing code...
# Build TableData object
data_1 = thermo_db.build_thermo_property(
[comp1],
'CUSTOM-REF-1',
'General-Data'
)
# Check if a property is available by symbol
print(data_1.is_property_available('GiEnFo')) # False
print(data_1.is_property_available('MW')) # True
# ...existing code...For TableEquation
# ...existing code...
# Build TableEquation object
comp1_eq_1 = thermo_db.build_thermo_property(
[comp1],
'CUSTOM-REF-1',
'Vapor-Pressure'
)
# Check property availability by symbol and column name
print(comp1_eq_1.is_property_available('VaPr')) # True
print(comp1_eq_1.is_property_available('GiEnFo')) # False
print(comp1_eq_1.is_property_available('VaPr', search_mode='SYMBOL')) # True
print(comp1_eq_1.is_property_available('vapor-pressure', search_mode='COLUMN')) # True
# ...existing code...Thank you for using pyThermoDB!
Feel free to open issues or pull requests for feedback and contributions.