forked from igrins/plp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathigr_pipe.py
64 lines (53 loc) · 2.05 KB
/
igr_pipe.py
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
from igrins.recipes.argh_helper import argh
import igrins.recipes.recipe_flat
#import igrins.recipes.recipe_thar
#import igrins.recipes.recipe_wvlsol_sky
from igrins.recipes.recipe_wvlsol_sky2 import wvlsol_sky, sky_wvlsol
#from igrins.recipes.recipe_distort_sky import distortion_sky
from igrins.recipes.recipe_extract import (a0v_ab, stellar_ab,
a0v_onoff, stellar_onoff,
extended_ab, extended_onoff)
from igrins.recipes.recipe_extract_plot import plot_spec
from igrins.recipes.recipe_publish_html import publish_html
from igrins.recipes.recipe_prepare_recipe_logs import prepare_recipe_logs
from igrins.recipes.recipe_tell_wvsol import tell_wvsol, wvlsol_tell
from igrins.recipes.recipe_make_sky import make_sky
recipe_list = [igrins.recipes.recipe_flat.flat,
#igrins.recipes.recipe_thar.thar,
#igrins.recipes.recipe_wvlsol_sky.sky_wvlsol,
#igrins.recipes.recipe_wvlsol_sky.wvlsol_sky,
wvlsol_sky,
sky_wvlsol,
#distortion_sky,
a0v_ab,
stellar_ab,
a0v_onoff,
stellar_onoff,
extended_ab,
extended_onoff,
plot_spec,
publish_html,
prepare_recipe_logs,
tell_wvsol,
wvlsol_tell,
make_sky
]
import igrins.recipes.recipe_register as recipe_register
recipe_list.extend(recipe_register.get_command_list())
from igrins.recipes.recipe_divide_a0v import divide_a0v
recipe_list.extend([divide_a0v])
parser = argh.ArghParser()
parser.add_commands(recipe_list)
# for k, v in subcommands.items():
# parser.add_commands(v, namespace=k)
if __name__ == '__main__':
import numpy
numpy.seterr(all="ignore")
import sys
argv = sys.argv[1:]
if "--debug" in argv:
argv.remove("--debug")
# print("--debug")
from igrins.libs.logger import set_level
set_level("debug")
argh.dispatch(parser, argv=argv)