Skip to content
Anchal Gupta edited this page Oct 10, 2023 · 13 revisions

Synthetic Diagnostics from SOLPS data

News: Minimal working set released on all repositories

How to use:

Following assumes that you have installed Julia on your computer as recommended here. We have not registered our package with Julia registry yet, thus adding packages in the standard way of using Pkg; Pkg.add("SD4SOLPS" would not work yet. Here is how you can get started on using the repositories in this project right now:

Creating your test environment

You can create a test environment file on your local machine and move it around wherever you like or refer to them from where you are running scripts or jupyter notebook. But to get there, you will have to strictly follow the following steps:

  1. Pull all the repositories from the latest master branches.
  • Some repositories have dev as the default branch, please checkout to master for stability.
  • You can pull the repositories anywhere on your computer, we will be using absolute path to these repositories in the next steps.
% git pull [email protected]:ProjectTorreyPines/SD4SOLPS.jl.git
% git checkout master
  1. Create a test environment directory a. This is strictly not required but will keep it clean for you.
% 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> dev /Users/gupta/Git/ProjectTorreyPines/OMAS.jl
...
(SD4SOLPS_env) pkg> dev /Users/gupta/Git/ProjectTorreyPines/SOLPS2IMAS.jl
...
(SD4SOLPS_env) pkg> dev /Users/gupta/Git/ProjectTorreyPines/GGDUtils.jl
...
(SD4SOLPS_env) pkg> dev /Users/gupta/Git/ProjectTorreyPines/SD4SOLPS.jl
...
(SD4SOLPS_env) pkg> dev /Users/gupta/Git/ProjectTorreyPines/SynthDiag.jl
...
(SD4SOLPS_env) instantiate
(SD4SOLPS_env) # press delete to get out
julia> exit()
  • Use your local paths to the pulled repos above.
  • Note that you can use add instead of dev above but dev allows you to remain up to date on these repos in the future by simply pulling the latest releases.
  1. 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
  1. Or you can run a jupyter notebook (for this to work, you'll have to install IJulia package in your main environment, then select the Julia kernel after starting the notebook or opening it in VScode), and at the top cell:
using Pkg;
Pkg.activate("./")
Pkg.instantiate()
  1. You can also make copies of the Project.toml and Manifest.toml generated in your SD4SOLPS_env directory and pass it around to any other directory in your local machine. In that case, it will become easier to call the scripts:
% cd working_dir
% cp /path/to/SD4SOLPS_env/as/created/above/*.toml ./
% julia --project some_script.jl
Clone this wiki locally