Object catalogs¶
New in version 0.5.0
Target object and their properties¶
New in version 0.5.0
-
class
astrophysix.simdm.catalogs.targobj.
TargetObject
(**kwargs)¶ Catalog target object class (Simulation data model)
- Parameters
name (
string
) – object name (mandatory)description (
string
) – result description
-
__eq__
(other)¶ TargetObject comparison method
- other:
TargetObject
target object instance to compare to
- other:
-
__ne__
(other)¶ Not an implied relationship between “rich comparison” equality methods in Python 2.X but only in Python 3.X see https://docs.python.org/2.7/reference/datamodel.html#object.__ne__
other: other instance to compare to
-
__unicode__
()¶ String representation of the instance
-
property
description
¶ Target object description. Can be edited.
-
galactica_valid_alias
(alias_value)¶
-
galactica_validity_check
(**kwargs)¶ Perform validity checks on this instance and eventually log warning messages.
- Parameters
kwargs (
dict
) – keyword arguments (optional)
-
property
name
¶ Target object name. Can be edited.
-
property
object_properties
¶ Target object
ObjectProperty
list (ObjectList
)
-
property
property_groups
¶ Target object
ObjectPropertyGroup
list (ObjectList
)
-
property
uid
¶
-
class
astrophysix.simdm.catalogs.targobj.
ObjectProperty
(**kwargs)¶ Target object property class (Simulation data model)
- Parameters
property_name (
string
) – property name (mandatory)description (
string
) – object property descriptionunit (
string
orUnit
) – object property physical unitfilter_flag (
PropertyFilterFlag
) – target object property filter flag. DefaultPropertyFilterFlag.NO_FILTER
sort_flag (
PropertySortFlag
) – target object property sort flag. DefaultPropertySortFlag.NO_SORT
dtype (:class`simdm.utils.DataType`) – property data type. Default DataType.REAL.
-
__eq__
(other)¶ ObjectProperty comparison method
- other:
ObjectProperty
target object property instance to compare to
- other:
-
__ne__
(other)¶ Not an implied relationship between “rich comparison” equality methods in Python 2.X but only in Python 3.X see https://docs.python.org/2.7/reference/datamodel.html#object.__ne__
other: other instance to compare to
-
__unicode__
()¶ String representation of the instance
-
property
description
¶ Object property description. Can be edited.
-
property
display_name
¶ Object property display name. Concatenation of the property name and its unit LaTex formula, if defined.
-
property
filter_flag
¶ Object property filter flag. Can be edited.
- Returns
f – object property filter flag
- Return type
PropertyFilterFlag
-
galactica_valid_alias
(alias_value)¶
-
galactica_validity_check
(**kwargs)¶ Perform validity checks on this instance and eventually log warning messages.
- Parameters
kwargs (
dict
) – keyword arguments (optional)
-
property
property_name
¶ Target object property name. Can be edited.
-
property
sort_flag
¶ Object property sort flag. Can be edited.
- Returns
f – object property sort flag
- Return type
PropertySortFlag
-
property
uid
¶
-
property
unit
¶
-
class
astrophysix.simdm.catalogs.targobj.
ObjectPropertyGroup
(**kwargs)¶ Target object property group class (Simulation data model)
- Parameters
group_name (property group name (mandatory)) –
description (property group description) –
-
__eq__
(other)¶ ObjectPropertyGroup comparison method
- other:
ObjectPropertyGroup
target object property group instance to compare to
- other:
-
__ne__
(other)¶ Not an implied relationship between “rich comparison” equality methods in Python 2.X but only in Python 3.X see https://docs.python.org/2.7/reference/datamodel.html#object.__ne__
other: other instance to compare to
-
__unicode__
()¶ String representation of the instance
-
property
description
¶ Object property group description. Can be edited.
-
galactica_valid_alias
(alias_value)¶
-
galactica_validity_check
(**kwargs)¶ Perform validity checks on this instance and eventually log warning messages.
- Parameters
kwargs (
dict
) – keyword arguments (optional)
-
property
group_name
¶ Object property group name. Can be edited.
-
property
group_properties
¶ Object property group
ObjectProperty
list (ObjectList
)
-
property
uid
¶
-
class
astrophysix.simdm.catalogs.targobj.
PropertySortFlag
(value)¶ An enumeration.
-
ADVANCED_SORT
= ('advanced_sort', 'Sort in advanced form')¶
-
BASIC_SORT
= ('basic_sort', 'Sort in basic form')¶
-
NO_SORT
= ('no_sort', 'Not used for sorting')¶
-
property
displayed_flag
¶ Object property sort flag displayed name
-
property
flag
¶ Object property sort flag value
-
classmethod
from_flag
(flag)¶ - Parameters
flag (
string
) – property sort flag value- Returns
t – Property sort flag matching the requested flag value.
- Return type
- Raises
ValueError – if requested flag value does not match any property sort flag.
Example
>>> flag = PropertySortFlag.from_flag("basic_sort") >>> flag.displayed_flag "Sort in basic form" >>> flag2 = PropertySortFlag.from_flag("MY_UNKNOWN_FLAG") ValuerError: No PropertySortFlag defined with the flag 'MY_UNKNOWN_FLAG'.
-
-
class
astrophysix.simdm.catalogs.targobj.
PropertyFilterFlag
(value)¶ An enumeration.
-
ADVANCED_FILTER
= ('advanced_filter', 'Filter in advanced form')¶
-
BASIC_FILTER
= ('basic_filter', 'Filter in basic form')¶
-
NO_FILTER
= ('no_filter', 'Not used in filters')¶
-
property
displayed_flag
¶ Object property filter flag displayed name
-
property
flag
¶ Object property filter flag value
-
classmethod
from_flag
(flag)¶ - Parameters
flag (
string
) – property filter flag value- Returns
t – Property filter flag matching the requested flag value.
- Return type
- Raises
ValueError – if requested flag value does not match any property filter flag.
Example
>>> flag = PropertyFilterFlag.from_flag("no_filter") >>> flag.displayed_flag "Not used in filters" >>> flag2 = PropertyFilterFlag.from_flag("MY_UNKNOWN_FLAG") ValuerError: No PropertyFilterFlag defined with the flag 'MY_UNKNOWN_FLAG'.
-
Object catalogs and catalog fields¶
New in version 0.5.0
-
class
astrophysix.simdm.catalogs.catalog.
Catalog
(*args, **kwargs)¶ -
-
__ne__
(other)¶ Not an implied relationship between “rich comparison” equality methods in Python 2.X but only in Python 3.X see https://docs.python.org/2.7/reference/datamodel.html#object.__ne__
other: other instance to compare to
-
__unicode__
()¶ String representation of the instance
-
property
catalog_fields
¶ Catalog
CatalogField
list (ObjectList
)
-
property
datafiles
¶ Catalog
Datafile
list (ObjectList
)
-
property
description
¶ Catalog description
-
galactica_valid_alias
(alias_value)¶
-
galactica_validity_check
(**kwargs)¶ Perform validity checks on this instance and eventually log warning messages.
- Parameters
kwargs (
dict
) – keyword arguments (optional)
-
property
name
¶ Catalog name. can be edited
-
property
nobjects
¶ Returns the total number of objects in this catalog
-
property
processing_services
¶ Catalog
CatalogDataProcessingService
list (ObjectList
)
-
property
target_object
¶ Catalog associated
TargetObject
.
-
to_pandas
()¶ Convert a Catalog into a Pandas Dataframe object
- Returns
df – pandas DataFrame containing the catalog data
- Return type
pandas.DataFrame
-
property
uid
¶
-
-
class
astrophysix.simdm.catalogs.field.
CatalogField
(*args, **kwargs)¶ -
__eq__
(other)¶ CatalogField comparison method
- other:
CatalogField
catalog field object to compare to
- other:
-
__ne__
(other)¶ Not an implied relationship between “rich comparison” equality methods in Python 2.X but only in Python 3.X see https://docs.python.org/2.7/reference/datamodel.html#object.__ne__
other: other instance to compare to
-
__unicode__
()¶ String representation of the instance
-
property
field_value_stats
¶ Returns (min., max., mean, std) tuple for this field value array
-
property
field_values
¶ Catalog field values. Can be edited.
- Returns
vals
- Return type
1D numpy.ndarray
-
property
field_values_md5sum
¶
-
galactica_valid_alias
(alias_value)¶
-
galactica_validity_check
(**kwargs)¶ Perform validity checks on this instance and eventually log warning messages.
- Parameters
kwargs (
dict
) – keyword arguments (optional)
-
property
nobjects
¶ Returns the number of objects in this catalog field => size of the field value 1D array
-
property
object_property
¶ Associated target object property (
ObjectProperty
)
-
property
property_name
¶ Associated target object property name
-
to_pandas
()¶ Convert a CatalogField into a
pandas.Series
object
-
property
uid
¶
-