aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 3211422f4b28b56344be6ff8e15f441ea3007722 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Spextool Manager

A quality of life utility for managing [Spextool](http://irtfweb.ifa.hawaii.edu/~spex/observer) installations

## Features

- A basic management tool and activation script
- _Predictable runtime environment clutter_

## Getting started

**Clone the spexmgr repository**
```
git clone https://github.com/jhunkeler/spexmgr
```

**Add spexmgr to your path**
```
export PATH="$(pwd)/spexmgr/bin:$PATH"
```

**Install a Spextool release**

Begin by listing all available versions:

```
$ spexmgr list
===========
 Available
===========
  1.4
  1.5
  2.0
  2.1
  2.2
  2.3
  3.1
  3.2
  3.3
  3.4
  4.0
  4.0.1
  4.0.2
  4.0.3
  4.1
```

Now install Spextool and its dependencies:

```
$ spexmgr install 4.1
spexmgr install 4.1
INFO: Downloading: Spextool_v4.1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  190M  100  190M    0     0  22.2M      0  0:00:08  0:00:08 --:--:-- 25.8M
INFO: Installing: v4.1
INFO: Downloading: https://github.com/wlandsman/IDLAstro/archive/refs/heads/master.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0  9.9M    0     0  8180k      0 --:--:--  0:00:01 --:--:-- 12.9M
INFO: Downloading: https://idlastro.gsfc.nasa.gov/ftp/coyote_astron.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  276k  100  276k    0     0   833k      0 --:--:-- --:--:-- --:--:--  834k
INFO: Downloading: https://pages.physics.wisc.edu/~craigm/idl/down/cmtotal.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  689k  100  689k    0     0  1489k      0 --:--:-- --:--:-- --:--:-- 1489k
INFO: Installing dependency: IDLAstro
INFO: Installing dependency: coyote
INFO: Installing dependency: cmtotal
```

In this example IDLAstro, coyote, and cmtotal are installed to `share/` and Spextool-4.1 is installed to `spex/4.1`:

**Activate Spextool**

To activate a Spextool in your current shell:

```
source spexactivate 4.1
```

The activation script prepends `share/` and `spex/4.1` to `IDL_PATH`, and any previous activations are replaced. If you activate 4.1, then 4.0 in the same shell, then 4.1 will no longer be present in `IDL_PATH`.

**Test it**

*As of v4.0:*

```
$ idl
IDL> mc_testspextoolpath
% Compiled module: MC_TESTSPEXTOOLPATH.
% Compiled module: FILE_WHICH.
% Compiled module: READCOL.
% Compiled module: REMCHAR.
% Compiled module: GETTOK.
% READCOL: 1 valid lines read

Spextool version 4.1 loaded.

The Astronomy User's Library directories are in your IDL path.

The Markwardt MPFIT Library directories are in your IDL path.

The IDL paths are set correctly.
```

*or earlier:*

TODO ITEM


## Commands

### spexmgr

```
usage: spexmgr [-h] {command} [arg ...]

Arguments:
  --help    -h        this message

Commands:
  clean               Removed cached packages/archives
  list                List available spextool releases
  install {release}   Install a spextool release
```


### spexactivate

```
usage: source spexactivate {release}
```