Conformance files
Small figure files, each made to pass or to break one rule of the profile, with the verdict a validator must give. Another implementation shows that it stores, finds and checks a declaration as the reference does by giving the same verdicts. The data is synthetic: a ramp with one bright spot, 40 by 60 values, noise-free. Anatomy of a UDeep file takes the two valid files apart.
The same cases in machine-readable form: expected.json. With the
reference implementation, a case is checked as
import numpy, udeep.validate
report = udeep.validate.validate("valid.jpg", data=numpy.load("data.npy"), sdr="valid_sdr.png")
print(report) # or report.status("data link"), report.ok
or, for a file on its own, python -m udeep.validate FILE. Points that need the figure itself
(the pixels, §10 points 3 to 5) are not part of these cases.
| Case | Files | What it tests | A validator must report |
|---|---|---|---|
| valid | valid.jpgdata data.npy / .csvSDR figure valid_sdr.png | a complete gain-map JPEG, with its data and its SDR figure of record | metadata pass, mapping pass, precision pass, data link pass, sdr link pass; conforms |
| valid-other-data | valid.jpgdata other_data.npy / .csv | the same file against data one value apart (§10 point 7) | metadata pass, data link fail; does not conform |
| valid-other-sdr | valid.jpgSDR figure other_sdr.png | the same file against another SDR figure (§10 point 7) | metadata pass, sdr link fail; does not conform |
| record | record.pngdata data.npy / .csvSDR figure valid_sdr.png | a 16-bit PQ PNG data record of the same figure, read back as data | metadata pass, mapping pass, precision pass, data link pass, data read back pass, sdr link pass; conforms |
| missing-unit | missing_unit.jpg | a required property absent: DataUnit (8.1) | metadata fail; does not conform |
| not-a-number | not_a_number.jpg | a number that is not one: MaxDataStep is nan (8.5) | metadata fail; does not conform |
| sha3-alone | sha3_alone.jpg | a SHA3-256 digest without its SHA-256 partner (8.5) | metadata fail; does not conform |
| headroom | headroom.jpg | the declared headroom is not the gain map's (9.1) | metadata fail; does not conform |
| two-declarations | two_declarations.jpg | two declarations in one packet (8.8) | metadata fail; does not conform |
| elsewhere | elsewhere.jpg | the declaration outside the primary image's XMP segment (8.8) | metadata fail; does not conform |
| compressed | compressed.png | the PNG's XMP chunk compressed (8.8) | metadata fail; does not conform |
| no-sdr-digest | no_sdr_digest.png | a PNG with no SDR base that does not name its SDR figure (9.1.2) | metadata fail; does not conform |
doi:10.0000/udeep-conformance-example is an example identifier: there is no such record.