Skip to content

vibration.immission.railway_prediction

Predicting railway vibration from third-octave spectra (E DIN 45672-3:2023-02).

Part 3 of DIN 45672 has never been published; the draft of February 2023 is the only text of it, and it is the prediction method that E DIN 4150-2:2023-08 refers a planning approval to. Where Part 1 measures next to a line and Part 2 reduces what was measured, Part 3 says what a building that does not exist yet, next to a line that does not exist yet, is going to feel: a third-octave velocity spectrum on a floor, and from it the assessment quantities of DIN 4150-2.

The chain (Clause 5.1, Formula (1)). The predicted spectrum on a floor is an emission spectrum plus four level differences, band by band from 4 Hz to 250 Hz:

the emission as a Max Hold spectrum of the Zuggattung at a known distance (Clause 5.2), the transmission through the ground to the building (Clause 5.3), the transfer from the ground into the foundation and from the foundation to the floor (Clause 5.4), and the insertion loss of whatever mitigation is planned (Clause 5.5). Every term is added as printed, so a mitigation enters as a negative number.

Emission (Clause 5.2). A measured spectrum is carried to another speed of the same category by (Formula (3)), for a change of speed of up to 30 %; beyond that the sleeper-passing frequency moves and the spectrum with it.

Transmission (Clause 5.3). The ratio of the velocities at the distance and at the reference distance is geometric spreading times material damping (Formula (5)), with , or a power law with an exponent measured per band (Formula (6)); the level difference is 20 lg of it (Formula (4)). On the surface the exponent is usually 0.2 to 0.4.

Building (Clause 5.4, Annex A). Six tables of level differences from extensive building measurements: ground to floor for concrete and for timber floors by the natural frequency of the floor (Tables A.1 and A.2), ground to foundation for a basement and for a ground floor with a mean and a deviation either way (Tables A.3 and A.4), and foundation to floor against the ratio of the band to the natural frequency of the floor (Tables A.5 and A.6). The prediction is run once per natural frequency the building may have, never with the envelope over all of them.

Assessment quantities (Clause 7). The KB weighting of DIN 45669-1 as a table of third-octave corrections (Table 2, Formula (8)) is added to the predicted spectrum, the bands from 4 Hz to 80 Hz are summed, and the sum level gives the clock maximum r.m.s. of the category (Formula (9)), with and mm/s; 1.5 times it is (Formula (10)), three times that the peak velocity a DIN 4150-3 comparison wants (Formula (12)), and Formula (11) is the sum of Formula (6) of E DIN 4150-2:2023-08, printed without that formula’s rule that a category whose is at or below 0.1 enters as zero; the assessment the draft says it performs is that of DIN 4150-2, so train_assessment_severity of phonometry.vibration.immission.train_categories, which applies the rule, is what the chain ends in. Formula (13) turns a level spectrum back into a velocity spectrum in micrometres per second, for the VC curves.

A point source and a train (Annex B). A train is a line of point sources until the distance (Formula (B.1)) and a point source beyond it, so a decay measured with a point excitation is made shallower by 0.3 or 0.5 in the exponent up to (Formula (B.2)).

What is not here. Clause 6, the phases of a prediction, and Annex D are work plans. The worked example of Annex C prints its emission and building terms as inputs: its sum, its chain to a peak velocity and the arithmetic of Formula (11) are conformance rows, and where the print does not reproduce itself the entry is in docs/ERRATA.md.

Auto-generated from the source docstrings by scripts/generate_api_docs.py (make api-docs). Do not edit by hand.

Constant (tuple).

