From 3f5a904a00ff9d8e6d4ec879fc8b70081b23c38f Mon Sep 17 00:00:00 2001 From: Paullo9 Date: Sat, 31 Oct 2026 13:59:37 +0100 Subject: [PATCH] test: the CSV export pins carry the sentences the application writes today csv-export-pins.json held the radial-profile and spots validation sentences and the lineage sentence as the application wrote them when the pins were made, with internal milestone ids in them. The application has since dropped those ids and now names what each number is checked against (ImagoKit parity tests) and says the FFT room carries no lineage id, without promising one for later. The fixture moves for that reason only: the three constants are replaced with the current sentences, and each expected file text has the same sentences substituted verbatim (22 files, 44 lines). No input and no other byte of any expected text changes. The kit writers reproduce every pinned file byte for byte, as before. A new test, pinnedSentencesNameNoMilestone, fails on the old fixture and passes on the new one. Done: the CSV export pins name no internal milestone. Next: none for this issue. Fixes #42 Co-Authored-By: Claude Opus 5.5 --- Tests/ImagoFFTTests/FFTExportCSVTests.swift | 10 ++++++++++ Tests/ImagoFFTTests/Fixtures/csv-export-pins.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Tests/ImagoFFTTests/FFTExportCSVTests.swift b/Tests/ImagoFFTTests/FFTExportCSVTests.swift index fbf1f8a..02fe509 100644 --- a/Tests/ImagoFFTTests/FFTExportCSVTests.swift +++ b/Tests/ImagoFFTTests/FFTExportCSVTests.swift @@ -114,6 +114,16 @@ private struct ExportPins: Decodable, Sendable { #expect(written == pins.spots.filter { $0.expected != nil }.count && written >= 8) } + /// The pinned sentences are the ones the application writes today: they name what each number is checked against and + /// carry no internal milestone id and promise nothing for a later one. + @Test func pinnedSentencesNameNoMilestone() throws { + let c = try ExportPins.load().constants + for sentence in [c.profileValidation, c.spotsValidation, c.lineage] { + #expect(sentence.range(of: #"V[0-9]+-[0-9]"#, options: .regularExpression) == nil, "\(sentence)") + #expect(!sentence.contains("until"), "\(sentence)") + } + } + @Test func subjectAndNoFileWithoutBins() throws { #expect(FFTExportText.subject(crop: nil, imageWidth: 2048, imageHeight: 1024) == "the whole image, 2048 x 1024 px") #expect(FFTExportText.subject(crop: PixelCrop(row: 404, col: 812, height: 256, width: 256), imageWidth: 1, imageHeight: 1) diff --git a/Tests/ImagoFFTTests/Fixtures/csv-export-pins.json b/Tests/ImagoFFTTests/Fixtures/csv-export-pins.json index 39fe5a5..a9035a0 100644 --- a/Tests/ImagoFFTTests/Fixtures/csv-export-pins.json +++ b/Tests/ImagoFFTTests/Fixtures/csv-export-pins.json @@ -1 +1 @@ -{"constants": {"lineage": "none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in", "profileValidation": "the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it", "spotsValidation": "the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it"}, "radial": [{"input": {"header": {"software": "with,comma.dm4", "fileName": "", "object": "line\nbreak", "imageWidth": 824, "imageHeight": 3568, "x": {"originBits": 9221120237041090560, "scaleBits": 4582064925582083487, "unit": "mrad"}, "y": {"originBits": 4621946245184461844, "scaleBits": 4621454679622686140, "unit": "1/px"}, "notes": ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "with,comma.dm4"], "crop": null, "spectrumWidth": 1490, "spectrumHeight": 1063, "spacingXBits": 9218868437227405312, "spacingYBits": 4503599627370496, "unitsX": "pm", "unitsY": ""}, "units": "pm", "widthBits": 4564196840266914789, "meanBits": [], "count": []}, "expected": null}, {"input": {"header": {"software": "", "fileName": "ctrl\u0001\u007f", "object": "a \"quoted\" name", "imageWidth": 4005, "imageHeight": 2407, "x": {"originBits": 4682489166594579218, "scaleBits": 4648047906712370870, "unit": "um"}, "y": {"originBits": 1, "scaleBits": 4481655518048654467, "unit": "mrad"}, "notes": ["cr\r\nlf"], "crop": [1383, 2839, 1766, 2585], "spectrumWidth": 3564, "spectrumHeight": 474, "spacingXBits": 4607182418800017408, "spacingYBits": 4503081804641300813, "unitsX": "pm", "unitsY": "px"}, "units": "", "widthBits": 4518666844752528166, "meanBits": [13938939970462022925], "count": [29]}, "expected": null}, {"input": {"header": {"software": "", "fileName": "a \"quoted\" name", "object": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "imageWidth": 2939, "imageHeight": 103, "x": {"originBits": 4558183910635174279, "scaleBits": 13794740017740053347, "unit": "pm"}, "y": {"originBits": 9223372036854775808, "scaleBits": 4630762321076262211, "unit": "um"}, "notes": ["\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", ""], "crop": null, "spectrumWidth": 1038, "spectrumHeight": 946, "spacingXBits": 4527752186738764833, "spacingYBits": 4481655518048654467, "unitsX": "", "unitsY": ""}, "units": "m", "widthBits": 4598194754330504773, "meanBits": [4488771061545228707, 13795181448083832347], "count": [30, 31]}, "expected": "# macTEM radial profile\n# software: \n# file: a \"quoted\" name\n# object: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# subject: the whole image, 2939 x 103 px\n# image: 2939 x 103 px\n# x scale: none\n# y scale: 39.54528272318796 um per px, origin -0.0 px\n# spectrum: 1038 x 946 bins\n# dq x: 5.1992244829392119e-06 per bin (5.1992244829392119e-06 px\u207b\u00b9)\n# dq y: 4.2000000000000004e-09 per bin (4.2000000000000004e-09 px\u207b\u00b9)\n# notes: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301; \n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 0.25108439841708147 m (251084398.41708148 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000000000\nbin,|q| centre (nm),|q| centre (m),mean |F|^2,count\n1,376626597.62562221,0.37662659762562223,-0.0044750566753744237,31\n"}, {"input": {"header": {"software": "line\nbreak", "fileName": "cr\r\nlf", "object": "plain.dm4", "imageWidth": 3100, "imageHeight": 4989, "x": {"originBits": 4477636806272543976, "scaleBits": 4470520832168766199, "unit": "\u00c5"}, "y": null, "notes": [], "crop": [205, 1670, 2971, 1378], "spectrumWidth": 1558, "spectrumHeight": 3922, "spacingXBits": 4503599627370496, "spacingYBits": 4655786146363130900, "unitsX": "", "unitsY": "\u00b0"}, "units": "1/px", "widthBits": 4546799042682666407, "meanBits": [13865618468490735845, 9218868437227405312, 4517397599583711362, 4556903542980518552, 13829097104759211779, 13877212344205686405, 4607182418800017408, 9223372036854775808, 9218868437227405312, 9223372036854775808, 4496300500890658890, 4581609034881226007, 4658850243064171912, 13886502625877318725, 4562896533040878561, 13968317622781055780, 4547939389928913176, 13749784153531362975, 13802513503452899323], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "fileName": "with,comma.dm4", "object": "ctrl\u0001\u007f", "imageWidth": 252, "imageHeight": 2311, "x": {"originBits": 4475851864629364200, "scaleBits": 4617810561564161001, "unit": "pm"}, "y": null, "notes": ["cr\r\nlf"], "crop": null, "spectrumWidth": 2486, "spectrumHeight": 2754, "spacingXBits": 4535459789578187911, "spacingYBits": 4599676419421066581, "unitsX": "\u00c5", "unitsY": ""}, "units": "um", "widthBits": 4522492685342026120, "meanBits": [4480392160226134225, 9094988921128908188, 13904638962861849488], "count": [30, 6, 30]}, "expected": "# macTEM radial profile\n# software: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# file: with,comma.dm4\n# object: ctrl \n# subject: the whole image, 252 x 2311 px\n# image: 252 x 2311 px\n# x scale: 5.439687044604377 pm per px, origin 1.712477751627458e-09 px\n# y scale: none\n# spectrum: 2486 x 2754 bins\n# dq x: 1.6393694004125422e-05 \u00c5 per bin (1.6393694004125422e-06 nm)\n# dq y: 0.33333333333333331 per bin (0.33333333333333331 px\u207b\u00b9)\n# notes: cr lf\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 2.2794753896982553e-06 um (0.0022794753896982554 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000\nbin,|q| centre (nm),|q| centre (um),mean |F|^2,count\n1,0.0034192130845473829,3.419213084547383e-06,1.0000000000000001e+300,6\n2,0.0056986884742456388,5.6986884742456384e-06,-95031.468612415949,30\n"}, {"input": {"header": {"software": "", "fileName": "plain.dm4", "object": "plain.dm4", "imageWidth": 1876, "imageHeight": 4229, "x": {"originBits": 13886162702188324480, "scaleBits": 4694035920171861392, "unit": "\u00b5m"}, "y": {"originBits": 13877467041494890956, "scaleBits": 4612470321755545503, "unit": "px"}, "notes": ["plain.dm4", "Unvalidated reader (UNVALIDATED)"], "crop": [2942, 2091, 706, 1480], "spectrumWidth": 3233, "spectrumHeight": 1553, "spacingXBits": 4636821757480671433, "spacingYBits": 4593127644936938427, "unitsX": "nm", "unitsY": "um"}, "units": "\u00b5m", "widthBits": 4535905069675315443, "meanBits": [4484200003081826229, 4638669593645170104, 13739390570659036089, 13795718112108601097], "count": [12, 40, 9, 48]}, "expected": "# macTEM radial profile\n# software: \n# file: plain.dm4\n# object: plain.dm4\n# subject: region 1480 x 706 px at (2091, 2942) (column, row of its top-left pixel)\n# image: 1876 x 4229 px\n# x scale: 673894.3139993418 \u00b5m per px, origin -5519.405597129487 px\n# y scale: 2.3483006452842825 px per px, origin -1450.6870670091475 px\n# spectrum: 3233 x 1553 bins\n# dq x: 101.20033584544139 nm per bin (101.20033584544139 nm)\n# dq y: 0.11745083064137322 um per bin (117.45083064137323 nm)\n# notes: plain.dm4; Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.790236165621988e-05 \u00b5m (0.017902361656219879 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000\nbin,|q| centre (nm),|q| centre (\u00b5m),mean |F|^2,count\n1,0.026853542484329817,2.6853542484329819e-05,127.45966711662811,40\n2,0.044755904140549703,4.4755904140549702e-05,-8.3806570658021892e-07,9\n3,0.062658265796769586,6.2658265796769586e-05,-0.0049405385166136984,48\n"}, {"input": {"header": {"software": "ctrl\u0001\u007f", "fileName": "tab\tand\u0085nel\u2028sep\u2029", "object": "a \"quoted\" name", "imageWidth": 246, "imageHeight": 161, "x": {"originBits": 4503599627370496, "scaleBits": 4728057454355442549, "unit": "pm"}, "y": {"originBits": 4607182418800017408, "scaleBits": 4554057583772693249, "unit": "m"}, "notes": [], "crop": [1782, 2265, 2645, 1158], "spectrumWidth": 3815, "spectrumHeight": 1041, "spacingXBits": 9221120237041090560, "spacingYBits": 4680184862943710031, "unitsX": "pm", "unitsY": "\u00b5m"}, "units": "pm", "widthBits": 4628155986490896115, "meanBits": [13944546050179384644, 13849674812083041159, 4545565990240066045, 4599676419421066581, 1, 4499378936940805725, 13907862917552924784, 4589412840134458613, 4669346504856791899, 0], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "line\nbreak", "object": "plain.dm4", "imageWidth": 3585, "imageHeight": 2155, "x": {"originBits": 13754003259431340918, "scaleBits": 4591870180066957722, "unit": "1/m"}, "y": {"originBits": 13712079110301865407, "scaleBits": 4650659967253323273, "unit": "\u00b0"}, "notes": ["with,comma.dm4"], "crop": null, "spectrumWidth": 3474, "spectrumHeight": 3588, "spacingXBits": 4591870180066957722, "spacingYBits": 4690085123910793849, "unitsX": "1/m", "unitsY": "1/m"}, "units": "1/px", "widthBits": 4535357757523751426, "meanBits": [4607182418800017408, 4519157920033828314, 4497432555216233861, 4728057454355442549, 4586167486656565114, 4553351190001562303, 13945329938271324271, 4599676419421066581, 4599301119452119040, 4591870180066957722, 4668362426886959031, 9223372036854775808, 4719118337607402258, 4481655518048654467, 13763648103907277962, 4524826613657805286, 13808802899750421564, 13818808507773481278, 9094988921128908188, 4661283918187772673, 13850774415352545570, 4637148665393671564, 13819728667631571655, 4481655518048654467, 4728828762483500837, 0, 4679776382321040370, 4600196089869172310, 9218868437227405312, 4503599627370496, 13884972706165787315, 4495909724017847228, 13873117760084237049, 13765397846311875174, 4563327908942930989, 9094988921128908188, 13749802436333190935, 4548778196454309872, 4692035830370628925], "count": [10, 20, 9, 49, 38, 44, 5, 27, 30, 17, 24, 47, 32, 22, 14, 33, 22, 22, 45, 4, 29, 40, 6, 9, 33, 46, 48, 43, 8, 45, 6, 42, 46, 49, 48, 15, 4, 1, 38]}, "expected": "# macTEM radial profile\n# software: with,comma.dm4\n# file: line break\n# object: plain.dm4\n# subject: the whole image, 3585 x 2155 px\n# image: 3585 x 2155 px\n# x scale: 0.1 1/m per px, origin -7.646330856513869e-06 px\n# y scale: 846.8249955446819 \u00b0 per px, origin -1.2615239230934536e-08 px\n# spectrum: 3474 x 3588 bins\n# dq x: 0.10000000000000001 1/m per bin (1.0000000000000002e-10 nm\u207b\u00b9)\n# dq y: 369124.5478972565 1/m per bin (0.00036912454789725651 nm\u207b\u00b9)\n# notes: with,comma.dm4\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.6047995956990434e-05 1/px (1.6047995956990434e-05 px\u207b\u00b9)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px\u207b\u00b9),|q| centre (1/px),mean |F|^2,count\n1,2.407199393548565e-05,2.407199393548565e-05,1.387247989404332e-06,20\n2,4.0119989892476081e-05,4.0119989892476081e-05,4.8596706985315729e-08,9\n3,5.6167985849466521e-05,5.6167985849466521e-05,123456789.12345679,49\n4,7.2215981806456948e-05,7.2215981806456948e-05,0.041679615458774813,38\n5,8.8263977763447388e-05,8.8263977763447388e-05,0.00025563136445753623,44\n6,0.00010431197372043781,0.00010431197372043781,-49837615.785294406,5\n7,0.00012035996967742826,0.00012035996967742826,0.33333333333333331,27\n8,0.00013640796563441868,0.00013640796563441868,0.3125,30\n9,0.00015245596159140911,0.00015245596159140911,0.10000000000000001,17\n10,0.00016850395754839956,0.00016850395754839956,12981.786418996619,24\n11,0.00018455195350538999,0.00018455195350538999,-0,47\n12,0.00020059994946238042,0.00020059994946238042,31117824.382571287,32\n13,0.00021664794541937084,0.00021664794541937084,4.2000000000000004e-09,22\n14,0.0002326959413763613,0.0002326959413763613,-3.4906175514153972e-05,14\n15,0.00024874393733335172,0.00024874393733335172,3.2679324796956015e-06,33\n16,0.00026479193329034215,0.00026479193329034215,-0.036568261334658264,22\n17,0.00028083992924733258,0.00028083992924733258,-0.17398445540301027,22\n18,0.000296887925204323,0.000296887925204323,1.0000000000000001e+300,45\n19,0.00031293592116131343,0.00031293592116131343,4149.0270511347344,4\n20,0.00032898391711830391,0.00032898391711830391,-23.83572740299963,29\n21,0.00034503191307529434,0.00034503191307529434,105.84597670233615,40\n22,0.00036107990903228477,0.00036107990903228477,-0.1995240219227041,6\n23,0.00037712790498927519,0.00037712790498927519,4.2000000000000004e-09,9\n24,0.00039317590094626562,0.00039317590094626562,135682623.73955646,33\n25,0.00040922389690325605,0.00040922389690325605,0,46\n26,0.00042527189286024647,0.00042527189286024647,73341.203249081766,48\n27,0.0004413198888172369,0.0004413198888172369,0.36218083816854596,43\n28,0.00045736788477422738,0.00045736788477422738,inf,8\n29,0.00047341588073121781,0.00047341588073121781,2.2250738585072014e-308,45\n30,0.00048946387668820823,0.00048946387668820823,-4437.1105195010778,6\n31,0.00050551187264519866,0.00050551187264519866,3.8519455437345198e-08,42\n32,0.00052155986860218909,0.00052155986860218909,-742.8874835659218,46\n33,0.00053760786455917951,0.00053760786455917951,-4.6762891241368396e-05,49\n34,0.00055365586051616994,0.00055365586051616994,0.0012327565279319872,48\n35,0.00056970385647316037,0.00056970385647316037,1.0000000000000001e+300,15\n36,0.0005857518524301508,0.0005857518524301508,-4.0796271241620133e-06,4\n37,0.00060179984838714122,0.00060179984838714122,0.00012593475626143614,1\n38,0.00061784784434413165,0.00061784784434413165,482670.60805304704,38\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "object": "cr\r\nlf", "imageWidth": 2013, "imageHeight": 749, "x": {"originBits": 9094988921128908188, "scaleBits": 4655845311854230596, "unit": "\u00c5"}, "y": {"originBits": 4529227895740223699, "scaleBits": 4614349479641826416, "unit": "1/m"}, "notes": ["with,comma.dm4", "Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 1669, "spectrumHeight": 894, "spacingXBits": 4495717455306835070, "spacingYBits": 4489073628402433983, "unitsX": "pm", "unitsY": "um"}, "units": "m", "widthBits": 4553294705304110459, "meanBits": [4532170061977890002, 4479705794860971654, 13698753722329691656, 4463144712686405224, 4520124077242325718, 13776134881973318433, 4502484019080619844, 4619724443601332323, 13867376328944040097, 4600293758257882684, 4549308649878917969, 13736197270593025125, 4481655518048654467, 4573243916440064942, 4578401269880888687, 13854709343025149819, 18442240474082181120, 13735769430822807520, 4736023834260361522, 13835274058376846264, 4515275852281718714, 4714457413173847234, 13943333817985749167, 4559618343028021438, 4477905836314806055, 4583865897395428159, 13778397341667375186, 4603369358972356164, 4475510020930295264, 1, 4708133560681898950, 4607182418800017408, 13733549704290027665, 4461708254686831032, 4587072614106098170, 13939877534485264448, 0, 4700125553340555573], "count": [6, 47, 46, 37, 38, 49, 24, 16, 29, 7, 36, 40, 30, 31, 2, 34, 21, 28, 33, 20, 36, 7, 35, 28, 1, 18, 13, 36, 14, 5, 17, 30, 14, 18, 40, 15, 8, 8]}, "expected": "# macTEM radial profile\n# software: cr lf\n# file: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# object: cr lf\n# subject: the whole image, 2013 x 749 px\n# image: 2013 x 749 px\n# x scale: 1848.660851437381 \u00c5 per px, origin 1e+300 px\n# y scale: 3.182814386186287 1/m per px, origin 6.449198627734616e-06 px\n# spectrum: 1669 x 894 bins\n# dq x: 3.7247127836146655e-08 pm per bin (3.7247127836146659e-11 nm)\n# dq y: 1.3221653535926766e-08 um per bin (1.3221653535926767e-05 nm)\n# notes: with,comma.dm4; Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 0.00025256932287306245 m (252569.32287306245 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000000000\nbin,|q| centre (nm),|q| centre (m),mean |F|^2,count\n1,378853.98430959362,0.00037885398430959364,3.1562585388828017e-09,47\n2,631423.30718265614,0.00063142330718265615,-1.6152469813808949e-09,46\n3,883992.63005571859,0.00088399263005571854,2.3683636721577865e-10,37\n4,1136561.952928781,0.0011365619529287809,1.5918397363604679e-06,38\n5,1389131.2758018435,0.0013891312758018434,-0.00023393887472025149,49\n6,1641700.598674906,0.0016417005986749059,1.0444433677335734e-07,24\n7,1894269.9215479684,0.0018942699215479684,7.1395557678716584,16\n8,2146839.2444210309,0.0021468392444210309,-301.08116662025901,29\n9,2399408.5672940933,0.0023994085672940932,0.36760252286476081,7\n10,2651977.8901671553,0.0026519778901671555,0.000140312725145498,36\n11,2904547.2130402182,0.0029045472130402182,-4.9996191078264159e-07,40\n12,3157116.5359132807,0.0031571165359132805,4.2000000000000004e-09,30\n13,3409685.8587863431,0.0034096858587863432,0.0057192916083480937,31\n14,3662255.1816594056,0.0036622551816594055,0.012572665304402901,2\n15,3914824.5045324676,0.0039148245045324678,-43.63079754110273,34\n16,4167393.8274055305,0.0041673938274055305,-inf,21\n17,4419963.1502785934,0.0044199631502785932,-4.6574988564788201e-07,28\n18,4672532.4731516549,0.0046725324731516551,431789488.87233269,33\n19,4925101.7960247174,0.0049251017960247178,-2.0959246436427428,20\n20,5177671.1188977808,0.0051776711188977805,7.594312417165071e-07,36\n21,5430240.4417708423,0.0054302404417708424,15265871.904192332,7\n22,5682809.7646439048,0.0056828097646439051,-34965360.716462485,35\n23,5935379.0875169681,0.0059353790875169678,0.00070246757157368229,28\n24,6187948.4103900297,0.0061879484103900297,2.4118131324891431e-09,1\n25,6440517.7332630921,0.0064405177332630924,0.028479565882686627,18\n26,6693087.0561361555,0.0066930870561361551,-0.00034638531021336405,13\n27,6945656.379009217,0.0069456563790092169,0.57666531850572555,36\n28,7198225.7018822795,0.0071982257018822797,1.6417861315291491e-09,14\n29,7450795.0247553419,0.0074507950247553424,4.9406564584124654e-324,5\n30,7703364.3476284044,0.0077033643476284042,5937693.3678063806,17\n31,7955933.6705014668,0.007955933670501467,1,30\n32,8208502.9933745293,0.0082085029933745297,-3.4823854145043889e-07,14\n33,8461072.3162475917,0.0084610723162475924,1.9770193643499674e-10,18\n34,8713641.6391206551,0.0087136416391206551,0.047960198800598833,40\n35,8966210.9619937167,0.0089662109619937161,-21384236.965141535,15\n36,9218780.2848667782,0.0092187802848667788,0,8\n37,9471349.6077398416,0.0094713496077398415,1717065.8382817034,8\n"}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "object": "plain.dm4", "imageWidth": 3352, "imageHeight": 3962, "x": {"originBits": 13925636921351700804, "scaleBits": 4470257757098785700, "unit": "1/m"}, "y": null, "notes": ["tab\tand\u0085nel\u2028sep\u2029", "ctrl\u0001\u007f", "Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 243, "spectrumHeight": 3854, "spacingXBits": 4503599627370496, "spacingYBits": 4628200668491881415, "unitsX": "um", "unitsY": "m"}, "units": "1/\u00c5", "widthBits": 4530035865399898970, "meanBits": [4562862709098583966, 4519585143689785652, 4688652874931880319, 13844207234490270855, 4599301119452119040, 0, 13854493204704763810, 13786755744418873201, 13783771406806426940, 13792006756702446043, 18442240474082181120, 13705026669410781865, 4643683633137101203, 13907858928399961048, 4646068518899252950, 13712222319170025587, 4680731168532850761, 4728057454355442549, 9218868437227405312, 4559616102512538236, 13764442482054035661, 4494367594603046457, 13916294724510671651, 4644500719810721445, 13890974412273687073, 13947757613143775065, 13778552984372981898, 0, 4599301119452119040, 4607182418800017408, 4707555513126352129, 13841142738849786392, 13782091825827882700, 4666058788399051753, 4620969798149770087, 4739534228422962706], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "fileName": "a \"quoted\" name", "object": "with,comma.dm4", "imageWidth": 2095, "imageHeight": 3701, "x": {"originBits": 4503599627370496, "scaleBits": 4673178760135758682, "unit": "1/px"}, "y": {"originBits": 18442240474082181120, "scaleBits": 4593631609173614329, "unit": ""}, "notes": ["\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 1681, "spectrumHeight": 4013, "spacingXBits": 4670579235648774196, "spacingYBits": 4640892417750055225, "unitsX": "nm", "unitsY": "1/\u00c5"}, "units": "", "widthBits": 4609108850919380212, "meanBits": [13961195036842425813, 4602172751889742351, 13798454044042840699, 4650422624229755526, 4618552584033410034, 1, 4700370329830916298, 4581130715825208945, 4546853342020339078, 13777786495880014560, 1, 4721962237858388496, 13949058435067592571, 13831466377582207979, 13708692864253376510, 13801343973872095893, 1, 13933283597095930818, 13806133411152350455, 4599301119452119040, 4649616596075156800, 4680157106304401039, 9218868437227405312, 4607182418800017408, 13825370457530111728, 13777446986461297952, 0, 13908362384196056872, 4694638061073016952, 13834073303422688949, 9221120237041090560, 4517236398591744913, 4620245678314058526], "count": [41, 34, 43, 26, 39, 14, 43, 41, 47, 38, 2, 21, 20, 48, 14, 8, 23, 23, 38, 30, 32, 13, 27, 49, 13, 10, 22, 38, 19, 34, 20, 16, 38]}, "expected": "# macTEM radial profile\n# software: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# file: a \"quoted\" name\n# object: with,comma.dm4\n# subject: the whole image, 2095 x 3701 px\n# image: 2095 x 3701 px\n# x scale: 27101.291125017546 1/px per px, origin 2.2250738585072014e-308 px\n# y scale: none\n# spectrum: 1681 x 4013 bins\n# dq x: 17644.276132852028 nm per bin (17644.276132852028 nm)\n# dq y: 190.09579505719901 1/\u00c5 per bin (1900.9579505719901 nm\u207b\u00b9)\n# notes: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301; Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.4277538588588046 (1.4277538588588046 px\u207b\u00b9)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px\u207b\u00b9),|q| centre (),mean |F|^2,count\n1,2.1416307882882069,2.1416307882882069,0.47190762252549318,34\n2,3.5693846471470114,3.5693846471470114,-0.0073135811941137342,43\n3,4.9971385060058164,4.9971385060058164,819.84221773997774,26\n4,6.4248923648646201,6.4248923648646201,6.0987353887239681,39\n5,7.8526462237234256,7.8526462237234256,4.9406564584124654e-324,14\n6,9.2804000825822293,9.2804000825822293,1774057.3060837262,43\n7,10.708153941441035,10.708153941441035,0.018989998520849875,41\n8,12.135907800299838,12.135907800299838,9.7915892392849436e-05,47\n9,13.563661659158644,13.563661659158644,-0.0003132712937278636,38\n10,14.991415518017448,14.991415518017448,4.9406564584124654e-324,2\n11,16.419169376876251,16.419169376876251,49869924.794727445,21\n12,17.846923235735058,17.846923235735058,-88125299.342527315,20\n13,19.274677094593862,19.274677094593862,-1.2024873440952841,48\n14,20.702430953452666,20.702430953452666,-7.2318728332848667e-09,14\n15,22.130184812311469,22.130184812311469,-0.011827891506962099,8\n16,23.557938671170277,23.557938671170277,4.9406564584124654e-324,23\n17,24.98569253002908,24.98569253002908,-7593584.4949979205,23\n18,26.413446388887884,26.413446388887884,-0.024647481587476396,38\n19,27.841200247746688,27.841200247746688,0.3125,30\n20,29.268954106605495,29.268954106605495,728.20742572905874,32\n21,30.696707965464299,30.696707965464299,78881.466380352373,13\n22,32.124461824323106,32.124461824323106,inf,27\n23,33.552215683181906,33.552215683181906,1,49\n24,34.979969542040713,34.979969542040713,-0.46223029611824895,13\n25,36.407723400899513,36.407723400899513,-0.00029486645126027174,10\n26,37.835477259758321,37.835477259758321,0,22\n27,39.263231118617128,39.263231118617128,-167356.7604545888,38\n28,40.690984977475928,40.690984977475928,743992.74079252686,19\n29,42.118738836334735,42.118738836334735,-1.7813411624137363,34\n30,43.546492695193542,43.546492695193542,nan,20\n31,44.974246554052343,44.974246554052343,9.8034999682927284e-07,16\n32,46.40200041291115,46.40200041291115,7.6025051913136661,38\n"}, {"input": {"header": {"software": "", "fileName": "with,comma.dm4", "object": "cr\r\nlf", "imageWidth": 353, "imageHeight": 3945, "x": {"originBits": 13804126397231581961, "scaleBits": 4577832781803295869, "unit": "um"}, "y": {"originBits": 13865379003122358623, "scaleBits": 4583424517628439319, "unit": "1/\u00c5"}, "notes": ["plain.dm4"], "crop": null, "spectrumWidth": 1285, "spectrumHeight": 904, "spacingXBits": 4740384300712272230, "spacingYBits": 4491247079447165524, "unitsX": "1/nm", "unitsY": "\u00c5"}, "units": "px", "widthBits": 4522920353990174111, "meanBits": [13846661432391717161, 4572909772200988019, 9094988921128908188, 9094988921128908188, 4599301119452119040, 13859018734411262428, 13798017354680006042, 4683502297337320555, 13749448269936258735, 4503599627370496, 0, 4607182418800017408, 13701104101232530239, 13898507275099124146, 13947750684807697905, 13956977928859399163, 4521027249691552869], "count": [23, 14, 37, 25, 20, 28, 30, 37, 42, 48, 48, 38, 7, 47, 19, 3, 39]}, "expected": "# macTEM radial profile\n# software: \n# file: with,comma.dm4\n# object: cr lf\n# subject: the whole image, 353 x 3945 px\n# image: 353 x 3945 px\n# x scale: 0.011586495690389715 um per px, origin -0.017684253257537672 px\n# y scale: 0.0269482221954532 1/\u00c5 per px, origin -221.77316916845572 px\n# spectrum: 1285 x 904 bins\n# dq x: 846516173.58695674 1/nm per bin (846516173.58695674 nm\u207b\u00b9)\n# dq y: 1.8733492144146093e-08 \u00c5 per bin (1.8733492144146095e-09 nm)\n# notes: plain.dm4\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 2.4606001074427829e-06 px (2.4606001074427829e-06 px)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px),|q| centre (px),mean |F|^2,count\n1,3.6909001611641742e-06,3.6909001611641742e-06,0.0054294676804035212,14\n2,6.1515002686069576e-06,6.1515002686069576e-06,1.0000000000000001e+300,37\n3,8.6121003760497401e-06,8.6121003760497401e-06,1.0000000000000001e+300,25\n4,1.1072700483492523e-05,1.1072700483492523e-05,0.3125,20\n5,1.3533300590935307e-05,1.3533300590935307e-05,-84.501729981194728,28\n6,1.5993900698378088e-05,1.5993900698378088e-05,-0.0069348135494044175,30\n7,1.8454500805820872e-05,1.8454500805820872e-05,127560.40271409012,37\n8,2.0915100913263655e-05,2.0915100913263655e-05,-3.7971668913875478e-06,42\n9,2.3375701020706439e-05,2.3375701020706439e-05,2.2250738585072014e-308,48\n10,2.5836301128149222e-05,2.5836301128149222e-05,0,48\n11,2.8296901235592005e-05,2.8296901235592005e-05,1,38\n12,3.0757501343034785e-05,3.0757501343034785e-05,-2.3399427438216988e-09,7\n13,3.3218101450477569e-05,3.3218101450477569e-05,-35669.834041211187,47\n14,3.5678701557920352e-05,3.5678701557920352e-05,-68638301.918540731,19\n15,3.8139301665363135e-05,3.8139301665363135e-05,-287668899.63165253,3\n16,4.0599901772805919e-05,4.0599901772805919e-05,1.7830939417474075e-06,39\n"}, {"input": {"header": {"software": "plain.dm4", "fileName": "cr\r\nlf", "object": "", "imageWidth": 4822, "imageHeight": 4351, "x": {"originBits": 4525307433297102072, "scaleBits": 4555029323588064386, "unit": "mrad"}, "y": {"originBits": 4517298036896595838, "scaleBits": 4591870180066957722, "unit": "mrad"}, "notes": [], "crop": [2836, 707, 530, 752], "spectrumWidth": 2949, "spectrumHeight": 1319, "spacingXBits": 4686952893557067869, "spacingYBits": 0, "unitsX": "1/\u00c5", "unitsY": "m"}, "units": "\u00b0", "widthBits": 4632121860527902154, "meanBits": [4481655518048654467, 4503575037875783674, 13734161053354561617, 9094988921128908188, 9221120237041090560, 9218868437227405312, 4607182418800017408, 4539419409108096731, 4533903264316271487, 13931377871399172438, 4583343002080882213, 4599301119452119040, 4728057454355442549, 4653127935909961544, 4599301119452119040, 4685905900185760554, 4623060813523632134, 4589986591016036367, 4583188971313621204, 13863812856052324160, 9218868437227405312, 4672317332772655577, 13837858749423135680, 4641024105185351929, 13858709462533809935, 1, 13866236969794998294, 13840237155104843789, 13755150319191528345, 4674926010060277572, 13731983972304203965, 4544746127533962706], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "ctrl\u0001\u007f", "fileName": "cr\r\nlf", "object": "plain.dm4", "imageWidth": 2372, "imageHeight": 4071, "x": {"originBits": 9221120237041090560, "scaleBits": 4604576606484929812, "unit": "nm"}, "y": null, "notes": ["plain.dm4", "plain.dm4"], "crop": null, "spectrumWidth": 2774, "spectrumHeight": 2827, "spacingXBits": 4688645912272134950, "spacingYBits": 4596676286116519060, "unitsX": "\u00b5m", "unitsY": "1/m"}, "units": "1/px", "widthBits": 4597582604735283249, "meanBits": [4607182418800017408, 4530784846215453644, 13906498892950271569], "count": [29, 32, 36]}, "expected": "# macTEM radial profile\n# software: ctrl \n# file: cr lf\n# object: plain.dm4\n# subject: the whole image, 2372 x 4071 px\n# image: 2372 x 4071 px\n# x scale: 0.7106967169937968 nm per px, origin nan px\n# y scale: none\n# spectrum: 2774 x 2827 bins\n# dq x: 285351.40485148353 \u00b5m per bin (285351404.85148352 nm)\n# dq y: 0.20839623987533129 1/m per bin (2.0839623987533129e-10 nm\u207b\u00b9)\n# notes: plain.dm4; plain.dm4\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 0.23355163483029309 1/px (0.23355163483029309 px\u207b\u00b9)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px\u207b\u00b9),|q| centre (1/px),mean |F|^2,count\n1,0.35032745224543965,0.35032745224543965,7.9065794237452393e-06,32\n2,0.58387908707573277,0.58387908707573277,-122097.01358982293,36\n"}, {"input": {"header": {"software": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "fileName": "line\nbreak", "object": "a \"quoted\" name", "imageWidth": 3602, "imageHeight": 4623, "x": {"originBits": 4616305137788576501, "scaleBits": 4621937521173996106, "unit": "um"}, "y": {"originBits": 4508178823946702071, "scaleBits": 13870105910924524483, "unit": "\u00c5"}, "notes": ["Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 2160, "spectrumHeight": 1260, "spacingXBits": 0, "spacingYBits": 4641812798820852862, "unitsX": "1/\u00c5", "unitsY": ""}, "units": "pm", "widthBits": 4610475753228375639, "meanBits": [4497825106007102218, 13839671845968113803, 4637265746041352822, 4612067859866375428, 4643804870629320473, 4568455506294526374, 18442240474082181120, 4607182418800017408, 4481655518048654467, 0, 13751478966809435561, 13944763808186945332, 4451832605150356122, 13858947967699614618, 4717639049439463869, 13931607145610266443, 13868953955402835293, 13867259799619797679], "count": [12, 23, 35, 44, 48, 4, 4, 30, 32, 31, 19, 16, 17, 32, 34, 9, 6, 39]}, "expected": "# macTEM radial profile\n# software: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# file: line break\n# object: a \"quoted\" name\n# subject: the whole image, 3602 x 4623 px\n# image: 3602 x 4623 px\n# x scale: 10.210327018067932 um per px, origin 4.10260213462674 px\n# y scale: none\n# spectrum: 2160 x 1260 bins\n# dq x: 0 1/\u00c5 per bin (0 nm\u207b\u00b9)\n# dq y: 216.25459841665355 per bin (216.25459841665355 px\u207b\u00b9)\n# notes: Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.7312671420308072 pm (0.0017312671420308073 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (tools/parity/fft-parity, V1-6 slices A and B); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 0.001\nbin,|q| centre (nm),|q| centre (pm),mean |F|^2,count\n1,0.0025969007130462107,2.5969007130462107,-4.0978693202743086,23\n2,0.0043281678550770178,4.3281678550770177,107.50979277649625,35\n3,0.006059434997107825,6.0594349971078252,2.1695716629279804,44\n4,0.007790702139138633,7.7907021391386326,289.74536904283883,48\n5,0.0095219692811694401,9.5219692811694401,0.0027361289311562285,4\n6,0.011253236423200247,11.253236423200248,-inf,4\n7,0.012984503565231056,12.984503565231055,1,30\n8,0.014715770707261861,14.715770707261861,4.2000000000000004e-09,32\n9,0.016447037849292669,16.44703784929267,0,31\n10,0.018178304991323477,18.178304991323476,-5.4997036746171546e-06,19\n11,0.019909572133354286,19.909572133354285,-45619617.963285834,16\n12,0.021640839275385092,21.64083927538509,4.3813255702370186e-11,17\n13,0.023372106417415897,23.372106417415896,-83.496074523295107,32\n14,0.025103373559446706,25.103373559446705,25607046.521920908,34\n15,0.026834640701477511,26.834640701477511,-6032267.3811510308,9\n16,0.02856590784350832,28.56590784350832,-390.75884822344761,6\n17,0.030297174985539126,30.297174985539126,-294.45724143278034,39\n"}, {"input": {"header": {"software": "tab\tand\u0085nel\u2028sep\u2029", "fileName": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "object": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "imageWidth": 400, "imageHeight": 4256, "x": {"originBits": 4607182418800017408, "scaleBits": 4481655518048654467, "unit": "1/nm"}, "y": {"originBits": 4625975106101040559, "scaleBits": 4503599627370496, "unit": "um"}, "notes": ["a \"quoted\" name", "plain.dm4"], "crop": null, "spectrumWidth": 178, "spectrumHeight": 2446, "spacingXBits": 4469635795144927269, "spacingYBits": 4607182418800017408, "unitsX": "um", "unitsY": ""}, "units": "nm", "widthBits": 4577147229984098849, "meanBits": [13867838990681230633], "count": [0]}, "expected": null}], "spots": [{"input": {"header": {"software": "with,comma.dm4", "fileName": "tab\tand\u0085nel\u2028sep\u2029", "object": "line\nbreak", "imageWidth": 2733, "imageHeight": 2073, "x": {"originBits": 9221120237041090560, "scaleBits": 4481655518048654467, "unit": "1/px"}, "y": {"originBits": 4584690525865630134, "scaleBits": 4648716500011024466, "unit": "1/nm"}, "notes": [], "crop": null, "spectrumWidth": 3090, "spectrumHeight": 3655, "spacingXBits": 4574067656153791361, "spacingYBits": 4611330256539712656, "unitsX": "um", "unitsY": "px"}, "rows": [], "omitted": 1, "maskRadiusBits": 13722200273050357740, "maskEdgeBits": 9223372036854775808, "notes": ["tab\tand\u0085nel\u2028sep\u2029"]}, "expected": null}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "with,comma.dm4", "object": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "imageWidth": 4899, "imageHeight": 1784, "x": {"originBits": 4599301119452119040, "scaleBits": 13881802992307169388, "unit": "\u00b5m"}, "y": {"originBits": 4481655518048654467, "scaleBits": 4710769047924189639, "unit": "um"}, "notes": ["ctrl\u0001\u007f", "tab\tand\u0085nel\u2028sep\u2029"], "crop": [1658, 1248, 2290, 1235], "spectrumWidth": 192, "spectrumHeight": 1752, "spacingXBits": 4533795449156767129, "spacingYBits": 4503626239141847873, "unitsX": "m", "unitsY": "mrad"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3355, "clickedCol": 3150, "snappedRow": 1279, "snappedCol": 2046, "centroidRowBits": 4599676419421066581, "centroidColBits": 4620765510160215965, "width": 1824, "height": 2521, "qxBits": 13880205779180900225, "qyBits": 13819086791582629494, "qBits": 9221120237041090560, "dBits": 4678119497738516228, "units": "um", "reciprocalUnits": "nm", "neighbour": false}}], "omitted": 5, "maskRadiusBits": 9223372036854775808, "maskEdgeBits": 4620963792116034949, "notes": ["plain.dm4", "plain.dm4"]}, "expected": "# macTEM spots\n# software: cr lf\n# file: with,comma.dm4\n# object: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# subject: region 1235 x 2290 px at (1248, 1658) (column, row of its top-left pixel)\n# image: 4899 x 1784 px\n# x scale: none\n# y scale: 8395756.263325585 um per px, origin 4.2e-09 px\n# spectrum: 192 x 1752 bins\n# dq x: 1.3006739188531693e-05 m per bin (13006.739188531692 nm)\n# dq y: 1.1991369727327608e-07 mrad per bin (1.1991369727327608e-07 mrad)\n# notes: ctrl ; tab and nel sep \n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 1 measured spots; not listed: 5 (measuring, refused, no peak, or of another region)\n# mask: radius -0 bins, edge 8.4806367462358683 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: plain.dm4\n# note: plain.dm4\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (nm),qx (nm),qy (nm),centroid col,centroid row,click col,click row\n1,57383179.630501226,nan,0,0,57383.179630501225,nan,-2098.8078415039349,-0.18170838271042883,8.1284172378871578,0.33333333333333331,3150,3355\n"}, {"input": {"header": {"software": "ctrl\u0001\u007f", "fileName": "", "object": "cr\r\nlf", "imageWidth": 2129, "imageHeight": 4717, "x": null, "y": {"originBits": 13961342740209856668, "scaleBits": 4661483514386866152, "unit": "1/\u00c5"}, "notes": ["plain.dm4"], "crop": [2341, 2068, 2513, 576], "spectrumWidth": 1311, "spectrumHeight": 848, "spacingXBits": 4526839331052858503, "spacingYBits": 4530507526564747456, "unitsX": "1/\u00c5", "unitsY": "1/px"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 1938, "clickedCol": 2850, "snappedRow": 3338, "snappedCol": 681, "centroidRowBits": 13874931074264967669, "centroidColBits": 4676700239705817078, "width": 2017, "height": 2386, "qxBits": 13882416592596201300, "qyBits": 13834083490296113074, "qBits": 13884998099837264935, "dBits": 4599301119452119040, "units": "nm", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 2, "inMask": true, "m": {"clickedRow": 3745, "clickedCol": 358, "snappedRow": 446, "snappedCol": 1241, "centroidRowBits": 9218868437227405312, "centroidColBits": 9094988921128908188, "width": 2080, "height": 3614, "qxBits": 13715801250257687459, "qyBits": 13734190820275348424, "qBits": 9218868437227405312, "dBits": 13886048752317874450, "units": "nm", "reciprocalUnits": "1/px", "neighbour": true}}, {"number": 3, "inMask": true, "m": {"clickedRow": 3183, "clickedCol": 2801, "snappedRow": 3132, "snappedCol": 3671, "centroidRowBits": 4599301119452119040, "centroidColBits": 13764633565178106812, "width": 1080, "height": 3108, "qxBits": 9223372036854775808, "qyBits": 13772007930404036633, "qBits": 13725894430721198438, "dBits": 13894105537129224132, "units": "nm", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 4, "inMask": false, "m": {"clickedRow": 2848, "clickedCol": 996, "snappedRow": 2974, "snappedCol": 3298, "centroidRowBits": 13835200432088026677, "centroidColBits": 4606045822805935072, "width": 3649, "height": 489, "qxBits": 13753920932450835385, "qyBits": 4503599627370496, "qBits": 4531693049239052877, "dBits": 18442240474082181120, "units": "nm", "reciprocalUnits": "1/px", "neighbour": true}}], "omitted": 3, "maskRadiusBits": 13903724075835984102, "maskEdgeBits": 4694900683346552541, "notes": ["tab\tand\u0085nel\u2028sep\u2029"]}, "expected": "# macTEM spots\n# software: ctrl \n# file: \n# object: cr lf\n# subject: region 576 x 2513 px at (2068, 2341) (column, row of its top-left pixel)\n# image: 2129 x 4717 px\n# x scale: none\n# y scale: 4330.558736704268 1/\u00c5 per px, origin -558792947.3745303 px\n# spectrum: 1311 x 848 bins\n# dq x: 4.4260056408881274e-06 1/\u00c5 per bin (4.4260056408881275e-05 nm\u207b\u00b9)\n# dq y: 7.5330880964284241e-06 1/px per bin (7.5330880964284241e-06 px\u207b\u00b9)\n# notes: plain.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 4 measured spots; not listed: 3 (measuring, refused, no peak, or of another region)\n# mask: radius -81718.110168490181 bins, edge 774565.99728509376 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/px; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: tab and nel sep \n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (nm),|q| (1/px),qx (1/px),qy (1/px),centroid col,centroid row,click col,click row\n1,0.3125,-4460.2059291685355,0,0,0.3125,-4460.2059291685355,-3104.169385416355,-1.7836031026986174,47056.718340992855,-949.03743856894891,2850,1938\n2,-5415.7687936874736,inf,1,1,-5415.7687936874736,inf,-2.2644845302681353e-08,-3.8217893911156934e-07,1.0000000000000001e+300,inf,358,3745\n3,-18205.487571738442,-1.0495222283458838e-07,1,0,-18205.487571738442,-1.0495222283458838e-07,-0,-0.00012207762829130676,-4.1583920831235005e-05,0.3125,2801,3183\n4,-inf,9.4451351913142897e-06,0,1,-inf,9.4451351913142897e-06,-7.5681290289457854e-06,2.2250738585072014e-308,0.87381249576730724,-2.0632280032166599,996,2848\n"}, {"input": {"header": {"software": "a \"quoted\" name", "fileName": "tab\tand\u0085nel\u2028sep\u2029", "object": "plain.dm4", "imageWidth": 505, "imageHeight": 2321, "x": {"originBits": 4710223757119339365, "scaleBits": 4604723179956913367, "unit": "\u00c5"}, "y": null, "notes": ["with,comma.dm4", "ctrl\u0001\u007f"], "crop": [882, 2390, 1906, 996], "spectrumWidth": 2994, "spectrumHeight": 1385, "spacingXBits": 4623115460613264846, "spacingYBits": 4725622602910392746, "unitsX": "pm", "unitsY": "\u00c5"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 100, "clickedCol": 709, "snappedRow": 1959, "snappedCol": 1823, "centroidRowBits": 13820720253253918036, "centroidColBits": 4566509482596145395, "width": 1298, "height": 69, "qxBits": 13710175479013000764, "qyBits": 13783055823879670853, "qBits": 4558611296971738783, "dBits": 13940291101238600163, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}], "omitted": 0, "maskRadiusBits": 4576456806246138884, "maskEdgeBits": 4547149451403915481, "notes": [""]}, "expected": "# macTEM spots\n# software: a \"quoted\" name\n# file: tab and nel sep \n# object: plain.dm4\n# subject: region 996 x 1906 px at (2390, 882) (column, row of its top-left pixel)\n# image: 505 x 2321 px\n# x scale: 0.7269696413333361 \u00c5 per px, origin 7884340.495375489 px\n# y scale: none\n# spectrum: 2994 x 1385 bins\n# dq x: 12.302767797412255 pm per bin (0.012302767797412255 nm)\n# dq y: 87174675.257696778 \u00c5 per bin (8717467.5257696789 nm)\n# notes: with,comma.dm4; ctrl \n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 1 measured spots; not listed: 0 (measuring, refused, no peak, or of another region)\n# mask: radius 0.0091995585890192258 bins, edge 0.00010192892285493543 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/m; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: \n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (1/m),qx (1/m),qy (1/m),centroid col,centroid row,click col,click row\n1,-22924893179.109467,5.9328341937222089e-07,0,0,-22924893.179109465,0.00059328341937222087,-9.4659454397382059e-09,-0.00070956302393233221,0.0019226503412795276,-0.22704605164310954,709,100\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "", "object": "cr\r\nlf", "imageWidth": 2631, "imageHeight": 4636, "x": {"originBits": 4489819889419862893, "scaleBits": 13755327764412641484, "unit": ""}, "y": {"originBits": 13854572438712739188, "scaleBits": 4693126976273283508, "unit": "um"}, "notes": [], "crop": [273, 1875, 1532, 1754], "spectrumWidth": 1612, "spectrumHeight": 1452, "spacingXBits": 4726333881296763478, "spacingYBits": 4598459980249840132, "unitsX": "pm", "unitsY": "nm"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 952, "clickedCol": 1066, "snappedRow": 2122, "snappedCol": 3826, "centroidRowBits": 4611765791097441025, "centroidColBits": 4559766969110672631, "width": 635, "height": 2373, "qxBits": 13770529297220823514, "qyBits": 9223372036854775808, "qBits": 13717219969683058512, "dBits": 13657909512827863312, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": true, "m": {"clickedRow": 2190, "clickedCol": 3963, "snappedRow": 1944, "snappedCol": 2854, "centroidRowBits": 4599301119452119040, "centroidColBits": 18442240474082181120, "width": 1501, "height": 2678, "qxBits": 4564506296902681245, "qyBits": 4585362218515372167, "qBits": 4631446209700648531, "dBits": 4599676419421066581, "units": "m", "reciprocalUnits": "1/nm", "neighbour": true}}, {"number": 3, "inMask": true, "m": {"clickedRow": 2870, "clickedCol": 1981, "snappedRow": 274, "snappedCol": 3461, "centroidRowBits": 13862218657659934171, "centroidColBits": 13777538211266549159, "width": 1983, "height": 272, "qxBits": 13889523844937667824, "qyBits": 4711513904755552025, "qBits": 4542650527397072964, "dBits": 4599676419421066581, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 4, "inMask": true, "m": {"clickedRow": 2203, "clickedCol": 856, "snappedRow": 3391, "snappedCol": 3017, "centroidRowBits": 13835267987315763643, "centroidColBits": 4607182418800017408, "width": 257, "height": 1490, "qxBits": 4650433793568514348, "qyBits": 0, "qBits": 4491971648548161851, "dBits": 9218868437227405312, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 1219, "clickedCol": 673, "snappedRow": 3639, "snappedCol": 659, "centroidRowBits": 13933216910364481375, "centroidColBits": 4528564523121474693, "width": 1641, "height": 3719, "qxBits": 4728057454355442549, "qyBits": 4541964682682625225, "qBits": 1, "dBits": 4511130314888779265, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 6, "inMask": true, "m": {"clickedRow": 2502, "clickedCol": 3934, "snappedRow": 3277, "snappedCol": 1850, "centroidRowBits": 4728057454355442549, "centroidColBits": 9218868437227405312, "width": 3212, "height": 1866, "qxBits": 1, "qyBits": 4599676419421066581, "qBits": 9221120237041090560, "dBits": 1, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 7, "inMask": false, "m": {"clickedRow": 2846, "clickedCol": 3341, "snappedRow": 1944, "snappedCol": 2362, "centroidRowBits": 4635396990808496714, "centroidColBits": 4516986974360018023, "width": 3702, "height": 2022, "qxBits": 4599676419421066581, "qyBits": 9094988921128908188, "qBits": 4594241770902292317, "dBits": 4740328075175348070, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 8, "inMask": false, "m": {"clickedRow": 3169, "clickedCol": 3345, "snappedRow": 260, "snappedCol": 2586, "centroidRowBits": 4657896028341267974, "centroidColBits": 4613063327435372799, "width": 1868, "height": 1064, "qxBits": 13895161686202585697, "qyBits": 4530724980892118166, "qBits": 4628149716528417653, "dBits": 13727513509205829089, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 3, "maskRadiusBits": 13697225653406335868, "maskEdgeBits": 4504342139015155003, "notes": ["\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "line\nbreak"]}, "expected": "# macTEM spots\n# software: cr lf\n# file: \n# object: cr lf\n# subject: region 1754 x 1532 px at (1875, 273) (column, row of its top-left pixel)\n# image: 2631 x 4636 px\n# x scale: none\n# y scale: 568079.3175237686 um per px, origin -42.65803389432668 px\n# spectrum: 1612 x 1452 bins\n# dq x: 97773549.146706909 pm per bin (97773.549146706908 nm)\n# dq y: 0.26580739453575597 nm per bin (0.26580739453575597 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 8 measured spots; not listed: 3 (measuring, refused, no peak, or of another region)\n# mask: radius -1.2992497343697233e-09 bins, edge 1.3886340913659853e-07 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# note: line break\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (m),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,-0.0030288390511300015,-2.733899411595858e-17,1,0,-3.0288390511300015e-12,-2.7338994115958581e-08,-0.00010203475402629312,-0,0.00071858164374352565,2.0354261820115203,1066,952\n2,333333333.33333331,4.4404603664454634e-08,1,1,0.33333333333333331,44.404603664454633,0.0014882786851303849,0.036091945262840368,-inf,0.3125,3963,2190\n3,333333333.33333331,5.0996144664556171e-14,1,0,0.33333333333333331,5.099614466455617e-05,-8960.6942391195043,9783160.2271342743,-0.00029981175786216802,-131.95074873573216,1981,2870\n4,inf,2.1130890195342647e-17,1,0,inf,2.1130890195342646e-08,821.11202454290969,0,1,-2.0932285509236102,856,2203\n5,398.67127771641543,0,1,0,3.9867127771641542e-07,4.9406564584124654e-324,123456789.12345679,4.6348680105856551e-05,5.8873001633478419e-06,-7531477.6365717342,673,1219\n6,4.9406564584124654e-315,nan,1,0,4.9406564584124654e-324,nan,4.9406564584124654e-324,0.33333333333333331,inf,123456789.12345679,3934,2502\n7,8.3981356727561638e+17,1.408248687594619e-10,0,0,839813567.27561641,0.1408248687594619,0.33333333333333331,1.0000000000000001e+300,9.4060333885322802e-07,80.953183664104614,3341,2846\n8,-133.55180676441822,2.6490805447170222e-08,0,0,-1.3355180676441821e-07,26.490805447170221,-22047.735517757366,7.8051636212188762e-06,2.6116480690753856,2581.8795927742058,3345,3169\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "", "object": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "imageWidth": 982, "imageHeight": 714, "x": {"originBits": 4599301119452119040, "scaleBits": 4481655518048654467, "unit": "1/px"}, "y": {"originBits": 13783771907195206536, "scaleBits": 4712166014170601563, "unit": "m"}, "notes": [], "crop": null, "spectrumWidth": 2124, "spectrumHeight": 379, "spacingXBits": 4495338238719882071, "spacingYBits": 4549658398526044209, "unitsX": "um", "unitsY": "um"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 2885, "clickedCol": 2279, "snappedRow": 1402, "snappedCol": 1106, "centroidRowBits": 13820225655815466330, "centroidColBits": 9094988921128908188, "width": 453, "height": 2289, "qxBits": 13791564017189615104, "qyBits": 4583952351210061458, "qBits": 9218868437227405312, "dBits": 9223372036854775808, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": false, "m": {"clickedRow": 1796, "clickedCol": 1424, "snappedRow": 3091, "snappedCol": 3682, "centroidRowBits": 13891691680072740181, "centroidColBits": 4599676419421066581, "width": 3712, "height": 3082, "qxBits": 4551734700636365590, "qyBits": 4708919817112237238, "qBits": 4679858240407018143, "dBits": 4473875266707930419, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 436, "clickedCol": 1509, "snappedRow": 620, "snappedCol": 3146, "centroidRowBits": 9094988921128908188, "centroidColBits": 4554524348699358135, "width": 3985, "height": 990, "qxBits": 4711946736768505670, "qyBits": 4528158290663638502, "qBits": 4581069031108811066, "dBits": 4659616901966722491, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 4, "inMask": true, "m": {"clickedRow": 2846, "clickedCol": 1776, "snappedRow": 1980, "snappedCol": 3407, "centroidRowBits": 4627395794791615196, "centroidColBits": 0, "width": 612, "height": 418, "qxBits": 9223372036854775808, "qyBits": 4634296717389218570, "qBits": 13917045712455916138, "dBits": 13839782019079146011, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 1712, "clickedCol": 922, "snappedRow": 1254, "snappedCol": 2324, "centroidRowBits": 13746682140840538593, "centroidColBits": 4576030511398405147, "width": 2030, "height": 3816, "qxBits": 18442240474082181120, "qyBits": 13862296470767087562, "qBits": 1, "dBits": 4490613992994822206, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 1, "maskRadiusBits": 4532328373162817372, "maskEdgeBits": 13810379213599932278, "notes": ["plain.dm4"]}, "expected": "# macTEM spots\n# software: cr lf\n# file: \n# object: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# subject: the whole image, 982 x 714 px\n# image: 982 x 714 px\n# x scale: 4.2e-09 1/px per px, origin 0.3125 px\n# y scale: 10997808.665844133 m per px, origin -0.0007872009325707733 px\n# spectrum: 2124 x 379 bins\n# dq x: 3.4737682966658253e-08 um per bin (3.4737682966658254e-05 nm)\n# dq y: 0.00014979268122145139 um per bin (0.1497926812214514 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 5 measured spots; not listed: 1 (measuring, refused, no peak, or of another region)\n# mask: radius 1.0521415782529103e-05 bins, edge -0.047506135895672694 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: plain.dm4\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (1/nm),|q| (nm),in mask,neighbour,d (1/nm),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,-0,inf,1,0,-0,inf,-0.0026218427639566055,0.028779512806350889,1.0000000000000001e+300,-0.21331821504086684,2279,2885\n2,1.3037268817717989e-09,74532.395176986684,0,0,1.3037268817717989e-09,74532.395176986684,0.00020607096269011836,6669951.7308170106,0.33333333333333331,-12903.963378450522,1424,1796\n3,3364.4423151600326,0.01877598666956113,0,0,3364.4423151600326,0.01877598666956113,10589372.676494252,5.5432078873164948e-06,0.00031922842489856155,1.0000000000000001e+300,1509,436\n4,-4.1957226999243415,-631723.49571878952,1,0,-4.1957226999243415,-631723.49571878952,-0,65.31735795574437,0,23.812337380087101,1776,2846\n5,1.6638784786352617e-08,4.9406564584124654e-324,1,0,1.6638784786352617e-08,4.9406564584124654e-324,-inf,-134.16233025712273,0.0084600549089675538,-2.6256656511706955e-06,922,1712\n"}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "line\nbreak", "object": "line\nbreak", "imageWidth": 4788, "imageHeight": 1300, "x": {"originBits": 13965709528140243611, "scaleBits": 4549795771171509008, "unit": "m"}, "y": null, "notes": ["line\nbreak", "with,comma.dm4"], "crop": null, "spectrumWidth": 1050, "spectrumHeight": 2398, "spacingXBits": 4728057454355442549, "spacingYBits": 4665724338210134999, "unitsX": "1/nm", "unitsY": "1/nm"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3938, "clickedCol": 1197, "snappedRow": 2738, "snappedCol": 1604, "centroidRowBits": 4591870180066957722, "centroidColBits": 13892242599244210972, "width": 3962, "height": 395, "qxBits": 13933929074098802276, "qyBits": 4503599627370496, "qBits": 13925031811229397620, "dBits": 4497878489927924685, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": true}}, {"number": 2, "inMask": true, "m": {"clickedRow": 3389, "clickedCol": 1374, "snappedRow": 2464, "snappedCol": 2867, "centroidRowBits": 4503599627370496, "centroidColBits": 4590456408947208190, "width": 1424, "height": 1178, "qxBits": 4534572428378863769, "qyBits": 1, "qBits": 4573579908586386497, "dBits": 1, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 3, "inMask": true, "m": {"clickedRow": 1209, "clickedCol": 458, "snappedRow": 1778, "snappedCol": 2643, "centroidRowBits": 4464141504907380747, "centroidColBits": 13899445472676875071, "width": 192, "height": 1194, "qxBits": 13937219670755723217, "qyBits": 18442240474082181120, "qBits": 4481655518048654467, "dBits": 4477102792508878544, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": true}}, {"number": 4, "inMask": false, "m": {"clickedRow": 1979, "clickedCol": 3795, "snappedRow": 2101, "snappedCol": 2108, "centroidRowBits": 4728057454355442549, "centroidColBits": 9223372036854775808, "width": 2448, "height": 211, "qxBits": 13902534710745152032, "qyBits": 13776031398803897046, "qBits": 13752672465516491036, "dBits": 13688454721899253593, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 2553, "clickedCol": 2940, "snappedRow": 401, "snappedCol": 1054, "centroidRowBits": 13942628928570626058, "centroidColBits": 13740623540950277517, "width": 2967, "height": 3570, "qxBits": 4554489323384314049, "qyBits": 13784530332529566817, "qBits": 13965650547416762851, "dBits": 13893750641294213434, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 6, "inMask": false, "m": {"clickedRow": 1828, "clickedCol": 103, "snappedRow": 1730, "snappedCol": 1331, "centroidRowBits": 4727831281832685912, "centroidColBits": 4716435525741378255, "width": 437, "height": 1554, "qxBits": 4698089494559768747, "qyBits": 13848978516028062480, "qBits": 4728057454355442549, "dBits": 13886046578321752849, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 7, "inMask": false, "m": {"clickedRow": 1593, "clickedCol": 3775, "snappedRow": 2253, "snappedCol": 3978, "centroidRowBits": 9094988921128908188, "centroidColBits": 13849547489419962899, "width": 1998, "height": 1828, "qxBits": 4593849056264399566, "qyBits": 4591509053454193674, "qBits": 9218868437227405312, "dBits": 4724400875991056989, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 8, "inMask": true, "m": {"clickedRow": 1074, "clickedCol": 2479, "snappedRow": 3531, "snappedCol": 3343, "centroidRowBits": 4677843035972744750, "centroidColBits": 4607182418800017408, "width": 1982, "height": 3653, "qxBits": 4598616717147020151, "qyBits": 13824725890116113867, "qBits": 4663717035309251244, "dBits": 4735062937036274947, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}], "omitted": 4, "maskRadiusBits": 4582956677560081578, "maskEdgeBits": 9221120237041090560, "notes": ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]}, "expected": "# macTEM spots\n# software: with,comma.dm4\n# file: line break\n# object: line break\n# subject: the whole image, 4788 x 1300 px\n# image: 4788 x 1300 px\n# x scale: 0.0001535161742377768 m per px, origin -1084967444.3497684 px\n# y scale: none\n# spectrum: 1050 x 2398 bins\n# dq x: 123456789.12345679 1/nm per bin (123456789.12345679 nm\u207b\u00b9)\n# dq y: 8187.5655351196974 1/nm per bin (8187.5655351196974 nm\u207b\u00b9)\n# notes: line break; with,comma.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 8 measured spots; not listed: 4 (measuring, refused, no peak, or of another region)\n# mask: radius 0.025325075896287665 bins, edge nan bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/\u00c5; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (1/\u00c5),qx (1/\u00c5),qy (1/\u00c5),centroid col,centroid row,click col,click row\n1,5.1547655369116316e-05,-2074.2795091506514,0,1,5.1547655369116317e-08,-2074279.5091506513,-8194731.7991672494,2.2250738585072014e-308,-13906.079513566154,0.10000000000000001,1197,3938\n2,4.9406564584124654e-321,6.0107183403320114e-06,1,0,4.9406564584124654e-324,0.0060107183403320117,1.4322993189427434e-05,4.9406564584124654e-324,0.080379984391299758,2.2250738585072014e-308,1374,3389\n3,2.0796819988421264e-06,4.2000000000000007e-12,1,1,2.0796819988421264e-09,4.2000000000000004e-09,-14130069.499423893,-inf,-42496.119850656476,2.8836931721169278e-10,458,1209\n4,-3.3702718985710969e-07,-6.5106364019985505e-09,0,0,-3.3702718985710969e-10,-6.5106364019985504e-06,-64973.285095561529,-0.00023113395779269266,-0,123456789.12345679,3795,1979\n5,-16914384.045244407,-1072323.5840315516,1,0,-16914.384045244406,-1072323584.0315517,0.00031732969876542219,-0.00086942957208891944,-9.8354871167099279e-07,-31633978.658584632,2940,2553\n6,-5413791.555733203,123456.78912345679,0,0,-5413.7915557332026,123456789.12345679,1243008.9618339937,-17.455411307159977,21123571.365473565,120086555.90424097,103,1828\n7,68969525497.811752,inf,0,0,68969525.49781175,inf,0.12992484793206532,0.094988361496305768,-19.476810859438114,1.0000000000000001e+300,3775,1593\n8,374515551164.99347,6.3619341819124928,1,0,374515551.16499346,6361.9341819124929,0.27450804013863411,-0.42644961692107292,1,55371.655540805645,2479,1074\n"}, {"input": {"header": {"software": "line\nbreak", "fileName": "a \"quoted\" name", "object": "a \"quoted\" name", "imageWidth": 1869, "imageHeight": 2262, "x": {"originBits": 13949159641422079606, "scaleBits": 4629679067439231320, "unit": "\u00c5"}, "y": {"originBits": 4599301119452119040, "scaleBits": 4479499299203800539, "unit": "nm"}, "notes": ["ctrl\u0001\u007f", "Unvalidated reader (UNVALIDATED)"], "crop": [725, 531, 1106, 2584], "spectrumWidth": 1180, "spectrumHeight": 3328, "spacingXBits": 4709473830538865588, "spacingYBits": 4654728351684540905, "unitsX": "1/\u00c5", "unitsY": "1/nm"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 932, "clickedCol": 1178, "snappedRow": 2593, "snappedCol": 2898, "centroidRowBits": 4591075994901562800, "centroidColBits": 13732278044889590532, "width": 863, "height": 2255, "qxBits": 13823935385403071093, "qyBits": 13811397511683867344, "qBits": 4568223165922004421, "dBits": 4607182418800017408, "units": "m", "reciprocalUnits": "nm", "neighbour": true}}, {"number": 2, "inMask": false, "m": {"clickedRow": 358, "clickedCol": 964, "snappedRow": 1943, "snappedCol": 2644, "centroidRowBits": 18442240474082181120, "centroidColBits": 18442240474082181120, "width": 195, "height": 1285, "qxBits": 13831031010772293304, "qyBits": 13752267808561039811, "qBits": 4724618062259749676, "dBits": 13769845665554246352, "units": "m", "reciprocalUnits": "nm", "neighbour": false}}, {"number": 3, "inMask": true, "m": {"clickedRow": 161, "clickedCol": 309, "snappedRow": 3003, "snappedCol": 1121, "centroidRowBits": 4620109851584150930, "centroidColBits": 13887483469070876246, "width": 2911, "height": 2812, "qxBits": 4644000120549606821, "qyBits": 13710277020769954697, "qBits": 9223372036854775808, "dBits": 4517512952624306371, "units": "m", "reciprocalUnits": "nm", "neighbour": true}}, {"number": 4, "inMask": false, "m": {"clickedRow": 433, "clickedCol": 652, "snappedRow": 20, "snappedCol": 1651, "centroidRowBits": 9221120237041090560, "centroidColBits": 4591870180066957722, "width": 148, "height": 782, "qxBits": 13802048544153230829, "qyBits": 4729751780776080081, "qBits": 4591870180066957722, "dBits": 13862694941324668677, "units": "m", "reciprocalUnits": "nm", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 2141, "clickedCol": 2164, "snappedRow": 3917, "snappedCol": 2102, "centroidRowBits": 4599676419421066581, "centroidColBits": 4728057454355442549, "width": 1646, "height": 2999, "qxBits": 13780318727841413688, "qyBits": 13717655202578040895, "qBits": 13799674985437216668, "dBits": 13812256607314744351, "units": "m", "reciprocalUnits": "nm", "neighbour": false}}], "omitted": 2, "maskRadiusBits": 13883398543381458812, "maskEdgeBits": 4555355064342258622, "notes": [""]}, "expected": "# macTEM spots\n# software: line break\n# file: a \"quoted\" name\n# object: a \"quoted\" name\n# subject: region 2584 x 1106 px at (531, 725) (column, row of its top-left pixel)\n# image: 1869 x 2262 px\n# x scale: 31.92415134770394 \u00c5 per px, origin -89633391.54458031 px\n# y scale: 3.0708539367886303e-09 nm per px, origin 0.3125 px\n# spectrum: 1180 x 3328 bins\n# dq x: 7185916.9416760691 1/\u00c5 per bin (71859169.416760683 nm\u207b\u00b9)\n# dq y: 1594.6935123313399 1/nm per bin (1594.6935123313399 nm\u207b\u00b9)\n# notes: ctrl ; Unvalidated reader (UNVALIDATED)\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 5 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius -3550.7089037130918 bins, edge 0.00036426161013608158 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: \n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (m),|q| (nm),qx (nm),qy (nm),centroid col,centroid row,click col,click row\n1,1000000000,2.6353673564984714e-12,0,1,1,0.0026353673564984714,-0.38256779024633342,-0.054571998262650134,-2.8091745333444506e-07,0.088978466794535249,1178,932\n2,-92769.817300257564,0.072205853096691794,0,0,-9.2769817300257561e-05,72205853.096691787,-1.1058164927903089,-6.1678786283957472e-06,-inf,-inf,964,358\n3,1038.9125911481713,-0,1,1,1.0389125911481712e-06,-0,300.84404204421509,-9.6339321851719359e-09,-6720.636079087466,7.4818668209913017,309,161\n4,-145487544661.26425,1e-10,0,0,-145.48754466126425,0.10000000000000001,-0.013050126114122452,163190712.46474317,0.10000000000000001,nan,652,433\n5,-60533171.698615931,-8.9326580878433189e-12,1,0,-0.060533171698615933,-0.008932658087843319,-0.00045054386341717182,-2.8779058966657602e-08,123456789.12345679,0.33333333333333331,2164,2141\n"}, {"input": {"header": {"software": "", "fileName": "with,comma.dm4", "object": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "imageWidth": 1143, "imageHeight": 3145, "x": {"originBits": 13773566682460945884, "scaleBits": 4610672253943900466, "unit": "1/px"}, "y": {"originBits": 4495691472350412669, "scaleBits": 4514894866991212481, "unit": "px"}, "notes": ["with,comma.dm4", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"], "crop": null, "spectrumWidth": 2991, "spectrumHeight": 3749, "spacingXBits": 4475942545893932164, "spacingYBits": 4503599627370496, "unitsX": "\u00b5m", "unitsY": "pm"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 1755, "clickedCol": 3836, "snappedRow": 3426, "snappedCol": 3109, "centroidRowBits": 18442240474082181120, "centroidColBits": 4695832153301936916, "width": 875, "height": 2901, "qxBits": 4581333872155050356, "qyBits": 4599301119452119040, "qBits": 13942421666561133856, "dBits": 13908957295467845560, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": false, "m": {"clickedRow": 1651, "clickedCol": 1205, "snappedRow": 3590, "snappedCol": 24, "centroidRowBits": 4518045658506930328, "centroidColBits": 9218868437227405312, "width": 3387, "height": 4014, "qxBits": 4537150099965529072, "qyBits": 4543378566791724991, "qBits": 13844882761709119071, "dBits": 13788540476280832745, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 1592, "clickedCol": 2198, "snappedRow": 620, "snappedCol": 3341, "centroidRowBits": 4543440068690820561, "centroidColBits": 13867657245727486626, "width": 290, "height": 738, "qxBits": 4473388540383347549, "qyBits": 4687276987853391286, "qBits": 13868339015241342988, "dBits": 13886926709565619619, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 4, "maskRadiusBits": 4499167222337134777, "maskEdgeBits": 13894749322703493142, "notes": ["ctrl\u0001\u007f", "ctrl\u0001\u007f"]}, "expected": "# macTEM spots\n# software: \n# file: with,comma.dm4\n# object: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# subject: the whole image, 1143 x 3145 px\n# image: 1143 x 3145 px\n# x scale: 1.7748990657770034 1/px per px, origin -0.00016432768745298823 px\n# y scale: 7.190928550317533e-07 px per px, origin 3.707518705367129e-08 px\n# spectrum: 2991 x 3749 bins\n# dq x: 1.7312301976205609e-09 \u00b5m per bin (1.7312301976205609e-06 nm)\n# dq y: 2.2250738585072014e-308 pm per bin (2.2250738585069563e-311 nm)\n# notes: with,comma.dm4; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 3 measured spots; not listed: 4 (measuring, refused, no peak, or of another region)\n# mask: radius 6.0546897381519498e-08 bins, edge -20547.565847240468 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: ctrl \n# note: ctrl \n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (1/nm),|q| (nm),in mask,neighbour,d (1/nm),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,-184670.9572455266,-30861867.505383611,0,0,-184670.9572455266,-30861867.505383611,0.019694838630188241,0.3125,883003.37191328639,-inf,3836,1755\n2,-0.0016318579575981768,-9.4521844566217492,0,0,-0.0016318579575981768,-9.4521844566217492,2.2120688360781988e-05,5.5929531497910915e-05,inf,1.1517174495928396e-06,1205,1651\n3,-6214.2662588948469,-355.8035470494076,0,0,-6214.2662588948469,-355.8035470494076,1.2030742369432634e-09,233906.75823454343,-317.04943700674096,5.6346284576732173e-05,2198,1592\n"}, {"input": {"header": {"software": "a \"quoted\" name", "fileName": "with,comma.dm4", "object": "cr\r\nlf", "imageWidth": 4191, "imageHeight": 1146, "x": {"originBits": 4580414725442608701, "scaleBits": 4538028118358944427, "unit": "m"}, "y": {"originBits": 13729508268412933976, "scaleBits": 4506855585451117767, "unit": "\u00b0"}, "notes": ["a \"quoted\" name", "plain.dm4"], "crop": [2528, 2330, 1291, 2068], "spectrumWidth": 760, "spectrumHeight": 2804, "spacingXBits": 4477011983478888971, "spacingYBits": 4670852035930539863, "unitsX": "mrad", "unitsY": "1/\u00c5"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3140, "clickedCol": 3737, "snappedRow": 2967, "snappedCol": 3493, "centroidRowBits": 4578165353224530441, "centroidColBits": 4512525181824613927, "width": 1780, "height": 266, "qxBits": 4473977258595358818, "qyBits": 13956557020640059004, "qBits": 4728057454355442549, "dBits": 13753988046047679591, "units": "nm", "reciprocalUnits": "nm", "neighbour": true}}, {"number": 2, "inMask": true, "m": {"clickedRow": 1290, "clickedCol": 500, "snappedRow": 427, "snappedCol": 2931, "centroidRowBits": 4620776108838189129, "centroidColBits": 9094988921128908188, "width": 3029, "height": 2250, "qxBits": 13874576165241513236, "qyBits": 4486455655516537159, "qBits": 4716315903919960850, "dBits": 13757051892850677680, "units": "nm", "reciprocalUnits": "nm", "neighbour": false}}, {"number": 3, "inMask": true, "m": {"clickedRow": 1652, "clickedCol": 118, "snappedRow": 2252, "snappedCol": 1743, "centroidRowBits": 13817086440467701659, "centroidColBits": 4598314571670610995, "width": 2398, "height": 1816, "qxBits": 4710351063477511952, "qyBits": 4690287085247801449, "qBits": 4727603540013193743, "dBits": 4516233223287804657, "units": "nm", "reciprocalUnits": "nm", "neighbour": true}}], "omitted": 1, "maskRadiusBits": 4607182418800017408, "maskEdgeBits": 4634247663284550600, "notes": []}, "expected": "# macTEM spots\n# software: a \"quoted\" name\n# file: with,comma.dm4\n# object: cr lf\n# subject: region 2068 x 1291 px at (2330, 2528) (column, row of its top-left pixel)\n# image: 4191 x 1146 px\n# x scale: 2.5095530390854364e-05 m per px, origin 0.016505907870309356 px\n# y scale: 2.0539378233720344e-07 \u00b0 per px, origin -1.863526433349402e-07 px\n# spectrum: 760 x 2804 bins\n# dq x: 2.0421242643160658e-09 mrad per bin (2.0421242643160658e-09 mrad)\n# dq y: 18636.717776484173 1/\u00c5 per bin (186367.17776484173 nm\u207b\u00b9)\n# notes: a \"quoted\" name; plain.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 3 measured spots; not listed: 1 (measuring, refused, no peak, or of another region)\n# mask: radius 1 bins, edge 64.620257201123536 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (nm),|q| (nm),qx (nm),qy (nm),centroid col,centroid row,click col,click row\n1,-7.6249764566815701e-06,123456789.12345679,0,1,-7.6249764566815701e-06,123456789.12345679,1.3248183097514145e-09,-265508135.36742008,4.7251491844689097e-07,0.012163415142244298,3737,3140\n2,-1.2810916757071414e-05,20677945.354662962,1,0,-1.2810916757071414e-05,20677945.354662962,-908.68895401354757,8.8905807051200614e-09,1.0000000000000001e+300,8.1472442719933884,500,1290\n3,8.6079683982910597e-07,116692938.341408,1,1,8.6079683982910597e-07,116692938.341408,8002903.7806337029,380880.2449194254,0.25773559690384501,-0.1261874860822417,118,1652\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "", "object": "plain.dm4", "imageWidth": 3959, "imageHeight": 4073, "x": {"originBits": 4666098656220252775, "scaleBits": 4671944416015918289, "unit": "m"}, "y": null, "notes": ["cr\r\nlf", "with,comma.dm4"], "crop": [141, 2845, 2837, 2018], "spectrumWidth": 498, "spectrumHeight": 1277, "spacingXBits": 4724309027355800469, "spacingYBits": 4625404603485167359, "unitsX": "nm", "unitsY": "\u00b5m"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3085, "clickedCol": 1268, "snappedRow": 1633, "snappedCol": 1871, "centroidRowBits": 4581205933219291387, "centroidColBits": 4673281411085341403, "width": 2920, "height": 981, "qxBits": 1, "qyBits": 4728057454355442549, "qBits": 13825014305741252548, "dBits": 4607182418800017408, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": true, "m": {"clickedRow": 2381, "clickedCol": 94, "snappedRow": 3488, "snappedCol": 2122, "centroidRowBits": 13758626735584388850, "centroidColBits": 4611259580349116138, "width": 2472, "height": 1640, "qxBits": 9221120237041090560, "qyBits": 4706241392951909703, "qBits": 4534202097511160554, "dBits": 4598221841212963573, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 135, "clickedCol": 3012, "snappedRow": 1795, "snappedCol": 3245, "centroidRowBits": 13707670449819996650, "centroidColBits": 13923465599935376555, "width": 913, "height": 3565, "qxBits": 0, "qyBits": 4534154515457737291, "qBits": 13916734969567647160, "dBits": 4628527905006726648, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 4, "inMask": false, "m": {"clickedRow": 423, "clickedCol": 98, "snappedRow": 743, "snappedCol": 1936, "centroidRowBits": 4681165294777802048, "centroidColBits": 4693434450436238527, "width": 2053, "height": 251, "qxBits": 4723572052487537538, "qyBits": 13897124515409936841, "qBits": 4639331010874340813, "dBits": 13871313618236507573, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": true}}, {"number": 5, "inMask": true, "m": {"clickedRow": 369, "clickedCol": 396, "snappedRow": 2911, "snappedCol": 1648, "centroidRowBits": 4591870180066957722, "centroidColBits": 9218868437227405312, "width": 330, "height": 342, "qxBits": 4468741400340027087, "qyBits": 4653503605746680673, "qBits": 13799728633372537086, "dBits": 13965858843496254627, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 6, "inMask": false, "m": {"clickedRow": 3973, "clickedCol": 2827, "snappedRow": 2898, "snappedCol": 1071, "centroidRowBits": 4503599627370496, "centroidColBits": 13891155166064943411, "width": 1128, "height": 3997, "qxBits": 4730212914263205072, "qyBits": 4571234783230782250, "qBits": 13723233495952021185, "dBits": 4529516257999262682, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 5, "maskRadiusBits": 4481655518048654467, "maskEdgeBits": 4485700045633814016, "notes": []}, "expected": "# macTEM spots\n# software: cr lf\n# file: \n# object: plain.dm4\n# subject: region 2018 x 2837 px at (2845, 141) (column, row of its top-left pixel)\n# image: 3959 x 4073 px\n# x scale: 22610.773376379922 m per px, origin 8864.0115642 px\n# y scale: none\n# spectrum: 498 x 1277 bins\n# dq x: 67600874.178419426 nm per bin (67600874.178419426 nm)\n# dq y: 16.73820478856123 \u00b5m per bin (16738.20478856123 nm)\n# notes: cr lf; with,comma.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 6 measured spots; not listed: 5 (measuring, refused, no peak, or of another region)\n# mask: radius 4.2000000000000004e-09 bins, edge 7.6405290138359597e-09 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (\u00c5),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,0.10000000000000001,-4.4245990030560396,0,0,1,-0.442459900305604,4.9406564584124654e-324,123456789.12345679,27474.733104127325,0.019250961279483097,1268,3085\n2,0.025258802244563523,0.0001369562829676764,1,0,0.25258802244563522,1.369562829676764e-05,nan,4184889.4229542348,1.9053117253851561,-1.5698819180432395e-05,94,2381\n3,2.7834400827223336,-5955482.623755252,0,0,27.834400827223334,-595548.2623755252,0,1.3615021162872604e-05,-1709617.5254657667,-6.3861514359986574e-09,3012,135\n4,-53.778030209632441,1457.1794253300905,0,1,-537.78030209632436,145.71794253300905,61863978.435309425,-29188.466576041454,603874.02115764457,93552.539579500444,98,423\n5,-112056699.93679589,-0.090257224206813327,1,0,-1120566999.3679588,-0.0090257224206813334,5.8669538732268053e-10,1316.2185269558906,inf,0.10000000000000001,396,369\n6,6.6934509618853142e-07,-6.9735044397281342e-07,0,0,6.6934509618853136e-06,-6.9735044397281345e-08,176933561.31180429,0.0039766463360944391,-11928.050083414279,2.2250738585072014e-308,2827,3973\n"}, {"input": {"header": {"software": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "fileName": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "object": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "imageWidth": 429, "imageHeight": 632, "x": null, "y": {"originBits": 4593378884416085353, "scaleBits": 4538679511826607614, "unit": "m"}, "notes": [], "crop": null, "spectrumWidth": 1548, "spectrumHeight": 644, "spacingXBits": 4599676419421066581, "spacingYBits": 4497437041693265262, "unitsX": "\u00c5", "unitsY": "nm"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 3027, "clickedCol": 3736, "snappedRow": 1986, "snappedCol": 2831, "centroidRowBits": 4718056455808416433, "centroidColBits": 4606791101958773617, "width": 3494, "height": 1523, "qxBits": 4683467987153689639, "qyBits": 13871116683603824046, "qBits": 4626853821218373435, "dBits": 13863332444656767046, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 2, "inMask": true, "m": {"clickedRow": 3434, "clickedCol": 3296, "snappedRow": 58, "snappedCol": 3363, "centroidRowBits": 4655902514546210559, "centroidColBits": 4671727129813493954, "width": 865, "height": 3865, "qxBits": 9094988921128908188, "qyBits": 13868231904263064549, "qBits": 0, "dBits": 4573434253702890400, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 3, "inMask": false, "m": {"clickedRow": 3082, "clickedCol": 1802, "snappedRow": 3469, "snappedCol": 3549, "centroidRowBits": 9223372036854775808, "centroidColBits": 4715651421810974015, "width": 2289, "height": 2266, "qxBits": 0, "qyBits": 4601433402121309470, "qBits": 13812654337578335075, "dBits": 13958590552094077479, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}, {"number": 4, "inMask": false, "m": {"clickedRow": 2758, "clickedCol": 774, "snappedRow": 2734, "snappedCol": 1122, "centroidRowBits": 13875611387242532304, "centroidColBits": 4704529190914413222, "width": 1106, "height": 1027, "qxBits": 0, "qyBits": 13759959941456307224, "qBits": 4599301119452119040, "dBits": 13958624241230638565, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 5, "inMask": false, "m": {"clickedRow": 1590, "clickedCol": 1697, "snappedRow": 2848, "snappedCol": 3173, "centroidRowBits": 4512548203363004729, "centroidColBits": 13831372622528911016, "width": 1236, "height": 967, "qxBits": 13860614853091599113, "qyBits": 13691185406516763147, "qBits": 4481655518048654467, "dBits": 4599520480027318143, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 6, "inMask": true, "m": {"clickedRow": 855, "clickedCol": 3123, "snappedRow": 769, "snappedCol": 1867, "centroidRowBits": 4600148865534897111, "centroidColBits": 4594200056905697922, "width": 3039, "height": 3174, "qxBits": 13921640563211446248, "qyBits": 13825180241614493186, "qBits": 13787968807409645943, "dBits": 13792739058901680808, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}, {"number": 7, "inMask": true, "m": {"clickedRow": 1166, "clickedCol": 2104, "snappedRow": 1174, "snappedCol": 2841, "centroidRowBits": 4728057454355442549, "centroidColBits": 9221120237041090560, "width": 1723, "height": 3426, "qxBits": 4643884618915796937, "qyBits": 4653587599728083343, "qBits": 4686033876444263502, "dBits": 4728057454355442549, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}], "omitted": 2, "maskRadiusBits": 9223372036854775808, "maskEdgeBits": 4607182418800017408, "notes": []}, "expected": "# macTEM spots\n# software: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# file: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# object: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# subject: the whole image, 429 x 632 px\n# image: 429 x 632 px\n# x scale: none\n# y scale: 2.7302537305802156e-05 m per px, origin 0.12093747882192009 px\n# spectrum: 1548 x 644 bins\n# dq x: 0.33333333333333331 \u00c5 per bin (0.033333333333333333 nm)\n# dq y: 4.8626395999868043e-08 nm per bin (4.8626395999868043e-08 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 7 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius -0 bins, edge 1 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/m; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (1/m),qx (1/m),qy (1/m),centroid col,centroid row,click col,click row\n1,-163606.47912707843,0.021886860452882712,1,1,-163.60647912707844,21.886860452882711,127061.12383042333,-515.39142646866617,0.95655510329275562,27162006.418696109,3736,3027\n2,5.8843828674363383,0,1,1,0.0058843828674363385,0,1.0000000000000001e+300,-349.71499284653538,21820.290776886752,1861.6672377581124,3296,3434\n3,-383788734691.19495,-6.4085959600090043e-05,0,0,-383788734.69119495,-0.064085959600090045,0,0.43086546571722006,18202556.600552794,-0,1802,3082\n4,-385796763708.70813,0.00031250000000000001,0,1,-385796763.70870811,0.3125,0,-2.0215896376383433e-05,3387583.2180426894,-1028.760139298498,774,2758\n5,324.67695806405311,4.2000000000000007e-12,0,1,0.32467695806405311,4.2000000000000004e-09,-107.18394065567931,-4.9073926423156548e-10,-1.1816695403262347,4.7373366854148403e-07,1697,1590\n6,-3.1314358747496946,-1.5078970311815633e-06,1,0,-0.0031314358747496947,-0.0015078970311815634,-1284693.0503411237,-0.45167119165975589,0.13966707277275608,0.35955936100679992,3123,855\n7,123456789123.45679,197.72745454445709,1,0,123456789.12345679,197727.45454445708,294.27853429445219,1335.3165472225262,nan,123456789.12345679,2104,1166\n"}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "with,comma.dm4", "object": "line\nbreak", "imageWidth": 1927, "imageHeight": 2109, "x": {"originBits": 13880642034312501143, "scaleBits": 4694199907912685060, "unit": ""}, "y": {"originBits": 0, "scaleBits": 4599676419421066581, "unit": "1/px"}, "notes": [], "crop": [2744, 962, 2403, 625], "spectrumWidth": 3350, "spectrumHeight": 1361, "spacingXBits": 9218868437227405312, "spacingYBits": 4734509319641128140, "unitsX": "m", "unitsY": "nm"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 309, "clickedCol": 2171, "snappedRow": 2130, "snappedCol": 1790, "centroidRowBits": 4685187393703277126, "centroidColBits": 13794438715013712830, "width": 2319, "height": 1781, "qxBits": 9223372036854775808, "qyBits": 4572265908540149364, "qBits": 4732994161393937478, "dBits": 4531055804026169470, "units": "nm", "reciprocalUnits": "1/\u00c5", "neighbour": true}}], "omitted": 2, "maskRadiusBits": 4655359683682347642, "maskEdgeBits": 13700638183685425811, "notes": []}, "expected": "# macTEM spots\n# software: with,comma.dm4\n# file: with,comma.dm4\n# object: line break\n# subject: region 625 x 2403 px at (962, 2744) (column, row of its top-left pixel)\n# image: 1927 x 2109 px\n# x scale: none\n# y scale: 0.3333333333333333 1/px per px, origin 0.0 px\n# spectrum: 3350 x 1361 bins\n# dq x: inf m per bin (inf nm)\n# dq y: 341517382.98579097 nm per bin (341517382.98579097 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 1 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius 1738.2417890975762 bins, edge -2.1472437628151764e-09 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/\u00c5; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (nm),|q| (1/\u00c5),qx (1/\u00c5),qy (1/\u00c5),centroid col,centroid row,click col,click row\n1,8.3655998097296372e-06,259821184.94174403,1,1,8.3655998097296372e-06,259821184.94174403,-0,0.0048710049765109294,-0.0038685442144070483,173091.56436623837,2171,309\n"}, {"input": {"header": {"software": "a \"quoted\" name", "fileName": "plain.dm4", "object": "a \"quoted\" name", "imageWidth": 4467, "imageHeight": 3825, "x": {"originBits": 4694300000128991719, "scaleBits": 4686866067022685685, "unit": "mrad"}, "y": null, "notes": ["a \"quoted\" name", "Unvalidated reader (UNVALIDATED)"], "crop": [173, 810, 1077, 103], "spectrumWidth": 926, "spectrumHeight": 1713, "spacingXBits": 4591870180066957722, "spacingYBits": 4681283176690101907, "unitsX": "\u00c5", "unitsY": "um"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 3914, "clickedCol": 292, "snappedRow": 2617, "snappedCol": 2025, "centroidRowBits": 13918881436393962956, "centroidColBits": 13718503453849879786, "width": 37, "height": 3941, "qxBits": 4716147395548386971, "qyBits": 4562464308410479264, "qBits": 13817616955943513221, "dBits": 13864231000439363376, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 2, "inMask": false, "m": {"clickedRow": 2707, "clickedCol": 2628, "snappedRow": 645, "snappedCol": 176, "centroidRowBits": 13834647311715274260, "centroidColBits": 4599301119452119040, "width": 2479, "height": 2538, "qxBits": 4484831878962570115, "qyBits": 4663386241688450573, "qBits": 13945186808208066206, "dBits": 13835473500804506312, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 2531, "clickedCol": 2385, "snappedRow": 2310, "snappedCol": 296, "centroidRowBits": 9218868437227405312, "centroidColBits": 4512889772787441585, "width": 3384, "height": 556, "qxBits": 13828699206995744963, "qyBits": 13789484436544315632, "qBits": 13961223240034326478, "dBits": 4610481683600173600, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 4, "inMask": true, "m": {"clickedRow": 2856, "clickedCol": 477, "snappedRow": 488, "snappedCol": 3756, "centroidRowBits": 4493031298996101410, "centroidColBits": 4537241625932635162, "width": 1137, "height": 2476, "qxBits": 13720979825251813014, "qyBits": 9223372036854775808, "qBits": 13905882727063490677, "dBits": 4638532077614602892, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 867, "clickedCol": 2891, "snappedRow": 1987, "snappedCol": 1816, "centroidRowBits": 0, "centroidColBits": 4713364341638000346, "width": 3079, "height": 1065, "qxBits": 4515411475952307896, "qyBits": 13719394589909120216, "qBits": 13764449478424226166, "dBits": 4590053196158707255, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 6, "inMask": true, "m": {"clickedRow": 3558, "clickedCol": 2623, "snappedRow": 3939, "snappedCol": 391, "centroidRowBits": 4470904037099795359, "centroidColBits": 13896166834028803839, "width": 2450, "height": 2041, "qxBits": 1, "qyBits": 4566407088054594027, "qBits": 13741209416679019860, "dBits": 4524639179628302378, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 7, "inMask": true, "m": {"clickedRow": 3253, "clickedCol": 2223, "snappedRow": 748, "snappedCol": 3752, "centroidRowBits": 4661176362686743454, "centroidColBits": 13720880093315589507, "width": 2557, "height": 1210, "qxBits": 4707876688148999875, "qyBits": 4634912882835514000, "qBits": 4509397759400696551, "dBits": 13767681580818319905, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}], "omitted": 2, "maskRadiusBits": 4465898046142682094, "maskEdgeBits": 13810618712540573946, "notes": ["cr\r\nlf", ""]}, "expected": "# macTEM spots\n# software: a \"quoted\" name\n# file: plain.dm4\n# object: a \"quoted\" name\n# subject: region 103 x 1077 px at (810, 173) (column, row of its top-left pixel)\n# image: 4467 x 3825 px\n# x scale: 221947.38804654745 mrad per px, origin 704637.267196712 px\n# y scale: none\n# spectrum: 926 x 1713 bins\n# dq x: 0.10000000000000001 \u00c5 per bin (0.010000000000000002 nm)\n# dq y: 95267.947174245768 um per bin (95267947.174245775 nm)\n# notes: a \"quoted\" name; Unvalidated reader (UNVALIDATED)\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 7 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius 3.7918037064864404e-10 bins, edge -0.049167993634883403 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/px; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: cr lf\n# note: \n# validation: the spot centroid compared with planted spots (tools/parity/spot-parity, V1-6a slice C'); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id until V1-2; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (px),|q| (px\u207b\u00b9),in mask,neighbour,d (px),|q| (1/px),qx (1/px),qy (1/px),centroid col,centroid row,click col,click row\n1,-189.14497048704061,-0.14091224848639086,1,0,-189.14497048704061,-0.14091224848639086,20050202.752829175,0.0010454930132432275,-3.336905159872852e-08,-845429.88875191798,292,3914\n2,-2.1844948737528718,-48771213.713147387,0,0,-2.1844948737528718,-48771213.713147387,6.8274241664622409e-09,6061.0791364139995,0.3125,-1.9087966069645335,2628,2707\n3,1.732583949093744,-544547416.34838271,0,0,1.732583949093744,-544547416.34838271,-0.79402602223196828,-0.0018365467112798038,5.0679524841393122e-07,inf,2385,2531\n4,125.50544678522618,-113130.61983877591,1,0,125.50544678522618,-113130.61983877591,-4.9756302904007939e-08,-0,2.2430790399454675e-05,2.4636979421817584e-08,477,2856\n5,0.074784282871086613,-4.0336500465715e-05,1,0,0.074784282871086613,-4.0336500465715e-05,7.7379095639358225e-07,-3.926609536953324e-08,13229867.510184694,0,2891,867\n6,3.1885510804828027e-06,-1.1076127229813397e-06,1,0,3.1885510804828027e-06,-1.1076127229813397e-06,4.9406564584124654e-324,0.0019004470643993975,-25704.442007533271,8.103067872820323e-10,2623,3558\n7,-6.3441000148580399e-05,3.0695055388189579e-07,1,0,-6.3441000148580399e-05,3.0695055388189579e-07,5698462.1791188149,74.073595593576329,-4.9096332311236259e-08,4073.6029464010635,2223,3253\n"}]} \ No newline at end of file +{"constants": {"lineage": "none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in", "profileValidation": "the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it", "spotsValidation": "the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it"}, "radial": [{"input": {"header": {"software": "with,comma.dm4", "fileName": "", "object": "line\nbreak", "imageWidth": 824, "imageHeight": 3568, "x": {"originBits": 9221120237041090560, "scaleBits": 4582064925582083487, "unit": "mrad"}, "y": {"originBits": 4621946245184461844, "scaleBits": 4621454679622686140, "unit": "1/px"}, "notes": ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "with,comma.dm4"], "crop": null, "spectrumWidth": 1490, "spectrumHeight": 1063, "spacingXBits": 9218868437227405312, "spacingYBits": 4503599627370496, "unitsX": "pm", "unitsY": ""}, "units": "pm", "widthBits": 4564196840266914789, "meanBits": [], "count": []}, "expected": null}, {"input": {"header": {"software": "", "fileName": "ctrl\u0001\u007f", "object": "a \"quoted\" name", "imageWidth": 4005, "imageHeight": 2407, "x": {"originBits": 4682489166594579218, "scaleBits": 4648047906712370870, "unit": "um"}, "y": {"originBits": 1, "scaleBits": 4481655518048654467, "unit": "mrad"}, "notes": ["cr\r\nlf"], "crop": [1383, 2839, 1766, 2585], "spectrumWidth": 3564, "spectrumHeight": 474, "spacingXBits": 4607182418800017408, "spacingYBits": 4503081804641300813, "unitsX": "pm", "unitsY": "px"}, "units": "", "widthBits": 4518666844752528166, "meanBits": [13938939970462022925], "count": [29]}, "expected": null}, {"input": {"header": {"software": "", "fileName": "a \"quoted\" name", "object": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "imageWidth": 2939, "imageHeight": 103, "x": {"originBits": 4558183910635174279, "scaleBits": 13794740017740053347, "unit": "pm"}, "y": {"originBits": 9223372036854775808, "scaleBits": 4630762321076262211, "unit": "um"}, "notes": ["\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", ""], "crop": null, "spectrumWidth": 1038, "spectrumHeight": 946, "spacingXBits": 4527752186738764833, "spacingYBits": 4481655518048654467, "unitsX": "", "unitsY": ""}, "units": "m", "widthBits": 4598194754330504773, "meanBits": [4488771061545228707, 13795181448083832347], "count": [30, 31]}, "expected": "# macTEM radial profile\n# software: \n# file: a \"quoted\" name\n# object: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# subject: the whole image, 2939 x 103 px\n# image: 2939 x 103 px\n# x scale: none\n# y scale: 39.54528272318796 um per px, origin -0.0 px\n# spectrum: 1038 x 946 bins\n# dq x: 5.1992244829392119e-06 per bin (5.1992244829392119e-06 px\u207b\u00b9)\n# dq y: 4.2000000000000004e-09 per bin (4.2000000000000004e-09 px\u207b\u00b9)\n# notes: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301; \n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 0.25108439841708147 m (251084398.41708148 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000000000\nbin,|q| centre (nm),|q| centre (m),mean |F|^2,count\n1,376626597.62562221,0.37662659762562223,-0.0044750566753744237,31\n"}, {"input": {"header": {"software": "line\nbreak", "fileName": "cr\r\nlf", "object": "plain.dm4", "imageWidth": 3100, "imageHeight": 4989, "x": {"originBits": 4477636806272543976, "scaleBits": 4470520832168766199, "unit": "\u00c5"}, "y": null, "notes": [], "crop": [205, 1670, 2971, 1378], "spectrumWidth": 1558, "spectrumHeight": 3922, "spacingXBits": 4503599627370496, "spacingYBits": 4655786146363130900, "unitsX": "", "unitsY": "\u00b0"}, "units": "1/px", "widthBits": 4546799042682666407, "meanBits": [13865618468490735845, 9218868437227405312, 4517397599583711362, 4556903542980518552, 13829097104759211779, 13877212344205686405, 4607182418800017408, 9223372036854775808, 9218868437227405312, 9223372036854775808, 4496300500890658890, 4581609034881226007, 4658850243064171912, 13886502625877318725, 4562896533040878561, 13968317622781055780, 4547939389928913176, 13749784153531362975, 13802513503452899323], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "fileName": "with,comma.dm4", "object": "ctrl\u0001\u007f", "imageWidth": 252, "imageHeight": 2311, "x": {"originBits": 4475851864629364200, "scaleBits": 4617810561564161001, "unit": "pm"}, "y": null, "notes": ["cr\r\nlf"], "crop": null, "spectrumWidth": 2486, "spectrumHeight": 2754, "spacingXBits": 4535459789578187911, "spacingYBits": 4599676419421066581, "unitsX": "\u00c5", "unitsY": ""}, "units": "um", "widthBits": 4522492685342026120, "meanBits": [4480392160226134225, 9094988921128908188, 13904638962861849488], "count": [30, 6, 30]}, "expected": "# macTEM radial profile\n# software: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# file: with,comma.dm4\n# object: ctrl \n# subject: the whole image, 252 x 2311 px\n# image: 252 x 2311 px\n# x scale: 5.439687044604377 pm per px, origin 1.712477751627458e-09 px\n# y scale: none\n# spectrum: 2486 x 2754 bins\n# dq x: 1.6393694004125422e-05 \u00c5 per bin (1.6393694004125422e-06 nm)\n# dq y: 0.33333333333333331 per bin (0.33333333333333331 px\u207b\u00b9)\n# notes: cr lf\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 2.2794753896982553e-06 um (0.0022794753896982554 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000\nbin,|q| centre (nm),|q| centre (um),mean |F|^2,count\n1,0.0034192130845473829,3.419213084547383e-06,1.0000000000000001e+300,6\n2,0.0056986884742456388,5.6986884742456384e-06,-95031.468612415949,30\n"}, {"input": {"header": {"software": "", "fileName": "plain.dm4", "object": "plain.dm4", "imageWidth": 1876, "imageHeight": 4229, "x": {"originBits": 13886162702188324480, "scaleBits": 4694035920171861392, "unit": "\u00b5m"}, "y": {"originBits": 13877467041494890956, "scaleBits": 4612470321755545503, "unit": "px"}, "notes": ["plain.dm4", "Unvalidated reader (UNVALIDATED)"], "crop": [2942, 2091, 706, 1480], "spectrumWidth": 3233, "spectrumHeight": 1553, "spacingXBits": 4636821757480671433, "spacingYBits": 4593127644936938427, "unitsX": "nm", "unitsY": "um"}, "units": "\u00b5m", "widthBits": 4535905069675315443, "meanBits": [4484200003081826229, 4638669593645170104, 13739390570659036089, 13795718112108601097], "count": [12, 40, 9, 48]}, "expected": "# macTEM radial profile\n# software: \n# file: plain.dm4\n# object: plain.dm4\n# subject: region 1480 x 706 px at (2091, 2942) (column, row of its top-left pixel)\n# image: 1876 x 4229 px\n# x scale: 673894.3139993418 \u00b5m per px, origin -5519.405597129487 px\n# y scale: 2.3483006452842825 px per px, origin -1450.6870670091475 px\n# spectrum: 3233 x 1553 bins\n# dq x: 101.20033584544139 nm per bin (101.20033584544139 nm)\n# dq y: 0.11745083064137322 um per bin (117.45083064137323 nm)\n# notes: plain.dm4; Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.790236165621988e-05 \u00b5m (0.017902361656219879 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000\nbin,|q| centre (nm),|q| centre (\u00b5m),mean |F|^2,count\n1,0.026853542484329817,2.6853542484329819e-05,127.45966711662811,40\n2,0.044755904140549703,4.4755904140549702e-05,-8.3806570658021892e-07,9\n3,0.062658265796769586,6.2658265796769586e-05,-0.0049405385166136984,48\n"}, {"input": {"header": {"software": "ctrl\u0001\u007f", "fileName": "tab\tand\u0085nel\u2028sep\u2029", "object": "a \"quoted\" name", "imageWidth": 246, "imageHeight": 161, "x": {"originBits": 4503599627370496, "scaleBits": 4728057454355442549, "unit": "pm"}, "y": {"originBits": 4607182418800017408, "scaleBits": 4554057583772693249, "unit": "m"}, "notes": [], "crop": [1782, 2265, 2645, 1158], "spectrumWidth": 3815, "spectrumHeight": 1041, "spacingXBits": 9221120237041090560, "spacingYBits": 4680184862943710031, "unitsX": "pm", "unitsY": "\u00b5m"}, "units": "pm", "widthBits": 4628155986490896115, "meanBits": [13944546050179384644, 13849674812083041159, 4545565990240066045, 4599676419421066581, 1, 4499378936940805725, 13907862917552924784, 4589412840134458613, 4669346504856791899, 0], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "line\nbreak", "object": "plain.dm4", "imageWidth": 3585, "imageHeight": 2155, "x": {"originBits": 13754003259431340918, "scaleBits": 4591870180066957722, "unit": "1/m"}, "y": {"originBits": 13712079110301865407, "scaleBits": 4650659967253323273, "unit": "\u00b0"}, "notes": ["with,comma.dm4"], "crop": null, "spectrumWidth": 3474, "spectrumHeight": 3588, "spacingXBits": 4591870180066957722, "spacingYBits": 4690085123910793849, "unitsX": "1/m", "unitsY": "1/m"}, "units": "1/px", "widthBits": 4535357757523751426, "meanBits": [4607182418800017408, 4519157920033828314, 4497432555216233861, 4728057454355442549, 4586167486656565114, 4553351190001562303, 13945329938271324271, 4599676419421066581, 4599301119452119040, 4591870180066957722, 4668362426886959031, 9223372036854775808, 4719118337607402258, 4481655518048654467, 13763648103907277962, 4524826613657805286, 13808802899750421564, 13818808507773481278, 9094988921128908188, 4661283918187772673, 13850774415352545570, 4637148665393671564, 13819728667631571655, 4481655518048654467, 4728828762483500837, 0, 4679776382321040370, 4600196089869172310, 9218868437227405312, 4503599627370496, 13884972706165787315, 4495909724017847228, 13873117760084237049, 13765397846311875174, 4563327908942930989, 9094988921128908188, 13749802436333190935, 4548778196454309872, 4692035830370628925], "count": [10, 20, 9, 49, 38, 44, 5, 27, 30, 17, 24, 47, 32, 22, 14, 33, 22, 22, 45, 4, 29, 40, 6, 9, 33, 46, 48, 43, 8, 45, 6, 42, 46, 49, 48, 15, 4, 1, 38]}, "expected": "# macTEM radial profile\n# software: with,comma.dm4\n# file: line break\n# object: plain.dm4\n# subject: the whole image, 3585 x 2155 px\n# image: 3585 x 2155 px\n# x scale: 0.1 1/m per px, origin -7.646330856513869e-06 px\n# y scale: 846.8249955446819 \u00b0 per px, origin -1.2615239230934536e-08 px\n# spectrum: 3474 x 3588 bins\n# dq x: 0.10000000000000001 1/m per bin (1.0000000000000002e-10 nm\u207b\u00b9)\n# dq y: 369124.5478972565 1/m per bin (0.00036912454789725651 nm\u207b\u00b9)\n# notes: with,comma.dm4\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.6047995956990434e-05 1/px (1.6047995956990434e-05 px\u207b\u00b9)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px\u207b\u00b9),|q| centre (1/px),mean |F|^2,count\n1,2.407199393548565e-05,2.407199393548565e-05,1.387247989404332e-06,20\n2,4.0119989892476081e-05,4.0119989892476081e-05,4.8596706985315729e-08,9\n3,5.6167985849466521e-05,5.6167985849466521e-05,123456789.12345679,49\n4,7.2215981806456948e-05,7.2215981806456948e-05,0.041679615458774813,38\n5,8.8263977763447388e-05,8.8263977763447388e-05,0.00025563136445753623,44\n6,0.00010431197372043781,0.00010431197372043781,-49837615.785294406,5\n7,0.00012035996967742826,0.00012035996967742826,0.33333333333333331,27\n8,0.00013640796563441868,0.00013640796563441868,0.3125,30\n9,0.00015245596159140911,0.00015245596159140911,0.10000000000000001,17\n10,0.00016850395754839956,0.00016850395754839956,12981.786418996619,24\n11,0.00018455195350538999,0.00018455195350538999,-0,47\n12,0.00020059994946238042,0.00020059994946238042,31117824.382571287,32\n13,0.00021664794541937084,0.00021664794541937084,4.2000000000000004e-09,22\n14,0.0002326959413763613,0.0002326959413763613,-3.4906175514153972e-05,14\n15,0.00024874393733335172,0.00024874393733335172,3.2679324796956015e-06,33\n16,0.00026479193329034215,0.00026479193329034215,-0.036568261334658264,22\n17,0.00028083992924733258,0.00028083992924733258,-0.17398445540301027,22\n18,0.000296887925204323,0.000296887925204323,1.0000000000000001e+300,45\n19,0.00031293592116131343,0.00031293592116131343,4149.0270511347344,4\n20,0.00032898391711830391,0.00032898391711830391,-23.83572740299963,29\n21,0.00034503191307529434,0.00034503191307529434,105.84597670233615,40\n22,0.00036107990903228477,0.00036107990903228477,-0.1995240219227041,6\n23,0.00037712790498927519,0.00037712790498927519,4.2000000000000004e-09,9\n24,0.00039317590094626562,0.00039317590094626562,135682623.73955646,33\n25,0.00040922389690325605,0.00040922389690325605,0,46\n26,0.00042527189286024647,0.00042527189286024647,73341.203249081766,48\n27,0.0004413198888172369,0.0004413198888172369,0.36218083816854596,43\n28,0.00045736788477422738,0.00045736788477422738,inf,8\n29,0.00047341588073121781,0.00047341588073121781,2.2250738585072014e-308,45\n30,0.00048946387668820823,0.00048946387668820823,-4437.1105195010778,6\n31,0.00050551187264519866,0.00050551187264519866,3.8519455437345198e-08,42\n32,0.00052155986860218909,0.00052155986860218909,-742.8874835659218,46\n33,0.00053760786455917951,0.00053760786455917951,-4.6762891241368396e-05,49\n34,0.00055365586051616994,0.00055365586051616994,0.0012327565279319872,48\n35,0.00056970385647316037,0.00056970385647316037,1.0000000000000001e+300,15\n36,0.0005857518524301508,0.0005857518524301508,-4.0796271241620133e-06,4\n37,0.00060179984838714122,0.00060179984838714122,0.00012593475626143614,1\n38,0.00061784784434413165,0.00061784784434413165,482670.60805304704,38\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "object": "cr\r\nlf", "imageWidth": 2013, "imageHeight": 749, "x": {"originBits": 9094988921128908188, "scaleBits": 4655845311854230596, "unit": "\u00c5"}, "y": {"originBits": 4529227895740223699, "scaleBits": 4614349479641826416, "unit": "1/m"}, "notes": ["with,comma.dm4", "Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 1669, "spectrumHeight": 894, "spacingXBits": 4495717455306835070, "spacingYBits": 4489073628402433983, "unitsX": "pm", "unitsY": "um"}, "units": "m", "widthBits": 4553294705304110459, "meanBits": [4532170061977890002, 4479705794860971654, 13698753722329691656, 4463144712686405224, 4520124077242325718, 13776134881973318433, 4502484019080619844, 4619724443601332323, 13867376328944040097, 4600293758257882684, 4549308649878917969, 13736197270593025125, 4481655518048654467, 4573243916440064942, 4578401269880888687, 13854709343025149819, 18442240474082181120, 13735769430822807520, 4736023834260361522, 13835274058376846264, 4515275852281718714, 4714457413173847234, 13943333817985749167, 4559618343028021438, 4477905836314806055, 4583865897395428159, 13778397341667375186, 4603369358972356164, 4475510020930295264, 1, 4708133560681898950, 4607182418800017408, 13733549704290027665, 4461708254686831032, 4587072614106098170, 13939877534485264448, 0, 4700125553340555573], "count": [6, 47, 46, 37, 38, 49, 24, 16, 29, 7, 36, 40, 30, 31, 2, 34, 21, 28, 33, 20, 36, 7, 35, 28, 1, 18, 13, 36, 14, 5, 17, 30, 14, 18, 40, 15, 8, 8]}, "expected": "# macTEM radial profile\n# software: cr lf\n# file: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# object: cr lf\n# subject: the whole image, 2013 x 749 px\n# image: 2013 x 749 px\n# x scale: 1848.660851437381 \u00c5 per px, origin 1e+300 px\n# y scale: 3.182814386186287 1/m per px, origin 6.449198627734616e-06 px\n# spectrum: 1669 x 894 bins\n# dq x: 3.7247127836146655e-08 pm per bin (3.7247127836146659e-11 nm)\n# dq y: 1.3221653535926766e-08 um per bin (1.3221653535926767e-05 nm)\n# notes: with,comma.dm4; Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 0.00025256932287306245 m (252569.32287306245 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1000000000\nbin,|q| centre (nm),|q| centre (m),mean |F|^2,count\n1,378853.98430959362,0.00037885398430959364,3.1562585388828017e-09,47\n2,631423.30718265614,0.00063142330718265615,-1.6152469813808949e-09,46\n3,883992.63005571859,0.00088399263005571854,2.3683636721577865e-10,37\n4,1136561.952928781,0.0011365619529287809,1.5918397363604679e-06,38\n5,1389131.2758018435,0.0013891312758018434,-0.00023393887472025149,49\n6,1641700.598674906,0.0016417005986749059,1.0444433677335734e-07,24\n7,1894269.9215479684,0.0018942699215479684,7.1395557678716584,16\n8,2146839.2444210309,0.0021468392444210309,-301.08116662025901,29\n9,2399408.5672940933,0.0023994085672940932,0.36760252286476081,7\n10,2651977.8901671553,0.0026519778901671555,0.000140312725145498,36\n11,2904547.2130402182,0.0029045472130402182,-4.9996191078264159e-07,40\n12,3157116.5359132807,0.0031571165359132805,4.2000000000000004e-09,30\n13,3409685.8587863431,0.0034096858587863432,0.0057192916083480937,31\n14,3662255.1816594056,0.0036622551816594055,0.012572665304402901,2\n15,3914824.5045324676,0.0039148245045324678,-43.63079754110273,34\n16,4167393.8274055305,0.0041673938274055305,-inf,21\n17,4419963.1502785934,0.0044199631502785932,-4.6574988564788201e-07,28\n18,4672532.4731516549,0.0046725324731516551,431789488.87233269,33\n19,4925101.7960247174,0.0049251017960247178,-2.0959246436427428,20\n20,5177671.1188977808,0.0051776711188977805,7.594312417165071e-07,36\n21,5430240.4417708423,0.0054302404417708424,15265871.904192332,7\n22,5682809.7646439048,0.0056828097646439051,-34965360.716462485,35\n23,5935379.0875169681,0.0059353790875169678,0.00070246757157368229,28\n24,6187948.4103900297,0.0061879484103900297,2.4118131324891431e-09,1\n25,6440517.7332630921,0.0064405177332630924,0.028479565882686627,18\n26,6693087.0561361555,0.0066930870561361551,-0.00034638531021336405,13\n27,6945656.379009217,0.0069456563790092169,0.57666531850572555,36\n28,7198225.7018822795,0.0071982257018822797,1.6417861315291491e-09,14\n29,7450795.0247553419,0.0074507950247553424,4.9406564584124654e-324,5\n30,7703364.3476284044,0.0077033643476284042,5937693.3678063806,17\n31,7955933.6705014668,0.007955933670501467,1,30\n32,8208502.9933745293,0.0082085029933745297,-3.4823854145043889e-07,14\n33,8461072.3162475917,0.0084610723162475924,1.9770193643499674e-10,18\n34,8713641.6391206551,0.0087136416391206551,0.047960198800598833,40\n35,8966210.9619937167,0.0089662109619937161,-21384236.965141535,15\n36,9218780.2848667782,0.0092187802848667788,0,8\n37,9471349.6077398416,0.0094713496077398415,1717065.8382817034,8\n"}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "object": "plain.dm4", "imageWidth": 3352, "imageHeight": 3962, "x": {"originBits": 13925636921351700804, "scaleBits": 4470257757098785700, "unit": "1/m"}, "y": null, "notes": ["tab\tand\u0085nel\u2028sep\u2029", "ctrl\u0001\u007f", "Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 243, "spectrumHeight": 3854, "spacingXBits": 4503599627370496, "spacingYBits": 4628200668491881415, "unitsX": "um", "unitsY": "m"}, "units": "1/\u00c5", "widthBits": 4530035865399898970, "meanBits": [4562862709098583966, 4519585143689785652, 4688652874931880319, 13844207234490270855, 4599301119452119040, 0, 13854493204704763810, 13786755744418873201, 13783771406806426940, 13792006756702446043, 18442240474082181120, 13705026669410781865, 4643683633137101203, 13907858928399961048, 4646068518899252950, 13712222319170025587, 4680731168532850761, 4728057454355442549, 9218868437227405312, 4559616102512538236, 13764442482054035661, 4494367594603046457, 13916294724510671651, 4644500719810721445, 13890974412273687073, 13947757613143775065, 13778552984372981898, 0, 4599301119452119040, 4607182418800017408, 4707555513126352129, 13841142738849786392, 13782091825827882700, 4666058788399051753, 4620969798149770087, 4739534228422962706], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "fileName": "a \"quoted\" name", "object": "with,comma.dm4", "imageWidth": 2095, "imageHeight": 3701, "x": {"originBits": 4503599627370496, "scaleBits": 4673178760135758682, "unit": "1/px"}, "y": {"originBits": 18442240474082181120, "scaleBits": 4593631609173614329, "unit": ""}, "notes": ["\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 1681, "spectrumHeight": 4013, "spacingXBits": 4670579235648774196, "spacingYBits": 4640892417750055225, "unitsX": "nm", "unitsY": "1/\u00c5"}, "units": "", "widthBits": 4609108850919380212, "meanBits": [13961195036842425813, 4602172751889742351, 13798454044042840699, 4650422624229755526, 4618552584033410034, 1, 4700370329830916298, 4581130715825208945, 4546853342020339078, 13777786495880014560, 1, 4721962237858388496, 13949058435067592571, 13831466377582207979, 13708692864253376510, 13801343973872095893, 1, 13933283597095930818, 13806133411152350455, 4599301119452119040, 4649616596075156800, 4680157106304401039, 9218868437227405312, 4607182418800017408, 13825370457530111728, 13777446986461297952, 0, 13908362384196056872, 4694638061073016952, 13834073303422688949, 9221120237041090560, 4517236398591744913, 4620245678314058526], "count": [41, 34, 43, 26, 39, 14, 43, 41, 47, 38, 2, 21, 20, 48, 14, 8, 23, 23, 38, 30, 32, 13, 27, 49, 13, 10, 22, 38, 19, 34, 20, 16, 38]}, "expected": "# macTEM radial profile\n# software: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# file: a \"quoted\" name\n# object: with,comma.dm4\n# subject: the whole image, 2095 x 3701 px\n# image: 2095 x 3701 px\n# x scale: 27101.291125017546 1/px per px, origin 2.2250738585072014e-308 px\n# y scale: none\n# spectrum: 1681 x 4013 bins\n# dq x: 17644.276132852028 nm per bin (17644.276132852028 nm)\n# dq y: 190.09579505719901 1/\u00c5 per bin (1900.9579505719901 nm\u207b\u00b9)\n# notes: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301; Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.4277538588588046 (1.4277538588588046 px\u207b\u00b9)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px\u207b\u00b9),|q| centre (),mean |F|^2,count\n1,2.1416307882882069,2.1416307882882069,0.47190762252549318,34\n2,3.5693846471470114,3.5693846471470114,-0.0073135811941137342,43\n3,4.9971385060058164,4.9971385060058164,819.84221773997774,26\n4,6.4248923648646201,6.4248923648646201,6.0987353887239681,39\n5,7.8526462237234256,7.8526462237234256,4.9406564584124654e-324,14\n6,9.2804000825822293,9.2804000825822293,1774057.3060837262,43\n7,10.708153941441035,10.708153941441035,0.018989998520849875,41\n8,12.135907800299838,12.135907800299838,9.7915892392849436e-05,47\n9,13.563661659158644,13.563661659158644,-0.0003132712937278636,38\n10,14.991415518017448,14.991415518017448,4.9406564584124654e-324,2\n11,16.419169376876251,16.419169376876251,49869924.794727445,21\n12,17.846923235735058,17.846923235735058,-88125299.342527315,20\n13,19.274677094593862,19.274677094593862,-1.2024873440952841,48\n14,20.702430953452666,20.702430953452666,-7.2318728332848667e-09,14\n15,22.130184812311469,22.130184812311469,-0.011827891506962099,8\n16,23.557938671170277,23.557938671170277,4.9406564584124654e-324,23\n17,24.98569253002908,24.98569253002908,-7593584.4949979205,23\n18,26.413446388887884,26.413446388887884,-0.024647481587476396,38\n19,27.841200247746688,27.841200247746688,0.3125,30\n20,29.268954106605495,29.268954106605495,728.20742572905874,32\n21,30.696707965464299,30.696707965464299,78881.466380352373,13\n22,32.124461824323106,32.124461824323106,inf,27\n23,33.552215683181906,33.552215683181906,1,49\n24,34.979969542040713,34.979969542040713,-0.46223029611824895,13\n25,36.407723400899513,36.407723400899513,-0.00029486645126027174,10\n26,37.835477259758321,37.835477259758321,0,22\n27,39.263231118617128,39.263231118617128,-167356.7604545888,38\n28,40.690984977475928,40.690984977475928,743992.74079252686,19\n29,42.118738836334735,42.118738836334735,-1.7813411624137363,34\n30,43.546492695193542,43.546492695193542,nan,20\n31,44.974246554052343,44.974246554052343,9.8034999682927284e-07,16\n32,46.40200041291115,46.40200041291115,7.6025051913136661,38\n"}, {"input": {"header": {"software": "", "fileName": "with,comma.dm4", "object": "cr\r\nlf", "imageWidth": 353, "imageHeight": 3945, "x": {"originBits": 13804126397231581961, "scaleBits": 4577832781803295869, "unit": "um"}, "y": {"originBits": 13865379003122358623, "scaleBits": 4583424517628439319, "unit": "1/\u00c5"}, "notes": ["plain.dm4"], "crop": null, "spectrumWidth": 1285, "spectrumHeight": 904, "spacingXBits": 4740384300712272230, "spacingYBits": 4491247079447165524, "unitsX": "1/nm", "unitsY": "\u00c5"}, "units": "px", "widthBits": 4522920353990174111, "meanBits": [13846661432391717161, 4572909772200988019, 9094988921128908188, 9094988921128908188, 4599301119452119040, 13859018734411262428, 13798017354680006042, 4683502297337320555, 13749448269936258735, 4503599627370496, 0, 4607182418800017408, 13701104101232530239, 13898507275099124146, 13947750684807697905, 13956977928859399163, 4521027249691552869], "count": [23, 14, 37, 25, 20, 28, 30, 37, 42, 48, 48, 38, 7, 47, 19, 3, 39]}, "expected": "# macTEM radial profile\n# software: \n# file: with,comma.dm4\n# object: cr lf\n# subject: the whole image, 353 x 3945 px\n# image: 353 x 3945 px\n# x scale: 0.011586495690389715 um per px, origin -0.017684253257537672 px\n# y scale: 0.0269482221954532 1/\u00c5 per px, origin -221.77316916845572 px\n# spectrum: 1285 x 904 bins\n# dq x: 846516173.58695674 1/nm per bin (846516173.58695674 nm\u207b\u00b9)\n# dq y: 1.8733492144146093e-08 \u00c5 per bin (1.8733492144146095e-09 nm)\n# notes: plain.dm4\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 2.4606001074427829e-06 px (2.4606001074427829e-06 px)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px),|q| centre (px),mean |F|^2,count\n1,3.6909001611641742e-06,3.6909001611641742e-06,0.0054294676804035212,14\n2,6.1515002686069576e-06,6.1515002686069576e-06,1.0000000000000001e+300,37\n3,8.6121003760497401e-06,8.6121003760497401e-06,1.0000000000000001e+300,25\n4,1.1072700483492523e-05,1.1072700483492523e-05,0.3125,20\n5,1.3533300590935307e-05,1.3533300590935307e-05,-84.501729981194728,28\n6,1.5993900698378088e-05,1.5993900698378088e-05,-0.0069348135494044175,30\n7,1.8454500805820872e-05,1.8454500805820872e-05,127560.40271409012,37\n8,2.0915100913263655e-05,2.0915100913263655e-05,-3.7971668913875478e-06,42\n9,2.3375701020706439e-05,2.3375701020706439e-05,2.2250738585072014e-308,48\n10,2.5836301128149222e-05,2.5836301128149222e-05,0,48\n11,2.8296901235592005e-05,2.8296901235592005e-05,1,38\n12,3.0757501343034785e-05,3.0757501343034785e-05,-2.3399427438216988e-09,7\n13,3.3218101450477569e-05,3.3218101450477569e-05,-35669.834041211187,47\n14,3.5678701557920352e-05,3.5678701557920352e-05,-68638301.918540731,19\n15,3.8139301665363135e-05,3.8139301665363135e-05,-287668899.63165253,3\n16,4.0599901772805919e-05,4.0599901772805919e-05,1.7830939417474075e-06,39\n"}, {"input": {"header": {"software": "plain.dm4", "fileName": "cr\r\nlf", "object": "", "imageWidth": 4822, "imageHeight": 4351, "x": {"originBits": 4525307433297102072, "scaleBits": 4555029323588064386, "unit": "mrad"}, "y": {"originBits": 4517298036896595838, "scaleBits": 4591870180066957722, "unit": "mrad"}, "notes": [], "crop": [2836, 707, 530, 752], "spectrumWidth": 2949, "spectrumHeight": 1319, "spacingXBits": 4686952893557067869, "spacingYBits": 0, "unitsX": "1/\u00c5", "unitsY": "m"}, "units": "\u00b0", "widthBits": 4632121860527902154, "meanBits": [4481655518048654467, 4503575037875783674, 13734161053354561617, 9094988921128908188, 9221120237041090560, 9218868437227405312, 4607182418800017408, 4539419409108096731, 4533903264316271487, 13931377871399172438, 4583343002080882213, 4599301119452119040, 4728057454355442549, 4653127935909961544, 4599301119452119040, 4685905900185760554, 4623060813523632134, 4589986591016036367, 4583188971313621204, 13863812856052324160, 9218868437227405312, 4672317332772655577, 13837858749423135680, 4641024105185351929, 13858709462533809935, 1, 13866236969794998294, 13840237155104843789, 13755150319191528345, 4674926010060277572, 13731983972304203965, 4544746127533962706], "count": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}, "expected": null}, {"input": {"header": {"software": "ctrl\u0001\u007f", "fileName": "cr\r\nlf", "object": "plain.dm4", "imageWidth": 2372, "imageHeight": 4071, "x": {"originBits": 9221120237041090560, "scaleBits": 4604576606484929812, "unit": "nm"}, "y": null, "notes": ["plain.dm4", "plain.dm4"], "crop": null, "spectrumWidth": 2774, "spectrumHeight": 2827, "spacingXBits": 4688645912272134950, "spacingYBits": 4596676286116519060, "unitsX": "\u00b5m", "unitsY": "1/m"}, "units": "1/px", "widthBits": 4597582604735283249, "meanBits": [4607182418800017408, 4530784846215453644, 13906498892950271569], "count": [29, 32, 36]}, "expected": "# macTEM radial profile\n# software: ctrl \n# file: cr lf\n# object: plain.dm4\n# subject: the whole image, 2372 x 4071 px\n# image: 2372 x 4071 px\n# x scale: 0.7106967169937968 nm per px, origin nan px\n# y scale: none\n# spectrum: 2774 x 2827 bins\n# dq x: 285351.40485148353 \u00b5m per bin (285351404.85148352 nm)\n# dq y: 0.20839623987533129 1/m per bin (2.0839623987533129e-10 nm\u207b\u00b9)\n# notes: plain.dm4; plain.dm4\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 0.23355163483029309 1/px (0.23355163483029309 px\u207b\u00b9)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 1\nbin,|q| centre (px\u207b\u00b9),|q| centre (1/px),mean |F|^2,count\n1,0.35032745224543965,0.35032745224543965,7.9065794237452393e-06,32\n2,0.58387908707573277,0.58387908707573277,-122097.01358982293,36\n"}, {"input": {"header": {"software": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "fileName": "line\nbreak", "object": "a \"quoted\" name", "imageWidth": 3602, "imageHeight": 4623, "x": {"originBits": 4616305137788576501, "scaleBits": 4621937521173996106, "unit": "um"}, "y": {"originBits": 4508178823946702071, "scaleBits": 13870105910924524483, "unit": "\u00c5"}, "notes": ["Unvalidated reader (UNVALIDATED)"], "crop": null, "spectrumWidth": 2160, "spectrumHeight": 1260, "spacingXBits": 0, "spacingYBits": 4641812798820852862, "unitsX": "1/\u00c5", "unitsY": ""}, "units": "pm", "widthBits": 4610475753228375639, "meanBits": [4497825106007102218, 13839671845968113803, 4637265746041352822, 4612067859866375428, 4643804870629320473, 4568455506294526374, 18442240474082181120, 4607182418800017408, 4481655518048654467, 0, 13751478966809435561, 13944763808186945332, 4451832605150356122, 13858947967699614618, 4717639049439463869, 13931607145610266443, 13868953955402835293, 13867259799619797679], "count": [12, 23, 35, 44, 48, 4, 4, 30, 32, 31, 19, 16, 17, 32, 34, 9, 6, 39]}, "expected": "# macTEM radial profile\n# software: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# file: line break\n# object: a \"quoted\" name\n# subject: the whole image, 3602 x 4623 px\n# image: 3602 x 4623 px\n# x scale: 10.210327018067932 um per px, origin 4.10260213462674 px\n# y scale: none\n# spectrum: 2160 x 1260 bins\n# dq x: 0 1/\u00c5 per bin (0 nm\u207b\u00b9)\n# dq y: 216.25459841665355 per bin (216.25459841665355 px\u207b\u00b9)\n# notes: Unvalidated reader (UNVALIDATED)\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# mean |F|^2: the mean over the pixels of each bin of |F|^2 of that transform (not log, not divided by anything)\n# bin width: 1.7312671420308072 pm (0.0017312671420308073 nm)\n# bins: bin k spans [k*width, (k+1)*width) in |q|; the centre is (k + 1/2)*width; bin 0 (the DC bin) is not written\n# omitted: bin 0, the DC bin (the region's sum, which the room's chart does not draw), and bins with no pixel (the profile holds mean 0 there)\n# validation: the radial profile compared with numpy 2.5.4 (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown column is the unit column times 0.001\nbin,|q| centre (nm),|q| centre (pm),mean |F|^2,count\n1,0.0025969007130462107,2.5969007130462107,-4.0978693202743086,23\n2,0.0043281678550770178,4.3281678550770177,107.50979277649625,35\n3,0.006059434997107825,6.0594349971078252,2.1695716629279804,44\n4,0.007790702139138633,7.7907021391386326,289.74536904283883,48\n5,0.0095219692811694401,9.5219692811694401,0.0027361289311562285,4\n6,0.011253236423200247,11.253236423200248,-inf,4\n7,0.012984503565231056,12.984503565231055,1,30\n8,0.014715770707261861,14.715770707261861,4.2000000000000004e-09,32\n9,0.016447037849292669,16.44703784929267,0,31\n10,0.018178304991323477,18.178304991323476,-5.4997036746171546e-06,19\n11,0.019909572133354286,19.909572133354285,-45619617.963285834,16\n12,0.021640839275385092,21.64083927538509,4.3813255702370186e-11,17\n13,0.023372106417415897,23.372106417415896,-83.496074523295107,32\n14,0.025103373559446706,25.103373559446705,25607046.521920908,34\n15,0.026834640701477511,26.834640701477511,-6032267.3811510308,9\n16,0.02856590784350832,28.56590784350832,-390.75884822344761,6\n17,0.030297174985539126,30.297174985539126,-294.45724143278034,39\n"}, {"input": {"header": {"software": "tab\tand\u0085nel\u2028sep\u2029", "fileName": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "object": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "imageWidth": 400, "imageHeight": 4256, "x": {"originBits": 4607182418800017408, "scaleBits": 4481655518048654467, "unit": "1/nm"}, "y": {"originBits": 4625975106101040559, "scaleBits": 4503599627370496, "unit": "um"}, "notes": ["a \"quoted\" name", "plain.dm4"], "crop": null, "spectrumWidth": 178, "spectrumHeight": 2446, "spacingXBits": 4469635795144927269, "spacingYBits": 4607182418800017408, "unitsX": "um", "unitsY": ""}, "units": "nm", "widthBits": 4577147229984098849, "meanBits": [13867838990681230633], "count": [0]}, "expected": null}], "spots": [{"input": {"header": {"software": "with,comma.dm4", "fileName": "tab\tand\u0085nel\u2028sep\u2029", "object": "line\nbreak", "imageWidth": 2733, "imageHeight": 2073, "x": {"originBits": 9221120237041090560, "scaleBits": 4481655518048654467, "unit": "1/px"}, "y": {"originBits": 4584690525865630134, "scaleBits": 4648716500011024466, "unit": "1/nm"}, "notes": [], "crop": null, "spectrumWidth": 3090, "spectrumHeight": 3655, "spacingXBits": 4574067656153791361, "spacingYBits": 4611330256539712656, "unitsX": "um", "unitsY": "px"}, "rows": [], "omitted": 1, "maskRadiusBits": 13722200273050357740, "maskEdgeBits": 9223372036854775808, "notes": ["tab\tand\u0085nel\u2028sep\u2029"]}, "expected": null}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "with,comma.dm4", "object": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "imageWidth": 4899, "imageHeight": 1784, "x": {"originBits": 4599301119452119040, "scaleBits": 13881802992307169388, "unit": "\u00b5m"}, "y": {"originBits": 4481655518048654467, "scaleBits": 4710769047924189639, "unit": "um"}, "notes": ["ctrl\u0001\u007f", "tab\tand\u0085nel\u2028sep\u2029"], "crop": [1658, 1248, 2290, 1235], "spectrumWidth": 192, "spectrumHeight": 1752, "spacingXBits": 4533795449156767129, "spacingYBits": 4503626239141847873, "unitsX": "m", "unitsY": "mrad"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3355, "clickedCol": 3150, "snappedRow": 1279, "snappedCol": 2046, "centroidRowBits": 4599676419421066581, "centroidColBits": 4620765510160215965, "width": 1824, "height": 2521, "qxBits": 13880205779180900225, "qyBits": 13819086791582629494, "qBits": 9221120237041090560, "dBits": 4678119497738516228, "units": "um", "reciprocalUnits": "nm", "neighbour": false}}], "omitted": 5, "maskRadiusBits": 9223372036854775808, "maskEdgeBits": 4620963792116034949, "notes": ["plain.dm4", "plain.dm4"]}, "expected": "# macTEM spots\n# software: cr lf\n# file: with,comma.dm4\n# object: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# subject: region 1235 x 2290 px at (1248, 1658) (column, row of its top-left pixel)\n# image: 4899 x 1784 px\n# x scale: none\n# y scale: 8395756.263325585 um per px, origin 4.2e-09 px\n# spectrum: 192 x 1752 bins\n# dq x: 1.3006739188531693e-05 m per bin (13006.739188531692 nm)\n# dq y: 1.1991369727327608e-07 mrad per bin (1.1991369727327608e-07 mrad)\n# notes: ctrl ; tab and nel sep \n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 1 measured spots; not listed: 5 (measuring, refused, no peak, or of another region)\n# mask: radius -0 bins, edge 8.4806367462358683 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: plain.dm4\n# note: plain.dm4\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (nm),qx (nm),qy (nm),centroid col,centroid row,click col,click row\n1,57383179.630501226,nan,0,0,57383.179630501225,nan,-2098.8078415039349,-0.18170838271042883,8.1284172378871578,0.33333333333333331,3150,3355\n"}, {"input": {"header": {"software": "ctrl\u0001\u007f", "fileName": "", "object": "cr\r\nlf", "imageWidth": 2129, "imageHeight": 4717, "x": null, "y": {"originBits": 13961342740209856668, "scaleBits": 4661483514386866152, "unit": "1/\u00c5"}, "notes": ["plain.dm4"], "crop": [2341, 2068, 2513, 576], "spectrumWidth": 1311, "spectrumHeight": 848, "spacingXBits": 4526839331052858503, "spacingYBits": 4530507526564747456, "unitsX": "1/\u00c5", "unitsY": "1/px"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 1938, "clickedCol": 2850, "snappedRow": 3338, "snappedCol": 681, "centroidRowBits": 13874931074264967669, "centroidColBits": 4676700239705817078, "width": 2017, "height": 2386, "qxBits": 13882416592596201300, "qyBits": 13834083490296113074, "qBits": 13884998099837264935, "dBits": 4599301119452119040, "units": "nm", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 2, "inMask": true, "m": {"clickedRow": 3745, "clickedCol": 358, "snappedRow": 446, "snappedCol": 1241, "centroidRowBits": 9218868437227405312, "centroidColBits": 9094988921128908188, "width": 2080, "height": 3614, "qxBits": 13715801250257687459, "qyBits": 13734190820275348424, "qBits": 9218868437227405312, "dBits": 13886048752317874450, "units": "nm", "reciprocalUnits": "1/px", "neighbour": true}}, {"number": 3, "inMask": true, "m": {"clickedRow": 3183, "clickedCol": 2801, "snappedRow": 3132, "snappedCol": 3671, "centroidRowBits": 4599301119452119040, "centroidColBits": 13764633565178106812, "width": 1080, "height": 3108, "qxBits": 9223372036854775808, "qyBits": 13772007930404036633, "qBits": 13725894430721198438, "dBits": 13894105537129224132, "units": "nm", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 4, "inMask": false, "m": {"clickedRow": 2848, "clickedCol": 996, "snappedRow": 2974, "snappedCol": 3298, "centroidRowBits": 13835200432088026677, "centroidColBits": 4606045822805935072, "width": 3649, "height": 489, "qxBits": 13753920932450835385, "qyBits": 4503599627370496, "qBits": 4531693049239052877, "dBits": 18442240474082181120, "units": "nm", "reciprocalUnits": "1/px", "neighbour": true}}], "omitted": 3, "maskRadiusBits": 13903724075835984102, "maskEdgeBits": 4694900683346552541, "notes": ["tab\tand\u0085nel\u2028sep\u2029"]}, "expected": "# macTEM spots\n# software: ctrl \n# file: \n# object: cr lf\n# subject: region 576 x 2513 px at (2068, 2341) (column, row of its top-left pixel)\n# image: 2129 x 4717 px\n# x scale: none\n# y scale: 4330.558736704268 1/\u00c5 per px, origin -558792947.3745303 px\n# spectrum: 1311 x 848 bins\n# dq x: 4.4260056408881274e-06 1/\u00c5 per bin (4.4260056408881275e-05 nm\u207b\u00b9)\n# dq y: 7.5330880964284241e-06 1/px per bin (7.5330880964284241e-06 px\u207b\u00b9)\n# notes: plain.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 4 measured spots; not listed: 3 (measuring, refused, no peak, or of another region)\n# mask: radius -81718.110168490181 bins, edge 774565.99728509376 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/px; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: tab and nel sep \n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (nm),|q| (1/px),qx (1/px),qy (1/px),centroid col,centroid row,click col,click row\n1,0.3125,-4460.2059291685355,0,0,0.3125,-4460.2059291685355,-3104.169385416355,-1.7836031026986174,47056.718340992855,-949.03743856894891,2850,1938\n2,-5415.7687936874736,inf,1,1,-5415.7687936874736,inf,-2.2644845302681353e-08,-3.8217893911156934e-07,1.0000000000000001e+300,inf,358,3745\n3,-18205.487571738442,-1.0495222283458838e-07,1,0,-18205.487571738442,-1.0495222283458838e-07,-0,-0.00012207762829130676,-4.1583920831235005e-05,0.3125,2801,3183\n4,-inf,9.4451351913142897e-06,0,1,-inf,9.4451351913142897e-06,-7.5681290289457854e-06,2.2250738585072014e-308,0.87381249576730724,-2.0632280032166599,996,2848\n"}, {"input": {"header": {"software": "a \"quoted\" name", "fileName": "tab\tand\u0085nel\u2028sep\u2029", "object": "plain.dm4", "imageWidth": 505, "imageHeight": 2321, "x": {"originBits": 4710223757119339365, "scaleBits": 4604723179956913367, "unit": "\u00c5"}, "y": null, "notes": ["with,comma.dm4", "ctrl\u0001\u007f"], "crop": [882, 2390, 1906, 996], "spectrumWidth": 2994, "spectrumHeight": 1385, "spacingXBits": 4623115460613264846, "spacingYBits": 4725622602910392746, "unitsX": "pm", "unitsY": "\u00c5"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 100, "clickedCol": 709, "snappedRow": 1959, "snappedCol": 1823, "centroidRowBits": 13820720253253918036, "centroidColBits": 4566509482596145395, "width": 1298, "height": 69, "qxBits": 13710175479013000764, "qyBits": 13783055823879670853, "qBits": 4558611296971738783, "dBits": 13940291101238600163, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}], "omitted": 0, "maskRadiusBits": 4576456806246138884, "maskEdgeBits": 4547149451403915481, "notes": [""]}, "expected": "# macTEM spots\n# software: a \"quoted\" name\n# file: tab and nel sep \n# object: plain.dm4\n# subject: region 996 x 1906 px at (2390, 882) (column, row of its top-left pixel)\n# image: 505 x 2321 px\n# x scale: 0.7269696413333361 \u00c5 per px, origin 7884340.495375489 px\n# y scale: none\n# spectrum: 2994 x 1385 bins\n# dq x: 12.302767797412255 pm per bin (0.012302767797412255 nm)\n# dq y: 87174675.257696778 \u00c5 per bin (8717467.5257696789 nm)\n# notes: with,comma.dm4; ctrl \n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 1 measured spots; not listed: 0 (measuring, refused, no peak, or of another region)\n# mask: radius 0.0091995585890192258 bins, edge 0.00010192892285493543 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/m; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: \n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (1/m),qx (1/m),qy (1/m),centroid col,centroid row,click col,click row\n1,-22924893179.109467,5.9328341937222089e-07,0,0,-22924893.179109465,0.00059328341937222087,-9.4659454397382059e-09,-0.00070956302393233221,0.0019226503412795276,-0.22704605164310954,709,100\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "", "object": "cr\r\nlf", "imageWidth": 2631, "imageHeight": 4636, "x": {"originBits": 4489819889419862893, "scaleBits": 13755327764412641484, "unit": ""}, "y": {"originBits": 13854572438712739188, "scaleBits": 4693126976273283508, "unit": "um"}, "notes": [], "crop": [273, 1875, 1532, 1754], "spectrumWidth": 1612, "spectrumHeight": 1452, "spacingXBits": 4726333881296763478, "spacingYBits": 4598459980249840132, "unitsX": "pm", "unitsY": "nm"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 952, "clickedCol": 1066, "snappedRow": 2122, "snappedCol": 3826, "centroidRowBits": 4611765791097441025, "centroidColBits": 4559766969110672631, "width": 635, "height": 2373, "qxBits": 13770529297220823514, "qyBits": 9223372036854775808, "qBits": 13717219969683058512, "dBits": 13657909512827863312, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": true, "m": {"clickedRow": 2190, "clickedCol": 3963, "snappedRow": 1944, "snappedCol": 2854, "centroidRowBits": 4599301119452119040, "centroidColBits": 18442240474082181120, "width": 1501, "height": 2678, "qxBits": 4564506296902681245, "qyBits": 4585362218515372167, "qBits": 4631446209700648531, "dBits": 4599676419421066581, "units": "m", "reciprocalUnits": "1/nm", "neighbour": true}}, {"number": 3, "inMask": true, "m": {"clickedRow": 2870, "clickedCol": 1981, "snappedRow": 274, "snappedCol": 3461, "centroidRowBits": 13862218657659934171, "centroidColBits": 13777538211266549159, "width": 1983, "height": 272, "qxBits": 13889523844937667824, "qyBits": 4711513904755552025, "qBits": 4542650527397072964, "dBits": 4599676419421066581, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 4, "inMask": true, "m": {"clickedRow": 2203, "clickedCol": 856, "snappedRow": 3391, "snappedCol": 3017, "centroidRowBits": 13835267987315763643, "centroidColBits": 4607182418800017408, "width": 257, "height": 1490, "qxBits": 4650433793568514348, "qyBits": 0, "qBits": 4491971648548161851, "dBits": 9218868437227405312, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 1219, "clickedCol": 673, "snappedRow": 3639, "snappedCol": 659, "centroidRowBits": 13933216910364481375, "centroidColBits": 4528564523121474693, "width": 1641, "height": 3719, "qxBits": 4728057454355442549, "qyBits": 4541964682682625225, "qBits": 1, "dBits": 4511130314888779265, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 6, "inMask": true, "m": {"clickedRow": 2502, "clickedCol": 3934, "snappedRow": 3277, "snappedCol": 1850, "centroidRowBits": 4728057454355442549, "centroidColBits": 9218868437227405312, "width": 3212, "height": 1866, "qxBits": 1, "qyBits": 4599676419421066581, "qBits": 9221120237041090560, "dBits": 1, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 7, "inMask": false, "m": {"clickedRow": 2846, "clickedCol": 3341, "snappedRow": 1944, "snappedCol": 2362, "centroidRowBits": 4635396990808496714, "centroidColBits": 4516986974360018023, "width": 3702, "height": 2022, "qxBits": 4599676419421066581, "qyBits": 9094988921128908188, "qBits": 4594241770902292317, "dBits": 4740328075175348070, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 8, "inMask": false, "m": {"clickedRow": 3169, "clickedCol": 3345, "snappedRow": 260, "snappedCol": 2586, "centroidRowBits": 4657896028341267974, "centroidColBits": 4613063327435372799, "width": 1868, "height": 1064, "qxBits": 13895161686202585697, "qyBits": 4530724980892118166, "qBits": 4628149716528417653, "dBits": 13727513509205829089, "units": "m", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 3, "maskRadiusBits": 13697225653406335868, "maskEdgeBits": 4504342139015155003, "notes": ["\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "line\nbreak"]}, "expected": "# macTEM spots\n# software: cr lf\n# file: \n# object: cr lf\n# subject: region 1754 x 1532 px at (1875, 273) (column, row of its top-left pixel)\n# image: 2631 x 4636 px\n# x scale: none\n# y scale: 568079.3175237686 um per px, origin -42.65803389432668 px\n# spectrum: 1612 x 1452 bins\n# dq x: 97773549.146706909 pm per bin (97773.549146706908 nm)\n# dq y: 0.26580739453575597 nm per bin (0.26580739453575597 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 8 measured spots; not listed: 3 (measuring, refused, no peak, or of another region)\n# mask: radius -1.2992497343697233e-09 bins, edge 1.3886340913659853e-07 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# note: line break\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (m),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,-0.0030288390511300015,-2.733899411595858e-17,1,0,-3.0288390511300015e-12,-2.7338994115958581e-08,-0.00010203475402629312,-0,0.00071858164374352565,2.0354261820115203,1066,952\n2,333333333.33333331,4.4404603664454634e-08,1,1,0.33333333333333331,44.404603664454633,0.0014882786851303849,0.036091945262840368,-inf,0.3125,3963,2190\n3,333333333.33333331,5.0996144664556171e-14,1,0,0.33333333333333331,5.099614466455617e-05,-8960.6942391195043,9783160.2271342743,-0.00029981175786216802,-131.95074873573216,1981,2870\n4,inf,2.1130890195342647e-17,1,0,inf,2.1130890195342646e-08,821.11202454290969,0,1,-2.0932285509236102,856,2203\n5,398.67127771641543,0,1,0,3.9867127771641542e-07,4.9406564584124654e-324,123456789.12345679,4.6348680105856551e-05,5.8873001633478419e-06,-7531477.6365717342,673,1219\n6,4.9406564584124654e-315,nan,1,0,4.9406564584124654e-324,nan,4.9406564584124654e-324,0.33333333333333331,inf,123456789.12345679,3934,2502\n7,8.3981356727561638e+17,1.408248687594619e-10,0,0,839813567.27561641,0.1408248687594619,0.33333333333333331,1.0000000000000001e+300,9.4060333885322802e-07,80.953183664104614,3341,2846\n8,-133.55180676441822,2.6490805447170222e-08,0,0,-1.3355180676441821e-07,26.490805447170221,-22047.735517757366,7.8051636212188762e-06,2.6116480690753856,2581.8795927742058,3345,3169\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "", "object": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "imageWidth": 982, "imageHeight": 714, "x": {"originBits": 4599301119452119040, "scaleBits": 4481655518048654467, "unit": "1/px"}, "y": {"originBits": 13783771907195206536, "scaleBits": 4712166014170601563, "unit": "m"}, "notes": [], "crop": null, "spectrumWidth": 2124, "spectrumHeight": 379, "spacingXBits": 4495338238719882071, "spacingYBits": 4549658398526044209, "unitsX": "um", "unitsY": "um"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 2885, "clickedCol": 2279, "snappedRow": 1402, "snappedCol": 1106, "centroidRowBits": 13820225655815466330, "centroidColBits": 9094988921128908188, "width": 453, "height": 2289, "qxBits": 13791564017189615104, "qyBits": 4583952351210061458, "qBits": 9218868437227405312, "dBits": 9223372036854775808, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": false, "m": {"clickedRow": 1796, "clickedCol": 1424, "snappedRow": 3091, "snappedCol": 3682, "centroidRowBits": 13891691680072740181, "centroidColBits": 4599676419421066581, "width": 3712, "height": 3082, "qxBits": 4551734700636365590, "qyBits": 4708919817112237238, "qBits": 4679858240407018143, "dBits": 4473875266707930419, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 436, "clickedCol": 1509, "snappedRow": 620, "snappedCol": 3146, "centroidRowBits": 9094988921128908188, "centroidColBits": 4554524348699358135, "width": 3985, "height": 990, "qxBits": 4711946736768505670, "qyBits": 4528158290663638502, "qBits": 4581069031108811066, "dBits": 4659616901966722491, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 4, "inMask": true, "m": {"clickedRow": 2846, "clickedCol": 1776, "snappedRow": 1980, "snappedCol": 3407, "centroidRowBits": 4627395794791615196, "centroidColBits": 0, "width": 612, "height": 418, "qxBits": 9223372036854775808, "qyBits": 4634296717389218570, "qBits": 13917045712455916138, "dBits": 13839782019079146011, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 1712, "clickedCol": 922, "snappedRow": 1254, "snappedCol": 2324, "centroidRowBits": 13746682140840538593, "centroidColBits": 4576030511398405147, "width": 2030, "height": 3816, "qxBits": 18442240474082181120, "qyBits": 13862296470767087562, "qBits": 1, "dBits": 4490613992994822206, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 1, "maskRadiusBits": 4532328373162817372, "maskEdgeBits": 13810379213599932278, "notes": ["plain.dm4"]}, "expected": "# macTEM spots\n# software: cr lf\n# file: \n# object: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# subject: the whole image, 982 x 714 px\n# image: 982 x 714 px\n# x scale: 4.2e-09 1/px per px, origin 0.3125 px\n# y scale: 10997808.665844133 m per px, origin -0.0007872009325707733 px\n# spectrum: 2124 x 379 bins\n# dq x: 3.4737682966658253e-08 um per bin (3.4737682966658254e-05 nm)\n# dq y: 0.00014979268122145139 um per bin (0.1497926812214514 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 5 measured spots; not listed: 1 (measuring, refused, no peak, or of another region)\n# mask: radius 1.0521415782529103e-05 bins, edge -0.047506135895672694 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: plain.dm4\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (1/nm),|q| (nm),in mask,neighbour,d (1/nm),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,-0,inf,1,0,-0,inf,-0.0026218427639566055,0.028779512806350889,1.0000000000000001e+300,-0.21331821504086684,2279,2885\n2,1.3037268817717989e-09,74532.395176986684,0,0,1.3037268817717989e-09,74532.395176986684,0.00020607096269011836,6669951.7308170106,0.33333333333333331,-12903.963378450522,1424,1796\n3,3364.4423151600326,0.01877598666956113,0,0,3364.4423151600326,0.01877598666956113,10589372.676494252,5.5432078873164948e-06,0.00031922842489856155,1.0000000000000001e+300,1509,436\n4,-4.1957226999243415,-631723.49571878952,1,0,-4.1957226999243415,-631723.49571878952,-0,65.31735795574437,0,23.812337380087101,1776,2846\n5,1.6638784786352617e-08,4.9406564584124654e-324,1,0,1.6638784786352617e-08,4.9406564584124654e-324,-inf,-134.16233025712273,0.0084600549089675538,-2.6256656511706955e-06,922,1712\n"}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "line\nbreak", "object": "line\nbreak", "imageWidth": 4788, "imageHeight": 1300, "x": {"originBits": 13965709528140243611, "scaleBits": 4549795771171509008, "unit": "m"}, "y": null, "notes": ["line\nbreak", "with,comma.dm4"], "crop": null, "spectrumWidth": 1050, "spectrumHeight": 2398, "spacingXBits": 4728057454355442549, "spacingYBits": 4665724338210134999, "unitsX": "1/nm", "unitsY": "1/nm"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3938, "clickedCol": 1197, "snappedRow": 2738, "snappedCol": 1604, "centroidRowBits": 4591870180066957722, "centroidColBits": 13892242599244210972, "width": 3962, "height": 395, "qxBits": 13933929074098802276, "qyBits": 4503599627370496, "qBits": 13925031811229397620, "dBits": 4497878489927924685, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": true}}, {"number": 2, "inMask": true, "m": {"clickedRow": 3389, "clickedCol": 1374, "snappedRow": 2464, "snappedCol": 2867, "centroidRowBits": 4503599627370496, "centroidColBits": 4590456408947208190, "width": 1424, "height": 1178, "qxBits": 4534572428378863769, "qyBits": 1, "qBits": 4573579908586386497, "dBits": 1, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 3, "inMask": true, "m": {"clickedRow": 1209, "clickedCol": 458, "snappedRow": 1778, "snappedCol": 2643, "centroidRowBits": 4464141504907380747, "centroidColBits": 13899445472676875071, "width": 192, "height": 1194, "qxBits": 13937219670755723217, "qyBits": 18442240474082181120, "qBits": 4481655518048654467, "dBits": 4477102792508878544, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": true}}, {"number": 4, "inMask": false, "m": {"clickedRow": 1979, "clickedCol": 3795, "snappedRow": 2101, "snappedCol": 2108, "centroidRowBits": 4728057454355442549, "centroidColBits": 9223372036854775808, "width": 2448, "height": 211, "qxBits": 13902534710745152032, "qyBits": 13776031398803897046, "qBits": 13752672465516491036, "dBits": 13688454721899253593, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 2553, "clickedCol": 2940, "snappedRow": 401, "snappedCol": 1054, "centroidRowBits": 13942628928570626058, "centroidColBits": 13740623540950277517, "width": 2967, "height": 3570, "qxBits": 4554489323384314049, "qyBits": 13784530332529566817, "qBits": 13965650547416762851, "dBits": 13893750641294213434, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 6, "inMask": false, "m": {"clickedRow": 1828, "clickedCol": 103, "snappedRow": 1730, "snappedCol": 1331, "centroidRowBits": 4727831281832685912, "centroidColBits": 4716435525741378255, "width": 437, "height": 1554, "qxBits": 4698089494559768747, "qyBits": 13848978516028062480, "qBits": 4728057454355442549, "dBits": 13886046578321752849, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 7, "inMask": false, "m": {"clickedRow": 1593, "clickedCol": 3775, "snappedRow": 2253, "snappedCol": 3978, "centroidRowBits": 9094988921128908188, "centroidColBits": 13849547489419962899, "width": 1998, "height": 1828, "qxBits": 4593849056264399566, "qyBits": 4591509053454193674, "qBits": 9218868437227405312, "dBits": 4724400875991056989, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}, {"number": 8, "inMask": true, "m": {"clickedRow": 1074, "clickedCol": 2479, "snappedRow": 3531, "snappedCol": 3343, "centroidRowBits": 4677843035972744750, "centroidColBits": 4607182418800017408, "width": 1982, "height": 3653, "qxBits": 4598616717147020151, "qyBits": 13824725890116113867, "qBits": 4663717035309251244, "dBits": 4735062937036274947, "units": "um", "reciprocalUnits": "1/\u00c5", "neighbour": false}}], "omitted": 4, "maskRadiusBits": 4582956677560081578, "maskEdgeBits": 9221120237041090560, "notes": ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]}, "expected": "# macTEM spots\n# software: with,comma.dm4\n# file: line break\n# object: line break\n# subject: the whole image, 4788 x 1300 px\n# image: 4788 x 1300 px\n# x scale: 0.0001535161742377768 m per px, origin -1084967444.3497684 px\n# y scale: none\n# spectrum: 1050 x 2398 bins\n# dq x: 123456789.12345679 1/nm per bin (123456789.12345679 nm\u207b\u00b9)\n# dq y: 8187.5655351196974 1/nm per bin (8187.5655351196974 nm\u207b\u00b9)\n# notes: line break; with,comma.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 8 measured spots; not listed: 4 (measuring, refused, no peak, or of another region)\n# mask: radius 0.025325075896287665 bins, edge nan bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/\u00c5; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (1/\u00c5),qx (1/\u00c5),qy (1/\u00c5),centroid col,centroid row,click col,click row\n1,5.1547655369116316e-05,-2074.2795091506514,0,1,5.1547655369116317e-08,-2074279.5091506513,-8194731.7991672494,2.2250738585072014e-308,-13906.079513566154,0.10000000000000001,1197,3938\n2,4.9406564584124654e-321,6.0107183403320114e-06,1,0,4.9406564584124654e-324,0.0060107183403320117,1.4322993189427434e-05,4.9406564584124654e-324,0.080379984391299758,2.2250738585072014e-308,1374,3389\n3,2.0796819988421264e-06,4.2000000000000007e-12,1,1,2.0796819988421264e-09,4.2000000000000004e-09,-14130069.499423893,-inf,-42496.119850656476,2.8836931721169278e-10,458,1209\n4,-3.3702718985710969e-07,-6.5106364019985505e-09,0,0,-3.3702718985710969e-10,-6.5106364019985504e-06,-64973.285095561529,-0.00023113395779269266,-0,123456789.12345679,3795,1979\n5,-16914384.045244407,-1072323.5840315516,1,0,-16914.384045244406,-1072323584.0315517,0.00031732969876542219,-0.00086942957208891944,-9.8354871167099279e-07,-31633978.658584632,2940,2553\n6,-5413791.555733203,123456.78912345679,0,0,-5413.7915557332026,123456789.12345679,1243008.9618339937,-17.455411307159977,21123571.365473565,120086555.90424097,103,1828\n7,68969525497.811752,inf,0,0,68969525.49781175,inf,0.12992484793206532,0.094988361496305768,-19.476810859438114,1.0000000000000001e+300,3775,1593\n8,374515551164.99347,6.3619341819124928,1,0,374515551.16499346,6361.9341819124929,0.27450804013863411,-0.42644961692107292,1,55371.655540805645,2479,1074\n"}, {"input": {"header": {"software": "line\nbreak", "fileName": "a \"quoted\" name", "object": "a \"quoted\" name", "imageWidth": 1869, "imageHeight": 2262, "x": {"originBits": 13949159641422079606, "scaleBits": 4629679067439231320, "unit": "\u00c5"}, "y": {"originBits": 4599301119452119040, "scaleBits": 4479499299203800539, "unit": "nm"}, "notes": ["ctrl\u0001\u007f", "Unvalidated reader (UNVALIDATED)"], "crop": [725, 531, 1106, 2584], "spectrumWidth": 1180, "spectrumHeight": 3328, "spacingXBits": 4709473830538865588, "spacingYBits": 4654728351684540905, "unitsX": "1/\u00c5", "unitsY": "1/nm"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 932, "clickedCol": 1178, "snappedRow": 2593, "snappedCol": 2898, "centroidRowBits": 4591075994901562800, "centroidColBits": 13732278044889590532, "width": 863, "height": 2255, "qxBits": 13823935385403071093, "qyBits": 13811397511683867344, "qBits": 4568223165922004421, "dBits": 4607182418800017408, "units": "m", "reciprocalUnits": "nm", "neighbour": true}}, {"number": 2, "inMask": false, "m": {"clickedRow": 358, "clickedCol": 964, "snappedRow": 1943, "snappedCol": 2644, "centroidRowBits": 18442240474082181120, "centroidColBits": 18442240474082181120, "width": 195, "height": 1285, "qxBits": 13831031010772293304, "qyBits": 13752267808561039811, "qBits": 4724618062259749676, "dBits": 13769845665554246352, "units": "m", "reciprocalUnits": "nm", "neighbour": false}}, {"number": 3, "inMask": true, "m": {"clickedRow": 161, "clickedCol": 309, "snappedRow": 3003, "snappedCol": 1121, "centroidRowBits": 4620109851584150930, "centroidColBits": 13887483469070876246, "width": 2911, "height": 2812, "qxBits": 4644000120549606821, "qyBits": 13710277020769954697, "qBits": 9223372036854775808, "dBits": 4517512952624306371, "units": "m", "reciprocalUnits": "nm", "neighbour": true}}, {"number": 4, "inMask": false, "m": {"clickedRow": 433, "clickedCol": 652, "snappedRow": 20, "snappedCol": 1651, "centroidRowBits": 9221120237041090560, "centroidColBits": 4591870180066957722, "width": 148, "height": 782, "qxBits": 13802048544153230829, "qyBits": 4729751780776080081, "qBits": 4591870180066957722, "dBits": 13862694941324668677, "units": "m", "reciprocalUnits": "nm", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 2141, "clickedCol": 2164, "snappedRow": 3917, "snappedCol": 2102, "centroidRowBits": 4599676419421066581, "centroidColBits": 4728057454355442549, "width": 1646, "height": 2999, "qxBits": 13780318727841413688, "qyBits": 13717655202578040895, "qBits": 13799674985437216668, "dBits": 13812256607314744351, "units": "m", "reciprocalUnits": "nm", "neighbour": false}}], "omitted": 2, "maskRadiusBits": 13883398543381458812, "maskEdgeBits": 4555355064342258622, "notes": [""]}, "expected": "# macTEM spots\n# software: line break\n# file: a \"quoted\" name\n# object: a \"quoted\" name\n# subject: region 2584 x 1106 px at (531, 725) (column, row of its top-left pixel)\n# image: 1869 x 2262 px\n# x scale: 31.92415134770394 \u00c5 per px, origin -89633391.54458031 px\n# y scale: 3.0708539367886303e-09 nm per px, origin 0.3125 px\n# spectrum: 1180 x 3328 bins\n# dq x: 7185916.9416760691 1/\u00c5 per bin (71859169.416760683 nm\u207b\u00b9)\n# dq y: 1594.6935123313399 1/nm per bin (1594.6935123313399 nm\u207b\u00b9)\n# notes: ctrl ; Unvalidated reader (UNVALIDATED)\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 5 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius -3550.7089037130918 bins, edge 0.00036426161013608158 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: \n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (m),|q| (nm),qx (nm),qy (nm),centroid col,centroid row,click col,click row\n1,1000000000,2.6353673564984714e-12,0,1,1,0.0026353673564984714,-0.38256779024633342,-0.054571998262650134,-2.8091745333444506e-07,0.088978466794535249,1178,932\n2,-92769.817300257564,0.072205853096691794,0,0,-9.2769817300257561e-05,72205853.096691787,-1.1058164927903089,-6.1678786283957472e-06,-inf,-inf,964,358\n3,1038.9125911481713,-0,1,1,1.0389125911481712e-06,-0,300.84404204421509,-9.6339321851719359e-09,-6720.636079087466,7.4818668209913017,309,161\n4,-145487544661.26425,1e-10,0,0,-145.48754466126425,0.10000000000000001,-0.013050126114122452,163190712.46474317,0.10000000000000001,nan,652,433\n5,-60533171.698615931,-8.9326580878433189e-12,1,0,-0.060533171698615933,-0.008932658087843319,-0.00045054386341717182,-2.8779058966657602e-08,123456789.12345679,0.33333333333333331,2164,2141\n"}, {"input": {"header": {"software": "", "fileName": "with,comma.dm4", "object": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "imageWidth": 1143, "imageHeight": 3145, "x": {"originBits": 13773566682460945884, "scaleBits": 4610672253943900466, "unit": "1/px"}, "y": {"originBits": 4495691472350412669, "scaleBits": 4514894866991212481, "unit": "px"}, "notes": ["with,comma.dm4", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"], "crop": null, "spectrumWidth": 2991, "spectrumHeight": 3749, "spacingXBits": 4475942545893932164, "spacingYBits": 4503599627370496, "unitsX": "\u00b5m", "unitsY": "pm"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 1755, "clickedCol": 3836, "snappedRow": 3426, "snappedCol": 3109, "centroidRowBits": 18442240474082181120, "centroidColBits": 4695832153301936916, "width": 875, "height": 2901, "qxBits": 4581333872155050356, "qyBits": 4599301119452119040, "qBits": 13942421666561133856, "dBits": 13908957295467845560, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": false, "m": {"clickedRow": 1651, "clickedCol": 1205, "snappedRow": 3590, "snappedCol": 24, "centroidRowBits": 4518045658506930328, "centroidColBits": 9218868437227405312, "width": 3387, "height": 4014, "qxBits": 4537150099965529072, "qyBits": 4543378566791724991, "qBits": 13844882761709119071, "dBits": 13788540476280832745, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 1592, "clickedCol": 2198, "snappedRow": 620, "snappedCol": 3341, "centroidRowBits": 4543440068690820561, "centroidColBits": 13867657245727486626, "width": 290, "height": 738, "qxBits": 4473388540383347549, "qyBits": 4687276987853391286, "qBits": 13868339015241342988, "dBits": 13886926709565619619, "units": "1/nm", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 4, "maskRadiusBits": 4499167222337134777, "maskEdgeBits": 13894749322703493142, "notes": ["ctrl\u0001\u007f", "ctrl\u0001\u007f"]}, "expected": "# macTEM spots\n# software: \n# file: with,comma.dm4\n# object: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# subject: the whole image, 1143 x 3145 px\n# image: 1143 x 3145 px\n# x scale: 1.7748990657770034 1/px per px, origin -0.00016432768745298823 px\n# y scale: 7.190928550317533e-07 px per px, origin 3.707518705367129e-08 px\n# spectrum: 2991 x 3749 bins\n# dq x: 1.7312301976205609e-09 \u00b5m per bin (1.7312301976205609e-06 nm)\n# dq y: 2.2250738585072014e-308 pm per bin (2.2250738585069563e-311 nm)\n# notes: with,comma.dm4; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 3 measured spots; not listed: 4 (measuring, refused, no peak, or of another region)\n# mask: radius 6.0546897381519498e-08 bins, edge -20547.565847240468 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: ctrl \n# note: ctrl \n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (1/nm),|q| (nm),in mask,neighbour,d (1/nm),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,-184670.9572455266,-30861867.505383611,0,0,-184670.9572455266,-30861867.505383611,0.019694838630188241,0.3125,883003.37191328639,-inf,3836,1755\n2,-0.0016318579575981768,-9.4521844566217492,0,0,-0.0016318579575981768,-9.4521844566217492,2.2120688360781988e-05,5.5929531497910915e-05,inf,1.1517174495928396e-06,1205,1651\n3,-6214.2662588948469,-355.8035470494076,0,0,-6214.2662588948469,-355.8035470494076,1.2030742369432634e-09,233906.75823454343,-317.04943700674096,5.6346284576732173e-05,2198,1592\n"}, {"input": {"header": {"software": "a \"quoted\" name", "fileName": "with,comma.dm4", "object": "cr\r\nlf", "imageWidth": 4191, "imageHeight": 1146, "x": {"originBits": 4580414725442608701, "scaleBits": 4538028118358944427, "unit": "m"}, "y": {"originBits": 13729508268412933976, "scaleBits": 4506855585451117767, "unit": "\u00b0"}, "notes": ["a \"quoted\" name", "plain.dm4"], "crop": [2528, 2330, 1291, 2068], "spectrumWidth": 760, "spectrumHeight": 2804, "spacingXBits": 4477011983478888971, "spacingYBits": 4670852035930539863, "unitsX": "mrad", "unitsY": "1/\u00c5"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3140, "clickedCol": 3737, "snappedRow": 2967, "snappedCol": 3493, "centroidRowBits": 4578165353224530441, "centroidColBits": 4512525181824613927, "width": 1780, "height": 266, "qxBits": 4473977258595358818, "qyBits": 13956557020640059004, "qBits": 4728057454355442549, "dBits": 13753988046047679591, "units": "nm", "reciprocalUnits": "nm", "neighbour": true}}, {"number": 2, "inMask": true, "m": {"clickedRow": 1290, "clickedCol": 500, "snappedRow": 427, "snappedCol": 2931, "centroidRowBits": 4620776108838189129, "centroidColBits": 9094988921128908188, "width": 3029, "height": 2250, "qxBits": 13874576165241513236, "qyBits": 4486455655516537159, "qBits": 4716315903919960850, "dBits": 13757051892850677680, "units": "nm", "reciprocalUnits": "nm", "neighbour": false}}, {"number": 3, "inMask": true, "m": {"clickedRow": 1652, "clickedCol": 118, "snappedRow": 2252, "snappedCol": 1743, "centroidRowBits": 13817086440467701659, "centroidColBits": 4598314571670610995, "width": 2398, "height": 1816, "qxBits": 4710351063477511952, "qyBits": 4690287085247801449, "qBits": 4727603540013193743, "dBits": 4516233223287804657, "units": "nm", "reciprocalUnits": "nm", "neighbour": true}}], "omitted": 1, "maskRadiusBits": 4607182418800017408, "maskEdgeBits": 4634247663284550600, "notes": []}, "expected": "# macTEM spots\n# software: a \"quoted\" name\n# file: with,comma.dm4\n# object: cr lf\n# subject: region 2068 x 1291 px at (2330, 2528) (column, row of its top-left pixel)\n# image: 4191 x 1146 px\n# x scale: 2.5095530390854364e-05 m per px, origin 0.016505907870309356 px\n# y scale: 2.0539378233720344e-07 \u00b0 per px, origin -1.863526433349402e-07 px\n# spectrum: 760 x 2804 bins\n# dq x: 2.0421242643160658e-09 mrad per bin (2.0421242643160658e-09 mrad)\n# dq y: 18636.717776484173 1/\u00c5 per bin (186367.17776484173 nm\u207b\u00b9)\n# notes: a \"quoted\" name; plain.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 3 measured spots; not listed: 1 (measuring, refused, no peak, or of another region)\n# mask: radius 1 bins, edge 64.620257201123536 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (nm),|q| (nm),qx (nm),qy (nm),centroid col,centroid row,click col,click row\n1,-7.6249764566815701e-06,123456789.12345679,0,1,-7.6249764566815701e-06,123456789.12345679,1.3248183097514145e-09,-265508135.36742008,4.7251491844689097e-07,0.012163415142244298,3737,3140\n2,-1.2810916757071414e-05,20677945.354662962,1,0,-1.2810916757071414e-05,20677945.354662962,-908.68895401354757,8.8905807051200614e-09,1.0000000000000001e+300,8.1472442719933884,500,1290\n3,8.6079683982910597e-07,116692938.341408,1,1,8.6079683982910597e-07,116692938.341408,8002903.7806337029,380880.2449194254,0.25773559690384501,-0.1261874860822417,118,1652\n"}, {"input": {"header": {"software": "cr\r\nlf", "fileName": "", "object": "plain.dm4", "imageWidth": 3959, "imageHeight": 4073, "x": {"originBits": 4666098656220252775, "scaleBits": 4671944416015918289, "unit": "m"}, "y": null, "notes": ["cr\r\nlf", "with,comma.dm4"], "crop": [141, 2845, 2837, 2018], "spectrumWidth": 498, "spectrumHeight": 1277, "spacingXBits": 4724309027355800469, "spacingYBits": 4625404603485167359, "unitsX": "nm", "unitsY": "\u00b5m"}, "rows": [{"number": 1, "inMask": false, "m": {"clickedRow": 3085, "clickedCol": 1268, "snappedRow": 1633, "snappedCol": 1871, "centroidRowBits": 4581205933219291387, "centroidColBits": 4673281411085341403, "width": 2920, "height": 981, "qxBits": 1, "qyBits": 4728057454355442549, "qBits": 13825014305741252548, "dBits": 4607182418800017408, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 2, "inMask": true, "m": {"clickedRow": 2381, "clickedCol": 94, "snappedRow": 3488, "snappedCol": 2122, "centroidRowBits": 13758626735584388850, "centroidColBits": 4611259580349116138, "width": 2472, "height": 1640, "qxBits": 9221120237041090560, "qyBits": 4706241392951909703, "qBits": 4534202097511160554, "dBits": 4598221841212963573, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 135, "clickedCol": 3012, "snappedRow": 1795, "snappedCol": 3245, "centroidRowBits": 13707670449819996650, "centroidColBits": 13923465599935376555, "width": 913, "height": 3565, "qxBits": 0, "qyBits": 4534154515457737291, "qBits": 13916734969567647160, "dBits": 4628527905006726648, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 4, "inMask": false, "m": {"clickedRow": 423, "clickedCol": 98, "snappedRow": 743, "snappedCol": 1936, "centroidRowBits": 4681165294777802048, "centroidColBits": 4693434450436238527, "width": 2053, "height": 251, "qxBits": 4723572052487537538, "qyBits": 13897124515409936841, "qBits": 4639331010874340813, "dBits": 13871313618236507573, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": true}}, {"number": 5, "inMask": true, "m": {"clickedRow": 369, "clickedCol": 396, "snappedRow": 2911, "snappedCol": 1648, "centroidRowBits": 4591870180066957722, "centroidColBits": 9218868437227405312, "width": 330, "height": 342, "qxBits": 4468741400340027087, "qyBits": 4653503605746680673, "qBits": 13799728633372537086, "dBits": 13965858843496254627, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}, {"number": 6, "inMask": false, "m": {"clickedRow": 3973, "clickedCol": 2827, "snappedRow": 2898, "snappedCol": 1071, "centroidRowBits": 4503599627370496, "centroidColBits": 13891155166064943411, "width": 1128, "height": 3997, "qxBits": 4730212914263205072, "qyBits": 4571234783230782250, "qBits": 13723233495952021185, "dBits": 4529516257999262682, "units": "\u00c5", "reciprocalUnits": "1/nm", "neighbour": false}}], "omitted": 5, "maskRadiusBits": 4481655518048654467, "maskEdgeBits": 4485700045633814016, "notes": []}, "expected": "# macTEM spots\n# software: cr lf\n# file: \n# object: plain.dm4\n# subject: region 2018 x 2837 px at (2845, 141) (column, row of its top-left pixel)\n# image: 3959 x 4073 px\n# x scale: 22610.773376379922 m per px, origin 8864.0115642 px\n# y scale: none\n# spectrum: 498 x 1277 bins\n# dq x: 67600874.178419426 nm per bin (67600874.178419426 nm)\n# dq y: 16.73820478856123 \u00b5m per bin (16738.20478856123 nm)\n# notes: cr lf; with,comma.dm4\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 6 measured spots; not listed: 5 (measuring, refused, no peak, or of another region)\n# mask: radius 4.2000000000000004e-09 bins, edge 7.6405290138359597e-09 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/nm; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (\u00c5),|q| (1/nm),qx (1/nm),qy (1/nm),centroid col,centroid row,click col,click row\n1,0.10000000000000001,-4.4245990030560396,0,0,1,-0.442459900305604,4.9406564584124654e-324,123456789.12345679,27474.733104127325,0.019250961279483097,1268,3085\n2,0.025258802244563523,0.0001369562829676764,1,0,0.25258802244563522,1.369562829676764e-05,nan,4184889.4229542348,1.9053117253851561,-1.5698819180432395e-05,94,2381\n3,2.7834400827223336,-5955482.623755252,0,0,27.834400827223334,-595548.2623755252,0,1.3615021162872604e-05,-1709617.5254657667,-6.3861514359986574e-09,3012,135\n4,-53.778030209632441,1457.1794253300905,0,1,-537.78030209632436,145.71794253300905,61863978.435309425,-29188.466576041454,603874.02115764457,93552.539579500444,98,423\n5,-112056699.93679589,-0.090257224206813327,1,0,-1120566999.3679588,-0.0090257224206813334,5.8669538732268053e-10,1316.2185269558906,inf,0.10000000000000001,396,369\n6,6.6934509618853142e-07,-6.9735044397281342e-07,0,0,6.6934509618853136e-06,-6.9735044397281345e-08,176933561.31180429,0.0039766463360944391,-11928.050083414279,2.2250738585072014e-308,2827,3973\n"}, {"input": {"header": {"software": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "fileName": "\u00c5ngstr\u00f6m \u00b5m \u00e9\u0301", "object": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "imageWidth": 429, "imageHeight": 632, "x": null, "y": {"originBits": 4593378884416085353, "scaleBits": 4538679511826607614, "unit": "m"}, "notes": [], "crop": null, "spectrumWidth": 1548, "spectrumHeight": 644, "spacingXBits": 4599676419421066581, "spacingYBits": 4497437041693265262, "unitsX": "\u00c5", "unitsY": "nm"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 3027, "clickedCol": 3736, "snappedRow": 1986, "snappedCol": 2831, "centroidRowBits": 4718056455808416433, "centroidColBits": 4606791101958773617, "width": 3494, "height": 1523, "qxBits": 4683467987153689639, "qyBits": 13871116683603824046, "qBits": 4626853821218373435, "dBits": 13863332444656767046, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 2, "inMask": true, "m": {"clickedRow": 3434, "clickedCol": 3296, "snappedRow": 58, "snappedCol": 3363, "centroidRowBits": 4655902514546210559, "centroidColBits": 4671727129813493954, "width": 865, "height": 3865, "qxBits": 9094988921128908188, "qyBits": 13868231904263064549, "qBits": 0, "dBits": 4573434253702890400, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 3, "inMask": false, "m": {"clickedRow": 3082, "clickedCol": 1802, "snappedRow": 3469, "snappedCol": 3549, "centroidRowBits": 9223372036854775808, "centroidColBits": 4715651421810974015, "width": 2289, "height": 2266, "qxBits": 0, "qyBits": 4601433402121309470, "qBits": 13812654337578335075, "dBits": 13958590552094077479, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}, {"number": 4, "inMask": false, "m": {"clickedRow": 2758, "clickedCol": 774, "snappedRow": 2734, "snappedCol": 1122, "centroidRowBits": 13875611387242532304, "centroidColBits": 4704529190914413222, "width": 1106, "height": 1027, "qxBits": 0, "qyBits": 13759959941456307224, "qBits": 4599301119452119040, "dBits": 13958624241230638565, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 5, "inMask": false, "m": {"clickedRow": 1590, "clickedCol": 1697, "snappedRow": 2848, "snappedCol": 3173, "centroidRowBits": 4512548203363004729, "centroidColBits": 13831372622528911016, "width": 1236, "height": 967, "qxBits": 13860614853091599113, "qyBits": 13691185406516763147, "qBits": 4481655518048654467, "dBits": 4599520480027318143, "units": "um", "reciprocalUnits": "1/m", "neighbour": true}}, {"number": 6, "inMask": true, "m": {"clickedRow": 855, "clickedCol": 3123, "snappedRow": 769, "snappedCol": 1867, "centroidRowBits": 4600148865534897111, "centroidColBits": 4594200056905697922, "width": 3039, "height": 3174, "qxBits": 13921640563211446248, "qyBits": 13825180241614493186, "qBits": 13787968807409645943, "dBits": 13792739058901680808, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}, {"number": 7, "inMask": true, "m": {"clickedRow": 1166, "clickedCol": 2104, "snappedRow": 1174, "snappedCol": 2841, "centroidRowBits": 4728057454355442549, "centroidColBits": 9221120237041090560, "width": 1723, "height": 3426, "qxBits": 4643884618915796937, "qyBits": 4653587599728083343, "qBits": 4686033876444263502, "dBits": 4728057454355442549, "units": "um", "reciprocalUnits": "1/m", "neighbour": false}}], "omitted": 2, "maskRadiusBits": 9223372036854775808, "maskEdgeBits": 4607182418800017408, "notes": []}, "expected": "# macTEM spots\n# software: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# file: \u00c5ngstr\u00f6m \u00b5m \u00e9\u0301\n# object: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n# subject: the whole image, 429 x 632 px\n# image: 429 x 632 px\n# x scale: none\n# y scale: 2.7302537305802156e-05 m per px, origin 0.12093747882192009 px\n# spectrum: 1548 x 644 bins\n# dq x: 0.33333333333333331 \u00c5 per bin (0.033333333333333333 nm)\n# dq y: 4.8626395999868043e-08 nm per bin (4.8626395999868043e-08 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 7 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius -0 bins, edge 1 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/m; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (um),|q| (1/m),qx (1/m),qy (1/m),centroid col,centroid row,click col,click row\n1,-163606.47912707843,0.021886860452882712,1,1,-163.60647912707844,21.886860452882711,127061.12383042333,-515.39142646866617,0.95655510329275562,27162006.418696109,3736,3027\n2,5.8843828674363383,0,1,1,0.0058843828674363385,0,1.0000000000000001e+300,-349.71499284653538,21820.290776886752,1861.6672377581124,3296,3434\n3,-383788734691.19495,-6.4085959600090043e-05,0,0,-383788734.69119495,-0.064085959600090045,0,0.43086546571722006,18202556.600552794,-0,1802,3082\n4,-385796763708.70813,0.00031250000000000001,0,1,-385796763.70870811,0.3125,0,-2.0215896376383433e-05,3387583.2180426894,-1028.760139298498,774,2758\n5,324.67695806405311,4.2000000000000007e-12,0,1,0.32467695806405311,4.2000000000000004e-09,-107.18394065567931,-4.9073926423156548e-10,-1.1816695403262347,4.7373366854148403e-07,1697,1590\n6,-3.1314358747496946,-1.5078970311815633e-06,1,0,-0.0031314358747496947,-0.0015078970311815634,-1284693.0503411237,-0.45167119165975589,0.13966707277275608,0.35955936100679992,3123,855\n7,123456789123.45679,197.72745454445709,1,0,123456789.12345679,197727.45454445708,294.27853429445219,1335.3165472225262,nan,123456789.12345679,2104,1166\n"}, {"input": {"header": {"software": "with,comma.dm4", "fileName": "with,comma.dm4", "object": "line\nbreak", "imageWidth": 1927, "imageHeight": 2109, "x": {"originBits": 13880642034312501143, "scaleBits": 4694199907912685060, "unit": ""}, "y": {"originBits": 0, "scaleBits": 4599676419421066581, "unit": "1/px"}, "notes": [], "crop": [2744, 962, 2403, 625], "spectrumWidth": 3350, "spectrumHeight": 1361, "spacingXBits": 9218868437227405312, "spacingYBits": 4734509319641128140, "unitsX": "m", "unitsY": "nm"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 309, "clickedCol": 2171, "snappedRow": 2130, "snappedCol": 1790, "centroidRowBits": 4685187393703277126, "centroidColBits": 13794438715013712830, "width": 2319, "height": 1781, "qxBits": 9223372036854775808, "qyBits": 4572265908540149364, "qBits": 4732994161393937478, "dBits": 4531055804026169470, "units": "nm", "reciprocalUnits": "1/\u00c5", "neighbour": true}}], "omitted": 2, "maskRadiusBits": 4655359683682347642, "maskEdgeBits": 13700638183685425811, "notes": []}, "expected": "# macTEM spots\n# software: with,comma.dm4\n# file: with,comma.dm4\n# object: line break\n# subject: region 625 x 2403 px at (962, 2744) (column, row of its top-left pixel)\n# image: 1927 x 2109 px\n# x scale: none\n# y scale: 0.3333333333333333 1/px per px, origin 0.0 px\n# spectrum: 3350 x 1361 bins\n# dq x: inf m per bin (inf nm)\n# dq y: 341517382.98579097 nm per bin (341517382.98579097 nm)\n# notes: none\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 1 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius 1738.2417890975762 bins, edge -2.1472437628151764e-09 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/\u00c5; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (nm),|q| (nm\u207b\u00b9),in mask,neighbour,d (nm),|q| (1/\u00c5),qx (1/\u00c5),qy (1/\u00c5),centroid col,centroid row,click col,click row\n1,8.3655998097296372e-06,259821184.94174403,1,1,8.3655998097296372e-06,259821184.94174403,-0,0.0048710049765109294,-0.0038685442144070483,173091.56436623837,2171,309\n"}, {"input": {"header": {"software": "a \"quoted\" name", "fileName": "plain.dm4", "object": "a \"quoted\" name", "imageWidth": 4467, "imageHeight": 3825, "x": {"originBits": 4694300000128991719, "scaleBits": 4686866067022685685, "unit": "mrad"}, "y": null, "notes": ["a \"quoted\" name", "Unvalidated reader (UNVALIDATED)"], "crop": [173, 810, 1077, 103], "spectrumWidth": 926, "spectrumHeight": 1713, "spacingXBits": 4591870180066957722, "spacingYBits": 4681283176690101907, "unitsX": "\u00c5", "unitsY": "um"}, "rows": [{"number": 1, "inMask": true, "m": {"clickedRow": 3914, "clickedCol": 292, "snappedRow": 2617, "snappedCol": 2025, "centroidRowBits": 13918881436393962956, "centroidColBits": 13718503453849879786, "width": 37, "height": 3941, "qxBits": 4716147395548386971, "qyBits": 4562464308410479264, "qBits": 13817616955943513221, "dBits": 13864231000439363376, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 2, "inMask": false, "m": {"clickedRow": 2707, "clickedCol": 2628, "snappedRow": 645, "snappedCol": 176, "centroidRowBits": 13834647311715274260, "centroidColBits": 4599301119452119040, "width": 2479, "height": 2538, "qxBits": 4484831878962570115, "qyBits": 4663386241688450573, "qBits": 13945186808208066206, "dBits": 13835473500804506312, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 3, "inMask": false, "m": {"clickedRow": 2531, "clickedCol": 2385, "snappedRow": 2310, "snappedCol": 296, "centroidRowBits": 9218868437227405312, "centroidColBits": 4512889772787441585, "width": 3384, "height": 556, "qxBits": 13828699206995744963, "qyBits": 13789484436544315632, "qBits": 13961223240034326478, "dBits": 4610481683600173600, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 4, "inMask": true, "m": {"clickedRow": 2856, "clickedCol": 477, "snappedRow": 488, "snappedCol": 3756, "centroidRowBits": 4493031298996101410, "centroidColBits": 4537241625932635162, "width": 1137, "height": 2476, "qxBits": 13720979825251813014, "qyBits": 9223372036854775808, "qBits": 13905882727063490677, "dBits": 4638532077614602892, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 5, "inMask": true, "m": {"clickedRow": 867, "clickedCol": 2891, "snappedRow": 1987, "snappedCol": 1816, "centroidRowBits": 0, "centroidColBits": 4713364341638000346, "width": 3079, "height": 1065, "qxBits": 4515411475952307896, "qyBits": 13719394589909120216, "qBits": 13764449478424226166, "dBits": 4590053196158707255, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 6, "inMask": true, "m": {"clickedRow": 3558, "clickedCol": 2623, "snappedRow": 3939, "snappedCol": 391, "centroidRowBits": 4470904037099795359, "centroidColBits": 13896166834028803839, "width": 2450, "height": 2041, "qxBits": 1, "qyBits": 4566407088054594027, "qBits": 13741209416679019860, "dBits": 4524639179628302378, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}, {"number": 7, "inMask": true, "m": {"clickedRow": 3253, "clickedCol": 2223, "snappedRow": 748, "snappedCol": 3752, "centroidRowBits": 4661176362686743454, "centroidColBits": 13720880093315589507, "width": 2557, "height": 1210, "qxBits": 4707876688148999875, "qyBits": 4634912882835514000, "qBits": 4509397759400696551, "dBits": 13767681580818319905, "units": "px", "reciprocalUnits": "1/px", "neighbour": false}}], "omitted": 2, "maskRadiusBits": 4465898046142682094, "maskEdgeBits": 13810618712540573946, "notes": ["cr\r\nlf", ""]}, "expected": "# macTEM spots\n# software: a \"quoted\" name\n# file: plain.dm4\n# object: a \"quoted\" name\n# subject: region 103 x 1077 px at (810, 173) (column, row of its top-left pixel)\n# image: 4467 x 3825 px\n# x scale: 221947.38804654745 mrad per px, origin 704637.267196712 px\n# y scale: none\n# spectrum: 926 x 1713 bins\n# dq x: 0.10000000000000001 \u00c5 per bin (0.010000000000000002 nm)\n# dq y: 95267.947174245768 um per bin (95267947.174245775 nm)\n# notes: a \"quoted\" name; Unvalidated reader (UNVALIDATED)\n# spots: the centroid of |F|^2 (power weights) over the 5 x 5 bins around the largest power within 2 bins of the click, measured on a Hann-windowed, mean-removed copy of the region (the transform above is not); d = 1/|q|; neighbour = another peak above 10 % of the spot's power within 3 bins (d may be off by up to 0.3 %); In Mask = the spot passes the masked inverse\n# transform: unnormalised forward FFT of the region's pixels as read: NO window, the mean NOT removed (the DC bin is the region's sum and is not drawn); |F|^2 centred, the zero frequency at bin (height/2, width/2)\n# listed: 7 measured spots; not listed: 2 (measuring, refused, no peak, or of another region)\n# mask: radius 3.7918037064864404e-10 bins, edge -0.049167993634883403 bins (the masked inverse)\n# qx, qy: from the centre of the spectrum, signed, in 1/px; Friedel partners are not listed\n# centroid, click: bins of the centred spectrum, column and row, the zero frequency at (width/2, height/2)\n# note: cr lf\n# note: \n# validation: the spot centroid compared with planted spots (ImagoKit's parity tests); the calibration as the file states it\n# lineage: none \u2014 the FFT room's state carries no lineage id; the region, spots and parameters above stand in\n# numbers: %.17g (exact round trip); the shown columns are the app's conversion (FFTUnits) of the unit columns\nspot,d (px),|q| (px\u207b\u00b9),in mask,neighbour,d (px),|q| (1/px),qx (1/px),qy (1/px),centroid col,centroid row,click col,click row\n1,-189.14497048704061,-0.14091224848639086,1,0,-189.14497048704061,-0.14091224848639086,20050202.752829175,0.0010454930132432275,-3.336905159872852e-08,-845429.88875191798,292,3914\n2,-2.1844948737528718,-48771213.713147387,0,0,-2.1844948737528718,-48771213.713147387,6.8274241664622409e-09,6061.0791364139995,0.3125,-1.9087966069645335,2628,2707\n3,1.732583949093744,-544547416.34838271,0,0,1.732583949093744,-544547416.34838271,-0.79402602223196828,-0.0018365467112798038,5.0679524841393122e-07,inf,2385,2531\n4,125.50544678522618,-113130.61983877591,1,0,125.50544678522618,-113130.61983877591,-4.9756302904007939e-08,-0,2.2430790399454675e-05,2.4636979421817584e-08,477,2856\n5,0.074784282871086613,-4.0336500465715e-05,1,0,0.074784282871086613,-4.0336500465715e-05,7.7379095639358225e-07,-3.926609536953324e-08,13229867.510184694,0,2891,867\n6,3.1885510804828027e-06,-1.1076127229813397e-06,1,0,3.1885510804828027e-06,-1.1076127229813397e-06,4.9406564584124654e-324,0.0019004470643993975,-25704.442007533271,8.103067872820323e-10,2623,3558\n7,-6.3441000148580399e-05,3.0695055388189579e-07,1,0,-6.3441000148580399e-05,3.0695055388189579e-07,5698462.1791188149,74.073595593576329,-4.9096332311236259e-08,4073.6029464010635,2223,3253\n"}]} \ No newline at end of file