< Computer.Python3 | Index | Office365 , stampanti, telefono >
Back
- access PSI root files via uproot (
pip install uproot
)
- see mu*_root*.py scripts in
~/musrfit/CCO/run_09_24/LEM/underdoped/Asymmetry/
- TODO include this in mujpy as standard access to data files
- 07/22 jupyterlab starts on Chromium. Being snap, Ch cannot create the initial html file in the hidden ~/.jupyter directory. Must either do a workaround for firefox or simply ignore error message and copy paste from console to chromium the url
promemoria git commends to commit and push
cd ~/git/mujpy
git status
git add whatmust be updated
git rm whatmust be removed (rm ves from the tree but also the file!!!)
git commit -e (or -m <msg>)
git push origin ("git push" should do)
- 10/21 was not working: meanwhile I updated jupyterlab. Need to
jupyter nbextension enable --py widgetsnbextension
jupyter labextension install @jupyter-widgets/jupyterlab-manager
- however the latter required also to install a nodejs v>=12
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
- only python3!
TODO roadmap
- finalize hifi fit
- methods for background subtraction {$N^i_k=N^i_{raw,k} -B_i$}and {$N_i$} initial rate per bin fits({$\alpha_i=N_0/N_i$})
- method for approximate single polarization fit with 8 detectors:
- fit angles {$\theta_i$} and average {$t_0$} refinement on one (more?) high T calibration. Total of 12 prefit parameters.
- Create quadrature data sets for each run: {$P_c(k) =\sum_i \cos \theta_i N^i_k \alpha_i \exp(t_k/\tau_\mu)/4N_i$} and analogous {$P_s(k)$}, then fit a double chi2 with global parameters (remember to subtract 12 prefit pars from dofs).
- refine rotframe visualization.
- possibly remove global stubs (not done)
- release 1.05
- investigate 2d fft (colormap vs frequency and lb)
- fix header to top panel info
- refactor mucomponent to have total asymmetry P[0}<-'_A' and first component parameter into P[n]<-'fraction', with 'amplitude' <- P[0]*P[n] (for one component P[n]=1, for two components the second = 1-P[n])
- extend fit to multi-asymmetry
- investigate pip, (example https://github.com/pyjokes/pyjokes) or conda, or jupyterlab extension
- investigate windows compatibility, windows 10 testing in vmadminunipr
- investigate breaking up into tab files (same class mujpy)
- investigate creating class fit, class plot, for basic operation so that other methods can inherit (share) the basic
- create a separate tab gfit (global fit)
- investigate goodness of fit rendering tools: chi2 as 2D color map vs time and run (bidirectional)
- release 2.0
Tried in 20.04: chrono from bottom
- mujpy marries python3 (not backward compatible with python2)
- jupyter nbextension enable jupyter_dashboards --user --py
- jupyter dashboards quick-setup --user
- works (at least the dash) from git/mujpy
- for jupyterlab need to
- sudo apt install nodejs npm
- for notenook need to
- jupyter nbextension enable --py widgetsnbextension
- fix broken link mu_test_damg.ipynb (hard copied example/mu_test_damg-installed-distribution.ipynb)
sudo apt-get install python3-tk
HOW TO RUN e.g. from git/mujpy
jupyter-lab
- click on File browser (the first left vertical tab, Folder ing)
- click on
mu_test_damg_lab.ipynb
(leave mu_test_damg_lab.template.ipynb
, or better, save there any stable notebook upgrade - python changes are transparent)
- ignore error, select Kernel horizontal tab/ Restart kernel and Run All Cells
- click on the blue vertical bar to hide the first cell
- markdown stopped working on Firefox, here is the fix, Disable redirect
jupyter-notebook --generate-config
Writing default config to: /home/<USER>/.jupyter/jupyter_notebook_config.py
- Open that file, uncomment this line and set it to False (it is commented and set to True by default) c.NotebookApp.use_redirect_file = False
MODIFICATIONS SINCE LAST git push
: FROM TOP
- mods to terminal
- decided to move to jupyterlab (JL), widget spacing appears different a version should branch off to adjust for this.
- JL, out of the box, redirects warnings and error messages to Log console (good, doesn't spoil the GUI appearance)
- transformed muload into psiload, added isisload
- refactored setup tab
- nexus and ISIS data solved by https://github.com/RDeRenzi/munexus
- moved path_file_dialog and get_run_number_from to aux
- started inserting tooltips everywhere (fit and suite)
- removed output tab if terminal is activated
- reshuffled tabs (now fit fft plot setup [output] about) and top title box, now including loaders (suite + Load button)
- reshuffled fit widgets
- corrected asymmetry error, now as in musrfit (hopefully)
- adapted tick removal (chi2 distribution in fitplot, ax[1,1]) as for matplotlib >= 3.3 (WARN, probably not backward compatible)
- fields now in mT (neither T nor G!)
- repaired suite fit
- repaired anim
- trapped a user errors (message on console)
- parameter plot with flag
- reads ISIS nexus data with a python hack of the old NeXus browser.
- implemented muedge from mulab to fit t=0 in ISIS data.
- present mods (particularly header "width=70%") spoiled completely jupyter notebook appearance.
To be committed:
- rediscovered that MuSR_td_PSI.cpp class by Alex Amato and Andrea Raselli reads also HAL 9500 hifi mdu data, adapted it to work and made up a quick and dirty determination of t=0.
HOW TO git
- cd git/mujpy
- modify freely files and check how they work from the local jupyter-lab (see HOW TO RUN)
- when happy and want to commit
- git status # check what is listed as changes not staged for commit, and follow advices, i.e.
- git add filename # to add filename it to the next commit
- git restore filename # to revert to master version of filename, for a modification that is given up
- git commit -m "my new commit description"
- git push origin
- uploaded id_rsa.pub to github (RDeRenzi icon, Settings/SSH...) with Pietro in December 2021
- cd FisMat locally
git remote remove FisMat
and git remote remove origin
(both wrong syntax)
git remote add origin git@github.com:RDeRenzi/FisMat.git
(notice syntax: ssh git@github.com requires :user/repo.git) defines origin as the remote repo
git status
and git log
to check (there is a commit on local master and a new file on remote master
- therefore
git push origin master
complains
git branch --set-upstream-to=origin/master master
from now on git push
form here will push to origin/master
git pull
first edits a merger comment CNTRL-x to approve merge and merger comment (delete comment to prevent merge) pulled the new file from origin
git push
pushed the commit from here to origin
Back
< Computer.Python3 | Index | Office365 , stampanti, telefono >