aasensio / hazel2

Hazel v2.0: synthesis and inversion of Stokes profiles caused by the joint action of atomic level polarization and the Hanle and Zeeman effects
https://aasensio.github.io/hazel2/index.html
MIT License
21 stars 6 forks source link

Not fitting telluric lines #14

Closed rahulyadav99 closed 6 years ago

rahulyadav99 commented 6 years ago

The nodes of telluric lines are not working. If I set them (lambda0, sigma and Depth) to 1 then I am getting the following error. ~/anaconda3/envs/hazel_env/lib/python3.6/site-packages/hazel-2018.6.7-py3.6-linux-x86_64.egg/hazel/model.py in invert(self, randomize) 1435 1436 # Find all active parameters for this cycle -> 1437 self.find_active_parameters(self.cycle) 1438 1439 # Randomize parameters if necessary

~/anaconda3/envs/hazel_env/lib/python3.6/site-packages/hazel-2018.6.7-py3.6-linux-x86_64.egg/hazel/model.py in find_active_parameters(self, cycle) 990 tmp = {'atm': atm, 'n_nodes': par[cycle], 'parameter': l, 991 'ranges': self.atmospheres[atm].ranges[l], 'delta': self.atmospheres[atm].epsilon[l], --> 992 'left': left, 'right': right, 'regularization': self.atmospheres[atm].regularization[l]} 993 994 self.nodes.append(self.atmospheres[atm].nodes[l])

KeyError: 'lambda0'

aasensio commented 6 years ago

Fixed. I was on the initial steps of adding regularization to the inversion and I forgot to update the code of the telluric contamination. It should work now (not yet regularization)