mixins#

Lightweight mixins task classes.

Classes:

CalibratorMixin(*args, **kwargs)

CalibratorsMixin(*args, **kwargs)

SelectorMixin(*args, **kwargs)

SelectorStepsMixin(*args, **kwargs)

ProducerMixin(*args, **kwargs)

ProducersMixin(*args, **kwargs)

MLModelMixinBase(*args, **kwargs)

MLModelTrainingMixin(*args, **kwargs)

MLModelMixin(*args, **kwargs)

MLModelDataMixin(*args, **kwargs)

MLModelsMixin(*args, **kwargs)

InferenceModelMixin(*args, **kwargs)

CategoriesMixin(*args, **kwargs)

VariablesMixin(*args, **kwargs)

DatasetsProcessesMixin(*args, **kwargs)

ShiftSourcesMixin(*args, **kwargs)

EventWeightMixin(*args, **kwargs)

ChunkedIOMixin(*args, **kwargs)

class CalibratorMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

calibrator

register_calibrator_shifts

calibrator_inst

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

get_calibrator_inst(calibrator[, kwargs])

resolve_param_values(params)

get_known_shifts(config_inst, params)

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

calibrator = <luigi.parameter.Parameter object>#
register_calibrator_shifts = False#
classmethod get_calibrator_inst(calibrator, kwargs=None)[source]#
classmethod resolve_param_values(params)[source]#
classmethod get_known_shifts(config_inst, params)[source]#

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

Return type:

tuple[set[str], set[str]]

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

property calibrator_inst#
store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class CalibratorsMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

calibrators

register_calibrators_shifts

calibrator_insts

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

get_calibrator_insts(calibrators[, kwargs])

resolve_param_values(params)

get_known_shifts(config_inst, params)

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

calibrators = <law.parameter.CSVParameter object>#
register_calibrators_shifts = False#
classmethod get_calibrator_insts(calibrators, kwargs=None)[source]#
classmethod resolve_param_values(params)[source]#
classmethod get_known_shifts(config_inst, params)[source]#

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

Return type:

tuple[set[str], set[str]]

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

property calibrator_insts#
store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class SelectorMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

selector

register_selector_shifts

selector_inst

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

get_selector_inst(selector[, kwargs])

resolve_param_values(params)

get_known_shifts(config_inst, params)

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

selector = <luigi.parameter.Parameter object>#
register_selector_shifts = False#
classmethod get_selector_inst(selector, kwargs=None)[source]#
classmethod resolve_param_values(params)[source]#
classmethod get_known_shifts(config_inst, params)[source]#

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

Return type:

tuple[set[str], set[str]]

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

property selector_inst#
store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class SelectorStepsMixin(*args, **kwargs)[source]#

Bases: SelectorMixin

Attributes:

selector_steps

exclude_params_repr_empty

selector_steps_order_sensitive

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

rtype:

dict[str, Any]

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

selector_steps = <law.parameter.CSVParameter object>#
exclude_params_repr_empty = {'selector_steps'}#
selector_steps_order_sensitive = False#
classmethod resolve_param_values(params)[source]#
Return type:

dict[str, Any]

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

Return type:

InsertableDict

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class ProducerMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

producer

register_producer_shifts

producer_inst

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

get_producer_inst(producer[, kwargs])

resolve_param_values(params)

get_known_shifts(config_inst, params)

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

producer = <luigi.parameter.Parameter object>#
register_producer_shifts = False#
classmethod get_producer_inst(producer, kwargs=None)[source]#
classmethod resolve_param_values(params)[source]#
classmethod get_known_shifts(config_inst, params)[source]#

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

Return type:

tuple[set[str], set[str]]

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

property producer_inst#
store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class ProducersMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

producers

register_producers_shifts

producer_insts

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

get_producer_insts(producers[, kwargs])

resolve_param_values(params)

get_known_shifts(config_inst, params)

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

