tna.classes.Parameters

class tna.classes.Parameters(**data)[source]

Parameter set controlling preprocessing and analysis of transient nutation data.

This model defines all configurable options for loading, processing, windowing, and Fourier transformation of transient nutation datasets.

Parameters:
  • current_time (float)

  • current_field (float)

  • prodel (bool)

  • two_d (bool)

  • path (Path | None)

  • baseline_correction (bool)

  • baseline_correction_deg (int)

  • reconstruction (bool)

  • mean_subtraction (bool)

  • wdw_chebwin (bool)

  • chebwin_attenuation (float)

  • wdw_hamming (bool)

  • hamming_window_coefficient (float)

  • wdw_kaiser (bool)

  • kaiser_window_shape_parameter (float)

  • wdw_sinebell (bool)

  • sinebell_phase_shift (float)

  • wdw_lorentz_gauss (bool)

  • tau (float)

  • sigma (float)

  • zero_filling (bool)

  • zero_filling_factor (int)

  • reference_freq (bool)

  • reference_freq_value (float)

  • save_location (str | None)

current_time

Time point at which the magnetic field spectrum is evaluated.

Type:

float

current_field

Magnetic field point at which the time spectrum is evaluated.

Type:

float

prodel

If True, swaps real and imaginary parts of the signal during loading.

Type:

bool

two_d

If True, treats the dataset as two-dimensional (field-resolved).

Type:

bool

path

Absolute path to experimental data.

Type:

Path or None

baseline_correction

Enables polynomial baseline correction.

Type:

bool

baseline_correction_deg

Degree of the polynomial used for baseline correction.

Type:

int

reconstruction

Enables signal reconstruction.

Type:

bool

mean_subtraction

Enables subtraction of the mean signal.

Type:

bool

wdw_chebwin

Applies a Dolph-Chebyshev window function.

Type:

bool

chebwin_attenuation

Attenuation parameter (dB) for the Chebyshev window.

Type:

float

wdw_hamming

Applies a Hamming window function.

Type:

bool

hamming_window_coefficient

Coefficient defining the Hamming window shape (default ~0.54).

Type:

float

wdw_kaiser

Applies a Kaiser window function.

Type:

bool

kaiser_window_shape_parameter

Shape parameter of the Kaiser window.

Type:

float

wdw_sinebell

Applies a sine-bell window function.

Type:

bool

sinebell_phase_shift

Phase shift applied to the sine-bell window.

Type:

float

wdw_lorentz_gauss

Applies a combined Lorentz-Gauss window function.

Type:

bool

tau

Lorentzian parameter (related to FWHH via 1/(pi*tau)).

Type:

float

sigma

Gaussian width parameter.

Type:

float

zero_filling

Enables zero-filling before Fourier transformation.

Type:

bool

zero_filling_factor

Factor by which the signal length is extended with zeros.

Type:

int

reference_freq

Enables correction to a reference frequency.

Type:

bool

reference_freq_value

Reference frequency used for frequency axis correction.

Type:

float

save_location

Path where processed results are stored.

Type:

str or None

Notes

This class is validates the type of the fields (validate_assignment=”True”) and disallows additional attributes (extra=”forbid”) to ensure reproducibility and prevent silent configuration errors in scientific processing pipelines.

__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

Return type:

None

Methods

__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

construct([_fields_set])

copy(*[, include, exclude, update, deep])

Returns a copy of the model.

dict(*[, include, exclude, by_alias, ...])

from_orm(obj)

json(*[, include, exclude, by_alias, ...])

model_construct([_fields_set])

Creates a new instance of the Model class with validated data.

model_copy(*[, update, deep])

!!! abstract "Usage Documentation"

model_dump(*[, mode, include, exclude, ...])

!!! abstract "Usage Documentation"

model_dump_json(*[, indent, ensure_ascii, ...])

!!! abstract "Usage Documentation"

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(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, extra, ...])

Validate a pydantic model instance.

model_validate_json(json_data, *[, strict, ...])

!!! abstract "Usage Documentation"

model_validate_strings(obj, *[, strict, ...])

Validate the given object with string data against the Pydantic model.

parse_file(path, *[, content_type, ...])

parse_obj(obj)

parse_raw(b, *[, content_type, encoding, ...])

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

update_forward_refs(**localns)

validate(value)

Attributes

model_computed_fields

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

current_time

current_field

prodel

two_d

path

baseline_correction

baseline_correction_deg

reconstruction

mean_subtraction

wdw_chebwin

chebwin_attenuation

wdw_hamming

hamming_window_coefficient

wdw_kaiser

kaiser_window_shape_parameter

wdw_sinebell

sinebell_phase_shift

wdw_lorentz_gauss

tau

sigma

zero_filling

zero_filling_factor

reference_freq

reference_freq_value

save_location