FLOOR_NATURAL_FREQUENCIES_HZ = (8.0, 10.0, 12.5, 16.0, 20.0, 25.0, 31.5, 40.0, 50.0, 63.0, 80.0)
foundation_to_floor_level_difference(
frequencies: float | np.floating[Any] | np.integer[Any],
*,
floor: Literal['concrete', 'timber'],
floor_natural_frequency_hz: float,
statistic: Literal['mean', 'lower', 'upper'] = ...,
) -> float
foundation_to_floor_level_difference(
frequencies: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
floor: Literal['concrete', 'timber'],
floor_natural_frequency_hz: float,
statistic: Literal['mean', 'lower', 'upper'] = ...,
) -> NDArray[np.float64]
foundation_to_floor_level_difference(
frequencies: NumericArrayLike,
*,
floor: Literal['concrete', 'timber'],
floor_natural_frequency_hz: float,
statistic: Literal['mean', 'lower', 'upper'] = ...,
) -> float | NDArray[np.float64]

The level difference from the foundation to a floor, Tables A.5 and A.6.

against the ratio of the band to the natural frequency of the floor, for concrete or for timber floors, as the mean or the mean less or plus its deviation. The tables are read at the ratio of each band; a ratio between two tabulated ones is interpolated linearly in decibels over the logarithm of the ratio, and a ratio the table has no value for gives nan.

Parameters

Name Description
frequencies The band centres, in hertz.
floor "concrete" or "timber".
floor_natural_frequency_hz , positive.
statistic "mean" (default), "lower" or "upper".

Returns: , in decibels, one per band, nan outside the table. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For an unknown floor or statistic, a non-positive frequency, or a non-finite input.
TypeError if floor_natural_frequency_hz is not a single number, or frequencies holds a text or a value that is not a real number, or floor or statistic is not a text.

Constant (mapping).

FOUNDATION_TO_FLOOR_LEVEL_DIFFERENCES = {'concrete': {'lower': (-1.52, -1.53, -1.74, -2.42, -2.63, -1.89, -1.81, -1.73, -1.27, -0.72, 0.02, 1.43, 6.05, 9.78, 4.52, 0.12, -3.27, -4.14, -5.29, -1.96, -1.38, nan, nan), 'mean': (0.29, 0.93, 0.72, 1.09, 0.98, 1.62, 1.6, 2.06, 2.52, 3.26, 4.19, 6.35, 9.94, 17.26, 9.85, 4.41, 3.27, 3.25, 1.42, 3.89, 2.83, nan, nan), 'upper': (2.37, 4.16, 3.85, 5.17, 5.15, 5.51, 5.49, 6.42, 6.88, 7.24, 8.74, 11.76, 17.46, 24.23, 17.07, 11.11, 10.23, 10.21, 8.38, 10.25, 7.9, nan, nan)}, 'timber': {'lower': (nan, nan, 0.64, 1.05, 0.52, 1.87, 2.37, 2.45, 2.6, 2.76, 3.43, 5.98, 8.62, 15.29, 9.88, 6.26, 5.13, 5.28, 5.26, 5.42, 7.63, nan, nan), 'mean': (nan, nan, nan, nan, 3.14, 3.06, 2.19, 4.87, 6.55, 7.74, 8.29, 10.47, 17.4, 21.93, 14.81, 11.54, 9.54, 5.4, 3.55, 3.24, 3.01, 3.35, 1.85), 'upper': (nan, nan, nan, nan, nan, nan, nan, 8.1, 11.09, 14.84, 15.68, 16.61, 23.36, 28.84, 22.39, 18.26, 15.24, 14.03, 10.07, 6.88, 5.4, nan, nan)}}

Constant (tuple).

FOUNDATION_TO_FLOOR_RATIOS = (0.05, 0.063, 0.08, 0.1, 0.125, 0.16, 0.2, 0.25, 0.315, 0.4, 0.5, 0.63, 0.8, 1.0, 1.25, 1.6, 2.0, 2.5, 3.15, 4.0, 5.0, 6.3, 8.0)

Constant (tuple).

GEOMETRIC_DECAY_EXPONENT_RANGE = (0.2, 0.4)
ground_attenuation_coefficient_per_m(
frequencies: float | np.floating[Any] | np.integer[Any],
*,
damping_ratio: float,
shear_wave_speed_m_s: float,
) -> float
ground_attenuation_coefficient_per_m(
frequencies: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
damping_ratio: float,
shear_wave_speed_m_s: float,
) -> NDArray[np.float64]
ground_attenuation_coefficient_per_m(
frequencies: NumericArrayLike,
*,
damping_ratio: float,
shear_wave_speed_m_s: float,
) -> float | NDArray[np.float64]

