Differences between revisions 19 and 91 (spanning 72 versions)
Revision 19 as of 2020-08-20 17:53:04
Size: 3297
Editor: naoki.koyama
Comment:
Revision 91 as of 2020-10-18 17:32:36
Size: 6998
Editor: naoki.koyama
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
 * If you are unfamiliar with the simulation operations, there is a possibility that errors may occur in the script description and so on.  * If users are not familiar with the finesse manner, the users can perform the finesse simulation without errors.
Line 12: Line 12:
/* * If you are unfamiliar with the simulation operations, there is a possibility that errors may occur in the script description and so on.*/
 * For beginners, GUI is easy to start.
Line 19: Line 21:
* We installed several tools to run simulations using Finesse.  * We installed several tools to run simulations using Finesse.
 * We initially considered using eel, but found it difficult to create gui using eel and finesse at the same time, so we decided to use pysimplegui instead of eel.
 * This eliminates the need to install eel (and chromium).
 * PySimpleGUI is a module for python that creates gui.
Line 21: Line 26:
* We initially considered using eel, but found it difficult to create gui using eel and finesse at the same time, so we decided to use pysimplegui instead of eel.

* This eliminates the need to install eel (and chromium).

* PySimpleGUI is a module for python that creates gui.

eel is a Python module used to create a GUI.

I didn't found any instructions on how to install eel without using pip.

Therefore, we use pip to install eel in conda's virtual environment.
 * eel is a Python module used to create a GUI.
 * I didn't found any instructions on how to install eel without using pip.
 *Therefore, we use pip to install eel in conda's virtual environment.
Line 35: Line 32:
{{{   {{{
Line 37: Line 34:
}}}   }}}
Line 41: Line 38:
{{{   {{{
Line 43: Line 40:
}}}   }}}
Line 51: Line 48:
{{{   {{{
Line 53: Line 50:
}}}   }}}
 
