Skip to content

Two question about APPLYING INSTRUMENTAL FUNCTIONS #48

Description

@Yuhao-9509

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions