phockett / quantum-metrology-with-photoelectrons-vol3 Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
GH actions currently only configured for basic JupyterBook env, so will fail in cases where notebooks need execution.
Options:
In testing Nov. 2022:
unsrt
style only working for per-document bibs (not recognised in _config.yml
case)?unsrt
per doc
unsrt
works in both cases, no backlinks in HTML though.For general use, set global bib document which works in both cases (although produces extra header in PDF).
For final outputs, may want to add pre-processing script for per-doc bibs for HTML output (see methods in ePSdata). Add as footer to pages:
% Per document case.
:filter: docname in docnames
:style: unsrt
TODO: decide and test best practice.
code
formatting? Is this confusing?code
style for package names?To do, probably first.
General setup & config notes: https://github.com/phockett/Quantum-Metrology-with-Photoelectrons-Vol3/tree/main/notes/jupyter_book
May also expect to see Plotly doesn't render after maths bug, although haven't had an issue with this as yet in HTML or PDF outputs.
Currently renders as flat text block - should convert to proper latex table, not sure why it isn't, might be glue() issue again? (But OK in HTML output.)
parameters
class, can use plain text or HTML output, e.g. https://github.com/lmfit/lmfit-py/blob/53118ec74784ef9350389a8c0297fbeb07ac94d9/lmfit/parameter.py#L324
display(data.params._repr_html_())
as a quick fix?pretty_print
functionality, and printfuncs.py
, https://github.com/lmfit/lmfit-py/blob/53118ec74784ef9350389a8c0297fbeb07ac94d9/lmfit/printfuncs.py#L327TODO: test with nbconvert directly, and maybe try a custom Pandoc wrapper (see https://pypi.org/project/pandoc/)?
Final pass for most docs, hopefully, on branch reviewJuly2023
, https://github.com/phockett/Quantum-Metrology-with-Photoelectrons-Vol3/tree/reviewJuly2023
31/07/23 Released.
refBuild_310723pm
subdir for current HTML and LaTex/PDF builds (no source files, ~80Mb), also included as archive in release above.General todo
Update text. Versions to new date-stamp as revised, and update TOC to reflect.
conda install -c conda-forge firefox geckodriver
did this, annoyingly), but so far seems OK, although have WARNINGS OFF. sudo pip install matplotlib==3.5.3
and pip install --user matplotlib==3.5.3
in container to fix (hopefully), seemed to have some pip/Conda mismatch issues too.Check/test individual notebooks in current Docker build.
epsproc.sphFromBLMPlot
for Plotly case.data.padPlot
for basic case, already did this...? Currently issues with missing defaults due to (recent?) changes in code, see broken example here. Should now be fixed (in next build), see phockett/ePSproc#27 (comment)Debug HTML and PDF builds.
get_ipython().magic('matplotlib inline')
to general setup script in 77be80e, hopefully only will do good things. SHOULD ALSO CHECK FIG BUILD CHAIN GENERALLY.RuntimeError: Neither firefox and geckodriver nor a variant of chromium browser and chromedriver are available on system PATH. You can install the former with 'conda install -c conda-forge firefox geckodriver'.
, in builds AND NOTEBOOK IN LAB, even though installed at container build? Conda env issues, and/or user paths?
sudo apt-get install --yes libgtk-3-0 libdbus-glib-1-2
in current Docker container (and added to Dockerfile), must have fixed this in old build then forgotten? Solution from bokeh/bokeh#10108{ref}
Part II chpt:extracting-matrix-elements-overview``.data.params
(lmfit object) data return in basis sets page.
Wrap up case studies.
General Docker builds for readers, and push to Docker hub. (see also build chain notes below)
Tidy/remove/archive drafts
2023-07-29_00-19-57_preDraftsCleanUp
archived with all drafts.notes/_drafts/part1
notes/_drafts/part2
Tidy scripts
Tidy build chain and finalise Docker build files and notes.
buildTmp/_latest_build/pdf
and buildTmp/_latest_build/html
. 30/07/23: manual reset of dir structure for testing.Installation guide in main readme, and also at end of "Platform intro" chpt. (Old version here.) UPDATED version 07/07/23, OK aside from Docker details to update.
To do:
General routine for locating setup-notebook.py
script? Still OK to use relative paths here? Now added a note to the Installation
section on this. May want to add as an appendix?
General notes on pkg versions, and link to build versions doc (end of book), also to add. Should release current versions and match to Docker build at completion.
Numerical implementations/examples
Some inconsistencies in default builds...
\bm
not rendering in Firefox, Github builds? (e.g. https://phockett.github.io/Quantum-Metrology-with-Photoelectrons-Vol3/part1/theory_101122.html)\boldsymbol
not rendering in IceDragon, local builds (either default MathJax, or v3).\boldsymbol
not working in default case. UPDATE: NOW NOT WORKING in either case after more test builds... weird...\bm
).For forcing version in _config.py
, see https://jupyterbook.org/en/stable/content/math.html#math-and-equations
TODO: clean test page, currently testing in main Theory notebook, might be other issues...?
UPDATE: may actually be issue with source and/or Pandoc conversion, currently failing to case with
UPDATE2: things seem OK in maths test page for \boldsymbol
(even nested), but not for \bm
. May have issue related to executablebooks/jupyter-book#1528 with Plotly? (See also https://jupyterbook.org/en/stable/interactive/interactive.html#plotly) Maybe also issue with extensions or macros, https://docs.mathjax.org/en/latest/input/tex/extensions/boldsymbol.html?
Ignore for now and use standard methods - but should fix!
UPDATE3 21/11/22:
\boldsymbol
currently working on some pages, but not all, so likely issue with some page builds.\bm
no Mathjax support, but added work-around to _config.py
as per mathjax/MathJax#1219, implemented in 3e0c9a5.Getting build errors for QuTip objects, specifically matrices.
$
--keep-going
set, see https://jupyterbook.org/en/stable/reference/cli.html#cmdoption-jupyter-book-build-keep-going).! Missing } inserted.
<inserted text>
}
l.2540 ...& 1.000\\\end{matrix}\right)$\end{split}
?
! Missing { inserted.
<inserted text>
{
l.2540 ...& 1.000\\\end{matrix}\right)$\end{split}
?
! Missing $ inserted.
<inserted text>
$
l.2540 ...& 1.000\\\end{matrix}\right)$\end{split}
?
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate
l.2540 ...& 1.000\\\end{matrix}\right)$\end{split}
Seems like something similar to use of \protect
in figure case (mcmtroffaes/sphinxcontrib-bibtex#276 (comment)) may be required here - something is presumably getting stripped incorrectly during preprocessing. May be to do with mixed nature of object, with text and matrix? In notebook this is clear, but in built output the label text is wrapped too?
Current example from .tex output:
\begin{sphinxVerbatimOutput}
\begin{sphinxuseclass}{cell_output}\begin{equation*}
\begin{split}Quantum object: dims = [[25], [25]], shape = (25, 25), type = oper, isherm = True $ \\ \left(\begin{matrix}1.0 & 0.0 & 0.0 & 0.0 & 0.707 & \cdots & 1.0 & 0.0 & 0.707 & 0.0 & 0.707\\0.0 & 1.000 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 1.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 1.000 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.707 & 0.0 & 0.0 & 0.0 & 1.000 & \cdots & 0.707 & 0.0 & 0.0 & 0.0 & 0.0\\\vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \vdots\\1.0 & 0.0 & 0.0 & 0.0 & 0.707 & \cdots & 1.0 & 0.0 & 0.707 & 0.0 & 0.707\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 1.000 & 0.0 & 1.000 & 0.0\\0.707 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.707 & 0.0 & 1.000 & 0.0 & 1.000\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 1.000 & 0.0 & 1.000 & 0.0\\0.707 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.707 & 0.0 & 1.000 & 0.0 & 1.000\\\end{matrix}\right)$\end{split}
\end{equation*}
\end{sphinxuseclass}\end{sphinxVerbatimOutput}
Looks like Numba issue.
Currently running
numba 0.54.1 py39h56b8d98_0 conda-forge
Should be able to update or deactivate warnings, see numba/numba#5275
Should be fixed in v>0.56? Not sure why this older version is present in current Docker builds... may need to specify in Dockerfile if something is pulling an older version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.