forked from mmaus96/Lens_Modeling_Auto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_source_params_lists.py
executable file
·42 lines (33 loc) · 1.44 KB
/
update_source_params_lists.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
import numpy as np
from copy import deepcopy
#source_model_list.append('SHAPELETS')
kwargs_init = deepcopy(kwargs_result)
kwargs_source_init_update = []
kwargs_source_sigma_update = []
kwargs_source_fixed_update = []
kwargs_source_lower_update = []
kwargs_source_upper_update = []
for x in kwargs_init['kwargs_source']:
kwargs_source_init_update.append(x)
kwargs_source_init_update.append({'n_max': n_max,
'center_x': x['center_x'],
'center_y': x['center_y'],
'beta': x['R_sersic']})
for x in source_params[1]:
kwargs_source_sigma_update.append(deepcopy(x))
kwargs_source_sigma_update.append({})
for x in source_params[2]:
kwargs_source_fixed_update.append(deepcopy(x))
kwargs_source_fixed_update.append({})
for x in source_params[3]:
kwargs_source_lower_update.append(deepcopy(x))
kwargs_source_lower_update.append({})
for x in source_params[4]:
kwargs_source_upper_update.append(deepcopy(x))
kwargs_source_upper_update.append({})
source_params_update = [deepcopy(kwargs_source_init_update),
deepcopy(kwargs_source_sigma_update),
deepcopy(kwargs_source_fixed_update),
deepcopy(kwargs_source_lower_update),
deepcopy(kwargs_source_upper_update)]
kwargs_fixed['kwargs_source'] = kwargs_source_fixed_update