Skip to content
Anchal Gupta edited this page Jul 17, 2024 · 13 revisions

Synthetic Diagnostics from SOLPS data

News: v1.0.0 released on all repositories. Please ensure you are using this version from now on. Previous versions will be deprecated.

How to use:

Following assumes that you have installed Julia on your computer as recommended here. SD4SOLPS and all other repos in this project are registered with public repository FuseRegistry. For installation:

using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
Pkg.Registry.add("General")
Pkg.add("SD4SOLPS")
Pkg.add("SynthDiag")

Creating your test environment

For creating your test environment and to not install all the repos in this project in your main julia environment, you can simply start a new Project.toml file anywhere by doing:

  • Create a test environment directory
% mkdir SD4SOLPS_env
% cd SD4SOLPS_env
  1. Run Julia and do the following:
% julia --project=./
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.2 (2023-07-05)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> ]
(SD4SOLPS_env) pkg> registry add https://github.com/ProjectTorreyPines/FuseRegistry.jl.git
(SD4SOLPS_env) pkg> add SD4SOLPS
...
(SD4SOLPS_env) pkg> add SynthDIag
...
(SD4SOLPS_env) instantiate
(SD4SOLPS_env) # press backspace (delete on mac) to get out
julia> exit()
  • Now to run some script using your environment, you can run the scripts as:
% julia --project=/path/to/SD4SOLPS_env/as/created/above/ some_script.jl

Or you can run a jupyter notebook for inline visualization and testing your code.

  • For this to work, you'll have to install IJulia package in your main environment (usually called @vx.x):
% julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.2 (2023-07-05)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> ]
(@v1.9) pkg> add IJulia
(@v1.9) pkg> instantiate
# press backspace (delete on mac) to get out
(@v1.9) pkg> julia> exit()
  • Either get inside SD4SOLPS_env directory created above or get inside a working directory that contains the environment toml files created above.
  • Then create any file with .ipynb extension and select the Julia kernel after starting the notebook or opening it in VScode), and at the top cell:
using Pkg;
Pkg.activate("./")
Pkg.instantiate()

Dependence hierarchy

Note: The packages have following dependence order right now, you'll have to ensure that this is not broken while installing and updating packages:

DependencyHeirarchy

Clone this wiki locally