forked from mmaus96/Lens_Modeling_Auto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
first_sampling.py
executable file
·32 lines (24 loc) · 1.69 KB
/
first_sampling.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
from Lens_Modeling_Auto.auto_modeling_functions import optParams
from Lens_Modeling_Auto.auto_modeling_functions import removekeys
from Lens_Modeling_Auto.auto_modeling_functions import prepareFit
from Lens_Modeling_Auto.auto_modeling_functions import runFit
from Lens_Modeling_Auto.auto_modeling_functions import get_kwarg_names
from lenstronomy.Workflow.fitting_sequence import FittingSequence
print('The lens, source, and lens light modeling parameters are')
print('lens model: ', kwargs_params['lens_model'])
print('\n')
print('source model: ', kwargs_params['source_model'])
print('\n')
print('lens light model: ', kwargs_params['lens_light_model'])
print('\n')
print('-------------------------------------------------------------------')
print('\n')
print('I will now begin the sampling')
#prepare fitting kwargs
kwargs_likelihood, kwargs_model, kwargs_data_joint, multi_band_list,kwargs_constraints = prepareFit(kwargs_data, kwargs_psf,
lens_model_list, source_model_list,
lens_light_model_list,
image_mask_list = mask_list)
chain_list, kwargs_result = runFit(fitting_kwargs_list, kwargs_params,
kwargs_likelihood, kwargs_model,
kwargs_data_joint, kwargs_constraints = kwargs_constraints)