Differences between revisions 4 and 5
Revision 4 as of 2020-08-06 08:48:37
Size: 1422
Editor: naoki.koyama
Comment:
Revision 5 as of 2020-08-06 12:40:01
Size: 3417
Editor: naoki.koyama
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
== install ==
== Introduction ==
To develop GUI for interferometer simulation with Debian 10, you need to install software as follows.
Line 5: Line 8:
VertualBoxでDebian10を実行している状態で作業を行う。 == Requirements ==
The following tasks require that you are running Debian 10 with VirtualBox.
Please refer to the following instructions on how to start Debian 10.
Line 7: Line 12:
・emacs dl
→エディタが他にない場合入れておく。デフォルトでエディタがインストールされていない場合がある。
→コマンド
sudo apt-get install emacs
http://gwwiki.icrr.u-tokyo.ac.jp/JGWwiki/KAGRA/Subgroups/MIF/Simulation/SimMeeting20200731
Line 12: Line 14:
・anaconda3 Linux 64-Bit (x86) Installer (550 MB)をダウンロードする
→https://www.anaconda.com/products/individual
anaconda3 install
→ダウンオードしたanaconnda3の場所に移動してコマンド
bash ./Anaconda3-2020.07-Linux-x86_64.sh
を実行してインストールする
一度ターミナルを閉じてもう一度開かないとcondaのコマンドが実行できないことに注意する
== Installation of anaconda3 ==
Download the anaconda3 Linux 64-Bit (x86) Installer (550 MB) → https://www.anaconda.com/products/individual
Line 20: Line 17:
・igwn conda 検索して一番上のページ
Environment→python37 DL
https://computing.docs.ligo.org/conda/environments/igwn-py37/
コマンド
conda env create --file igwn-py37 .yaml -n "自分で名前を付ける"
Start the terminal and go to the directory where you downloaded anaconda3.
Line 26: Line 19:
・finesse install
http://www.gwoptics.org/finesse/#install
-> conda install -c gwoptics pykat
It's probably in Downloads.Enter the following command.
Line 30: Line 21:
・コマンド
仮想環境にはいる
conda activate "自分のつけた名前"
入っている仮想環境をみる
conda info -e
今の仮想環境にインストールされているパッケージを一覧する
conda list
{{{bash . /Anaconda3-2020.07-Linux-x86_64.sh}}}
Line 38: Line 23:
gitのインストール
apt-get install git
If you close the terminal and open it again, you can use the conda commands.

== Igwn python37 ==
Download igwn Linux version from the following URL.

https: https://computing.docs.ligo.org/conda/environments/igwn-py37/

This file is a collection of packages used in anaconda.
It is used to create a virtual environment with anaconda.
By using the conda command, you can easily switch the virtual environment you created to active.
To create the virtual environment, enter the following command.

{{{conda env create --file igwn-py37 .yaml -n XXXXX}}}

Please give XXXXX an appropriate name that is easy to understand.
XXXXX will be the name you will call later when you activate this virtual environment.

To switch this virtual environment, you can use the following command.

{{{conda activate XXXXX}}}
{{{conda deactivate XXXXX}}}

To see the current virtual environment you have, use the following command.

{{{conda info -e}}}

You can see the packages installed when you create a virtual environment using this file with the following command.

{{{conda list}}}

== Installation of Finesse2 ==
Finesse (http://www.gwoptics.org/finesse/#install) is a simulation tool that you can use with Jupyter notebook and others.

To install Finesse using conda, type the following command.

{{{conda install -c gwoptics pykat}}}

When the installation is complete, open jupyter notebook and enter the following command.


{{{from pykat import finesse}}}

{{{from pykat.commands import * }}}

{{{kat = finesse.kat()}}}

{{{code = """"}}}

{{{l laser 1 0 n1}}}

{{{s space 1 n1 n2}}}

{{{pd pout n2}}}

{{{xaxis laser P lin 1 10 100}}}

{{{""""}}}

{{{kat.parse(code)}}}

{{{out = kat.run()}}}

out.plot()


If you see the graph, the installation was successful.
You may encounter some errors when installing in this manner.
In that case, entering the following command may solve the problem.

{{{ln -s $HOME/anaconda3/envs/py37/lib/libgsl.so $HOME/anaconda3/envs/py37/lib/libgsl.so.0}}}

== Download the github file from the terminal ==
Set up a terminal to download files uploaded to Github from the terminal.
Open a terminal and type the following command.

{{{sudo apt-get install git}}}

To download the file, you can use the following command.

{{{git clone XXX}}}

XXX is the url of the file you want to download.

== Install emacs ==
If the editor is not installed, you need to install it.
You can install it by typing the following command into a terminal.

{{{sudo apt-get install emacs}}}

KAGRA/Subgroups/MIF/Simulation/CondaSetupについて、ここに記述してください。

install

Introduction

To develop GUI for interferometer simulation with Debian 10, you need to install software as follows.

Requirements

The following tasks require that you are running Debian 10 with VirtualBox. Please refer to the following instructions on how to start Debian 10.

http://gwwiki.icrr.u-tokyo.ac.jp/JGWwiki/KAGRA/Subgroups/MIF/Simulation/SimMeeting20200731

Installation of anaconda3

Download the anaconda3 Linux 64-Bit (x86) Installer (550 MB) → https://www.anaconda.com/products/individual

Start the terminal and go to the directory where you downloaded anaconda3.

It's probably in Downloads.Enter the following command.

bash . /Anaconda3-2020.07-Linux-x86_64.sh

If you close the terminal and open it again, you can use the conda commands.

Igwn python37

Download igwn Linux version from the following URL.

https: https://computing.docs.ligo.org/conda/environments/igwn-py37/

This file is a collection of packages used in anaconda. It is used to create a virtual environment with anaconda. By using the conda command, you can easily switch the virtual environment you created to active. To create the virtual environment, enter the following command.

conda env create --file igwn-py37 .yaml -n XXXXX

Please give XXXXX an appropriate name that is easy to understand. XXXXX will be the name you will call later when you activate this virtual environment.

To switch this virtual environment, you can use the following command.

conda activate XXXXX conda deactivate XXXXX

To see the current virtual environment you have, use the following command.

conda info -e

You can see the packages installed when you create a virtual environment using this file with the following command.

conda list

Installation of Finesse2

Finesse (http://www.gwoptics.org/finesse/#install) is a simulation tool that you can use with Jupyter notebook and others.

To install Finesse using conda, type the following command.

conda install -c gwoptics pykat

When the installation is complete, open jupyter notebook and enter the following command.

from pykat import finesse

from pykat.commands import * 

kat = finesse.kat()

code = """"

l laser 1 0 n1

s space 1 n1 n2

pd pout n2

xaxis laser P lin 1 10 100

""""

kat.parse(code)

out = kat.run()

out.plot()

If you see the graph, the installation was successful. You may encounter some errors when installing in this manner. In that case, entering the following command may solve the problem.

ln -s $HOME/anaconda3/envs/py37/lib/libgsl.so $HOME/anaconda3/envs/py37/lib/libgsl.so.0

Download the github file from the terminal

Set up a terminal to download files uploaded to Github from the terminal. Open a terminal and type the following command.

sudo apt-get install git

To download the file, you can use the following command.

git clone XXX

XXX is the url of the file you want to download.

Install emacs

If the editor is not installed, you need to install it. You can install it by typing the following command into a terminal.

sudo apt-get install emacs

KAGRA/Subgroups/MIF/Simulation/CondaSetup (last edited 2020-08-26 13:59:31 by HirotakaYuzurihara)