2024년 2월 13일 화요일

Error estimation of fitting parameters

 https://stackoverflow.com/questions/40187517/getting-covariance-matrix-of-fitted-parameters-from-scipy-optimize-least-squares

2024년 2월 5일 월요일

PyQt5 adding FigureCanvas in designer

(1) Put a layout in a designer. rename it as convenient

(2) Click Right Mouse Button and change it into a Widget. 

(3) After that, one can put Canvas Widget into the layout. 

2024년 1월 31일 수요일

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized

It is suspected that this error comes from the multiple library confilcts which have libiomp5.dll files. 

One solution is to delete  libiomp5md.dll (and other libiomp5 related files)

in anaconda3/Library/bin . (anaconda3 is located in hidden "ProgramData" folder.) 

It is not clear whether this is the best solution, but it works. 


(Update) The above symptom first appeared while using PyTorch , Matplotlib, and Scipy. 

However, after above procedure, 

there are many occasions that the kernel stops and restart. Python became very unstable.

To avoid this problem, it may be better to use separate environment when installing pytorch. 

2024년 1월 24일 수요일

Wolfram Engine Jupyter 매쓰매티카

(1) get Free Wolfram engine : https://www.wolfram.com/engine/

(2) get Wolfram language for Jupyter

https://github.com/WolframResearch/WolframLanguageForJupyter

    unzip the file at permanant folder and do not delete it.  

(3) Follow steps in the page 

    - install Wolfram engine and run "wolframscript" at command line  

    - download Wolfram language for Jupyer and run "configure-jupyter.wls add" in powershell. (not command prompt)


2023년 12월 2일 토요일

2023년 12월 1일 금요일

QCY T1earphone bluetooth 블루투스 이어폰 링크

 How to Pair 

Push both EarBuds into charging case to activate them then take out from the case and they will auto power on and pair with each other. Right EarBud will auto enter pairing mode when LED on left EarBud turns off. On cellphone, search for QCY-T1_R and tap to connect cellphone to both EarBuds. (Please try the following steps, in case you fail to build connection.) Power off two EarBuds and tap and hold MFBs on both of them for 20s (LED will blink red and white then turn off and 10s later blink red and white 3 times). Tap and hold two EarBuds for 1s to power on(LED blinks red white twice) and two EarBuds will auto pair with each other. Then right EarBud will auto enter pairing mode(LED blinks red and white) when LED on left EarBud turn off. On cellphone, search for QCY-T1_R and tap to connect both EarBuds with cellphone. Notes: if two EarBuds fail to pair with each other in 20s, they will enter pairing mode(connectable to cellphone).

2023년 10월 31일 화요일

compile problems of various manybody codes (in Ubuntu)

List of compile problems for various manybody nuclear physics codes. 

 (1) BigstickPublick : https://github.com/cwjsdsu/BigstickPublick
            gfortran had problems with MPI commands. 
        --> ifort could compile without problem
        or add compile option "-fallow-argument-mismatch"

 (2) imsrg : https://github.com/ragnarstroberg/imsrg
               missing libraries have to be installed. But, python binding was problem. 
        --> include python3 path in Makefile. (replace 'python-config' into 'python3-config') 
       (2-1) to build : goto "build/" and run "cmake .." 
                then "make install" 
       (2-2) After compile, one can run  "imsrg++  [arguments]" 
               Python script to specify command line arguments can be found in "work/" folder. 
       (2-3)  To get documentation, run "doxygen  [.dox file]" in "doc/" folder.  



 (3) NuHamil : https://github.com/Takayuki-Miyagi/NuHamil-public
          *       no submodule
        --> "git submodule init" and "git submodule update"               
            *       missing hdf5.mod 
        --> add include path " -I/usr/include/hdf5/serial" 
               (first install "sudo apt install libhdf5-dev hdf5-tools")
             *      cannot find -lhdf5_fortran 
        --> add path "-L/usr/lib/x86_64-linux-gnu/hdf5/serial" 
             * may need additional libraries installed 
                      "sudo apt install libgsl-dev" 

(4) HartreeFock:  https://github.com/Takayuki-Miyagi/HartreeFock 
                    no submodule 
        --> same solution as above 
                     argument mismatch 
        --> edit Makefile, Debug=off and add compile option "-fallow-argument-mismatch"


 Tips: In general, if some library is already installed but could not be found, solutions are usually add correct path/location. How to find the path os installed library in Ubuntu? 
 try " dpkg --get-selections | grep -v deinstall | grep [name]
then " dpkg -L packagename "to find the path.