33#+setupfile: https://ls4gan.github.io/other/setup-page.org
44#+options: toc:t
55
6- The toyzero package provides first steps toward [[https://ls4gan.github.io/][LS4GAN]].
6+ The toyzero package provides first steps toward [[https://ls4gan.github.io/][LS4GAN]]. See also [[file:next-steps.org]]
77
88* Goals
99:PROPERTIES:
@@ -291,6 +291,28 @@ The ~all_frames~ target generates "frame" data from depos by running the
291291Wire-Cell simulation. The "frame" file format is described elsewhere.
292292For here, we treat it as a temporary.
293293
294+ The simulation is internally structured as a DAG of components
295+ exchanging data flow as shown:
296+
297+ #+ATTR_HTML: :width 90%
298+ [[file:plots/dots/depos-sim-adc/dag.png]]
299+
300+ Frames come in different flavor depending on the final output data
301+ tier. We name and describe them as:
302+
303+ - noiseless :: these are integer ADC waveforms reflecting existence of
304+ only ionization electrons and no electronics noise. They are
305+ bipolar on the induction planes "U" and "V and unipolar on
306+ collection plane "W". They have a fixed "baseline" at an ADC value
307+ depending on the plane and are sparse (baseline-padded) at locations
308+ away from any ionization.
309+
310+ - signal :: these floating point measures of the original ionization
311+ electrons after signal processing and noise filtering is applied to
312+ signal and noise simulation. The waveforms from all planes are
313+ unipolar and give a measure of the original ionization distribution.
314+ The waveforms have a "baseline" of 0.0 and are sparse
315+ (baseline-padded) at locations away from any ionization.
294316
295317** images
296318:PROPERTIES:
@@ -308,8 +330,8 @@ match. For example:
308330protodune-orig-0-1-W (960, 6000)
309331#+end_example
310332
311- These image arrays have shape ~(nchan, ntick)~. That is each row is the
312- waveform from one channel and has ~ntick=6000~ samples (3ms). When
333+ These image arrays have shape ~(nchan, ntick)~. That is, each row is
334+ the waveform from one channel and has ~ntick=6000~ samples (3ms). When
313335visualized with matplotlib's ~imshow()~ you will see channels as Y-axis,
314336tics as X-axis.
315337
@@ -319,6 +341,10 @@ This "W" file holds one array of 960 channels and 6000 sample time
319341induction planes and each will have 800 channels and the
320342contemporaneous 6000 ticks.
321343
344+ Like frames above, images come in corresponding flavors. See section
345+ [[frames]] for description.
346+
347+
322348* Plotting
323349:PROPERTIES:
324350:CUSTOM_ID: plotting
@@ -547,3 +573,48 @@ made available. If the changes are generally useful, please consider
547573making a PR!
548574
549575
576+ * Production
577+
578+ We run from containers. Eg, as a mongo ~docker~ command that runs
579+ ~snakemake~ in the ~toyzero~ container.
580+
581+ #+begin_example
582+
583+ $ docker run \
584+ --user user \
585+ --volume (pwd):/data \
586+ -ti ls4gan/toyzero:0.3.0 \
587+ "cd toyzero && \
588+ snakemake just_tar --notemp -j1 -p \
589+ --config seed=1234 outdir=/data ntracks=100 nevents=10 wcloglvl=debug threads=8"
590+
591+ #+end_example
592+
593+ Or, one layer down in the ~wirecell~ container, assuming you have
594+ ~toyzero~ checked out locally:
595+
596+ #+begin_example
597+
598+ $ cd .. # parent holding local toyzero/
599+ $ mkdir run
600+ $ cd run/
601+ $ cp -a ../toyzero/{Snakefile,cfg,toyzero.yaml} .
602+ $ docker run \
603+ --user user \
604+ --volume (pwd):/data \
605+ -ti ls4gan/wirecell:0.16.0 \
606+ "cd /data && \
607+ snakemake just_tar -j1 -p \
608+ --config seed=1234 ntracks=100 nevents=10 wcloglvl=debug threads=8"
609+ $ ls -l toyzero-100-10-1234.tar
610+
611+ #+end_example
612+
613+ Note: will likely want to set ~threads=1~ for batch and *MUST* set
614+ ~seed=XYZ~ uniquely for each submission. The ~outdir~ setting may be used
615+ if output should not go to the CWD. The tar file base name can be
616+ controlled with ~outname~. Intermediate files that eventually go in to
617+ the tar file land in ~{outdir}/seed-{seed}/~. The ~./.snakemake/~
618+ directory receives snakemake control and log files. If run with
619+ ~--notemp~ then (ironically, should be named ~--yestemp~) temporary files
620+ marked with ~temp()~ in the Snakefile are *kept*.
0 commit comments