README.md 6.63 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Commandline Tools

## bbi_gen_gifs
Collects images created by the BBI speckle pipeline and generated GIF and mp4 files from them.
Looks for png files containing one of the markers 'reco' 'alpha' or 'location'
```shell
usage: bbi_gen_gifs [-h] [-v] folder_in

positional arguments:
  folder_in      folder to be processed

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  don't silence warnings
```
## bbi_header_conversion
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Runs BBI header conversion. Requires renaming and sorting beforehand. Kis tools provides functionality to do this,
albeit not in an automated way, only using the REPL.

```shell

usage: bbi_header_conversion [-h] [-v] [-o FOLDER_OUT] folder_in

positional arguments:
  folder_in             folder to be processed

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         don't silence warnings
  -o FOLDER_OUT, --folder_out FOLDER_OUT
                        Output folder, all output files will be stored here, (default: /dat/sdc/bbi/)
```
33
34

## gris_gen_maps
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Generate preview images for gris observations. Target a day-level gris folder with this utility to generate 
png files containing continuum maps for the observations within.

```shell

usage: gris_gen_maps [-h] [-v] [-o OUTFOLDER] [-r RUN] folder_in

positional arguments:
  folder_in             folder to be processed

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         don't silence warnings
  -o OUTFOLDER, --output OUTFOLDER
                        target folder for storing generated maps. All maps are stored in a subfolder 'day/context/data/map.png'. If no folder is specified, a context data folder in each day will be
                        createdto store results
  -r RUN, --run RUN     run number
```
53
54

## gris_location_plot
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Generate location preview images for gris observations. Target a day-level gris folder with this utility to generate 
png files containing HMI continuum images with the extent of the observation overplotted.

```shell
usage: gris_location_plot [-h] [-v] [-r RUN_NUMBER] [-o OUTPUT_FOLDER] [--disable-hmi-cache] folder_in

positional arguments:
  folder_in             folder to be processed

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         don't silence warnings
  -r RUN_NUMBER, --run-number RUN_NUMBER
                        run number
  -o OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER
                        folder to use for storing results
  --disable-hmi-cache   Disable caching of HMI data in /dat. Context data is copied to the user's home directory instead.
```
73

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
## gris_parse_calib
Parse calibration settings from `calDDmmmYY.pro` files. Recursively searches target folder for calibration scripts 
and parses the environment at each call to one of the main calibration routine (gris_v8 etc.) calls.

Config data is filled into a pandas DataFrame. Run with pythons `-i` option to drop into an interactive frame for 
further batch modification or use the output file option to store the data in CSV format for use with other tools.

The resulting data should be appended to the repository of GRIS calibration settings for use with `grisred`. Currently, 
this information is stored in a csv file in the `grisred` repository (Nov 2021) this may be subject to change.     
```shell

usage: gris_parse_calib [-h] [-v] [-o OUTPUT_FILE] folder_in

positional arguments:
  folder_in             folder to be processed

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         don't silence warnings
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        output file
```

97
## gris_penumbral_thumbs
98
99
100
101
Generate preview images for GRIS penumbral masks, targets '*pen_mask.sav' files in the folder and produces .png versions.
```shell

usage: gris_penumbral_thumbs [-h] [-v] folder_in
102

103
104
105
106
107
108
109
positional arguments:
  folder_in      folder to be processed

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  don't silence warnings
```
110
## gris_plot_cont_corr
111
112
113
114
115
116
117
118
119
120
121
Plot the contents of `*cont_corr.sav` files to visualize the fitting process of the continuum correction.
```shell
usage: gris_plot_cont_corr [-h] [--store] files [files ...]

positional arguments:
  files       list of input files

optional arguments:
  -h, --help  show this help message and exit
  --store     If set, plot will not be shown but stored to the same path as the input file but as as .png
```
122
123

## gris_translate_header
124
125
126
127
128
Perform header conversion on GRIS split files. The files need to be generated using the `grs_split` functionality in 
`grisred`. If files are already translated they are skipped.

```shell
usage: gris_translate_header [-h] [--folder_out FOLDER_OUT] [-r RUN] [-v] folder_in
129

130
131
132
133
134
135
136
137
138
139
positional arguments:
  folder_in             folder to be processed, needs to be a GRIS level1_split folder

optional arguments:
  -h, --help            show this help message and exit
  --folder_out FOLDER_OUT
                        path where output is written. Defaults to input folder
  -r RUN, --run RUN     run number
  -v, --verbose         don't silence warnings
```
140
## grisplot
141
142
143
144
145
146
Display an interactive plot to explore gris data
```shell
usage: grisplot [-h] target_pattern

positional arguments:
  target_pattern  glob pattern to catch gris files (l1 or l0, non split)
147

148
149
150
optional arguments:
  -h, --help      show this help message and exit
```
151
## gristagger
152
153
154
155
156
157
158
159
160
161
162
163
164
Open an interactive gui application to tag targets of GRIS data, simply run 
`gristagger`
in an interactive shell. The tagger requires an input file in csv format formatted as
```csv
date,run
2020-07-08,1
2020-09-28,1
2020-09-05,3
2020-11-10,7
...
``` 
The gui will automatically look for preview images for the given run and allow the user to set the 
appropriate tag using a radio button. Results can be exported in csv format.
165
166

## lars_gen_preview
Carl Schaffer's avatar
Carl Schaffer committed
167
168
169
170
171
172
173
174
175
Generate preview images for LARS data. Might only be useful for data structured as in the 
center limb variation measurements. The folder is required to contain `*.chvtt.sum.fits` files.
```shell
positional arguments:
  folder_in      folder to be processed

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  don't silence warnings
176

Carl Schaffer's avatar
Carl Schaffer committed
177
```
178
## lars_logbook
Carl Schaffer's avatar
Carl Schaffer committed
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
LARS logbooks are stored in full files, this utility splits them into daily files which can be 
ingested by the LARS importer.

```shell
usage: lars_logbook [-h] folder_in folder_out

positional arguments:
  folder_in   folder to be processed
  folder_out  folder to use for storing results

optional arguments:
  -h, --help  show this help message and exit

This is a commandline tool to split lars logbook files into daily files.
```