The material damping of the ground, of Clause 5.3.

: the damping ratio of the ground over the wavelength, which the standard writes with the shear wave speed although the wave is the surface wave, and that is how it is computed here.

Parameters

Name Description
frequencies The band centres, in hertz.
damping_ratio , the damping ratio of the ground.
shear_wave_speed_m_s , in metres per second.

Returns: , in reciprocal metres, one per band. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For a negative damping ratio, a non-positive speed or a non-positive frequency.
TypeError if damping_ratio or shear_wave_speed_m_s is not a single number, or frequencies holds a text or a value that is not a real number.
ground_to_floor_level_difference(
floor: Literal['concrete', 'timber'],
*,
floor_natural_frequency_hz: float,
) -> NDArray[np.float64]

The level difference from the ground to a floor, Tables A.1 and A.2.

for a building with concrete or with timber floors whose floors have the given natural frequency, along PREDICTION_BAND_CENTERS_HZ, for any storey. The tables print a column for each of FLOOR_NATURAL_FREQUENCIES_HZ and no rule for a frequency between two, so the frequency has to be one of them. Clause 5.4.4: run the prediction once for each natural frequency the building may have, and never with the envelope over all of them, which overestimates considerably.

Parameters

Name Description
floor "concrete" or "timber".
floor_natural_frequency_hz , one of the tabulated frequencies.

Returns: , in decibels, one per band.

Raises

Exception When
ValueError For an unknown floor or a frequency the tables have no column for.
TypeError if floor is not a text.

Constant (mapping).

ground_to_foundation_level_difference(
level: Literal['basement', 'ground_floor'],
*,
statistic: Literal['mean', 'lower', 'upper'] = 'mean',
) -> NDArray[np.float64]

The level difference from the ground into the foundation, Tables A.3 and A.4.

for a basement or for a foundation at ground level, along the 14 bands from 4 Hz to 80 Hz, as the mean of the buildings measured or the mean less or plus its deviation. The tables stop at 80 Hz where the others run to 250 Hz, so the result enters predict_floor_spectrum only with an emission spectrum cut to the same 14 bands, or padded with zeros above them by the caller.

Parameters

Name Description
level "basement" or "ground_floor".
statistic "mean" (default), "lower" or "upper".

Returns: , in decibels, one per band from 4 Hz to 80 Hz.

Raises

Exception When
ValueError For an unknown level or statistic.
TypeError if level or statistic is not a text.

Constant (mapping).

GROUND_TO_FOUNDATION_LEVEL_DIFFERENCES = {'basement': {'lower': (-9.1, -8.2, -8.3, -8.7, -8.2, -8.3, -9.5, -12.5, -14.7, -15.6, -14.5, -13.1, -12.4, -11.6), 'mean': (-4.0, -3.5, -3.6, -4.2, -4.2, -3.8, -4.6, -6.0, -8.2, -9.3, -7.4, -5.1, -4.4, -4.2), 'upper': (1.0, 1.5, 1.1, 0.3, 0.1, 0.4, 0.3, -0.4, -2.1, -2.7, -0.1, 3.0, 3.4, 3.1)}, 'ground_floor': {'lower': (-8.3, -7.0, -7.5, -6.4, -4.6, -4.3, -6.3, -7.0, -9.1, -10.7, -11.3, -10.0, -11.2, -9.8), 'mean': (-3.2, -3.0, -3.9, -3.0, -2.2, -1.9, -3.1, -4.2, -5.8, -6.4, -5.7, -4.9, -5.3, -4.7), 'upper': (1.7, 1.1, 0.0, 0.3, -0.5, 0.4, -0.4, -1.4, -1.8, -2.5, -0.7, 0.3, 0.4, 0.8)}}
ground_transmission(
frequencies: float | np.floating[Any] | np.integer[Any],
*,
distance_m: float,
reference_distance_m: float,
exponent: NumericArrayLike,
damping_ratio: float | None = ...,
shear_wave_speed_m_s: float | None = ...,
) -> float
ground_transmission(
frequencies: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
distance_m: float,
reference_distance_m: float,
exponent: NumericArrayLike,
damping_ratio: float | None = ...,
shear_wave_speed_m_s: float | None = ...,
) -> NDArray[np.float64]
ground_transmission(
frequencies: NumericArrayLike,
*,
distance_m: float,
reference_distance_m: float,
exponent: NumericArrayLike,
damping_ratio: float | None = ...,
shear_wave_speed_m_s: float | None = ...,
) -> float | NDArray[np.float64]

