Fit rotated image

Dear all

Hello
Can I ask one question about fitting?

I want to fit rotated hyperbolic pattern.

With unrotated hyperbolic pattern I just used TF1 and function which returns

par[1]*sqrt(1 + pow(x[0]/par[0],2));

However when the pattern is rotated of course I can’t simply use this function.

New function with rotation includes y^2, x^2, xy terms.

Is there any way to fit ‘rotated hyperbola’?

I tried to rotate this ‘rotated pattern’ again to make it looks like ‘unrotated pattern’ and fitted with simple function.
However then I don’t know how much should I rotate… I just decided the angle of rotation by my eyes.
I want to parameterize this angle too…

Thank you so much to think about it together! :slight_smile:

Best Regards,
JungEun

Hi JungEun,

you can express functions in form of y=f(x).
For your case (2 y values for certain x values), the only solution I see is to use two functions.

Cheers,
Danilo

Dear Danilo

Hello,
Thank you so much!
It was an easy problem… :smiley:
Now it works very well!

Best Regars,
JungEun