-
Notifications
You must be signed in to change notification settings - Fork 0
/
mcfost_struct.i
300 lines (265 loc) · 6.04 KB
/
mcfost_struct.i
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
//Include other files;
//#include "plot_3d.i"
MCFOST_version = 3.0 ;
lambda_min=0.1;
lambda_max=3000.0;
// load dimension parameters used
nrad = (nrad ? nrad : 60);
nz = (nz ? nz : 20);
n_az = (n_az ? n_az : 1);
nrad_in = (nrad_in ? nrad_in : 10);
nthet = (nthet ? nthet : 10);
RT_ntheta = (RT_ntheta ? RT_ntheta : 1);
nphi = (nphi ? nphi : 1);
nlamb = (nlamb? nlamb: 100);
nlamb1 = (nlamb1? nlamb1: 51) ;
nx = (nx ? nx : 51);
ny = (ny ? ny : 51);
n_type = (n_type ? n_type : 7);
n_T = (n_T ? n_T : 1);
n_T_grain = (n_T_grain ? n_T_grain : 1);
data_dir = (data_dir ? data_dir :"undefined");
n_zones = (n_zones ? n_zones : 1) ;
n_especes = (n_especes ? n_especes : 7) ;
n_components = (n_components ? n_components : 3) ;
n_stars = (n_stars ? n_stars : 1) ;
nmol = (nmol ? nmol : 1) ;
n_lines_ray_tracing = (n_lines_ray_tracing ? n_lines_ray_tracing : 3);
n_Trans = (n_Trans ? n_Trans : 3) ;
n_speed = (n_speed ? n_speed : 50) ;
if (is_void(vect_n_phi)) vect_n_phi = indgen(nphi);
nphiV = numberof(vect_n_phi);
if (is_void(vect_n_sed))
vect_n_sed = indgen(9); // Vector of num flux in sed_file
nsed = numberof(vect_n_sed);
if (is_void(vect_n_sed1))
vect_n_sed1 = [1]; // Vector of num flux in sed_file
nsed1 = numberof(vect_n_sed1);
//struct_file = get_cwd()+"/init/mcfost_struct.i"; //put the complete path if this file is not in your yorick directory
struct_file = "~/yorick/init/mcfost_struct.i"; //put the complete path if this file is not in your yorick directory
sed1_file = ".sed_th.fits.gz";
sed2_file = "sed_mc.fits.gz";
sed_rt_file = "sed_rt.fits.gz";
image_file = "MC.fits.gz"
image_rt_file = "RT.fits.gz"
temperature_file = "Temperature.fits.gz";
spectre_file = "lines.fits.gz";
flux_adjust = 1.; // Correction eventuelle distance
//lamb_adjust = 1e-6; // um to m
lamb_adjust = 1; // um to m
// STRUCTURE DEFINITION
struct McfostPhoton {
int n1;
int n2;
int nlambda;
int nimage
}
struct McfostWavelength {
string file;
int nlamb;
int nlamb1;
float lambda_min
float lambda_max
}
struct McfostDust {
float sublim;
string lstrat;
string lmigration ;
int strat_type ;
float strat;
float a_strat;
float gas_dust ;
}
struct McfostDustPop {
//float dens;
float porosity;
float amin;
float amax;
float aexp;
string file(n_components) ;
int type_grain;
int n_grains;
int n_components ;
int mixing_rule ;
float mass_fraction;
float component_volume_fraction(n_components);
string type;
float dhs_maxf ;
}
struct McfostGrid {
double R_grid(nrad);
double H_grid(nrad);
}
struct McfostGridp {
int nrad;
int nz;
int n_az;
int nrad_in;
int geometry;
}
struct McfostGridT {
int n_T;
int n_T_grain;
float T_min;
float T_max;
}
struct McfostMaps {
int nthet;
int nphi;
int nx;
int ny;
int n_type;
float zoom;
int inc;
int delta;
float dist;
float PA;
float size_neb;
float map_size ;
float angle_interest;
string lonly_bin_interest;
float RT_imin ;
float RT_imax ;
float RT_az_min ;
float RT_az_max ;
int RT_ntheta ;
int RT_naz ;
string lRT_i_centered ;
float RT_incl(RT_ntheta) ;
}
struct McfostZone {
double mass;
double gas_to_dust;
double Ho;
double Ro;
double vert_exp ;
double rout;
double Rc;
double rin;
double edge;
double beta;
double dens;
double gamma_exp;
int geometry;
double size_neb;
int n_especes;
}
struct McfostCavity{
string lcavity ;
float H0 ;
float R0 ;
float beta ;
}
struct McfostMol{
float vmax;
float vturb;
int n_speed;
string lpop, lpop_precise, lLTE;
float profile_width;
string molecule_file;
int level_max;
string cst_abundance;
float abundance;
string abundance_file;
string ray_tracing;
int n_lines_ray_tracing;
int transition_numbers(n_lines_ray_tracing);
}
struct McfostStars {
float T;
float R;
float Mass;
string is_bb;
string spectre;
float x, y, z;
float fUV, slope_fUV ;
}
struct McfostSimu {
float version;
string lcheckpoint;
int checkpoint_time;
string ltemp, lsed, lsed_complete;
string lem_disk_image, lsepar, lsepar_pola;
float tau_seuil, wl_seuil;
int scatt_method, aniso_method;
string lsym_ima, lsym_centrale, lsym_axiale;
string ldust_sublimation;
float correct_Rsub ;
string lchauff_int;
string lhydro_eq ;
float viscosity;
int n_zones;
int n_especes_max ;
int n_components_max ;
int n_stars;
int nmol ;
}
struct McfostParams {
string dir;
McfostPhoton phot;
McfostWavelength wave;
McfostDust dust;
McfostDustPop dust_pop(n_zones,n_especes);
McfostGridp grid;
McfostGridT gridT;
McfostMaps map;
McfostZone zones(n_zones);
McfostCavity cavity ;
McfostStars stars(n_stars);
McfostSimu simu
McfostMol mol(nmol)
}
struct McfostSED {
McfostParams P;
McfostGrid grid;
float T(nrad, nz, n_az, n_T_grain);
float lamb1(nlamb1);
float lamb(nlamb);
float sed1(nlamb1, nthet , nphi, nsed1);
float sed(nlamb, nthet , nphi, nsed);
float sed_rt(nlamb, RT_ntheta , nphi, n_type);
string dir;
float h_hydro(nrad)
}
struct McfostImage {
McfostParams P;
McfostGrid grid;
float lamb;
float image(nx, ny, nthet , nphi, n_type);
float image_rt(nx, ny, RT_ntheta , nphi, n_type);
string dir;
}
struct McfostSpectre {
McfostParams P;
McfostGrid grid;
float Fline(nx, ny, 2*n_speed+1, n_lines_ray_tracing, RT_ntheta) ;
float Fcont(nx, ny, n_lines_ray_tracing, RT_ntheta) ;
int ifreq(n_lines_ray_tracing) ;
float freq(n_lines_ray_tracing) ;
float velocity(2*n_speed+1) ;
string dir;
string mol_name ;
}
//***************************************************
n_params_tot = 53;
_n_valeurs_max = 40 ;
struct grid {
string name ;
// MCFOST
int mcfost_version ;
// Clusters
int n_clusters ;
string clusters_name(n_clusters) ;
// Modeles
int n_models ;
McfostParams params(n_models) ;
string model_name(n_models) ;
}
struct MCFOST_grid {
int dims(n_params_tot);
string names(n_params_tot);
float values(n_params_tot,_n_valeurs_max) ;
McfostStars stars(_n_valeurs_max);
McfostParams ref ;
}
//***************************************************