import { Edition } from "../model/Edition.js"; import { Strain } from "../model/RollCopy.js"; import { LengthRatio } from "../model/Version.js"; import { MetersPerMinute, Percent } from "../model/Quantity.js"; /** * How far the paper of one copy is taken to have stretched or shrunk * along the roll, as a standard deviation, where the edition has too few * copies of one system to say: the three red copies of Welte 225 spread * by 0.19 %. It includes the scanner's error along the roll, which the * alignment cannot tell from the paper's. * @category Analysis */ export declare const PAPER_SPREAD: Percent; /** * How far a paper speed a label or the literature states is taken to be * from the speed a copy was cut at: the literature gives the red roll's * three metres a minute as 2.9 as well (Bärtsch 2020), which is 3.4 %. * @category Analysis */ export declare const SPEED_TOLERANCE = 0.035; /** * What the alignments say about one copy's paper. * @category Analysis */ export interface PaperOfCopy { copy: string; /** The system the copy was cut for, by the id of its bar. */ system: string; /** How far its paper has stretched along the roll since it was perforated, and how surely that is known. */ along: Strain; /** Whether a strain measured on the copy went into it, rather than the spread of paper alone. */ measured: boolean; } /** * What the alignments say about the paper the copies of one system were cut on. * @category Analysis */ export interface PaperOfSystem { /** The system, by the id of its bar. */ system: string; /** * The length of this system's paper, unstretched, for a length of the * reference system's: one for the reference copy's own system, about * 0.77 for a Licensee or green re-cut of a red roll. It is the ratio * of the paper speeds the two were cut for. */ ratio: number; /** The standard uncertainty of the ratio. */ ratioError: number; /** * A place on the axis times this is millimetres of this system's * paper, unstretched: what a performance of one of its versions runs * on (`RollProperties.toOwnPaper`). */ toOwnPaper: number; /** The standard uncertainty of `toOwnPaper`. */ toOwnPaperError: number; /** The copies of the system it rests on. */ copies: string[]; } /** * What the alignments of an edition say about the paper of its copies, and how surely. * @category Analysis */ export interface PaperReading { /** The copy whose millimetres are the axis. */ reference: string; /** * How far one copy's paper is taken to stray from its system's, and * how many degrees of freedom the copies give it: none where it is * `PAPER_SPREAD` for want of copies. */ spread: { value: Percent; degreesOfFreedom: number; }; copies: PaperOfCopy[]; systems: PaperOfSystem[]; } /** * What the alignments of the edition say about the paper of its copies: * how far each copy's paper has stretched along the roll, and how long * the paper of each system is against the reference copy's. * * An alignment's scale is one number with three causes. A copy cut for * another paper speed is shorter or longer by the ratio of the speeds, * which the system's copies share; its paper has stretched or shrunk as * it alone has, and so has the reference copy's. In true strains, the * logarithms of the ratios of the lengths, the causes add: * * ln scale = strain_reference − strain_copy − ln ratio_system * * The alignments give the left side to a few parts in a hundred thousand. * The right side has a strain for every copy and a ratio for every * system, so it is found by least squares with each strain taken to lie * about zero by the spread of paper (`PAPER_SPREAD`, or what the copies * show where there are enough of one system), or about a strain * measured on the copy by that measurement's uncertainty. Where a system * has one copy only its ratio takes the whole scale and the copy's strain * stays at zero, known no better than paper varies; where the copies of * the reference system are several, the axis comes out at their mean * paper and not at the reference copy's. * * Copies whose places are not places on the paper, such as a roll * reader's, say nothing about the paper and are left out. Nothing is * said where the edition has no reference copy. * @category Analysis */ export declare const paperOf: (edition: Pick) => PaperReading | undefined; /** * Where the alignments of the copies, or what they say about the paper, want looking into. * @category Analysis */ export type AlignmentProblem = { copy: string; problem: /** The copy has features but no alignment, and is not the reference copy. */ 'not-aligned' /** It was aligned against a copy that is not the reference copy now. */ | 'aligned-against-another-copy' /** * The speed stated for it and the reference copy's stated or * nominal one give another ratio of the papers than the * alignments, by more than a stated speed may be off. */ | 'speed-disagrees-with-paper' /** * Its paper strays from its system's by more than paper does: * it may have been cut for another speed, or read wrongly. */ | 'paper-beyond-its-spread'; /** * How far: for a speed, the logarithm of the ratio the speeds give * over the one the alignments give; for a paper, the copy's strain in * per cent. */ by?: number; }; /** * The speed the version's paper starts at, as the copies of its own system * that bear witness to it at first hand state they were cut for: the mean * of the speeds the edition holds true or likely. A stated speed is the * speed at the beginning of the roll, as a tempo marking gives it. Nothing * where no such copy states one; in particular, a copy that reaches the * version only through a later one says nothing about it, since the later * one may have been cut for another speed. * @category Analysis */ export declare const paperSpeedOf: (edition: Edition, versionId: string) => MetersPerMinute | undefined; /** * Where the alignments of the edition's copies, or what they say about * the paper, want looking into. None of it is recomputed, so it is cheap * to ask; whether an alignment would come out otherwise if found again * is `alignmentFor`'s to say. * @category Analysis */ export declare const alignmentProblems: (edition: Pick) => AlignmentProblem[]; /** * How long the version's paper runs for a length of the paper of the * version it derives from, as the alignments give it: the ratio of the * two versions' systems' papers, with its uncertainty. It is what the * creation of the version states where the edition holds to it * (`VersionCreation.lengthRatio`). * * The reading pools the copies of a system, so the ratio is only given * for a version that one of those copies bears witness to: a second * re-cut for the same system, whose copies measure no paper, is not * credited with the first one's ratio. Where the reading has copies of * two versions re-cut for one system, the ratio is theirs together. * Nothing is given for a version that derives from none, or from one on * its own system, whose paper it keeps. * @category Analysis */ export declare const lengthRatioOf: (edition: Edition, versionId: string) => LengthRatio | undefined;