def test_run(master_dir): # Masters spectrograph = load_spectrograph('shane_kast_blue') mstilt, edges = load_kast_blue_masters(mstilt=True, edges=True) # Instantiate #spectrograph.detector[0]['saturation'] = 60000. #spectrograph.detector[0]['nonlinear'] = 0.9 par = pypeitpar.WaveTiltsPar() wavepar = pypeitpar.WavelengthSolutionPar() slits = edges.get_slits() buildwaveTilts = wavetilts.BuildWaveTilts(mstilt, slits, spectrograph, par, wavepar, det=1) # Run waveTilts = buildwaveTilts.run(doqa=False) assert isinstance(waveTilts.fit2tiltimg(slits.slit_img()), np.ndarray)
def test_run(master_dir): # Masters spectrograph = load_spectrograph('shane_kast_blue') msarc, tslits_dict, mstrace = load_kast_blue_masters(aimg=True, tslits=True) # Instantiate master_key = 'A_1_01' spectrograph.detector[0]['saturation'] = 60000. spectrograph.detector[0]['nonlinear'] = 0.9 par = pypeitpar.WaveTiltsPar() wavepar = pypeitpar.WavelengthSolutionPar() waveTilts = wavetilts.WaveTilts(msarc, tslits_dict, spectrograph, par, wavepar, det=1, master_key=master_key, master_dir=master_dir, reuse_masters=True) # Run tilts_dict, mask = waveTilts.run(doqa=False) assert isinstance(tilts_dict['tilts'], np.ndarray)
def test_wavetilts(): pypeitpar.WaveTiltsPar()