Refuse at the door what used to arrive as a NaN (#642)
Every entry point that takes a signal resolves it through one line, and that
line let three things past. A None became an array of one NaN, so
octave_filter(None, 8000) answered with eight bands of NaN and refused
nothing. A None inside a list became a NaN sample, and one poisoned sample in
a few thousand came back as a whole ruined spectrum with nothing said, which
a caller could not tell from a broken instrument. Anything else numpy could
not convert escaped in numpy's own words, or as a TypeError where the entry
points document a ValueError.
None of this is a new policy. The tree already refused a non-finite sample
nearly everywhere: two signal entry points and the calibration one say so in
their own words, and the filter family and broadcast were the outliers. The
resolver now says it once, for all of them, and the message names the
parameter that carried the value: 'ref_signal' where that is the name, not a
generic 'x'.
The suite decided the part that was in doubt. Refusing a non-finite sample
broke twelve tests and not one of them was a caller with a real NaN-bearing
signal: ten already refused such a sample and only disagreed about the
wording, one carried a written instruction to rewrite it if the library ever
validated the input itself, and the last asserted that a NaN propagates
through the filter bank, which is the defect recorded as expected behaviour.
It does propagate, which is exactly why it is not something to hand back.
Eleven call sites wrapped the resolver in np.asarray, which converted the
None to a NaN before either guard could see it; without dropping those the
naming would have been cosmetic at eleven of the entry points. Nine per-entry
guards became unreachable once the resolver refused first, and are gone
rather than left as dead lines.
One behaviour changes beyond the refusals: a masked array whose masked slot
hides a NaN is refused now. The mask never survived the conversion, so that
NaN was already reaching the computation; the refusal surfaces it.
A personal vibration exposure meter is graded against ISO 8041-2, cell for cell (#874)
* A personal vibration exposure meter is graded against ISO 8041-2, cell for cell
ISO 8041-2:2021 grades the personal vibration exposure meter with the tables
of ISO 8041-1 wherever it prints them again. The 228 saw-tooth burst
indications of its Tables 7 to 9 and the 228 tolerances beside them, typed off
the Part 2 pages into the test reference data, are the Part 1 cells the
library already holds, and so is its Table 6 test signal, so the existing
signal-burst functions are the Part 2 test as they stand.
The two things Part 2 prints differently get tables of their own in
vibration.human.instrumentation. PVEM_INDICATION_TOLERANCES_PERCENT is its
Table 2: the first two rows of the Part 1 table and no running r.m.s. row,
because Part 2 5.13 declares the running r.m.s. not applicable to a PVEM.
PVEM_MAX_EXPANDED_UNCERTAINTY_PERCENT holds the maximum expanded uncertainty
each clause of Part 2 permits, the Part 1 figures on Part 2's own list of
clauses; its 13.9 is a periodic verification and not the Part 1 13.9.
The conformance report gains a section for Part 2: the library reproduces
every printed cell of Tables 7 to 9 inside the Part 2 tolerance, each table
and Table 6 match Part 1 cell by cell, and the Table 2, uncertainty and
coverage factor rows are checked against the page.
* The meter guide covers the personal meter, and two ISO 8041-2 defects are registered
The human-vibration meter guide has a section on the personal vibration
exposure meter of ISO 8041-2:2021, in English, in Spanish and in the docs
mirror: which Part 1 numbers a PVEM is held to, the Table 2 that loses its
running r.m.s. row, the uncertainty table whose clause numbers name different
tests, and what of Part 2 is not implemented. The page cites the standard.
Two defects the Part 2 page shows go into the errata registry, in both
languages. Its 12.7 carries over the Part 1 pointer "the appropriate
weighting factor (see Table 1)", which a conforming Wf meter cannot satisfy
with the 0,388 8 Table 1 still prints; and the paragraph after it grades
"each time weighting" against "the tolerance limits of Table 2", a running
r.m.s. row Part 2 dropped when its 5.13 made the running r.m.s. not
applicable.
* The guide indexes say the meter guide covers the personal meter too
The entries for the human-vibration meter guide in the docs index and in the English and Spanish guide lists now name the personal vibration exposure meter of ISO 8041-2, which the guide covers in its own section.
* The personal meter guide says where its running r.m.s. survives, and a misprint in its logging test is on record
* The personal meter is described as ISO 8041-2 defines it, and the Wf errata give the gap its printed factor implies
A PVEM is the meter left unattended to log a worker's exposure through a
full working day, with its transducer on the worker, the seat or the
machine (ISO 8041-2 5.1.1 to 5.1.3); the guide, the CHANGELOG and the
docstrings no longer call it a meter the worker wears. Read from the
0,388 8 of Table 1, the Wf weighting-factor pointer of 12.7 misses by
7,76 % of the demanded value, not 7,75 %, in the ISO 8041-1 entry and its
ISO 8041-2 counterpart alike, and in the band_limited_weighting_factor
docstring. The uncertainty table is labelled 11 figures over 10 clauses,
the See also entry points at the renumbered IEC 61672-1 section 12, the
docs mirror carries the not-covered claim for the rest of Part 2, the
Spanish errata entries use the register's location and status wording,
and the landing page lists ISO 8041-1/-2.
* A lost Table 6 application fails its row, and the coverage factor is compared exactly
* The generated pages follow the layers below
Give a vibration meter the verdict a sound level meter gets (ISO 8041-1) (#750)
* Give a vibration meter the class verdict a sound level meter gets
* Pin the ISO 8041-1 tolerance tables to the printed page
* Say the meter is graded on its weighting, and count the pages again
* Count the tolerance pairs Table 5 actually prints
* Grade the phase response, and the uncertainty the laboratory brings
* Name the band-limiting response, and grade the running r.m.s. decay
* Grade the burst, the decay and the band-limiting stage
* The shape of the tolerance, and the guide that reads Tables 4 and 5
Tables 4 and 5 print on one page and read as two unrelated objects: nine rows
of break frequencies, then five rows of limits. Draw them as one thing. Three
panels share a frequency axis: Wk with the band Table 5 allows around it, the
same band with the design goal divided out so the +12/-11 against +26/-21 step
is to scale, and the phase column on the same four corners. The five printed
rows carry three distinct pairs of limits, and the two tails have no lower
limit at all, which is why their fill runs off the bottom.
The guide is the long form of the same reading, from why an instrument
standard belongs in a library of computations to the 228 cells of the
saw-tooth burst tables.
* Close the map of verifiers, and put the phase formula on its own line
Compliance and verification calls itself the map of every verifier in the
library, and five were missing from it: the IEC 61265 aircraft-noise system
check and the four ISO 8041-1 ones. They belong in a table of their own
rather than in the one above, because they answer a different question. The
four in that table grade a design this library built against an acceptance
mask; these grade numbers somebody measured on a bench, and the verdict is a
plain pass or fail that belongs to that instrument on that day.
The display formula of Formula (6) had its maths on the opening fence, where
it reads as the fence's meta and swallows the prose until the next bare $$.
* List the fourth page of the human-vibration section
The section index has said for a while that four pages cover human vibration
and then listed three of them. The fourth is the meter verification, and the
overview mirror picks up the relative link now that the page is in docs/.
* Say which clauses of the instrument standard are implemented
The scope claims were written when the weighting tolerance was the only one
of them, and they still said an instrument was graded on its weighting and on
nothing else. What is implemented now is every criterion of ISO 8041-1 that
is arithmetic: the tolerance band, the characteristic phase deviation, the
running r.m.s. decay times and the 228 burst indications. The line those
claims exist to draw has not moved, it just runs somewhere else: a bench is
still what everything on the other side of it needs.
* Give the meter guide the section that says where it stops
Every other guide in the section ends on a "What this guide covers" list, and
this one went straight from the comparison with the sound level meter to the
see-also. It is the page that most needs the list, because four of its five
verdicts look like a type test and none of them is one.
* Five drawings for the clauses of ISO 8041-1 that are arithmetic
The guide had eleven sections and one figure. Each of these draws the thing
its section is about and something the printed page cannot say.
The bench sweep of section 2, twice: on the log-log axis where the failing
band is nearly invisible, and in per cent where the same shortfall of 15 %
sits outside the central region and inside the skirt, with an arrow carrying
it across the corner.
The uncertainty of section 4, as a bar on every point rather than a wider
band, because that is what 13.1 and 14.1 do: the band never moves. In the two
tails the bar has one arm, since there is no lower limit to extend, and a
second panel closes the certifiable window as U grows.
Formula (6) of section 8 on three panels: the raw phase error that Table 5
never grades, the characteristic deviation that it does, and the same errors
on a linear axis where the criterion is read off as an intercept at f = 0.
A constant error is graded at its own height, and 2 ms of group delay, worth
57 degrees at the top of the range, is graded as zero.
The stopwatch of section 9: both averages falling from the cut, the printed
band around each crossing, and a magnification of the linear one where the
measured trace runs below the closed form and therefore crosses early. The
third panel puts Table 11's two columns on one dimensionless axis, which is
what settles that the time column binds.
The saw-tooth burst of section 10: where the six bursts sit in the minute,
one burst with the five graded lengths on their upward zero crossings, and
the deviations of a meter that reports its exponential average in the linear
column, failing only at the two longest bursts.
Three defects came out of drawing them. The rate column of Table 11 was
compared with the closed form using the lower bound of one row and the upper
bound of another. The burst renderer joined the continuous row to the 16 cycle
row across an interval the tables never define. And the two verifier
renderers painted a conforming band red and a failing one orange, which is
the verdict backwards and the only pair in the corpus that reads that way.
* The Spanish edition of the meter guide, and its place in the index
Both twins of the page, the plain-markdown one under docs/ in English and the
site pair in both languages, with the six figures carried across: a picture
element keeps its URLs untouched, because the site picks the Spanish twin of
each SVG from the same stem, and its alt text is translated like any other
prose a reader is given.
Every code block is byte for byte the English one except its prose comments,
which is the rule this corpus settled: a comment that quotes what the code
prints describes output the reader will really see, and the library prints
English. The clause numbers keep their decimal point and everything else
takes the comma.
The index gains its hundred and twenty-seventh guide, in figures and in
words, in both languages.
* Capitalise the table names of the Spanish frontmatter
The body follows the house form, Tabla 5 and not tabla 5, which the Spanish
tree writes ten times to one. The frontmatter I wrote around it did not.
* One word each, decided once, for the Spanish page
Translating a page in eight pieces converges on eight vocabularies, so this is
the pass over the whole of it. Every one of these was settled against a source
rather than against a preference, and the ones that reached beyond the page
reached as far as the term goes.
*Mean square* was «media cuadrática», which is not a clumsy reading of the
English but a different quantity: the quadratic mean is the root mean square,
and the sentence is about the mean of the squares. It is «valor cuadrático
medio».
*Running r.m.s.* was «r.m.s. móvil» in five lines, four of which arrived with
this branch, against the «valor eficaz móvil» the exposure guide has used all
along and the Spanish guide to the vibration regulation writes seven times.
The four new lines were the ones that were wrong.
*Hardware* was «soporte físico», the purist calque, in five places including
the two section indexes. The Spanish adoption of ISO 10140-3, the Spanish GUM
and Pallas Areny all write hardware, and so do seventeen pages here.
*Characteristic phase deviation* was two orders in three places, and the
library and its figure carried the one that attaches the adjective to the
wrong noun. Both now read the way the page does.
And the smaller ones: the averaging is a «promediado» and not a «promedio»,
the deviation is «extendida» as its own figure already labels it, the
instrument's *allowance* is a «holgura» and not a second «tolerancia» in a
sentence whose whole point is that the two are different, comparing takes
«con» and not «contra», and the generic type test of the opening paragraph is
no longer the same words as the first of the three levels clause 1 defines.
* The register findings the Spanish reviewers were right about
Every block came back with the same class of note and a source beside it, so
these are the ones that were verifiable and are applied at their source, in
the translated blocks, with the page rebuilt from them.
One of the reviewers caught a stale copy rather than a wording: the page had
been assembled from a block its translator revised a minute later, so it was
carrying an earlier reading of section 8 and a sentence that said the response
climbs *itself* over its limit. The page is rebuilt from the blocks now, by a
script, so the two cannot drift again.
The rest are calques and English syntax wearing Spanish words: a scope that
was «estrecho» where the trade writes «acotado», a resumptive «ella» for the
standard, «sumada encima» for added on top, an English cleft, a plural that
did not agree, «calificar contra» for graded against, and a sentence that had
the figure grading the sweep the wrong way round. The anti-alias filter keeps
the name the neighbouring page already gives it.
Not applied, and recorded instead: the corpus writes «media cuadrática» in
twenty-one other places where the UNE adoptions never do, and it is split
between «malla» and «rejilla» and between «invariancia» and «invarianza».
Those are sweeps of their own, decided once, not fixed page by page by
whoever passes.
* The three things the pipeline found that the local gates do not run
KaTeX refuses `P_\max`: a control sequence with no argument cannot be a
subscript, and the guide wrote the peak deviation of Formula (H.4) that way.
It is `P_{\max}`, in the plain-markdown page and in both twins. Nothing local
parses the maths of a built page, which is why this reached the site job.
Bandit reads the Spanish for PASS as a hardcoded password, on the string
value alone. The report translation table already carries the same line with
the same annotation, so the figure table takes it too, with the reason.
And five literals that Sonar counts as duplicated: the deviation ordinate the
mobility, seat and burst panels share, the three legend entries every
ISO 8041-1 verifier panel carries, and the message the three entry points
that take a frequency vector refuse it with. That last one is worth a
constant on its own merits: a caller matching on the text was matching three
copies of it.
* The review findings that held up, and the one that was mine twice over
Two are defects in code rather than in prose. The decay search took
`argmax` of a mask that can be all false, so a running r.m.s. that never
reaches a tenth of its initial value reported a decay of 0.000 s, and the
rate row that divides 20 dB by that time would have ended the whole report on
a ZeroDivisionError instead of failing its own row. And the burst table row
counted the cells it found rather than the cells the standard prints, so a row
vanishing from either table would have shrunk the denominator with the
numerator and passed on a smaller table while the label still claimed 192.
Both now say what went wrong.
The saw-tooth sentence had the multiple wrong. A burst started at the peak
does read 28 % high on the single-cycle row of Table 8, which I confirmed by
rolling the library's own record half a ramp inside each burst window: the
r.m.s. moves from -0.13 % to +28.2 % of the printed cell and the linear MTVV
from +0.03 % to +28.4 %. Against a printed tolerance of 10 % that is nearly
three times, not four.
The rest is prose that said more or less than it should. Two absolute-value
bars split a cell of the curated API table into six. An English docstring
carried Spanish decimal commas inside code formatting, so the corner
frequencies it prints could not be pasted into an interpreter. The verifier
table promised a plain pass or fail where four of the five return a result
object and only one returns the bool. Table 6 was cited among the acceptance
limits when it defines the signal. The scope claims listed every arithmetic
criterion except the band-limiting stage. And the hardware paragraph read as
though every test on the page needed a bench, when the page is the half of
each comparison that does not.
One of them I introduced myself, and twice: substituting the mean square left
«de la valor cuadrático medio» behind in the Spanish page and in the block it
is built from.
* The errata entry the docstring had been promising, and what reading the page changed
`band_limited_weighting_factor` ended on "the ambiguity is registered in
docs/ERRATA.md" and no such entry existed. Writing it meant reading clause
12.7 rather than trusting the analysis already in the docstring, and the page
corrected two things in it.
The clause is on printed folio 30, and what it prints is that the indicated
frequency-weighted values "shall equal the indicated band-limited weighted
vibration value multiplied by the appropriate weighting factor (see Table 1)
**within the tolerance limits of Table 2**". So the limit is Table 2's, which
for `Wf` is ± 5 %. The docstring cited 3 %, which is the paragraph above: the
spread the three repeat measurements of the error of indication may not
exceed. Different requirement. And with the right limit the 7,75 % a
conforming `Wf` meter is asked to miss the row by is half again over it, not
more than twice.
The entry itself records what the two readings are, why eight of the nine
weightings cannot tell them apart, and why `Wf` can: its reference frequency
of 2,5 rad/s sits inside its own band-limiting skirt, so the band-limiting
weighting there is 0,928 078 rather than the 0,999 7 the others carry. Both
editions, and both cite the printed folio and the PDF page they were read on.
The wrap put a `|` at the start of a line inside the inline maths, which
markdown reads as a table row. The guard caught it; the expression is on one
line now.
* State the sampling-rate rule where the caller reads it
The validator refuses an fs at or below twice the upper band-limiting corner,
because under it the pass band of the weighting being tested is not
represented and the indications are an artefact of the sampling rather than a
response. The two docstrings that take the parameter said only that None
takes the recommended rate.
* Make the predicate noun unmistakable where the subject is singular
The Spanish tree writes «aritmética» as a predicate noun, with a plural
subject: «los apartados que son aritmética», «las partes del ensayo que son
aritmética». Correct, and four places do it. With a singular masculine
subject the same construction reads as a failed agreement instead, so those
two say «pura aritmética», which keeps the noun rather than switching to an
adjective and disagreeing with the rest.
* A worked example that gave the wrong verdict, and two links that left the site
The API quick table demonstrated verify_weighting on a Wk channel reading
0,86 at 16 Hz and said the verdict was False. It is True: the design goal
there is 0,768 699, so 0,86 is 11,88 % high and the central region allows
+12 %. The row now says so, with the margin, since a tolerance check whose
example is a hair inside the limit is worth reading.
And the see-also of both twins pointed at the published site by absolute URL
where every other link on the page is site-relative, which leaves the site on
a preview build and dropped the locale prefix on the Spanish page.
* Regenerate the two errata pages the site serves
The registers under docs/ are the source and the site copies are written from
them by generate_site_reports.py. Adding the ISO 8041-1 entry to the source
left the two generated pages a record behind.
* The findings in the review body, which are not the ones on the diff
Two of them were the same real omission at two levels: the topic index of the
vibration section listed three human-vibration pages where there are four, and
the llms shard built from it inherited that. The section index below it had
already been fixed; its parent had not. Both editions, then regenerated.
`__all__` of the human-vibration package was sorted on main, 59 names in ASCII
order, and this branch appended 42 in three unsorted blocks. It is one sorted
list again. That is restoring the module's own convention rather than imposing
one: 38 modules in the tree do not sort `__all__` at all, including
`vibration/__init__.py` and `exposure.py`, and deciding that for them belongs
to a sweep of its own.
The burst table spelled the band-limiting row as a literal in four sampled
cells while the row selector next to it takes the same value from
`ph.vibration.BAND_LIMITING`. Two spellings of one row is how a table starts
sampling cells that no longer exist. The comment of the band-limiting sample
table said its tuple carried three fields where it carries four. And the phase
helper of the plot tests returned `object`, so nothing checked what it built.
* The claim my own table had just made false, and five figures in the wrong language
Adding the measurement verifiers to the map left the section below it saying
that every verifier verdict is a statement about a design. That was true until
the table above it existed. The page separates the two now: a class verdict is
about the design and every measurement made in software inherits it, and a
measurement verdict belongs to that instrument on the day it was measured and
nothing inherits it, not even a second run of the same test. Three editions.
And five `.plot()` calls in the Spanish guide had no `language="es"`, so a
reader copying the line got an English figure inside the Spanish page. The
five are in the blocks the page is built from, so the rebuild carries them.