sunpeek.components.types.UninitialisedCollector#

class sunpeek.components.types.UninitialisedCollector(collector_name, parent, attribute)#

Bases: Collector

Methods

__init__(collector_name, parent, attribute)

add_component_attr(name[, unit, minimum, ...])

all_subclasses([c])

define_component_attrs()

get_component_attribute(name)

get_default_unit(name)

Return default unit of a class attribute defined as ComponentParam.

is_attrib_missing(attrib_name)

is_nonzero(param_name)

Return True if some collector parameter is greater than zero.

is_zero(param_name)

Return True if some collector parameter is zero.

register_callback(callback_type, func)

set_component_attribute(name, value, array_type)

update_parameters()

Check and set collector parameters.

classmethod get_default_unit(name)#

Return default unit of a class attribute defined as ComponentParam.

Return type:

str

is_nonzero(param_name)#

Return True if some collector parameter is greater than zero.

Return type:

bool

is_zero(param_name)#

Return True if some collector parameter is zero.

Return type:

bool

update_parameters()#

Check and set collector parameters. Convert parameters from aperture to gross are, if ref area is aperture.

Raises:

CollectorDefinitionException – If definition of collector parameters is incomplete or contradictory.

Return type:

None

Notes

  • This method checks that we have a complete and valid Collector definition, for both test_types ‘SST’ | ‘QDT’.

  • This method exists because parameters are interdependent, so setting collector parameters can’t be done

    per-attribute (in setter methods e.g.). Attributes that don’t depend on others are set in __init__ directly.

  • This methods sets the instance attributes, with reference to gross area “area_gr”, if params is sane.

  • Converts from aperture to gross area, if necessary. To do so, both “area_gr” and “area_ap” are required.

  • Either “eta0b” or “eta0hem” must be provided in params

  • For statically-tested collectors only: Estimates kd using calculate_kd_Hess_and_Hanby(), if necessary.