def test_limits_trace_curves_to_xy_edges(self, diagonal_trace):
        spt = SpectralTrace(diagonal_trace)
        xy_edges = {"x_min": -25, "x_max": -15, "y_min": 10, "y_max": 20}
        mtcs_all = spt.get_trace_curves(0.015)
        mtcs_xy_limited = spt.get_trace_curves(0.015, xy_edges=xy_edges)

        assert len(mtcs_all) > len(mtcs_xy_limited)

        if PLOTS:
            for mtc in mtcs_xy_limited:
                plt.plot(mtc.x, mtc.y)
            spt.plot(spt.wave_min, spt.wave_max)
            plt.axhline(xy_edges["y_min"])
            plt.axhline(xy_edges["y_max"])
            plt.axvline(xy_edges["x_min"])
            plt.axvline(xy_edges["x_max"])
            plt.show()
 def test_plots(self, curved_trace):
     spt = SpectralTrace(curved_trace)
     if PLOTS:
         spt.plot(0.5, 2.5)
         plt.show()