producers = <law.parameter.CSVParameter object>#
register_producers_shifts = False#
classmethod get_producer_insts(producers, kwargs=None)[source]#
classmethod resolve_param_values(params)[source]#
classmethod get_known_shifts(config_inst, params)[source]#

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

Return type:

tuple[set[str], set[str]]

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

property producer_insts#
store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class MLModelMixinBase(*args, **kwargs)[source]#

Bases: AnalysisTask

Attributes:

ml_model

exclude_params_repr_empty

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

get_ml_model_inst(ml_model, analysis_inst[, ...])

rtype:

MLModel

events_used_in_training(config_inst, ...)

rtype:

bool

ml_model = <luigi.parameter.Parameter object>#
exclude_params_repr_empty = {'ml_model'}#
classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

classmethod get_ml_model_inst(ml_model, analysis_inst, requested_configs=None, **kwargs)[source]#
Return type:

MLModel

events_used_in_training(config_inst, dataset_inst, shift_inst)[source]#
Return type:

bool

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class MLModelTrainingMixin(*args, **kwargs)[source]#

Bases: MLModelMixinBase

Attributes:

configs

calibrators

selectors

producers

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_calibrators(ml_model_inst, params)

rtype:

tuple[tuple[str]]

resolve_selectors(ml_model_inst, params)

rtype:

tuple[str]

resolve_producers(ml_model_inst, params)

rtype:

tuple[tuple[str]]

resolve_param_values(params)

rtype:

dict[str, Any]

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

configs = <law.parameter.CSVParameter object>#
calibrators = <law.parameter.MultiCSVParameter object>#
selectors = <law.parameter.CSVParameter object>#
producers = <law.parameter.MultiCSVParameter object>#
classmethod resolve_calibrators(ml_model_inst, params)[source]#
Return type:

tuple[tuple[str]]

classmethod resolve_selectors(ml_model_inst, params)[source]#
Return type:

tuple[str]

classmethod resolve_producers(ml_model_inst, params)[source]#
Return type:

tuple[tuple[str]]

classmethod resolve_param_values(params)[source]#
Return type:

dict[str, Any]

store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

Return type:

InsertableDict

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {'ml_model'}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class MLModelMixin(*args, **kwargs)[source]#

Bases: ConfigTask, MLModelMixinBase

Attributes:

ml_model

allow_empty_ml_model

exclude_params_repr_empty

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

rtype:

dict[str, Any]

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

ml_model = <luigi.parameter.Parameter object>#
allow_empty_ml_model = True#
exclude_params_repr_empty = {'ml_model'}#
classmethod resolve_param_values(params)[source]#
Return type:

dict[str, Any]

store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

Return type:

InsertableDict

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class MLModelDataMixin(*args, **kwargs)[source]#

Bases: MLModelMixin

Attributes:

allow_empty_ml_model

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

allow_empty_ml_model = False#
store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

Return type:

InsertableDict

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {'ml_model'}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class MLModelsMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

ml_models

allow_empty_ml_models

exclude_params_repr_empty

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

rtype:

dict[str, Any]

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

ml_models = <law.parameter.CSVParameter object>#
allow_empty_ml_models = True#
exclude_params_repr_empty = {'ml_models'}#
classmethod resolve_param_values(params)[source]#
Return type:

dict[str, Any]

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

Return type:

InsertableDict

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class InferenceModelMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

inference_model

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

rtype:

dict[str, Any]

get_inference_model_inst(inference_model, ...)

rtype:

InferenceModel

req_params(inst, **kwargs)

Returns parameters that are jointly defined in this class and another task instance of some other class.

store_parts()

Returns a law.util.InsertableDict whose values are used to create a store path.

inference_model = <luigi.parameter.Parameter object>#
classmethod resolve_param_values(params)[source]#
Return type:

dict[str, Any]

classmethod get_inference_model_inst(inference_model, config_inst)[source]#
Return type:

InferenceModel

classmethod req_params(inst, **kwargs)[source]#

