How to plot optical transition probability from WAVEDER file obtained during optical run in VASP?
Dear Quang Pham, I installed the "NumPy, matplotlib, spglib, scipy" libraries in the Anaconda environment. When I run the mcu / mcu / vasp / utils.py program to process WAVEDER files, Pycharm prompts an error: " from ..utils.misc import check_exist; ImportError: attempted relative import with no known parent package ", I do n’t know where the error occurred, thank you for your help.

Did you add mcu to the Python path? for example:
export PYTHONPATH=$HOME/mcu:$PYTHONPATH
with $HOME/mcu in the parent folder ($HOME/mcu/mcu is the source code) Sorry for the late response. Thing was a bit chaotic here in the last few days in Minneapolis.
@hungpham2017 ,Thank you very much for your reply. I have added mcu to my Python path, but I still get an error when running the program. Is it because I did not have a WAVDERF file? In addition, I am looking forward to your upcoming new version of MCU with many new functions as well as a pip and conda install.
Just now I realized that you actually ran the program on Window. I have only tested MCU on Linux. So the latest version in the dev branch. The reason why I have not merged it to the master branch because I have not had time to document it. A new documentation and the code need to be released at the same time. My plan is to get all of these done by the end of June. For now, I will keep this issue open and labeled it as an enhancement request.

It looks like it is not the way you should call the function. But sure, please email me with your data. And If possible what you would like to do if the CDER obtained from the WAVEDER file. The reason why I ask this question is that I can imagine you will perform some post-analysis using CDER tensor. So it would be easier to just do all the calculations in a Python script that I am happy to assist to write it for your purpose. This would be included in the future function (post analysis of WAVEDER) if you dont mind. For now, I will be closing this issue.
@hungpham2017 ,Dear hungpham,I called the read_WAVEDER(file='WAVEDER') function in the program, but the result did not appear cder, I do not know what went wrong, I hope to get your help, thank you very much.

This looks correct to me. I did not put a print function to print out cder because I assumed you would do computation directly by modifying my python script. If you would like to have further assistance, can you tell me what you are planning to compute with the cder tensor. I can help modify it.
never mind, you actually said it in the title. I will send you a modified script with the plotting optical transition probability if you still need it. Please give me a few days, I am kinda distracted by my other projects.
@hungpham2017 ,Dear hungpham,Thank you very much for your kind help. I really need your script to get the optical transition probability, which will greatly help me understand the knowledge of physical optics. I look forward to receiving your modified script. But it doesn't matter when you have free time.
@hungpham2017. Good day. Thank you so much for your mcu script. please, i need assistance on how to plot optical transition.
never mind, you actually said it in the title. I will send you a modified script with the plotting optical transition probability if you still need it. Please give me a few days, I am kinda distracted by my other projects.
Sir, am also in need of this.