Commit 11e99b6550e5a0d6f047846fc40ee00ea8667355
1 parent
5864c70d
Exists in
master
first commit
Showing
1 changed file
with
103 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,103 @@ |
1 | +PRO dustem_show_file_dependencies,help=help | |
2 | + | |
3 | +;== make a list of routines used by DustEMWrap | |
4 | +;+ | |
5 | +; NAME: | |
6 | +; dustem_show_file_dependencies | |
7 | +; PURPOSE: | |
8 | +; Generate a list of routines called by DustEMWrap runs | |
9 | +; CATEGORY: | |
10 | +; DustEMWrap, Distributed, Low-Level | |
11 | +; CALLING SEQUENCE: | |
12 | +; dustem_show_file_dependencies[,help=help] | |
13 | +; INPUTS: | |
14 | +; None | |
15 | +; OPTIONAL INPUT PARAMETERS: | |
16 | +; None | |
17 | +; OUTPUTS: | |
18 | +; OPTIONAL OUTPUT PARAMETERS: | |
19 | +; ACCEPTED KEY-WORDS: | |
20 | +; help = If set, print this help | |
21 | +; COMMON BLOCKS: | |
22 | +; None | |
23 | +; SIDE EFFECTS: | |
24 | +; None | |
25 | +; RESTRICTIONS: | |
26 | +; The DustEM fortran code must be installed | |
27 | +; The DustEMWrap IDL code must be installed | |
28 | +; PROCEDURES AND SUBROUTINES USED: | |
29 | +; *** COMMENT AH --> is this really NONE? **** | |
30 | +; EXAMPLES | |
31 | +; MODIFICATION HISTORY: | |
32 | +; Written by JPB Apr-2011 | |
33 | +; Evolution details on the DustEMWrap gitlab. | |
34 | +; See http://dustemwrap.irap.omp.eu/ for FAQ and help. | |
35 | + | |
36 | +if keyword_set(help) then begin | |
37 | + doc_library,'dustem_show_file_dependencies' | |
38 | + goto,the_end | |
39 | +END | |
40 | + | |
41 | +dustem_run_example | |
42 | +;dustem_fit_sed_readme | |
43 | +;dustem_run_readme | |
44 | +help,/function,output=ff | |
45 | +help,/pro,output=pp | |
46 | + | |
47 | +ff=ff[1:*] | |
48 | +pp=pp[2:*] | |
49 | + | |
50 | +nff=n_elements(ff) | |
51 | +npp=n_elements(pp) | |
52 | + | |
53 | +one_func={name:'',path:'',args:ptr_new()} | |
54 | +one_pro={name:'',path:'',args:ptr_new()} | |
55 | + | |
56 | +func_list=replicate(one_func,nff) | |
57 | +pro_list=replicate(one_pro,npp) | |
58 | + | |
59 | +message,'Found '+string(nff)+' functions',/info | |
60 | + | |
61 | +FOR i=0L,nff-1 DO BEGIN | |
62 | + str=strcompress(ff(i)) | |
63 | + vv=str_sep(str,' ') | |
64 | + func_list(i).name=vv(0) | |
65 | + func_list(i).args=ptr_new(vv(1:*)) | |
66 | + wh=which_pro(strlowcase(func_list(i).name)) | |
67 | + func_list(i).path=wh(0) | |
68 | +ENDFOR | |
69 | + | |
70 | +message,'Found '+string(npp)+' routines',/info | |
71 | +FOR i=0L,npp-1 DO BEGIN | |
72 | + str=strcompress(pp(i)) | |
73 | + vv=str_sep(str,' ') | |
74 | + pro_list(i).name=vv(0) | |
75 | + pro_list(i).args=ptr_new(vv(1:*)) | |
76 | + wh=which_pro(strlowcase(pro_list(i).name)) | |
77 | + pro_list(i).path=wh(0) | |
78 | +ENDFOR | |
79 | + | |
80 | +one_st={name:'',path:''} | |
81 | +st=replicate(one_st,nff+npp) | |
82 | +st.name=[func_list.name,pro_list.name] | |
83 | +st.path=[func_list.path,pro_list.path] | |
84 | + | |
85 | +;=== remove empty names | |
86 | +ind=where(st.name NE '') | |
87 | +st=st(ind) | |
88 | +;=== remove empty path (are entries without .pro) | |
89 | +ind=where(st.path NE '') | |
90 | +st=st(ind) | |
91 | + | |
92 | +;=== order by path | |
93 | +order=sort(st.path) | |
94 | +st=st(order) | |
95 | + | |
96 | +;file=!dustem_wrap_soft_dir+'/src/idl/all_dustem_dependencies.xcat' | |
97 | +file='DustEMWrap_file_dependencies.xcat' | |
98 | +write_xcat,st,file,/wiki | |
99 | +message,'Wrote '+file,/continue | |
100 | + | |
101 | +;stop | |
102 | +the_end: | |
103 | +END | ... | ... |