Returns parameters that are jointly defined in this class and another task instance of some other class. The parameters are used when calling Task.req(self).

Return type:

dict

store_parts()[source]#

Returns a law.util.InsertableDict whose values are used to create a store path. For instance, the parts {"keyA": "a", "keyB": "b", 2: "c"} lead to the path “a/b/c”. The keys can be used by subclassing tasks to overwrite values.

Return type:

InsertableDict

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class CategoriesMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

categories

default_categories

allow_empty_categories

categories_repr

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

categories = <law.parameter.CSVParameter object>#
default_categories = None#
allow_empty_categories = False#
classmethod resolve_param_values(params)[source]#
property categories_repr#
exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class VariablesMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

variables

default_variables

allow_empty_variables

variables_repr

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

split_multi_variable(variable)

Splits a multi-dimensional variable given in the format "var_a[-var_b[-...]]" into separate variable names using a delimiter ("-") and returns a tuple.

join_multi_variable(variables)

Joins the name of multiple variables using a delimiter ("-") into a single string that represents a multi-dimensional variable and returns it.

variables = <law.parameter.CSVParameter object>#
default_variables = None#
allow_empty_variables = False#
classmethod resolve_param_values(params)[source]#
classmethod split_multi_variable(variable)[source]#

Splits a multi-dimensional variable given in the format "var_a[-var_b[-...]]" into separate variable names using a delimiter ("-") and returns a tuple.

Return type:

tuple[str]

classmethod join_multi_variable(variables)[source]#

Joins the name of multiple variables using a delimiter ("-") into a single string that represents a multi-dimensional variable and returns it.

Return type:

str

property variables_repr#
exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class DatasetsProcessesMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

datasets

processes

allow_empty_datasets

allow_empty_processes

datasets_repr

processes_repr

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

get_known_shifts(config_inst, params)

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

datasets = <law.parameter.CSVParameter object>#
processes = <law.parameter.CSVParameter object>#
allow_empty_datasets = False#
allow_empty_processes = False#
classmethod resolve_param_values(params)[source]#
classmethod get_known_shifts(config_inst, params)[source]#

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

property datasets_repr#
property processes_repr#
exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class ShiftSourcesMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

shift_sources

allow_empty_shift_sources

shift_sources_repr

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

resolve_param_values(params)

expand_shift_sources(sources)

rtype:

list[str]

reduce_shifts(shifts)

rtype:

list[str]

shift_sources = <law.parameter.CSVParameter object>#
allow_empty_shift_sources = False#
classmethod resolve_param_values(params)[source]#
classmethod expand_shift_sources(sources)[source]#
Return type:

list[str]

classmethod reduce_shifts(shifts)[source]#
Return type:

list[str]

property shift_sources_repr#
exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class EventWeightMixin(*args, **kwargs)[source]#

Bases: ConfigTask

Methods:

get_known_shifts(config_inst, params)

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

Attributes:

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

classmethod get_known_shifts(config_inst, params)[source]#

Returns two sets of shifts in a tuple: shifts implemented by _this_ task, and depdenent shifts implemented by upstream tasks.

Return type:

tuple[set[str], set[str]]

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class ChunkedIOMixin(*args, **kwargs)[source]#

Bases: AnalysisTask

Attributes:

check_finite

exclude_params_req

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

Methods:

iter_chunked_io(*args, **kwargs)

raise_if_not_finite(ak_array)

Perform explicit check whether all values in array ak_array are finite.

check_finite = <luigi.parameter.BoolParameter object>#
exclude_params_req = {'check_finite'}#
iter_chunked_io(*args, **kwargs)[source]#
exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
classmethod raise_if_not_finite(ak_array)[source]#

Perform explicit check whether all values in array ak_array are finite.

The check is performed using the numpy.isfinite() function

Parameters:

ak_array (Array) – Array with events to check.

Raises:

ValueError – If any value in ak_array is not finite.

Return type:

None