def testCreationWithSimulatedDevices(self): #aFakeConfig.simulated = 1 ott, interf = create_ott( os.path.join(testDataRootDir(), 'base', 'Configurations', 'testConf.yaml')) self.assertIsInstance(ott.parabolaSlider, FakeParabolaSlider) self.assertIsInstance(interf, FakeInterferometer)
def _createInterferometer(self): from m4.configuration.start import create_ott from m4.ott_sim.fake_interferometer import FakeInterferometer ott, interf = create_ott( os.path.join(testDataRootDir(), 'base', 'Configurations', 'testConf.yaml')) self.assertIsInstance(interf, FakeInterferometer) return interf
def testMainGui(self, mock_conf): want_mirror_root_folder = os.path.join(testDataRootDir(), 'base', 'ottSim', 'MIRROR_System') mock_conf.MIRROR_FOLDER = want_mirror_root_folder conf = os.path.join(testDataRootDir(), 'base', 'Configurations', 'testConf.yaml') ott, interf = start.create_ott(conf)
# -*- coding: utf-8 -*- """ Created on Thu Jun 18 06:20:03 2020 @author: Runa """ from importlib import reload import os from matplotlib import pyplot as plt a = 'D:\Astro\ARCETRI\Python\M4-master' os.chdir(a) from m4.configuration.create_ott import * from m4.configuration import start ott = start.create_ott() from m4.ott_sim.ott_images import * from m4.configuration import config as conf from m4.configuration.ott_parameters import * class comm4d(): phcam_ip = '' phcam_datapath = '' phcam_conf = '' def acq4d(nframes=1, show=0): if conf.simulated == 1: opd, mask = ott_smap(show=show)
def testCreationWhitFakePathInYaml(self): ott, interf = create_ott( os.path.join(testDataRootDir(), 'base', 'Configurations', 'testConf2.yaml'))
def setUp(self): from m4.configuration import start self.ott, self._interf = start.create_ott() from m4.utils.optical_calibration import OpticalCalibration self.cal = OpticalCalibration(self.ott, self._interf)