radis.test.spectrum.test_operations moduleΒΆ
Created on Sun Aug 5 14:26:44 2018
@author: erwan
- test_crop(verbose=True, *args, **kwargs)[source]ΒΆ
Test that update can correctly recompute missing quantities
- test_crop_zero_boundary()[source]ΒΆ
Regression test for GitHub issue #1000.
crop()usedif wmin:instead ofif wmin is not None:to guard boundary checks. Because0.0is falsy in Python, passingwmin=0.0silently skipped the crop and returned the original (uncropped) spectrum.
- test_cut_recombine(verbose=True, *args, **kwargs)[source]ΒΆ
Use
crop()andMergeSlabs()to cut a Spectrum and recombine itAssert we still get the same spectrum at the end
- test_invariants(*args, **kwargs)[source]ΒΆ
Ensures adding 0 or multiplying by 1 does not change the spectra
- test_resample_even(*args, **kwargs)[source]ΒΆ
Test
resample_even(), and thatapply_slit()properly fails if Spectrum is not evenly distributed