Skip to content

Latest commit

 

History

History
129 lines (88 loc) · 5.34 KB

guide.md

File metadata and controls

129 lines (88 loc) · 5.34 KB

Remote access to LTB

Install VS Code and configure SSH

If you do not have VS Code on your machine, you can install it first, and then configure the remote access.

  1. Install VS Code image

  2. Install necessary extensions: (When you install ‘Remote – SSH’, another one will be installed automatically.) image

  3. Add a new SSH: image image

  4. Conenct to the SSH you just added: image

  5. Select platform and input passwords: image

Now we assume that you have access to the SSH.

  1. You can check out the files: image

Use LTBVIS

Before using LTBVIS, please install the extension docker in the VS Code estension market.

The LTBVis is already installed in the server for the common account '/home/curentltb/ltb/ltbvis'.

  1. Hit Ctrl + ~ to open the terminal window. Change path to the LTBVIS location:
cd /home/curentltb/ltball/ltbvis
  1. Build the LTBVIS (the environment is already there, only do this when needed):
./go.sh build
  1. Open tmux:
tmux
  1. Now you are in the tmux, run the LTBVIS:
./go.sh dev2

Then there are three panes, which are http, dime2, and control, respectively.

  1. In the port panel, port 8810 should be forwarded automatically, and you need to manually forward the port 8818. Now the communication is ready, then open the web 'localhost:8810' in your browser (Chrome is recommended) and the visualization window should be there.

  2. In the tmux command window, the command is already input there, just hit 'enter' and you should be able to run the example case.

  3. After running, please close the program propoerly, or it will cause trouble in the next time use. (1) In the control pane, hit Ctrl + C and then exit to safely close it. (2) Then it should be switched to dime2 pane, hit Ctrl + C and then exit to safely close it. (3) Then it should be switched to http pane, hit Ctrl + C and then exit to safely close it. (4) Finally clean the docker images and tmux sessions by ./go.sh clean. (5) Remove the ports (8810 and 8818) you just forwarded.

After successfully running the visualization, you can replay the video in your browser. Before you visualize another one, remember to refresh the visualize webpage.

Trouble shooting:

  1. If no visualization appears in the browser, check if the port is forwarded correctly.

  2. If in the dime pane, it said: "Address already in use", you may need to delete the '/tmp/dime2' and then run the LTBVIS again.

  3. If the port is already in use, you may remove those ports in the port panel and then run again.

  4. If ANDES said the file does not exist, check the mounting path. The default path is 'pwd/cases' ('/home/curentltb/ltball/ltbvis/cases'), if you need to change the path, please change the path before ':/home/cui/work' in the docker run .... It should be noted that the blank space in the path may cause error, if so please include your path in the double quote.

Other ANDES command:

If you need any other ADNES command, just modify the andes part in the docker command (... andes run wecc_vis.xlsx -r tds ...).

Convert the andes output npz file into csv file:

andes plot weec_vis_out.npz --to-csv

Visualize the existing output csv file:

andes run weec_vis_out.xlsx --from-csv weec_vis_out.csv

More details:

ANDES Documentation:

https://docs.andes.app/en/stable/

LTBVIS:

https://github.com/CURENT/ltbvis

Additional notes

Play with Jupyter Notebook:

  • Open in VS Code: (Make sure you have installed Jupyter extension.) image image

  • Open in browser:

    a) Open terminal by: Ctrl + ~ image

    b) CD to the path which will be the root path: image

    c) open jupyter notebook by:

    jupyter notebook
    

    If it does not open browser automatically, you can open it manually from the link: image

    If you cannot find the desired kernel (usually it should be andes), you will need to install ipykernel. image