Search a catalogue of your own with every lookup by name, draw a panel's plateau from its row, and a guide to keeping catalogues of your own (#888)
* Search a catalogue of your own with every lookup by name, and draw a panel's plateau from its row
Every *_named lookup of a published catalogue takes catalogue=, the rows to
search in place of its own PUBLISHED_*: a catalogue read from a file, the
published one joined with it by |, or any mapping of key to row. Each keeps
its own way of matching a name, answers every match in the order the mapping
holds them and never picks one, and refuses a row of another class by its
key. The join of two mappings of one row class is typed as a mapping of that
class. building.plateau_transmission_loss takes a solids.PlateauMaterial row
as its material and reads its three numbers through printed(), so a bound is
refused in the sheet's own words, and a number passed explicitly replaces the
row's without reading it.
* A guide to keeping catalogues of your own, and the published catalogues page says where they go
"Your own catalogues" (EN and ES, with its docs/ twin) takes a data sheet
from a published table written out as a template to the rows in the models:
the document and its provenance, the refusals that point at a cell, a porous
core in the transfer-matrix model, a spectrum in a reverberation time, a
board in the plateau method, a floating floor's s' and s't, and every lookup
searching yours and the published ones at once. It shows how to write a
bound, a word, a range and a figure in another unit, lists the units a cell
takes, says which row class holds which quantity, and what the library never
does with the data. The guide is registered in the Files topic and the guides
index (145), and the published catalogues page gains a section on why it
never shows a manufacturer's table and where your own go.
* A refused catalogue row or plateau material is named by its class in words that read right for every class
A lookup given a catalogue that holds a row of another class now says
"holds a row of class AbsorptionSpectrum under 'mine/one'", and one given
something that is not a mapping, or a plateau material that is neither a name
nor a PlateauMaterial, ends with "got list" the way the other type refusals
of the library do, instead of putting "a" before a class name that needs
"an". The three lookups whose row class starts with a vowel say so in their
docstrings too.
* The contributing guide sends a manufacturer's data to the guide on catalogues of your own
The paragraph that says a data sheet, a declaration of performance or a test
report is never merged now links "Your own catalogues", which shows how to
keep such data in a file of your own and read it into the same rows.
* Every lookup by name finds a name however its accented letters are stored
A name pasted from a document can store an accented letter as the plain
letter followed by a combining accent. It prints the same as the one typed,
and a lookup that only folded case answered it with nothing. The twenty
lookups now compare the name asked for and each row's text in one Unicode
form, through one shared function, so both forms find the same rows.
Their summaries and return lines describe the catalogue searched, not only
the published one, and the curated API table says the same. The plateau
tests cover an explicit mass per area and frequency ratio beside a row as
well as the height, the lookup guard holds every public *_named to the shape
of a lookup instead of skipping one annotated otherwise, and the type check
covers a new tests/static_typing directory, where a published catalogue
joined with yours is checked to be accepted by a lookup's catalogue=.
* The catalogues guide says what a laboratory's R is, which kinds a provenance takes and what a row's source cites
The guide on catalogues of your own no longer calls every
TransmissionLossSpectrum row a field-incidence value or says a laboratory's
R comes with its own flanking: ISO 10140-2 measures R in one-third-octave
bands on one specimen, where flanking has been shown to be negligible, and
rates it with ISO 717-1, while a book compiles octave bands from tests it
seldom names. The document table names the seven provenance kinds, the date
format and phonometry_version; the source is said to leave the test date and
the standards in the provenance; a temperature in a row class of your own
takes only its own unit; the floating-floor example states s't to the whole
MN/m3 a test report prints; and the template is the one foam of Allard &
Atalla's Table 13.1. The Spanish page says módulo de cizalla, as the rest of
the site does.
* A plateau panel reads its material and the constants it gives in two steps of their own
The name or row is held to what it may be, and each number the caller leaves
out is then taken from the material, as before.
* A lookup searches the very rows it held to their class, the mapping read once
A lookup given catalogue= held every row to its class over the mapping's
items and then read the rows again from its values, so a mapping that
changed between the two readings could hand the lookup a row of another
class without the TypeError it documents. The rows held to the class are
now the rows searched, in the order the mapping gave them. A test with a
mapping whose values are not the rows its items give fails on the code
before this change, for each of the twenty lookups.
Rate a lining and a floor covering on their reference elements, and measure the sound of rain on a roof, by ISO 10140-1:2021 (#906)
A lining measured without and with it now gives its improvement band by band and its single numbers on the standard basic element of ISO 717-1:2020 Annex D, a floor covering gives its reduction of impact level on the heavyweight reference floor or on any of the three lightweight ones, and the sound of artificial rain on a roof, a roof window or a rooflight comes out as its intensity level, its A-weighted value and its normalized level against the reference glass pane. The reference curves of ISO 717-1 Table E.1 and ISO 717-2 Table 4, and the rain tables of ISO 10140-1 and ISO 10140-5, are published read-only tables, every result has a plot in English and Spanish, and a new guide walks the three annexes through a worked lining, a vinyl on a timber floor and a rooflight under heavy rain.
Pass the form of a survey's reverberation index and a calibration's tone estimate as a bool variable (#913)
estimate_reverberation_index(weighted=) and metrology.sensitivity(narrowband=)
had overloads for True and False only. mypy does not split a bool into the
two literals, so a flag read from a setting was refused although the call
runs.
estimate_reverberation_index gains a third overload that takes a bool and
returns the array or the float. For sensitivity every form returns a float
and the True overload only said that the coherent estimate needs fs, so that
overload now takes a bool with fs as a keyword, a second one takes it with
fs in position after the target level and the reference pressure, and a new
first overload takes a Signal, which carries its rate, with either estimate
and no fs. With fs in position, a bare array now takes narrowband=True as
well, which mypy refused before. A bare array with narrowband=True, or
with a bool that may hold it, still needs fs, and tests/static_typing pins
both refusals with ignores that strict mypy reports once they go unused.
A test reads every overload set in src through the parser and fails when one
types a parameter as Literal[True] or Literal[False] without a bool overload
for it. Nothing changes at run time.
Pass the form of a survey's reverberation index and a calibration's tone estimate as a bool variable (#913)
estimate_reverberation_index(weighted=) and metrology.sensitivity(narrowband=)
had overloads for True and False only. mypy does not split a bool into the
two literals, so a flag read from a setting was refused although the call
runs.
estimate_reverberation_index gains a third overload that takes a bool and
returns the array or the float. For sensitivity every form returns a float
and the True overload only said that the coherent estimate needs fs, so that
overload now takes a bool with fs as a keyword, a second one takes it with
fs in position after the target level and the reference pressure, and a new
first overload takes a Signal, which carries its rate, with either estimate
and no fs. With fs in position, a bare array now takes narrowband=True as
well, which mypy refused before. A bare array with narrowband=True, or
with a bool that may hold it, still needs fs, and tests/static_typing pins
both refusals with ignores that strict mypy reports once they go unused.
A test reads every overload set in src through the parser and fails when one
types a parameter as Literal[True] or Literal[False] without a bool overload
for it. Nothing changes at run time.