The transmission through the ground, Formulae (4) to (6).

Formula (5) gives the ratio of the velocity at to that at as , geometric spreading with the exponent and material damping with of ground_attenuation_coefficient_per_m, and Formula (4) takes 20 lg of it. With the damping left out and an exponent per band it is Formula (6), the power law with the exponent measured on site for every band. On the surface the standard usually takes between 0.2 and 0.4, frequency-independent; a train is a line of point sources, and Annex B says what to take off an exponent measured with a point excitation.

Parameters

Name Description
frequencies The band centres, in hertz.
distance_m , from the source to the ground in front of the building or to its foundation.
reference_distance_m , where the emission spectrum was taken.
exponent , one value or one per band.
damping_ratio of the ground; None (default) leaves the material damping out.
shear_wave_speed_m_s , needed with a damping ratio.

Returns: , in decibels, one per band; negative where the building is further from the source than the reference. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For a non-positive distance, a negative exponent or damping, a damping ratio without a wave speed, or an exponent that does not broadcast to the bands.
TypeError if damping_ratio, distance_m or reference_distance_m is not a single number, or exponent or frequencies holds a text or a value that is not a real number.

Constant (tuple).

KB_ASSESSMENT_BANDS_HZ = (4.0, 80.0)
kb_weighted_levels(
levels: float | np.floating[Any] | np.integer[Any],
*,
frequencies: float | np.floating[Any] | np.integer[Any],
) -> float
kb_weighted_levels(
levels: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
frequencies: NumericArrayLike,
) -> NDArray[np.float64]
kb_weighted_levels(
levels: float | np.floating[Any] | np.integer[Any],
*,
frequencies: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
) -> NDArray[np.float64]
kb_weighted_levels(
levels: NumericArrayLike,
*,
frequencies: NumericArrayLike,
) -> float | NDArray[np.float64]

The KB-weighted third-octave levels, Formula (8) with Table 2.

: the correction of Table 2, the KB weighting of DIN 45669-1 rounded to a tenth of a decibel, added to each band from 4 Hz to 80 Hz. Bands outside those are not weighted by the table and are refused.

Parameters

Name Description
levels , one level per band, in decibels.
frequencies The band centres, nominal, 4 Hz to 80 Hz.

Returns: , one per band. A float when levels and frequencies are both numbers, an array when either is a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For a band outside Table 2, or mismatched inputs.
TypeError if frequencies or levels holds a text or a value that is not a real number.

Constant (mapping).

KB_WEIGHTING_CORRECTIONS = {4.0: -4.7, 5.0: -3.5, 6.3: -2.5, 8.0: -1.7, 10.0: -1.2, 12.5: -0.8, 16.0: -0.5, 20.0: -0.3, 25.0: -0.2, 31.5: -0.1, 40.0: -0.1, 50.0: -0.1, 63.0: 0.0, 80.0: 0.0}
line_source_correction(
distance_m: float,
*,
reference_distance_m: float,
exponent_correction: float,
) -> float

The correction of a point-source decay to a train, Formula (B.2).

, added to the level a point excitation predicts, with between 0.3 and 0.5: the train spreads less than the point did, up to the distance of Formula (B.1).

Parameters

Name Description
distance_m , in metres.
reference_distance_m , in metres.
exponent_correction , 0.3 to 0.5.