Line 73: Line 70:
 * how we installed this package?  * how we installed package PySimpleGUI?
  * We use conda. [[https://anaconda.org/conda-forge/pysimplegui]]
   {{{
% conda install -c conda-forge pysimplegui
   }}}
Line 76: Line 77:
  * Now there are many kinds of environments on control workstation. Before leaving, we should delete unnecessary virtual environment.
  * Yuzurihara likes the name of 'mifsim37'
 * you can choose which DoF to run.
 * You can now choose where to put the PD.
 * You can now choose the laser power.
Line 77: Line 83:
 * in jupyter-notebook, two plots are displayed separately. .py dato gamenn kuroi
  * (Yuzurihara) one of the solution is to use 'matplotlib' and summarize all the result on one figure. If so, we don't need second plot.
  * Koyama-san solved this by using matplotlib.
Line 78: Line 87:
 *Allows you to choose which DoF to run.
 *You can now choose where to put the PD.
 *You can now choose the laser power.
 *You can select a range for sweeping the mirror by entering a number. (Can't input other character. only numbers are allowed.)
  * Based on lecture by Kokeyama-san, Koyama-san implemented.
 * Yuzurihara implemented the feature to output the plot data and the kat file.
 * resize the figure of the interferometer
  {{{
% convert Fabry_Perot_MI_eom_drawing.png -resize 800x600 hoge.png
  }}}
 * Koyama added all nodes to GUI (on GUI, we use REFL/AS. But, in the source we use just n1 / n2 /....)
 * Koyama removed exit button from GUI (By pushing the button on top right, we exit from GUI)
 * Koyama changed the size of the outputted figure to be large
 * (Koyama) the xlabel and ylabel on figure are automatically added.
 * make the plot display large
  * Figure size changed large. But, the label and number on axis are very small.
 * output kat file (be careful to overwride)
 * output the plot data (be careful to overwride)
 * if we use "put" multiple times, what will happen?
 * (Koyama) Fixed the bug
  * when plotting PD2, the plotting of PD1 appear at the same time
  * when sekected only one pd1 output option(I1/I2/Q2/Q2), it caused an error.
 * (Koyama) change variable name (f1 → f1_SB, f2→ f2_SB)
 * (Yuzurihara) Prepared the virtual environment on all control workstation (virtual environment name : mifsim37)
 * (Koyama) make a select box about "pd1" plotting (Eg.I1/Q1/I1 and Q1 overplot)
 * (Koyama) Add option tab to select not required settings(xplotsclae(log/linear)/yplotscale...)
  * (Koyama) Check the plotting scale (log/linear) for PD0 and PD1
  * (Koyama) Add options to select the yaxis plotting scale log/linear(pd2)
  * (Koyama) Add options to select the plotting scale(log/linear), especialy y-scale of PD2
 * (koyama) change default value of "xaxis range beg" and "xaxis range end" according to the xplotscale setting

=== Current task (Once task was solved, move to Log.) ===

 * (Hirose) prepare manual
  * write README.md on git repository
  * make a drawing of interferometers by using an "inkscape"
 * (Hirose) add the brief manual on GUI display (such as "1. select interferometer configuration 2. select mode (power/...)")
 * (Hirose) change the displayed name of PD place(GUI) to something suitable name (nxtrans→netx??) [[http://gwwiki.icrr.u-tokyo.ac.jp/JGWwiki/LCGT/subgroup/ifo/MIF/OptParam]]
 * (Hirose) change the check box of PDs larger→[font=(font_name,font_size)]
 * (Hirose) measure the computational time
 * (koyama) Add option of "power" and "demod" to Transfer function
 * Add a interferometer drawing expand button


=== Future task (Once task was solved, move to Log.) ===

 * split the codes by using function
 * add new configuration of interferometer (FPMI/PRFPMI/DRFPMI)
 * read external data and over plot
Line 91: Line 141:
 * pase of learning Python in Japanese[[https://repository.kulib.kyoto-u.ac.jp/dspace/bitstream/2433/245698/1/Version2020_02_13_01.pdf]]  * page of learning Python in Japanese[[https://repository.kulib.kyoto-u.ac.jp/dspace/bitstream/2433/245698/1/Version2020_02_13_01.pdf]]
 * [[http://www.gwoptics.org/finesse/download/manual.pdf | manual finesse]]
 * To share the latest codes, use `git`
 * Add codes on git repository [[KAGRA/Subgroups/MIF/Simulation/KamikokaActivity20200817/how_to_use_git_and_github|how to use git and github]]
 * Change font size(in Japaneses)(p.10 of this site) [[http://www.k-techlabo.org/www_python/PySimpleGUI.pdf]]

Log of Kamioka Activity during 2020/08/17 ~ 27

Participants

  • Koyama
  • Hirose
  • Yuzurihara
  • Kokeyama

Perpose

  • If users are not familiar with the finesse manner, the users can perform the finesse simulation without errors.
  • By creating a GUI, such errors can be prevented and the reliability of the simulation results can be increased.

  • For beginners, GUI is easy to start.

Log (trial to use `eel`)

1. Installation of eel

note that:

  • We installed several tools to run simulations using Finesse.
  • We initially considered using eel, but found it difficult to create gui using eel and finesse at the same time, so we decided to use pysimplegui instead of eel.
  • This eliminates the need to install eel (and chromium).
  • PySimpleGUI is a module for python that creates gui.
  • eel is a Python module used to create a GUI.
  • I didn't found any instructions on how to install eel without using pip.
  • Therefore, we use pip to install eel in conda's virtual environment.

Activate the conda virtual environment.

  • % conda activate XXXXX

And type the following command

  • % pip install eel

To use eel, you need to install a specific browser like "chromium".

  • How to install chromium

You can install chromium by typing the following command.

  • % sudo apt install -y chromium

2. Learning HTML and javascript

  • HTML and javascript are used to write scripts to create the GUI in eel

3. Learning Python

  • Python is used to run simulations using "finesse2
  • Creation of GUI In "finesse2", we use character strings which describe the simulation settings.
  • Create a selection box (GUI) and load the settings you entered into the box by "finesse2" and execute it.

4. Creating a simple GUI with python and HTML.

  • An error occurs when sending the input value to Finesse, so we are looking for an improvement.
  • We gave up to use eel.

Log (trial to use `PySimpleGUI`)

  • how we installed package PySimpleGUI?
  • what is the name of virtual environment on control workstation?
    • MIFsim37
    • Now there are many kinds of environments on control workstation. Before leaving, we should delete unnecessary virtual environment.
    • Yuzurihara likes the name of 'mifsim37'
  • you can choose which DoF to run.
  • You can now choose where to put the PD.
  • You can now choose the laser power.
  • overplot ga mondai.We can't split plots.
  • in jupyter-notebook, two plots are displayed separately. .py dato gamenn kuroi
    • (Yuzurihara) one of the solution is to use 'matplotlib' and summarize all the result on one figure. If so, we don't need second plot.
    • Koyama-san solved this by using matplotlib.
  • pd1 ga hituyoukadouka ("Transfer function" uses "pd2". need "pd1" for "diff"?)
    • Based on lecture by Kokeyama-san, Koyama-san implemented.
  • Yuzurihara implemented the feature to output the plot data and the kat file.
  • resize the figure of the interferometer
    • % convert Fabry_Perot_MI_eom_drawing.png -resize 800x600 hoge.png
  • Koyama added all nodes to GUI (on GUI, we use REFL/AS. But, in the source we use just n1 / n2 /....)
  • Koyama removed exit button from GUI (By pushing the button on top right, we exit from GUI)
  • Koyama changed the size of the outputted figure to be large
  • (Koyama) the xlabel and ylabel on figure are automatically added.
  • make the plot display large
    • Figure size changed large. But, the label and number on axis are very small.
  • output kat file (be careful to overwride)
  • output the plot data (be careful to overwride)
  • if we use "put" multiple times, what will happen?
  • (Koyama) Fixed the bug
    • when plotting PD2, the plotting of PD1 appear at the same time
    • when sekected only one pd1 output option(I1/I2/Q2/Q2), it caused an error.
  • (Koyama) change variable name (f1 → f1_SB, f2→ f2_SB)
  • (Yuzurihara) Prepared the virtual environment on all control workstation (virtual environment name : mifsim37)
  • (Koyama) make a select box about "pd1" plotting (Eg.I1/Q1/I1 and Q1 overplot)
  • (Koyama) Add option tab to select not required settings(xplotsclae(log/linear)/yplotscale...)
    • (Koyama) Check the plotting scale (log/linear) for PD0 and PD1
    • (Koyama) Add options to select the yaxis plotting scale log/linear(pd2)
    • (Koyama) Add options to select the plotting scale(log/linear), especialy y-scale of PD2
  • (koyama) change default value of "xaxis range beg" and "xaxis range end" according to the xplotscale setting

Current task (Once task was solved, move to Log.)

  • (Hirose) prepare manual
    • write README.md on git repository
    • make a drawing of interferometers by using an "inkscape"
  • (Hirose) add the brief manual on GUI display (such as "1. select interferometer configuration 2. select mode (power/...)")
  • (Hirose) change the displayed name of PD place(GUI) to something suitable name (nxtrans→netx??) http://gwwiki.icrr.u-tokyo.ac.jp/JGWwiki/LCGT/subgroup/ifo/MIF/OptParam

  • (Hirose) change the check box of PDs larger→[font=(font_name,font_size)]
  • (Hirose) measure the computational time
  • (koyama) Add option of "power" and "demod" to Transfer function
  • Add a interferometer drawing expand button

Future task (Once task was solved, move to Log.)

  • split the codes by using function
  • add new configuration of interferometer (FPMI/PRFPMI/DRFPMI)
  • read external data and over plot

Useful page

KAGRA/Subgroups/MIF/Simulation/KamikokaActivity20200817 (last edited 2020-10-18 17:32:36 by naoki.koyama)