Message Boards Message Boards

0
|
2997 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Properties of Entities - capital letters

Hello,

If I call the list of properties of entities of type "Physical Constant", the properties are written in lowercase letters, but I have to call the properties by capital letters?

I have wasted one hour to find out, why

Entity["PhysicalConstant", "gravitational constant"]["value"]

does not work even if

Entity["PhysicalConstant"]["Properties"]

returned a property "value"....

Best regards,

Joachim

POSTED BY: Joachim Janezic
3 Replies

Good Morning,

Thank you your your reply.

Ok, I understand now the difference between CommonName and CanonicalName, but, this does not work either:

Screenshot

Best regards,

Joachim

POSTED BY: Joachim Janezic
Posted 2 years ago

Two expressions separated by a space are treated as a product. You need to access the property

Entity["PhysicalConstant", "ElementaryCharge"][EntityProperty["PhysicalConstant", "Value"]]

or using postfix

Entity["PhysicalConstant", "ElementaryCharge"] // EntityProperty["PhysicalConstant", "Value"]
POSTED BY: Rohit Namjoshi
Posted 2 years ago

Hi Joachim,

Entity["PhysicalConstant"]["Properties"]

returns a list of EntityProperty that are formatted as light yellow boxes with the CommonName. CommonName can have spaces in them and are useful for using in textual descriptions.

Entity["PhysicalConstant"]["Properties"] // CommonName
(* {"abbreviation code", "alternate names", "ASCII description", 
"classes", "conjectured value association", "conjectured values", 
"description", "entity classes", "equal\[Hyphen]magnitude constants", 
"equivalent forms", "external link", "Lévy\[Hyphen]Leblond class", 
"name", "primary source", "quantity", "relative uncertainty", "series 
expansion value association", "series expansion values", "standard 
uncertainty", "standard year", "symbol", "value", "value 
association", "values", "variants", "variant table"} *)

The CanonicalName needs to be used for accessing values.

Entity["PhysicalConstant"]["Properties"] // CanonicalName
(* {"AbbreviationCode", "AlternateNames", "ASCIIDescription", "Classes", 
"ConjecturedValueAssociation", "ConjecturedValues", "Description", 
"EntityClasses", "EqualMagnitudeConstants", "EquivalentForms", 
"ExternalLink", "LevyLeblondClass", "Name", "PrimarySource", 
"Quantity", "RelativeUncertainty", "SeriesExpansionValueAssociation", 
"SeriesExpansionValues", "StandardUncertainty", "StandardYear", 
"Symbol", "Value", "ValueAssociation", "Values", "Variants", 
"VariantTable"} *)

Entity["PhysicalConstant"] // EntityList // CanonicalName
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract