def test_one_line_mesh_scan_type_error_33id_29(self):
        specFile = self.abs_data_fname('33id_spec.dat')
        scan_number = 29

        sfile = specplot.openSpecFile(specFile)
        scan = sfile.getScan(scan_number)
        self.assertTrue(scan is not None)

        image_maker = specplot.Selector().auto(scan)
        self.assertTrue(issubclass(image_maker, specplot.ImageMaker))

        plotter = image_maker()
        self.assertTrue(isinstance(plotter, specplot.MeshPlotter))

        if os.path.exists(
                self.plotFile):  # always re-create this plot for testing
            os.remove(self.plotFile)
        plotter.plot_scan(scan, self.plotFile)
        self.assertTrue(os.path.exists(self.plotFile))
    def test_40x35_grid_shown_properly_lmn40_spe(self):
        specFile = self.abs_data_fname('lmn40.spe')
        scan_number = 14

        sfile = specplot.openSpecFile(specFile)
        scan = sfile.getScan(scan_number)
        self.assertTrue(scan is not None)

        image_maker = specplot.Selector().auto(scan)
        self.assertTrue(issubclass(image_maker, specplot.ImageMaker))

        plotter = image_maker()
        self.assertTrue(isinstance(plotter, specplot.MeshPlotter))

        if os.path.exists(
                self.plotFile):  # always re-create this plot for testing
            os.remove(self.plotFile)
        plotter.plot_scan(scan, self.plotFile)
        self.assertTrue(os.path.exists(self.plotFile))
    def test_one_line_mesh_scan_as_1D_plot_issue82(self):
        specFile = os.path.join(os.path.dirname(__file__), 'data',
                                'issue82_data.txt')
        scan_number = 17

        sfile = specplot.openSpecFile(specFile)
        scan = sfile.getScan(scan_number)
        self.assertTrue(scan is not None)

        image_maker = specplot.Selector().auto(scan)
        self.assertTrue(issubclass(image_maker, specplot.ImageMaker))

        plotter = image_maker()
        self.assertTrue(isinstance(plotter, specplot.MeshPlotter))

        if os.path.exists(
                self.plotFile):  # always re-create this plot for testing
            os.remove(self.plotFile)
        plotter.plot_scan(scan, self.plotFile)
        self.assertTrue(os.path.exists(self.plotFile))