Grade a machine, not only diagnose it (#697)
* Grade a machine, not only diagnose it
vibration.machinery could say where a fault would show and not whether the
machine was acceptable. Those are different trades: a kinematic line tells you
what is wrong, a severity grade tells you whether to keep running, and the
second is the question a plant asks first. The section index said as much, in
the list of what it did not cover.
ISO 20816-1 is the basis document of the series, merging what were ISO 10816-1
and ISO 7919-1. It fixes the shape of the judgement and leaves the numbers to
the machine-specific parts, so what lands here is the shape.
Four evaluation zones and the grading, deliberately blind to the quantity: the
parts set boundaries on shaft displacement, housing velocity or housing
acceleration alike, and the comparison is the same in all three. A magnitude
exactly on a boundary is the top of the zone below it, which is how the tables
print their limits.
The criterion is a curve rather than a number. A single velocity limit
regardless of frequency allows unacceptable displacement low down and
unacceptable acceleration high up, so Figure 9 is flat only between two corner
frequencies and slopes outside them, and Formula (C.1) is that shape with the
zone factors Annex C.2 prints.
And a change is a vector. Criterion II is written on a change from a baseline,
and a broad-band magnitude cannot express one: the machine of Annex D fell from
3 mm/s to 2,5 mm/s while its phase swung 140 degrees, which is a change of
5,2 mm/s, ten times what the magnitudes say.
For machines no part of the series covers, Table C.1 offers a ladder of
preferred magnitudes and the range each boundary is typically drawn from. Both
are published, ranges overlapping as the table draws them, because a large
machine's A/B boundary can sit above a small machine's B/C one.
Fifteen conformance rows in a domain of their own, one hundred and three tests,
a guide in both languages, and three drawings: where the measurement is taken,
the zone criterion as a curve, and the polar diagram of Annex D.
* Read the polar figure back in the tests, and say the Spanish for 'final'
Two things the last run found. The vector-change renderer was drawn and looked at but never read back, so nothing would have caught a chord that came out bowed, a legend that lost a vector or a title that dropped its unit; these read the artists. The chord test is the one that earns its place: a polar axes interpolates along an arc between two points, so the straight line of Figure D.1 is sampled in the plane, and the test walks the sampled path and checks its length is the chord.
The other is the figure-language gate. The renderer already translates the three vector labels, and 'final' happens to be the same word in Spanish, so the Spanish figure ships a string the audit reads as English. It goes into the translation table as its own translation, which says it was looked at, rather than into ENGLISH_BY_DESIGN, which would say it must not be translated.
* Say in the changelog what the machine-vibration grading adds
* Keep the only call that can raise inside the raises block
* Say which way the criterion slopes below the corner, and which number the severity is
Three findings from the review, all of them real.
The low-frequency branch of Formula (C.1) was described backwards. Constant displacement means the allowable velocity RISES with frequency, at 6 dB per octave, up to the lower corner; only the high-frequency branch falls. The code was right and the figure drew it right, so the error was only ever in the words, which is the half a reader takes away.
The opening paragraph said the severity comes from one number measured at a bearing. 4.3.3 is more specific than that: measurements are made at several positions and in one to three directions, and the severity is the largest of the magnitudes they give. Reading it as one bearing invites measuring one and missing a larger value next door.
And the change chord took its label as a positional default beside **kwargs, so a caller who passed label= got a duplicate-keyword TypeError rather than their label. It is a default now, like every other kwarg the renderers set, with a test that a caller's label wins.
Grade a machine, not only diagnose it (#697)
* Grade a machine, not only diagnose it
vibration.machinery could say where a fault would show and not whether the
machine was acceptable. Those are different trades: a kinematic line tells you
what is wrong, a severity grade tells you whether to keep running, and the
second is the question a plant asks first. The section index said as much, in
the list of what it did not cover.
ISO 20816-1 is the basis document of the series, merging what were ISO 10816-1
and ISO 7919-1. It fixes the shape of the judgement and leaves the numbers to
the machine-specific parts, so what lands here is the shape.
Four evaluation zones and the grading, deliberately blind to the quantity: the
parts set boundaries on shaft displacement, housing velocity or housing
acceleration alike, and the comparison is the same in all three. A magnitude
exactly on a boundary is the top of the zone below it, which is how the tables
print their limits.
The criterion is a curve rather than a number. A single velocity limit
regardless of frequency allows unacceptable displacement low down and
unacceptable acceleration high up, so Figure 9 is flat only between two corner
frequencies and slopes outside them, and Formula (C.1) is that shape with the
zone factors Annex C.2 prints.
And a change is a vector. Criterion II is written on a change from a baseline,
and a broad-band magnitude cannot express one: the machine of Annex D fell from
3 mm/s to 2,5 mm/s while its phase swung 140 degrees, which is a change of
5,2 mm/s, ten times what the magnitudes say.
For machines no part of the series covers, Table C.1 offers a ladder of
preferred magnitudes and the range each boundary is typically drawn from. Both
are published, ranges overlapping as the table draws them, because a large
machine's A/B boundary can sit above a small machine's B/C one.
Fifteen conformance rows in a domain of their own, one hundred and three tests,
a guide in both languages, and three drawings: where the measurement is taken,
the zone criterion as a curve, and the polar diagram of Annex D.
* Read the polar figure back in the tests, and say the Spanish for 'final'
Two things the last run found. The vector-change renderer was drawn and looked at but never read back, so nothing would have caught a chord that came out bowed, a legend that lost a vector or a title that dropped its unit; these read the artists. The chord test is the one that earns its place: a polar axes interpolates along an arc between two points, so the straight line of Figure D.1 is sampled in the plane, and the test walks the sampled path and checks its length is the chord.
The other is the figure-language gate. The renderer already translates the three vector labels, and 'final' happens to be the same word in Spanish, so the Spanish figure ships a string the audit reads as English. It goes into the translation table as its own translation, which says it was looked at, rather than into ENGLISH_BY_DESIGN, which would say it must not be translated.
* Say in the changelog what the machine-vibration grading adds
* Keep the only call that can raise inside the raises block
* Say which way the criterion slopes below the corner, and which number the severity is
Three findings from the review, all of them real.
The low-frequency branch of Formula (C.1) was described backwards. Constant displacement means the allowable velocity RISES with frequency, at 6 dB per octave, up to the lower corner; only the high-frequency branch falls. The code was right and the figure drew it right, so the error was only ever in the words, which is the half a reader takes away.
The opening paragraph said the severity comes from one number measured at a bearing. 4.3.3 is more specific than that: measurements are made at several positions and in one to three directions, and the severity is the largest of the magnitudes they give. Reading it as one bearing invites measuring one and missing a larger value next door.
And the change chord took its label as a positional default beside **kwargs, so a caller who passed label= got a duplicate-keyword TypeError rather than their label. It is a default now, like every other kwarg the renderers set, with a test that a caller's label wins.
Answer the audit: three defects in the code, one class of invisible byte, and sixteen claims the page does not support (#705)
* Grade the run, refuse the control character, ask only for what is used
Three things the audit found in the code.
industrial_machine_zone wrapped a function that has always taken an array and then applied the most-restrictive rule of 5.2.3 by comparing the two gradings as text. With an array in, that text was the array's repr, so a year of monthly readings came back as one eighteen-character string. The rule is applied to zone indices now and the letters looked up at the end, and a new figure draws what the array is for: twelve readings walking from zone A into zone D, with the month Criterion II sees before Criterion I does.
A form feed had reached the change-of-section docstring, and in a raw string that is exactly the backslash and the f of the command after it, so the published formula lost its fraction. check_control_characters.py refuses the whole class over the tracked text corpus, with an escape hatch for the two files that are copies of somebody else's and a ratchet on it.
section_change_loss demanded a rectangular duct's largest side whatever the ratio, and for a sudden reduction threw it away: Figure 26 prints no effect in the frequency column there, so no limit frequency and no dimension enter the answer. It is asked for now only where it is used. A round duct's diameter and its area are one fact stated twice, and a contradictory pair silently moved the limit frequency by a decade instead of being refused.
* Say what the printed page says, in both languages
Ten statements across the guides, the register and the module comments that the printed page does not support.
Clause numbers: the measurement band of ISO 10816-3 is stated in an unnumbered Annex A, which has no A.1; the 50 MW cap on group 1 is in the title of Table A.1 and not in clause 4.2; VDI 2081's duct attenuation uses Tables 5 and 7, Table 8 being the sound reduction index of building components; the spectral parameter and the blade-frequency allowance are printed in Section 4.3.4, not 4.3.3; and the Table C.1 ladder steps by 1,6, which is R5 and not R10.
Numbers: the fan caption said eight decibels between a radial machine and an axial one where its own figure prints 94 and 106; the ISO/TR 17534-3 cases are 194,16 m apart in ground projection, not 195; and the register holds five VDI 2081 defects, not four, the fifth being the cross-reference that sends a reader to Section 7.3.2 for coefficients printed in 7.2.3.2.
Descriptions: the Section 6.4 mistranslation is about whether a junction's reduction depends on frequency at all, not about which way a duct's attenuation runs with it; and the note about the three L_WSM values sitting inside their stated tolerance holds for two of the three, assembly T being inside the English tolerance and outside the normative German one.
The ISO/TR 17534-3 errata entry gets its Status line back in both languages, taken by the two VDI entries inserted above it. And one term, one word, on the Spanish pages: margen for the tolerance band and referencia for the established baseline, each of which the same page had been saying two ways.
* Name the parameter this signature has when it refuses a rating
gear_housing_velocity_limit passed the rating through to allowable_velocity, so a bad one surfaced under the delegate's 'constant_velocity_mm_s': a keyword the caller cannot see and no pytest.raises(match=) against this API can match. Validated locally now, the way its sibling already was.
* Carry the restored errata line into the pages the register feeds
* Count the letters the figure actually draws
* Let the section-change rows describe a duct that exists
The nine Figure 26 abscissae were checked through a round duct given both an area and a 0,4 m diameter that does not follow from it, which the consistency check now refuses. The diameter comes from the area, which is what keeps the 63 Hz octave below the limit frequency at every ratio the chart is drawn over.
* Write the fixture bytes the test means, on Windows too
path.write_text translates a newline into a carriage return and a newline on Windows, so a fixture written to carry one control character carried two there and the two tests that fix a position failed on both Windows runners. newline='' turns the translation off.
* Name a file the same way on every platform
The reports and the keys of the escape hatch were built with str() on a path, which gives backslashes on Windows and matches no key written with forward slashes. Both exempt files were therefore reported there and their entries called stale in the same run, which is what the Windows job caught. Named through as_posix() now, and the test that held the hatch against the tree asks what it can answer anywhere: that every entry names a file the scan reads.
* Take the corrections into the figure and the printed outputs
The quality-assurance figure still drew the 195 m the pages had stopped saying; it is 194,16 m in both languages now. The propagation snippet printed 96 and -1 at 8 kHz where it returns 95,8 and -0,8. The trend snippet imported numpy and used a name it never imported. And the Spanish errata bullet called Section 7.3 sound attenuation, where it is the airborne sound insulation of a building component.
* Attribute each claim to the clause that carries it
Section 7.6 of Blatt 1 is the vibration isolation the page called a different guideline. Equation (35) is written on the cross-section ratio, not on the flow, which is why split_loss takes areas. The three gear ratings are named under Table 5 and defined in Annex A; Table 1 gives their units and nothing else. The CNOSSOS cross-references still pointed at section 3, which is the quality-assurance section now, and the comparison they mean is in section 4. And the chapters the successors added were credited to a 2019 revision on a page that says twice the successors are the 2022 editions.
* Keep the 2019 revision, which is a real edition
The refuters were right: VDI 2081 Blatt 1:2019-03 exists, sits between the held 2001-07 and the 2022-04 successor, and is the revision that added the air-handling-unit and outdoor-propagation chapters. The sentence was correct and only its second half needed the Section 7.6 fix. The changelog also counted nine Spanish figures where this branch repoints eight, the ninth having travelled with the gear-unit work; it says which now.
* Read the corpus the gate says it reads, and let a lost Status be heard
The control-character gate named the text suffixes and read those, so it never opened twenty-nine tracked files, seven of which carry the very character it exists for: the CNOSSOS extracts are CRLF as the workbook and the Official Journal produced them. It names the binary suffixes now and reads everything else, 1807 files instead of 1778, and its scope test asks something that can fail: that nothing it skips is text.
The errata gate recognised a record by its Status bullet, so a record that lost one was not reported, it was dropped, and its page citation and ratio claims stopped being checked with it. That is exactly how the ISO/TR 17534-3 line went missing this morning. A record is recognised by its Location now and a missing Status is an error; the sweep found one more, the ISO 3747 E.4.2.3 entry, in both registers. The Spanish register is read too, and has to hold the same records as the English one.
* Answer the review: what Criterion II reads, and the cap that can be refused
Criterion II does not read the zone, it reads the change from the established baseline, and a machine can be well inside zone B and still owe an investigation, which the caption under the figure already said and the paragraph above it did not. The Spanish 'al margen del propio documento' reads as 'apart from the document'; it is 'dentro del margen'. And section_change_loss refuses a cap that is not positive, which its raises clause did not say.
* Recognise a record by either bullet, not only by its Location
Keying recognition on the Location alone made the gate's own fixtures invisible: they carry an Evidence and a Status and no Location, which is the shape a test probe wants. Either bullet marks a record now, so a section missing one is reported rather than dropped, whichever one it is.
Answer the audit: three defects in the code, one class of invisible byte, and sixteen claims the page does not support (#705)
* Grade the run, refuse the control character, ask only for what is used
Three things the audit found in the code.
industrial_machine_zone wrapped a function that has always taken an array and then applied the most-restrictive rule of 5.2.3 by comparing the two gradings as text. With an array in, that text was the array's repr, so a year of monthly readings came back as one eighteen-character string. The rule is applied to zone indices now and the letters looked up at the end, and a new figure draws what the array is for: twelve readings walking from zone A into zone D, with the month Criterion II sees before Criterion I does.
A form feed had reached the change-of-section docstring, and in a raw string that is exactly the backslash and the f of the command after it, so the published formula lost its fraction. check_control_characters.py refuses the whole class over the tracked text corpus, with an escape hatch for the two files that are copies of somebody else's and a ratchet on it.
section_change_loss demanded a rectangular duct's largest side whatever the ratio, and for a sudden reduction threw it away: Figure 26 prints no effect in the frequency column there, so no limit frequency and no dimension enter the answer. It is asked for now only where it is used. A round duct's diameter and its area are one fact stated twice, and a contradictory pair silently moved the limit frequency by a decade instead of being refused.
* Say what the printed page says, in both languages
Ten statements across the guides, the register and the module comments that the printed page does not support.
Clause numbers: the measurement band of ISO 10816-3 is stated in an unnumbered Annex A, which has no A.1; the 50 MW cap on group 1 is in the title of Table A.1 and not in clause 4.2; VDI 2081's duct attenuation uses Tables 5 and 7, Table 8 being the sound reduction index of building components; the spectral parameter and the blade-frequency allowance are printed in Section 4.3.4, not 4.3.3; and the Table C.1 ladder steps by 1,6, which is R5 and not R10.
Numbers: the fan caption said eight decibels between a radial machine and an axial one where its own figure prints 94 and 106; the ISO/TR 17534-3 cases are 194,16 m apart in ground projection, not 195; and the register holds five VDI 2081 defects, not four, the fifth being the cross-reference that sends a reader to Section 7.3.2 for coefficients printed in 7.2.3.2.
Descriptions: the Section 6.4 mistranslation is about whether a junction's reduction depends on frequency at all, not about which way a duct's attenuation runs with it; and the note about the three L_WSM values sitting inside their stated tolerance holds for two of the three, assembly T being inside the English tolerance and outside the normative German one.
The ISO/TR 17534-3 errata entry gets its Status line back in both languages, taken by the two VDI entries inserted above it. And one term, one word, on the Spanish pages: margen for the tolerance band and referencia for the established baseline, each of which the same page had been saying two ways.
* Name the parameter this signature has when it refuses a rating
gear_housing_velocity_limit passed the rating through to allowable_velocity, so a bad one surfaced under the delegate's 'constant_velocity_mm_s': a keyword the caller cannot see and no pytest.raises(match=) against this API can match. Validated locally now, the way its sibling already was.
* Carry the restored errata line into the pages the register feeds
* Count the letters the figure actually draws
* Let the section-change rows describe a duct that exists
The nine Figure 26 abscissae were checked through a round duct given both an area and a 0,4 m diameter that does not follow from it, which the consistency check now refuses. The diameter comes from the area, which is what keeps the 63 Hz octave below the limit frequency at every ratio the chart is drawn over.
* Write the fixture bytes the test means, on Windows too
path.write_text translates a newline into a carriage return and a newline on Windows, so a fixture written to carry one control character carried two there and the two tests that fix a position failed on both Windows runners. newline='' turns the translation off.
* Name a file the same way on every platform
The reports and the keys of the escape hatch were built with str() on a path, which gives backslashes on Windows and matches no key written with forward slashes. Both exempt files were therefore reported there and their entries called stale in the same run, which is what the Windows job caught. Named through as_posix() now, and the test that held the hatch against the tree asks what it can answer anywhere: that every entry names a file the scan reads.
* Take the corrections into the figure and the printed outputs
The quality-assurance figure still drew the 195 m the pages had stopped saying; it is 194,16 m in both languages now. The propagation snippet printed 96 and -1 at 8 kHz where it returns 95,8 and -0,8. The trend snippet imported numpy and used a name it never imported. And the Spanish errata bullet called Section 7.3 sound attenuation, where it is the airborne sound insulation of a building component.
* Attribute each claim to the clause that carries it
Section 7.6 of Blatt 1 is the vibration isolation the page called a different guideline. Equation (35) is written on the cross-section ratio, not on the flow, which is why split_loss takes areas. The three gear ratings are named under Table 5 and defined in Annex A; Table 1 gives their units and nothing else. The CNOSSOS cross-references still pointed at section 3, which is the quality-assurance section now, and the comparison they mean is in section 4. And the chapters the successors added were credited to a 2019 revision on a page that says twice the successors are the 2022 editions.
* Keep the 2019 revision, which is a real edition
The refuters were right: VDI 2081 Blatt 1:2019-03 exists, sits between the held 2001-07 and the 2022-04 successor, and is the revision that added the air-handling-unit and outdoor-propagation chapters. The sentence was correct and only its second half needed the Section 7.6 fix. The changelog also counted nine Spanish figures where this branch repoints eight, the ninth having travelled with the gear-unit work; it says which now.
* Read the corpus the gate says it reads, and let a lost Status be heard
The control-character gate named the text suffixes and read those, so it never opened twenty-nine tracked files, seven of which carry the very character it exists for: the CNOSSOS extracts are CRLF as the workbook and the Official Journal produced them. It names the binary suffixes now and reads everything else, 1807 files instead of 1778, and its scope test asks something that can fail: that nothing it skips is text.
The errata gate recognised a record by its Status bullet, so a record that lost one was not reported, it was dropped, and its page citation and ratio claims stopped being checked with it. That is exactly how the ISO/TR 17534-3 line went missing this morning. A record is recognised by its Location now and a missing Status is an error; the sweep found one more, the ISO 3747 E.4.2.3 entry, in both registers. The Spanish register is read too, and has to hold the same records as the English one.
* Answer the review: what Criterion II reads, and the cap that can be refused
Criterion II does not read the zone, it reads the change from the established baseline, and a machine can be well inside zone B and still owe an investigation, which the caption under the figure already said and the paragraph above it did not. The Spanish 'al margen del propio documento' reads as 'apart from the document'; it is 'dentro del margen'. And section_change_loss refuses a cap that is not positive, which its raises clause did not say.
* Recognise a record by either bullet, not only by its Location
Keying recognition on the Location alone made the gate's own fixtures invisible: they carry an Evidence and a Status and no Location, which is the shape a test probe wants. Either bullet marks a record now, so a section missing one is reported rather than dropped, whichever one it is.