-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMockFBA_PreProcess.jl
executable file
·46 lines (34 loc) · 1.12 KB
/
MockFBA_PreProcess.jl
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
#!/bin/bash
#=
exec julia --color=yes --startup-file=no "${BASH_SOURCE[0]}" "$@"
=#
using Pkg
#Pkg.activate(".")
#include("srg/MockFBA.jl")
import MockFBA
using YAML
function main(ARGS)
#load the config file
config=YAML.load_file(ARGS[1])
tracer=ARGS[2]
#1 to preprocess focalp plan
focal_plane=parse(Int32,ARGS[3])
#get the needed info from config
fname=config["target"][tracer]["FITSfile"]
priority_list=config["target"][tracer]["Priorities"]
priority_frac_list=config["target"][tracer]["Priority_fraction"]
outfile=config["target"][tracer]["JLDfile"]
tile_file=config["TILES"]["tile_file"]
tile_radius_indeg=config["TILES"]["tile_radius"]
npass=config["TILES"]["NumPass"]
program=config["TILES"]["PROGRAM"]
#pre-process the tracer
MockFBA.preprocess_tracer(fname,priority_list,priority_frac_list,outfile,
tile_file,tile_radius_indeg,npass,program)
#pre-process the focal plane
if(focal_plane==1)
fp_dic,exc_dic=MockFBA.load_hw_full_FocalPlane!(config["focal_plane"];date=config["focal_plane"]["date"])
end
end
@show ARGS
main(ARGS)