Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two question about APPLYING INSTRUMENTAL FUNCTIONS #48

Open
Yuhao-9509 opened this issue Apr 19, 2024 · 0 comments
Open

Two question about APPLYING INSTRUMENTAL FUNCTIONS #48

Yuhao-9509 opened this issue Apr 19, 2024 · 0 comments

Comments

@Yuhao-9509
Copy link

Thank you very much for your work!In the part of INSTRUMENTAL FUNCTIONS, I have a few questions.
The first question is whether the Michelson Instrumental functions do not weight the center?
Code show as below:

def SLIT_MICHELSON(x,g):
    """
    Instrumental (slit) function.
    B(x) = 2/γ*sin(2pi*x/γ)/(2pi*x/γ) if x!=0 else 1,
    where 1/γ is the maximum optical path difference.
    """
    y = np.zeros(len(x))
    index_zero = x==0
    index_nonzero = ~index_zero
    dk_ = 2*np.pi/g
    x_ = dk_*x[index_nonzero]
    #Michelson:B(x)=\frac{2}{\gamma}\sin^2\left(\frac{\pi}{\gamma}x\right)/\left(\frac{\pi}{\gamma}x\right)^2
    #Original code:y[index_zero] = 1
    y[index_zero]= 2 / g
    y[index_nonzero] = 2/g*np.sin(x_)/x_
    return y

The second question is the wing width sampling point. If the center point of 0 is not sampled, will it cause wave number drift?
Code show as below:

def arange_(lower,upper,step):
    npnt = floor((upper-lower)/step)+1
    npnt = int(npnt) # cast to integer to avoid type errors
    upper_new = lower + step*(npnt-1)
    if abs((upper-upper_new)-step) < 1e-10:
        upper_new += step
        npnt += 1    
    return linspace(lower,upper_new,npnt)

Thanks again for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant