Spaces:
Running on Zero
Running on Zero
Readable hero text over the lasagna art, sentences start with a capital, plainer copy
Browse files- index.html +22 -21
index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
<title>Lasagna Fields</title>
|
| 7 |
-
<meta name="description" content="villa lasagna
|
| 8 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 10 |
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
@@ -42,12 +42,12 @@ nav .wrap{display:flex;align-items:center;gap:22px;height:56px}
|
|
| 42 |
.tbtn{border:1px solid var(--line);background:var(--card);color:var(--ink2);border-radius:8px;padding:5px 10px;cursor:pointer;font:inherit;font-size:13px}
|
| 43 |
header.hero{position:relative;overflow:hidden;border-bottom:1px solid var(--line)}
|
| 44 |
.hero .wrap{padding-top:72px;padding-bottom:64px;position:relative;z-index:1}
|
| 45 |
-
.fields{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
|
| 46 |
-
.hero:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,var(--bg) 0,color-mix(in srgb,var(--bg)
|
| 47 |
.hero .wrap{z-index:2}
|
| 48 |
.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:600;color:var(--accent)}
|
| 49 |
.hero h1{font-size:clamp(38px,6vw,68px);max-width:760px;margin:12px 0 18px}
|
| 50 |
-
.lede{font-size:19px;color:var(--
|
| 51 |
.by{margin-top:18px;color:var(--ink2);font-size:15px}.by b{color:var(--ink)}
|
| 52 |
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:40px;max-width:760px}
|
| 53 |
.stat{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:var(--shadow)}
|
|
@@ -117,7 +117,8 @@ footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
| 117 |
@media (max-width:900px){
|
| 118 |
.detail,.region{grid-template-columns:1fr}
|
| 119 |
.cards3{grid-template-columns:1fr}
|
| 120 |
-
.hero:after{background:
|
|
|
|
| 121 |
.stats{grid-template-columns:repeat(2,minmax(0,1fr))}
|
| 122 |
}
|
| 123 |
@media (max-width:560px){
|
|
@@ -143,8 +144,8 @@ footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
| 143 |
<div class="wrap">
|
| 144 |
<div class="eyebrow">Vesuvius Challenge open data, made usable</div>
|
| 145 |
<h1>Lasagna fields for ten Herculaneum scrolls</h1>
|
| 146 |
-
<p class="lede">villa
|
| 147 |
-
<p class="by">Made and shared by <b>Chase Hendrick</b>, October 2026. Model and code by the
|
| 148 |
<div class="stats" id="stats"></div>
|
| 149 |
<div class="cta">
|
| 150 |
<a class="btn primary" href="#scans">Browse the scans</a>
|
|
@@ -182,14 +183,14 @@ footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
| 182 |
|
| 183 |
<section id="connect"><div class="wrap">
|
| 184 |
<h2>Connect your tool</h2>
|
| 185 |
-
<p class="sub">Every field is also
|
| 186 |
<div class="panel">
|
| 187 |
-
<div style="display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center"><h3 id="cname" style="margin:0"></h3><span style="color:var(--ink3);font-size:13px">
|
| 188 |
<div class="codebox"><pre id="curl"></pre><button class="copy" data-copy="curl" type="button">Copy</button></div>
|
| 189 |
<div class="tabs" role="tablist">
|
| 190 |
<button role="tab" aria-selected="true" data-ct="py">Python (zarr)</button>
|
| 191 |
<button role="tab" aria-selected="false" data-ct="ng">Neuroglancer</button>
|
| 192 |
-
<button role="tab" aria-selected="false" data-ct="villa">
|
| 193 |
<button role="tab" aria-selected="false" data-ct="any">Any other tool</button>
|
| 194 |
</div>
|
| 195 |
<div id="cbody"></div>
|
|
@@ -198,7 +199,7 @@ footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
| 198 |
|
| 199 |
<section id="region"><div class="wrap">
|
| 200 |
<h2>Download only the region you need</h2>
|
| 201 |
-
<p class="sub">Click the map or type a point in full-resolution scan voxels. The first command
|
| 202 |
<div class="region">
|
| 203 |
<div class="mapbox">
|
| 204 |
<svg class="map" id="map" viewBox="0 0 400 400" role="img" aria-label="Top view of the scan's parts at the chosen height"></svg>
|
|
@@ -222,10 +223,10 @@ footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
| 222 |
|
| 223 |
<section id="use"><div class="wrap">
|
| 224 |
<h2>Who it is for, and how to use it</h2>
|
| 225 |
-
<p class="sub">A lasagna field is the input
|
| 226 |
<div class="cards3">
|
| 227 |
<div class="card"><div class="k">Researchers</div><h3>Read it like any OME-Zarr</h3><p>Open the arrays with <code>zarr</code>, <code>tensorstore</code> or any OME-Zarr viewer. Coordinates are the scan's own voxels, divided by 2 for cos and by 4 for the other channels. The format table below says exactly what is stored.</p></div>
|
| 228 |
-
<div class="card"><div class="k">Teams building tools</div><h3>Point lasagna at the manifest</h3><p><code>SCAN.lasagna.json</code> is the manifest
|
| 229 |
<div class="card"><div class="k">Everyone else, rivals included</div><h3>Same head start for all</h3><p>These fields are public so that nobody has to spend a GPU day before trying an idea on these scrolls. Use them, compare against them, and tell us if you find a problem.</p></div>
|
| 230 |
</div>
|
| 231 |
<h3 style="margin-top:34px">From download to first numbers</h3>
|
|
@@ -241,7 +242,7 @@ footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
| 241 |
<h2>How it was made</h2>
|
| 242 |
<p class="sub">Every step ran on Hugging Face Jobs from scripts, with each part's record kept. Nothing was edited by hand.</p>
|
| 243 |
<div class="steps">
|
| 244 |
-
<div class="step"><div><h3>Same settings as
|
| 245 |
<div class="step"><div><h3>Split into parts that never share a chunk</h3><p>Each scan was cut into boxes whose edges sit on multiples of 1,024 scan voxels, each small enough to finish in one Job. Because of that alignment, every chunk of every pyramid level is written by exactly one part, so the parts join without blending. PHerc0175A, the first scan, used an earlier layout whose coarsest level was rebuilt across tile edges; its card gives the details.</p></div></div>
|
| 246 |
<div class="step"><div><h3>Predict on GPUs</h3><p>One Job per part on an NVIDIA RTX PRO 6000, at the scan's native resolution with no resampling: <span id="mparts"></span> parts in all.</p></div></div>
|
| 247 |
<div class="step"><div><h3>Join and check</h3><p>The parts were joined into one store, with a check that no chunk appears twice. A seam check then compares the step across each part edge with the steps beside it (1.0 means no step; the limit is 1.5). Finally the card's own load snippet was run on two real parts before upload.</p></div></div>
|
|
@@ -252,13 +253,13 @@ footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
|
|
| 252 |
|
| 253 |
<section id="format"><div class="wrap">
|
| 254 |
<h2>Format</h2>
|
| 255 |
-
<p class="sub">
|
| 256 |
<div class="tablewrap"><table>
|
| 257 |
<thead><tr><th>File</th><th>Read at</th><th>Scale</th><th>Stored as</th></tr></thead>
|
| 258 |
<tbody>
|
| 259 |
-
<tr><td><code>SCAN_cos.ome.zarr</code></td><td>
|
| 260 |
-
<tr><td><code>SCAN_grad_mag.ome.zarr</code></td><td>
|
| 261 |
-
<tr><td><code>SCAN_nx.ome.zarr</code>, <code>SCAN_ny.ome.zarr</code></td><td>
|
| 262 |
<tr><td><code>SCAN.lasagna.json</code></td><td colspan="3">The manifest: groups, their zarr paths and scale-downs, <code>base_shape_zyx</code> and the boxes computed</td></tr>
|
| 263 |
<tr><td>Every array</td><td colspan="3">zarr v2, chunks 64 × 64 × 64, Blosc zstd level 3, fill value 0, axes z, y, x, each with coarser levels down to 4</td></tr>
|
| 264 |
</tbody>
|
|
@@ -355,7 +356,7 @@ function pick(i,scroll){cur=i;const s=D[i];
|
|
| 355 |
document.querySelectorAll('.scan').forEach(b=>b.setAttribute('aria-pressed',+b.dataset.i===i));
|
| 356 |
$('dname').textContent=s.id;
|
| 357 |
const mm=(s.shape[0]*s.um/1000).toFixed(1);
|
| 358 |
-
const facts=[['Scan',s.volume],['Voxel size',s.um+' µm'],['Scan size (z, y, x)',s.shape.map(fmt).join(' × ')+' voxels, '+mm+' mm tall'],['Download',gb(s.bytes)+' in '+s.parts.length+' parts'],['Seam check',s.seam<=1.5?'
|
| 359 |
$('dfacts').innerHTML=facts.map(([k,v])=>'<dt>'+k+'</dt><dd>'+v+'</dd>').join('');
|
| 360 |
$('dlinks').innerHTML='<a class="btn primary" href="https://huggingface.co/datasets/'+s.repo+'">Open dataset</a>'+(s.center?'<a class="btn" href="https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines">Center line</a>':'')+(s.id==='PHerc0175A'?'<a class="btn" href="https://huggingface.co/spaces/SharpMeow/umbilici?mode=lasagna&scan=PHerc0175A&z=6400">See in 3D</a>':'');
|
| 361 |
showView();showTab();showConnect();
|
|
@@ -384,8 +385,8 @@ function showConnect(){const s=D[cur],c=center(s),b=base(s);
|
|
| 384 |
let h='';
|
| 385 |
if(ctab==='py')h='<p style="margin-top:14px">Reads only the chunks you index, over HTTPS. Tested with zarr 3.4.1, fsspec and aiohttp.</p><div class="codebox"><pre id="cpy">pip install "zarr>=3" fsspec aiohttp\n\nimport zarr\n\nbase = "'+b+'"\ncos = zarr.open_array(base + "/'+s.id+'_cos.ome.zarr/1", mode="r", zarr_format=2) <span class="c"># every 2nd scan voxel</span>\nnx = zarr.open_array(base + "/'+s.id+'_nx.ome.zarr/2", mode="r", zarr_format=2) <span class="c"># every 4th scan voxel</span>\n\nz, y, x = '+c[0]+', '+c[1]+', '+c[2]+' <span class="c"># full-resolution scan voxels</span>\npatch = cos[z // 2, y // 2 - 256:y // 2 + 256, x // 2 - 256:x // 2 + 256]\nprint(patch.shape, patch.mean())</pre><button class="copy" data-copy="cpy" type="button">Copy</button></div>';
|
| 386 |
if(ctab==='ng')h='<p style="margin-top:14px">Opens the cos channel (level 1) in the public Neuroglancer viewer, streaming from the bucket. Its axes d0, d1, d2 are z, y, x in level-1 voxels, half the scan\'s.</p><div class="links"><a class="btn primary" target="_blank" rel="noopener" href="'+ngLink(s,c[0],c[1],c[2])+'">Open '+s.id+' in Neuroglancer</a></div><div class="codebox"><pre id="cng">zarr2://'+b+'/'+s.id+'_cos.ome.zarr/1</pre><button class="copy" data-copy="cng" type="button">Copy</button></div><p style="margin-top:10px;font-size:14px;color:var(--ink3)">Add the source above as an image layer in any Neuroglancer. Use a level folder (<code>/1</code>, <code>/2</code>), not the <code>.ome.zarr</code> root: villa writes the axis unit as "pixel", which Neuroglancer\'s OME reader rejects.</p>';
|
| 387 |
-
if(ctab==='villa')h='<p style="margin-top:14px">
|
| 388 |
-
if(ctab==='any')h='<div class="tablewrap" style="margin-top:14px"><table><tbody><tr><th>Store</th><td>zarr v2, one array per pyramid level, chunks 64 × 64 × 64, Blosc zstd, fill 0, <code>/</code> separator</td></tr><tr><th>URL</th><td><code>'+b+'/'+s.id+'_CHANNEL.ome.zarr/LEVEL/Z/Y/X</code></td></tr><tr><th>Channels</th><td>cos (levels 1 to 4), grad_mag, nx, ny (levels 2 to 4)</td></tr><tr><th>HTTP</th><td>
|
| 389 |
$('cbody').innerHTML=h;}
|
| 390 |
document.querySelectorAll('[data-ct]').forEach(b=>b.onclick=()=>{ctab=b.dataset.ct;showConnect()});
|
| 391 |
|
|
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
<title>Lasagna Fields</title>
|
| 7 |
+
<meta name="description" content="Lasagna fields from the villa lasagna model for ten Herculaneum scroll scans, free to download. Made by Chase Hendrick.">
|
| 8 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 10 |
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,650&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
|
|
| 42 |
.tbtn{border:1px solid var(--line);background:var(--card);color:var(--ink2);border-radius:8px;padding:5px 10px;cursor:pointer;font:inherit;font-size:13px}
|
| 43 |
header.hero{position:relative;overflow:hidden;border-bottom:1px solid var(--line)}
|
| 44 |
.hero .wrap{padding-top:72px;padding-bottom:64px;position:relative;z-index:1}
|
| 45 |
+
.fields{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.55}
|
| 46 |
+
.hero:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,var(--bg) 0,var(--bg) 52%,color-mix(in srgb,var(--bg) 80%,transparent) 66%,color-mix(in srgb,var(--bg) 30%,transparent) 84%,transparent 100%)}
|
| 47 |
.hero .wrap{z-index:2}
|
| 48 |
.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:600;color:var(--accent)}
|
| 49 |
.hero h1{font-size:clamp(38px,6vw,68px);max-width:760px;margin:12px 0 18px}
|
| 50 |
+
.lede{font-size:19px;color:var(--ink);max-width:640px}
|
| 51 |
.by{margin-top:18px;color:var(--ink2);font-size:15px}.by b{color:var(--ink)}
|
| 52 |
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:40px;max-width:760px}
|
| 53 |
.stat{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:var(--shadow)}
|
|
|
|
| 117 |
@media (max-width:900px){
|
| 118 |
.detail,.region{grid-template-columns:1fr}
|
| 119 |
.cards3{grid-template-columns:1fr}
|
| 120 |
+
.hero:after{background:color-mix(in srgb,var(--bg) 92%,transparent)}
|
| 121 |
+
.fields{opacity:.35}
|
| 122 |
.stats{grid-template-columns:repeat(2,minmax(0,1fr))}
|
| 123 |
}
|
| 124 |
@media (max-width:560px){
|
|
|
|
| 144 |
<div class="wrap">
|
| 145 |
<div class="eyebrow">Vesuvius Challenge open data, made usable</div>
|
| 146 |
<h1>Lasagna fields for ten Herculaneum scrolls</h1>
|
| 147 |
+
<p class="lede">The villa lasagna model, run on ten whole scroll scans that had no lasagna field in the open data. Download a scan or stream it from a URL, then use it with the lasagna surface fit or the spiral fit. Every field is checked for seams.</p>
|
| 148 |
+
<p class="by">Made and shared by <b>Chase Hendrick</b>, October 2026. Model and code by the authors of lasagna in ScrollPrize/villa.</p>
|
| 149 |
<div class="stats" id="stats"></div>
|
| 150 |
<div class="cta">
|
| 151 |
<a class="btn primary" href="#scans">Browse the scans</a>
|
|
|
|
| 183 |
|
| 184 |
<section id="connect"><div class="wrap">
|
| 185 |
<h2>Connect your tool</h2>
|
| 186 |
+
<p class="sub">Every field is also in the public bucket <a href="https://huggingface.co/buckets/SharpMeow/lasagna-fields">SharpMeow/lasagna-fields</a>, laid out like the Vesuvius Challenge open data (<code>SCAN/representations/predictions/lasagna/RUN/</code>). Any tool that reads zarr over HTTPS can open it, with no download and no account. The commands here follow the scan you picked above.</p>
|
| 187 |
<div class="panel">
|
| 188 |
+
<div style="display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center"><h3 id="cname" style="margin:0"></h3><span style="color:var(--ink3);font-size:13px">Anonymous HTTPS, CORS open, missing chunks read as empty</span></div>
|
| 189 |
<div class="codebox"><pre id="curl"></pre><button class="copy" data-copy="curl" type="button">Copy</button></div>
|
| 190 |
<div class="tabs" role="tablist">
|
| 191 |
<button role="tab" aria-selected="true" data-ct="py">Python (zarr)</button>
|
| 192 |
<button role="tab" aria-selected="false" data-ct="ng">Neuroglancer</button>
|
| 193 |
+
<button role="tab" aria-selected="false" data-ct="villa">Local copy for lasagna</button>
|
| 194 |
<button role="tab" aria-selected="false" data-ct="any">Any other tool</button>
|
| 195 |
</div>
|
| 196 |
<div id="cbody"></div>
|
|
|
|
| 199 |
|
| 200 |
<section id="region"><div class="wrap">
|
| 201 |
<h2>Download only the region you need</h2>
|
| 202 |
+
<p class="sub">Click the map, or type a point in full-resolution scan voxels. The first command copies from the bucket only the chunks that cover your z range. The second downloads whole parts from the dataset: each scan was computed in boxes called parts, one tar each, and a region needs only the parts it touches plus one small tar with the joined manifest. Parts you skip read as empty.</p>
|
| 203 |
<div class="region">
|
| 204 |
<div class="mapbox">
|
| 205 |
<svg class="map" id="map" viewBox="0 0 400 400" role="img" aria-label="Top view of the scan's parts at the chosen height"></svg>
|
|
|
|
| 223 |
|
| 224 |
<section id="use"><div class="wrap">
|
| 225 |
<h2>Who it is for, and how to use it</h2>
|
| 226 |
+
<p class="sub">A lasagna field is the input that the lasagna surface fit in villa reads. With it ready, nobody has to spend GPU time predicting it again.</p>
|
| 227 |
<div class="cards3">
|
| 228 |
<div class="card"><div class="k">Researchers</div><h3>Read it like any OME-Zarr</h3><p>Open the arrays with <code>zarr</code>, <code>tensorstore</code> or any OME-Zarr viewer. Coordinates are the scan's own voxels, divided by 2 for cos and by 4 for the other channels. The format table below says exactly what is stored.</p></div>
|
| 229 |
+
<div class="card"><div class="k">Teams building tools</div><h3>Point lasagna at the manifest</h3><p><code>SCAN.lasagna.json</code> is the manifest that the lasagna tools read, with relative paths to the four channels. A center line for every scan except PHerc0841 is in <a href="https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines">vesuvius-center-lines</a>.</p></div>
|
| 230 |
<div class="card"><div class="k">Everyone else, rivals included</div><h3>Same head start for all</h3><p>These fields are public so that nobody has to spend a GPU day before trying an idea on these scrolls. Use them, compare against them, and tell us if you find a problem.</p></div>
|
| 231 |
</div>
|
| 232 |
<h3 style="margin-top:34px">From download to first numbers</h3>
|
|
|
|
| 242 |
<h2>How it was made</h2>
|
| 243 |
<p class="sub">Every step ran on Hugging Face Jobs from scripts, with each part's record kept. Nothing was edited by hand.</p>
|
| 244 |
<div class="steps">
|
| 245 |
+
<div class="step"><div><h3>Same settings as the published fields</h3><p>The lasagna code in villa at commit <code>db3dbea2</code>, <code>lasagna-preprocess predict3d --tile-size 192</code> with default chunks and levels, and the <a href="https://huggingface.co/scrollprize/lasagna">scrollprize/lasagna</a> model <code>model_current.pt</code> at revision <code>de45f011</code>. On a test crop of PHerc0343 these settings reproduce the published lasagna field to within 2 of 255 at every voxel compared. Bigger tiles and <code>torch.compile</code> ran faster in testing but changed the output, so they were not used.</p></div></div>
|
| 246 |
<div class="step"><div><h3>Split into parts that never share a chunk</h3><p>Each scan was cut into boxes whose edges sit on multiples of 1,024 scan voxels, each small enough to finish in one Job. Because of that alignment, every chunk of every pyramid level is written by exactly one part, so the parts join without blending. PHerc0175A, the first scan, used an earlier layout whose coarsest level was rebuilt across tile edges; its card gives the details.</p></div></div>
|
| 247 |
<div class="step"><div><h3>Predict on GPUs</h3><p>One Job per part on an NVIDIA RTX PRO 6000, at the scan's native resolution with no resampling: <span id="mparts"></span> parts in all.</p></div></div>
|
| 248 |
<div class="step"><div><h3>Join and check</h3><p>The parts were joined into one store, with a check that no chunk appears twice. A seam check then compares the step across each part edge with the steps beside it (1.0 means no step; the limit is 1.5). Finally the card's own load snippet was run on two real parts before upload.</p></div></div>
|
|
|
|
| 253 |
|
| 254 |
<section id="format"><div class="wrap">
|
| 255 |
<h2>Format</h2>
|
| 256 |
+
<p class="sub">The same layout as the lasagna fields in the open data. Replace <code>SCAN</code> with the scan's name.</p>
|
| 257 |
<div class="tablewrap"><table>
|
| 258 |
<thead><tr><th>File</th><th>Read at</th><th>Scale</th><th>Stored as</th></tr></thead>
|
| 259 |
<tbody>
|
| 260 |
+
<tr><td><code>SCAN_cos.ome.zarr</code></td><td>Level <code>1</code></td><td>Every 2nd scan voxel</td><td>uint8; peaks on papyrus sheets and dips between them</td></tr>
|
| 261 |
+
<tr><td><code>SCAN_grad_mag.ome.zarr</code></td><td>Level <code>2</code></td><td>Every 4th scan voxel</td><td>uint8 gradient magnitude, encoded as the manifest says (<code>grad_mag_encode_scale</code>)</td></tr>
|
| 262 |
+
<tr><td><code>SCAN_nx.ome.zarr</code>, <code>SCAN_ny.ome.zarr</code></td><td>Level <code>2</code></td><td>Every 4th scan voxel</td><td>uint8 surface normal components, <code>v × 127 + 128</code>; <code>nz</code> not stored</td></tr>
|
| 263 |
<tr><td><code>SCAN.lasagna.json</code></td><td colspan="3">The manifest: groups, their zarr paths and scale-downs, <code>base_shape_zyx</code> and the boxes computed</td></tr>
|
| 264 |
<tr><td>Every array</td><td colspan="3">zarr v2, chunks 64 × 64 × 64, Blosc zstd level 3, fill value 0, axes z, y, x, each with coarser levels down to 4</td></tr>
|
| 265 |
</tbody>
|
|
|
|
| 356 |
document.querySelectorAll('.scan').forEach(b=>b.setAttribute('aria-pressed',+b.dataset.i===i));
|
| 357 |
$('dname').textContent=s.id;
|
| 358 |
const mm=(s.shape[0]*s.um/1000).toFixed(1);
|
| 359 |
+
const facts=[['Scan',s.volume],['Voxel size',s.um+' µm'],['Scan size (z, y, x)',s.shape.map(fmt).join(' × ')+' voxels, '+mm+' mm tall'],['Download',gb(s.bytes)+' in '+s.parts.length+' parts'],['Seam check',s.seam<=1.5?'Worst edge '+s.seam.toFixed(2)+' (limit 1.5)':'One edge at '+s.seam.toFixed(2)+', cleared: a run across it matched byte for byte']];
|
| 360 |
$('dfacts').innerHTML=facts.map(([k,v])=>'<dt>'+k+'</dt><dd>'+v+'</dd>').join('');
|
| 361 |
$('dlinks').innerHTML='<a class="btn primary" href="https://huggingface.co/datasets/'+s.repo+'">Open dataset</a>'+(s.center?'<a class="btn" href="https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines">Center line</a>':'')+(s.id==='PHerc0175A'?'<a class="btn" href="https://huggingface.co/spaces/SharpMeow/umbilici?mode=lasagna&scan=PHerc0175A&z=6400">See in 3D</a>':'');
|
| 362 |
showView();showTab();showConnect();
|
|
|
|
| 385 |
let h='';
|
| 386 |
if(ctab==='py')h='<p style="margin-top:14px">Reads only the chunks you index, over HTTPS. Tested with zarr 3.4.1, fsspec and aiohttp.</p><div class="codebox"><pre id="cpy">pip install "zarr>=3" fsspec aiohttp\n\nimport zarr\n\nbase = "'+b+'"\ncos = zarr.open_array(base + "/'+s.id+'_cos.ome.zarr/1", mode="r", zarr_format=2) <span class="c"># every 2nd scan voxel</span>\nnx = zarr.open_array(base + "/'+s.id+'_nx.ome.zarr/2", mode="r", zarr_format=2) <span class="c"># every 4th scan voxel</span>\n\nz, y, x = '+c[0]+', '+c[1]+', '+c[2]+' <span class="c"># full-resolution scan voxels</span>\npatch = cos[z // 2, y // 2 - 256:y // 2 + 256, x // 2 - 256:x // 2 + 256]\nprint(patch.shape, patch.mean())</pre><button class="copy" data-copy="cpy" type="button">Copy</button></div>';
|
| 387 |
if(ctab==='ng')h='<p style="margin-top:14px">Opens the cos channel (level 1) in the public Neuroglancer viewer, streaming from the bucket. Its axes d0, d1, d2 are z, y, x in level-1 voxels, half the scan\'s.</p><div class="links"><a class="btn primary" target="_blank" rel="noopener" href="'+ngLink(s,c[0],c[1],c[2])+'">Open '+s.id+' in Neuroglancer</a></div><div class="codebox"><pre id="cng">zarr2://'+b+'/'+s.id+'_cos.ome.zarr/1</pre><button class="copy" data-copy="cng" type="button">Copy</button></div><p style="margin-top:10px;font-size:14px;color:var(--ink3)">Add the source above as an image layer in any Neuroglancer. Use a level folder (<code>/1</code>, <code>/2</code>), not the <code>.ome.zarr</code> root: villa writes the axis unit as "pixel", which Neuroglancer\'s OME reader rejects.</p>';
|
| 388 |
+
if(ctab==='villa')h='<p style="margin-top:14px">The lasagna fit in villa reads a local manifest. Sync the run folder (or only the rows you need, from the region tool below) and point lasagna at <code>'+s.id+'.lasagna.json</code>. Tested anonymously with the <code>hf</code> CLI.</p><div class="codebox"><pre id="cvl">pip install -U "huggingface_hub[cli]"\nhf buckets sync hf://buckets/SharpMeow/lasagna-fields/'+s.run+' '+s.id.toLowerCase()+'-lasagna\n<span class="c"># then point lasagna at '+s.id.toLowerCase()+'-lasagna/'+s.id+'.lasagna.json</span></pre><button class="copy" data-copy="cvl" type="button">Copy</button></div>'+(s.center?'<p style="margin-top:10px;font-size:14px">The fit and the spiral fit also want a center line: '+s.id+'\'s is in <a href="https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines">vesuvius-center-lines</a>.</p>':'');
|
| 389 |
+
if(ctab==='any')h='<div class="tablewrap" style="margin-top:14px"><table><tbody><tr><th>Store</th><td>zarr v2, one array per pyramid level, chunks 64 × 64 × 64, Blosc zstd, fill 0, <code>/</code> separator</td></tr><tr><th>URL</th><td><code>'+b+'/'+s.id+'_CHANNEL.ome.zarr/LEVEL/Z/Y/X</code></td></tr><tr><th>Channels</th><td>cos (levels 1 to 4), grad_mag, nx, ny (levels 2 to 4)</td></tr><tr><th>HTTP</th><td>Anonymous; a 302 to Hugging Face\'s CDN, which allows any origin and byte ranges; a missing chunk is a 404, which zarr readers treat as empty</td></tr><tr><th>Scale</th><td>Level k is every 2<sup>k</sup>th scan voxel; the OME <code>.zattrs</code> gives the same as scale transforms</td></tr></tbody></table></div>';
|
| 390 |
$('cbody').innerHTML=h;}
|
| 391 |
document.querySelectorAll('[data-ct]').forEach(b=>b.onclick=()=>{ctab=b.dataset.ct;showConnect()});
|
| 392 |
|