firecrown.generators.two_point.LogLinearElls#
- class firecrown.generators.two_point.LogLinearElls(**data)[source]#
Bases:
BaseModelGenerator for log-linear integral ell values.
Not all ell values will be generated. The result will contain each integral value from min to mid. Starting from mid, and going up to max, there will be n_log logarithmically spaced values.
Note that midpoint must be strictly greater than minimum, and strictly less than maximum. n_log must be positive.
- Parameters:
data (
Any) –
Public Methods:
Validate the ell values.
generate()Generate the log-linear ell values.
__signature__The synthesized __init__ [Signature][inspect.Signature] of the model.
Inherited from
BaseModel__init__(**data)Create a new model by parsing and validating input data from keyword arguments.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#model_copy
model_dump(*[, mode, include, exclude, ...])Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump
model_dump_json(*[, indent, include, ...])Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump_json
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(_BaseModel__context)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])Usage docs: https://docs.pydantic.dev/2.10/concepts/json/#json-parsing
model_validate_strings(obj, *[, strict, context])Validate the given object with string data against the Pydantic model.
__get_pydantic_core_schema__(source, handler, /)Hook into generating the model's CoreSchema.
__get_pydantic_json_schema__(core_schema, ...)Hook into generating the model's JSON schema.
__pydantic_init_subclass__(**kwargs)This is intended to behave just like __init_subclass__, but is called by ModelMetaclass only after the class is actually fully initialized.
__class_getitem__(typevar_values)- param typevar_values:
__copy__()Returns a shallow copy of the model.
__deepcopy__([memo])Returns a deep copy of the model.
__getattr__(item)- param item:
__setattr__(name, value)Implement setattr(self, name, value).
__delattr__(item)Implement delattr(self, name).
__replace__(**changes)- param changes:
__getstate__()Helper for pickle.
__setstate__(state)- param state:
__eq__(other)Return self==value.
__iter__()So dict(model) works.
__repr__()Return repr(self).
__repr_args__()__repr_name__()Name of the instance's class, used in __repr__.
__repr_recursion__(object)Returns the string representation of a recursive object.
__repr_str__(join_str)- param join_str:
__pretty__(fmt, **kwargs)Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.
__rich_repr__()Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.
__str__()Return str(self).
dict(*[, include, exclude, by_alias, ...])- param include:
json(*[, include, exclude, by_alias, ...])- param include:
parse_obj(obj)- param obj:
parse_raw(b, *[, content_type, encoding, ...])- param b:
parse_file(path, *[, content_type, ...])- param path:
from_orm(obj)- param obj:
construct([_fields_set])- param _fields_set:
copy(*[, include, exclude, update, deep])Returns a copy of the model.
schema([by_alias, ref_template])- param by_alias:
schema_json(*[, by_alias, ref_template])- param by_alias:
validate(value)- param value:
update_forward_refs(**localns)- param localns:
Private Methods:
Inherited from
BaseModel_check_frozen(name, value)- param name:
_iter(*args, **kwargs)- param args:
_copy_and_set_values(*args, **kwargs)- param args:
_get_value(*args, **kwargs)- param args:
_calculate_keys(*args, **kwargs)- param args:
- generate()[source]#
Generate the log-linear ell values.
The result will contain each integral value from min to mid. Starting from mid, and going up to max, there will be n_log logarithmically spaced values.
- Parameters:
minimum – The low edge of the first bin.
midpoint – The high edge of the last in the linear range.
maximum – The high edge of the last bin.
n_log – The number of bins in the log section of the range.
- Return type:
ndarray[tuple[int,...],dtype[int64]]
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].