Returns: , in decibels.

Raises

Exception When
ValueError For a non-positive distance or a correction outside 0.3 to 0.5.
TypeError if distance_m, exponent_correction or reference_distance_m is not a single number.

Constant (mapping).

LINE_SOURCE_EXPONENT_CORRECTION = {'power_and_damping': 0.3, 'power_law': 0.5}

Constant (float).

PEAK_VELOCITY_FACTOR = 3.0
peak_velocity_from_kb_mm_s(kb_fmax_zug: float) -> float

The peak velocity of a category, Formula (12).

with = 3, an empirical factor, which is the number a DIN 4150-3 comparison wants.

Parameters

Name Description
kb_fmax_zug of Formula (10).

Returns: , in millimetres per second.

Raises

Exception When
ValueError For a negative input.
TypeError if kb_fmax_zug is not a single number.
point_to_line_transition_distance_m(
train_length_m: float,
*,
wavelength_m: float,
) -> float

Where a train stops being a line source, Formula (B.1).

: nearer than that a train of length is a line of point sources and its surface waves spread less than a point’s; further away it is a point source. Within the distances of Table 1 the line behaviour is the rule.

Parameters

Name Description
train_length_m , in metres.
wavelength_m at the band of interest, in metres.

Returns: , in metres.

Raises

Exception When
ValueError For a non-positive length or wavelength.
TypeError if train_length_m or wavelength_m is not a single number.
predict_floor_spectrum(
emission_levels: float | np.floating[Any] | np.integer[Any],
*,
ground_level_difference: NumericArrayLike = ...,
foundation_level_difference: NumericArrayLike = ...,
floor_level_difference: NumericArrayLike = ...,
mitigation_level_difference: NumericArrayLike = ...,
) -> float
predict_floor_spectrum(
emission_levels: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
ground_level_difference: NumericArrayLike = ...,
foundation_level_difference: NumericArrayLike = ...,
floor_level_difference: NumericArrayLike = ...,
mitigation_level_difference: NumericArrayLike = ...,
) -> NDArray[np.float64]
predict_floor_spectrum(
emission_levels: NumericArrayLike,
*,
ground_level_difference: NumericArrayLike = ...,
foundation_level_difference: NumericArrayLike = ...,
floor_level_difference: NumericArrayLike = ...,
mitigation_level_difference: NumericArrayLike = ...,
) -> float | NDArray[np.float64]

The predicted spectrum on a floor, Formula (1).

Every term is added, band by band, as the formula prints it: the emission spectrum, the transmission through the ground, the transfer into the foundation, the transfer to the floor and the effect of the mitigation. The Annex A tables are negative where they attenuate, and a mitigation must be too, which is why the term is not called an insertion loss here: the formula prints with a plus sign and names DIN 45673-1 for it, and an insertion loss in the sense of DIN 45672-2 Annex B, elastic_insertion_loss, is positive where the element reduces the level, so it goes in with its sign changed. An emission spectrum measured at the foundation makes the foundation term zero (Annex C does exactly that).

Parameters

Name Description
emission_levels , one level per band, in decibels.
ground_level_difference , per band or one value.
foundation_level_difference , per band or one value.
floor_level_difference , per band or one value.
mitigation_level_difference , per band or one value, added as printed, so negative for a mitigation.

Returns: , one level per band. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For a non-finite input or a term that does not broadcast to the emission spectrum.
TypeError if emission_levels holds a text or a value that is not a real number.
predict_train_category(
emission_levels: NumericArrayLike,
*,
frequencies: NumericArrayLike = (4.0, 5.0, 6.3, 8.0, 10.0, 12.5, 16.0, 20.0, 25.0, 31.5, 40.0, 50.0, 63.0, 80.0, 100.0, 125.0, 160.0, 200.0, 250.0),
ground_level_difference: NumericArrayLike = 0.0,
foundation_level_difference: NumericArrayLike = 0.0,
floor_level_difference: NumericArrayLike = 0.0,
mitigation_level_difference: NumericArrayLike = 0.0,
) -> TrainCategoryPrediction

