guaix-ucm / megaradrp

MEGARA (Multi-Espectrógrafo en GTC de Alta Resolución para Astronomía) is a facility instrument designed for the 10.4m GTC telescope in La Palma (Spain).
https://guaix.fis.ucm.es/megara/
GNU General Public License v3.0
12 stars 6 forks source link

Add Gauss-Hermite to model map #306

Open gildepaz opened 2 years ago

gildepaz commented 2 years ago

Since there might me circunstancies where the assumption of a pure Gaussian profile for the spatial profile of each fiber (as part of the ModelMap recipe) might not be enough, it would be great to be able to use a Gauss-Hermite profile instead but (given the lack of information unless the cover is used) fixing the parameters (different from the sigma) in the ModelMap recipe by setting the skewness and a kurtosis as a parameter in the ModelMap YAML file. Again, the idea would be not to add quantities to fit but to fit the amplitudes, positions and sigmas of each fiber profile but allowing the kurtosis to be set to a different value. Computational time, therefore, should not dramatically increase.

I assume that by changing...

g1=(t-center)/sigma
g = amp*np.exp(-.5*g1**2)

by:

gh=amp*np.exp(-.5*g1**2)*(1+skew*(c1*g1+c3*g1**3)+kurt*(c5+c2*g1**2+c4*(g1**4)))

donde los c1,c2,c3,c4,c5 son constantes:   

c1=-np.sqrt(3)
c2=-np.sqrt(6)
c3=2/np.sqrt(3)
c4=np.sqrt(6)/3
c5=np.sqrt(6)/4

would suffice.

I put below a plot with the shape of the profiles for different kurtosis (skew set to 0 in all cases). plot_GH Thanks!