def PyExec(self): from IndirectImport import run_f2py_compatibility_test, is_supported_f2py_platform if is_supported_f2py_platform(): import IndirectMuscat as Main run_f2py_compatibility_test() self.log().information('Muscat input') prefix = self.getPropertyValue('Instrument') ana = self.getPropertyValue('Analyser') geom = self.getPropertyValue('Geom') disp = self.getPropertyValue('Dispersion') sam = self.getPropertyValue('SamNumber') sname = prefix + sam + '_' + ana NRUN1 = self.getPropertyValue('NR1') NRUN2 = self.getPropertyValue('NR2') NMST = self.getPropertyValue('Nms') JRAND = 12345 MRAND = 67890 neut = [int(NRUN1), int(NRUN2), int(JRAND), int(MRAND), int(NMST)] HEIGHT = 3.0 alfa = self.getPropertyValue('DetAngle') THICK = self.getPropertyValue('Thick') WIDTH = self.getPropertyValue('Width') HEIGHT = self.getPropertyValue('Height') if geom == 'Flat': beam = [float(THICK), float(WIDTH), float(HEIGHT), float(alfa)] if geom == 'Cyl': beam = [float(THICK), float(WIDTH), float(HEIGHT), 0.0] #beam = [WIDTH, WIDTH2, HEIGHT, 0.0] dens = self.getPropertyValue('Density') sigb = self.getPropertyValue('SigScat') siga = self.getPropertyValue('SigAbs') sigss = sigb temp = self.getPropertyValue('Temperature') sam = [float(temp), float(dens), float(siga), float(sigb)] NQ = self.getPropertyValue('NQ') dQ = self.getPropertyValue('dQ') Nw = self.getPropertyValue('NW') dw = self.getPropertyValue('dW') #in microeV grid = [int(NQ), float(dQ), int(Nw), float(dw)] c1 = self.getPropertyValue('Coeff1') c2 = self.getPropertyValue('Coeff2') c3 = self.getPropertyValue('Coeff3') c4 = self.getPropertyValue('Coeff4') c5 = self.getPropertyValue('Coeff5') coeff = [float(c1), float(c2), float(c3), float(c4), float(c5)] kr1 = 1 verbOp = self.getProperty('Verbose').value plotOp = self.getPropertyValue('Plot') saveOp = self.getProperty('Save').value Main.MuscatFuncStart(sname, geom, neut, beam, sam, grid, disp, coeff, kr1, verbOp, plotOp, saveOp)
def PyExec(self): from IndirectImport import run_f2py_compatibility_test, is_supported_f2py_platform if is_supported_f2py_platform(): import IndirectMuscat as Main run_f2py_compatibility_test() self.log().information('Muscat input') prefix = self.getPropertyValue('Instrument') ana = self.getPropertyValue('Analyser') geom = self.getPropertyValue('Geom') sam = self.getPropertyValue('SamNumber') sqwi = self.getPropertyValue('SqwInput') sname = prefix + sam + '_' + ana sqw = prefix + sqwi + '_' + ana NRUN1 = self.getPropertyValue('NR1') NRUN2 = self.getPropertyValue('NR2') NMST = self.getPropertyValue('Nms') JRAND = 12345 MRAND = 67890 neut = [int(NRUN1), int(NRUN2), int(JRAND), int(MRAND), int(NMST)] HEIGHT = 3.0 alfa = self.getPropertyValue('DetAngle') THICK = self.getPropertyValue('Thick') WIDTH = self.getPropertyValue('Width') HEIGHT = self.getPropertyValue('Height') if geom == 'Flat': beam = [float(THICK), float(WIDTH), float(HEIGHT), float(alfa)] if geom == 'Cyl': beam = [float(THICK), float(WIDTH), float(HEIGHT), 0.0] #beam = [WIDTH, WIDTH2, HEIGHT, 0.0] dens = self.getPropertyValue('Density') sigb = self.getPropertyValue('SigScat') siga = self.getPropertyValue('SigAbs') temp = self.getPropertyValue('Temperature') sam = [float(temp), float(dens), float(siga), float(sigb)] kr1 = 1 verbOp = self.getProperty('Verbose').value plotOp = self.getPropertyValue('Plot') saveOp = self.getProperty('Save').value Main.MuscatDataStart(sname, geom, neut, beam, sam, sqw, kr1, verbOp, plotOp, saveOp)