示例#1
0
def test_setting_a_known_pair():

    lhs6328_spectrum1D = SpectrumOneD(log_file_name=None)
    wavecal = WavelengthCalibration(log_file_name=None)
    lhs6328_spectrum1D.add_arc_spec(arc_spec)
    wavecal.from_spectrum1D(lhs6328_spectrum1D)
    # Find the peaks of the arc
    wavecal.find_arc_lines(
        save_fig=True,
        fig_type="iframe+png",
        filename=os.path.join(
            HERE, "test_output", "test_wavecal_find_arc_lines"
        ),
        display=False,
        return_jsonstring=True,
    )
    wavecal.initialise_calibrator()
    wavecal.set_known_pairs(123, 456)
    assert wavecal.spectrum1D.calibrator.pix_known == 123
    assert wavecal.spectrum1D.calibrator.wave_known == 456