Esempio n. 1
0
def func_freq_comb(deg, comb, wave, **kwargs):
    kwargs["degree"] = deg
    module = WavelengthCalibrationModule(**kwargs)
    wave = module.frequency_comb(comb, wave)
    if module.n_lines_good < 8000:
        raise ValueError("Not enough lines found")
    return module.aic
Esempio n. 2
0
def func_freq_comb(degree, comb, wave, threshold, wavecal_mode):
    module = WavelengthCalibrationModule(plot=False,
                                         degree=degree,
                                         threshold=threshold,
                                         mode=wavecal_mode,
                                         lfc_peak_width=3,
                                         nstep=8)
    wave = module.frequency_comb(comb, wave)
    return module.aic
Esempio n. 3
0
def func_wavecal(deg, thar, instrument, mode, **kwargs):
    reference = instruments.instrument_info.get_wavecal_filename(
        None, instrument, mode, polarimetry=False)
    reference = np.load(reference, allow_pickle=True)
    linelist = reference["cs_lines"]
    kwargs["degree"] = deg

    module = WavelengthCalibrationModule(**kwargs)
    wave, coef = module.execute(thar, linelist)

    return module.aic
Esempio n. 4
0
def func_wavecal(degree, thar, instrument, mode, threshold, iterations,
                 wavecal_mode, shift_window):
    reference = instruments.instrument_info.get_wavecal_filename(
        None, instrument, mode)
    reference = np.load(reference, allow_pickle=True)
    linelist = reference["cs_lines"]

    module = WavelengthCalibrationModule(
        plot=False,
        manual=False,
        degree=degree,
        threshold=threshold,
        iterations=iterations,
        mode=wavecal_mode,
        shift_window=shift_window,
    )
    wave, coef = module.execute(thar, linelist)

    return module.aic
Esempio n. 5
0
def func_freq_comb(deg, comb, wave, **kwargs):
    kwargs["degree"] = deg
    module = WavelengthCalibrationModule(**kwargs)
    wave = module.frequency_comb(comb, wave)
    return module.aic