Run the chain from an emission spectrum to the assessment quantities.

Formula (1) for the spectrum on the floor, Formula (8) for the KB-weighted bands from 4 Hz to 80 Hz, Formula (9) for the clock maximum r.m.s. of the category, Formula (10) for its and Formula (12) for the peak velocity. The assessment vibration severity over the categories of a timetable is Formula (11), the sum of train_assessment_severity, which also applies the rule of E DIN 4150-2:2023-08 that Formula (11) leaves out, a category at or below 0.1 counting as zero.

Parameters

Name Description
emission_levels , one level per band, in decibels.
frequencies The band centres, nominal; the 19 bands from 4 Hz to 250 Hz by default, and at least the 14 from 4 Hz to 80 Hz.
ground_level_difference , per band or one value.
foundation_level_difference , per band or one value.
floor_level_difference , per band or one value.
mitigation_level_difference , per band or one value, added as printed, so negative for a mitigation.

Returns: The chain, as a TrainCategoryPrediction.

Raises

Exception When
ValueError For a spectrum that does not hold the 14 bands of the KB assessment, or a bad term.
TypeError if emission_levels or frequencies holds a text or a value that is not a real number.

Constant (tuple).

PREDICTION_BAND_CENTERS_HZ = (4.0, 5.0, 6.3, 8.0, 10.0, 12.5, 16.0, 20.0, 25.0, 31.5, 40.0, 50.0, 63.0, 80.0, 100.0, 125.0, 160.0, 200.0, 250.0)

Constant (mapping).

RECOMMENDED_DISTANCES_M = {'freight_soft_soil': {'tunnel': None, 'surface': 200.0}, 'mainline': {'tunnel': 30.0, 'surface': 60.0}, 's_bahn': {'tunnel': 20.0, 'surface': 40.0}, 'urban': {'tunnel': 20.0, 'surface': 25.0}}
rescale_emission_for_speed(
levels: float | np.floating[Any] | np.integer[Any],
*,
speed_from_kmh: float,
speed_to_kmh: float,
) -> float
rescale_emission_for_speed(
levels: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
speed_from_kmh: float,
speed_to_kmh: float,
) -> NDArray[np.float64]
rescale_emission_for_speed(
levels: NumericArrayLike,
*,
speed_from_kmh: float,
speed_to_kmh: float,
) -> float | NDArray[np.float64]

An emission spectrum carried to another train speed, Formula (3).

, the same shift in every band, for the same category of train under the same conditions and a change of speed of up to 30 %. Beyond that the frequencies bound to a length, the sleeper-passing frequency for one, move with the speed while the resonances do not, and the shift is refused.

Parameters

Name Description
levels , the spectrum measured at the first speed, in decibels.
speed_from_kmh , the speed it was measured at.
speed_to_kmh , the speed wanted, in the same unit.

Returns: . A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For a non-positive speed, a change of more than 30 %, or a non-finite spectrum.
TypeError if speed_from_kmh or speed_to_kmh is not a single number, or levels holds a text or a value that is not a real number.

Constant (float).

SPEED_RESCALING_LIMIT = 0.3

Constant (float).

TAKT_MAX_FACTOR = 1.0
takt_max_kb(weighted_levels: NumericArrayLike) -> float

The clock maximum r.m.s. of a category from its spectrum, Formula (9).

with the energy sum of the KB-weighted bands from 4 Hz to 80 Hz, = 1 for Max Hold spectra with the time weighting Fast and mm/s, the reference of the velocity level; the value is the KB quantity because KB is the velocity in millimetres per second. Annex C prints 0.4 for a sum level of 78.1 dB.

Parameters

Name Description
weighted_levels , as kb_weighted_levels gives them, one per band.

Returns: , dimensionless.

Raises

Exception When
ValueError For an empty or non-finite input.
TypeError if weighted_levels holds a text or a value that is not a real number.
train_decay_exponent(
point_exponent: float,
*,
fitted_with: Literal['power_and_damping', 'power_law'] = 'power_and_damping',
) -> float

The decay exponent of a train from that of a point excitation, Annex B.

when the point measurement was fitted with spreading and damping apart (Formula (5)), when it was fitted as a power law alone (Formula (6)); both up to the transition distance of Formula (B.1), beyond which the point exponent holds as it is. The annex prints no floor, so a point exponent below the correction gives a negative result, as printed.

Parameters

Name Description
point_exponent , not negative.
fitted_with "power_and_damping" (default) or "power_law".

Returns: .

Raises

Exception When
ValueError For a negative exponent or an unknown fit.
TypeError if point_exponent is not a single number, or fitted_with is not a text.
train_velocity_ratio(
distance_m: float | np.floating[Any] | np.integer[Any],
*,
reference_distance_m: float,
transition_distance_m: float,
point_exponent: float,
exponent_correction: float,
) -> float
train_velocity_ratio(
distance_m: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
reference_distance_m: float,
transition_distance_m: float,
point_exponent: float,
exponent_correction: float,
) -> NDArray[np.float64]
train_velocity_ratio(
distance_m: NumericArrayLike,
*,
reference_distance_m: float,
transition_distance_m: float,
point_exponent: float,
exponent_correction: float,
) -> float | NDArray[np.float64]

The decay of a train’s vibration with distance, Figure B.1.

The ratio of the velocity at to that at , as the figure draws it: a power law with the exponent up to the transition distance of Formula (B.1), and the point exponent beyond it, continuous at . The figure is a sketch and prints no closed form; this is its reading.

Parameters

Name Description
distance_m , in metres, one or many.
reference_distance_m , in metres.
transition_distance_m , in metres.
point_exponent .
exponent_correction , 0.3 to 0.5.

Returns: , one per distance. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For a non-positive distance, a reference beyond the transition, a negative exponent or a correction outside Annex B.
TypeError if exponent_correction, point_exponent, reference_distance_m or transition_distance_m is not a single number, or distance_m holds a text or a value that is not a real number.
TrainCategoryPrediction(
frequencies: NDArray[np.float64],
emission_levels: NDArray[np.float64],
floor_levels: NDArray[np.float64],
weighted_frequencies_hz: NDArray[np.float64],
weighted_levels: NDArray[np.float64],
sum_level: float,
kb_ftm: float,
kb_fmax: float,
peak_velocity_mm_s: float,
)

The prediction for one category of train, Clauses 5 and 7.

Attributes

Name Description
frequencies The band centres.
emission_levels the prediction started from.
floor_levels of Formula (1), the spectrum on the floor.
weighted_frequencies_hz The band centres from 4 Hz to 80 Hz the KB assessment sums.
weighted_levels of Formula (8) over those bands.
sum_level of Formula (9), the energy sum of the weighted bands.
kb_ftm of Formula (9).
kb_fmax of Formula (10).
peak_velocity_mm_s of Formula (12).
TrainCategoryPrediction.plot(
ax: Axes | None = None,
*,
language: Literal['en', 'es'] = 'en',
**kwargs: Any,
) -> Axes

Draw the emission, the floor spectrum and the KB-weighted bands.

Requires matplotlib (the [plot] extra).

Parameters

Name Description
ax Existing axes, or None to create a figure.
language Label language, "en" (default) or "es".
kwargs Forwarded to phonometry._plot.vibration.plot_train_category_prediction.

Returns: The Axes.

velocity_spectrum_um_s(
levels: float | np.floating[Any] | np.integer[Any],
) -> float
velocity_spectrum_um_s(
levels: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
) -> NDArray[np.float64]
velocity_spectrum_um_s(
levels: NumericArrayLike,
) -> float | NDArray[np.float64]

A level spectrum as a velocity spectrum, Formula (13).

in micrometres per second, the form the VC curves of VDI 2038 Blatt 2 are drawn in.

Parameters

Name Description
levels , one level per band, in decibels.

Returns: , one per band, in micrometres per second. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError For a non-finite input.
TypeError if levels holds a text or a value that is not a real number.