class Inventory(base.Inventory): from mcni.pyre_support import facility source = facility('source', default='mcni://sources/MonochromaticSource') monitor = facility('monitor', default='twomonitors')
class Inventory(base.Inventory): from mcni.pyre_support import facility source = facility('source', default='source') sample = facility('sample', default='sample') detector = facility('detector', default='detector') pass # end of Inventory
class Inventory(base.Inventory): import pyre.inventory from mcni.pyre_support import facility source = facility('source', default=Source('source')) verifier = facility('verifier', default=Verifier('verifier')) pass # end of Inventory
class Inventory(base.Inventory): from mcni.pyre_support import facility from mcni.pyre_components.NeutronFromStorage import NeutronFromStorage source = facility('source', default=NeutronFromStorage('source')) verifier = facility('verifier', default=Verifier('verifier')) pass # end of Inventory
class Inventory(base.Inventory): from mcni.pyre_support import facility from mcni.pyre_components.MonochromaticSource import MonochromaticSource source = facility('source', default=MonochromaticSource('source')) from mcni.pyre_components.NeutronToStorage import NeutronToStorage storage = facility('storage', default=NeutronToStorage('storage')) pass # end of Inventory
class Inventory(base.Inventory): from mcni.pyre_support import facility, componentfactory as component import mccomponents.pyre_support source = facility('source', default=component('optics', 'Dummy')('source')) detector = facility('detector', default=component('optics', 'Dummy')('detector')) pass # end of Inventory
class Inventory(base.Inventory): import pyre.inventory from mcni.pyre_support import facility, componentfactory source = facility('source', default=Source('source')) monitor = facility( 'monitor', default=componentfactory('monitors', 'E_monitor', supplier='mcstas2')('monitor')) pass # end of Inventory
class Inventory(base.Inventory): import pyre.inventory from mcni.pyre_support import facility, componentfactory as component import mccomponents.pyre_support source = facility('source', default=component( 'sources', 'NeutronsOnCone_FixedQE')('source')) detector = facility( 'detector', default=component('detectors', 'DetectorSystemFromXml')('detector')) pass # end of Inventory
class Inventory(base.Inventory): import pyre.inventory from mcni.pyre_support import facility, componentfactory as component import mccomponents.pyre_support source = facility('source', default=component('sources', 'MonochromaticSource')('source')) sample = facility('sample', default=component('samples', 'SampleAssemblyFromXml')('sample')) detector = facility( 'detector', default=component('detectors', 'DetectorSystemFromXml')('detector')) pass # end of Inventory
def facility(category, type, name): '''create a neutron instrument component facility, and set the default to a mcstas component of given category and type. ''' from mcni.pyre_support import facility default = componentfactory(category, type)(name) return facility(name, default=default)
def facility( category, type, name ): '''create a neutron instrument component facility, and set the default to a mcstas component of given category and type. ''' from mcni.pyre_support import facility default = componentfactory( category, type )( name ) return facility( name, default = default)
class Inventory(base.Inventory): from mcni.pyre_support import facility, componentfactory as component detector = facility( 'detector', default = component( 'monitors', 'NeutronPrinter', supplier = 'mcni')\ ('detector') ) pass # end of Inventory
class Inventory(base.Inventory): from mcni.pyre_support import facility source = facility('source', default = 'source') guide1 = facility('guide1', default = 'guide1') guide2 = facility('guide2', default = 'guide2') slit1 = facility('slit1', default = 'slit1') slit2 = facility('slit2', default = 'slit2') #neutron recorder neutron_recorder = facility( 'neutron_recorder', default = 'neutron_recorder') pass # end of Inventory
class Inventory(MultiMonitors.Inventory): from mcni.pyre_support import facility m1 = facility('m1', default="monitors/NDMonitor(t)") m2 = facility('m2', default="monitors/NDMonitor(w)") m3 = facility('m3', default="monitors/NDMonitor(t)") m4 = facility('m4', default="monitors/NDMonitor(w)") m5 = facility('m5', default="monitors/NDMonitor(t)") m6 = facility('m6', default="monitors/NDMonitor(w)") import pyre.inventory as inv xwidth = inv.float(name='xwidth', default=0.77) yheight = inv.float(name='yheight', default=0.385) tmin = inv.float(name='tmin', default=0.) tmax = inv.float(name='tmax', default=0.1) nt = inv.int(name='nt', default=100) wmin = inv.float(name='wmin', default=0.) wmax = inv.float(name='wmax', default=10) nw = inv.int(name='nw', default=100)
class Inventory(base.Inventory): from mcni.pyre_support import facility source = facility(name='source') monitor = facility(name='monitor') pass # end of Inventory
class Inventory(base.Inventory): #neutron components #moderator from mcni.pyre_support import facility moderator = facility('moderator', default = 'sns_moderator_beamline18') #guides core_vessel_insert = facility( 'core_vessel_insert', default = 'core_vessel_insert') shutter_guide = facility( 'shutter_guide', default = 'shutter_guide') guide1 = facility('guide1', default = 'guide1') # T0 chopper # should change this to a real t0 chopper t0_chopper = facility('t0_chopper', default = 't0_chopper') # guide guide2 = facility('guide2', default = 'guide2') #Fermi chopper fermi_chopper = facility( 'fermi_chopper', default = 'fermi_chopper') #guides guide3 = facility('guide3', default = 'guide3') guide4 = facility('guide4', default = 'guide4') guide5 = facility('guide5', default = 'guide5') #monitors energy_monitor1 = facility( 'energy_monitor1', default = 'energy_monitor1') tof_monitor1 = facility('tof_monitor1', default = 'tof_monitor1') #neutron recorder neutron_recorder = facility( 'neutron_recorder', default = 'neutron_recorder') pass # end of Inventory
class Inventory(base.Inventory): import pyre.inventory from mcni.pyre_support import facility, componentfactory as component source = facility('source', default=component('sources', 'SNS_source', supplier='mcstas2')('source')) core_vessel_insert = facility( 'core_vessel_insert', default=component('optics', 'Collimator_linear', supplier='mcstas2')('core_vessel_insert')) start_shutter_insert = facility( 'start_shutter_insert', default=component('optics', 'Slit', supplier='mcstas2')('start_shutter_insert')) end_shutter_insert = facility( 'end_shutter_insert', default=component('optics', 'Slit', supplier='mcstas2')('end_shutter_insert')) L_monitor1 = facility( 'L_monitor1', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor1')) bulk_shield_insert1 = facility( 'bulk_shield_insert1', default=component('optics', 'Guide', supplier='mcstas2')('bulk_shield_insert1')) bulk_shield_insert2 = facility( 'bulk_shield_insert2', default=component('optics', 'Guide', supplier='mcstas2')('bulk_shield_insert2')) L_monitor2 = facility( 'L_monitor2', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor2')) transition_guide1 = facility( 'transition_guide1', default=component('optics', 'Guide', supplier='mcstas2')('transition_guide1')) transition_guide2 = facility( 'transition_guide2', default=component('optics', 'Guide', supplier='mcstas2')('transition_guide2')) transition_guide3 = facility( 'transition_guide3', default=component('optics', 'Guide', supplier='mcstas2')('transition_guide3')) L_monitor3 = facility( 'L_monitor3', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor3')) bandwidth_chopper = facility( 'bandwidth_chopper', default=component('optics', 'DiskChopper', supplier='mcstas2')('bandwidth_chopper')) curved_guide1 = facility( 'curved_guide1', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide1')) curved_guide2 = facility( 'curved_guide2', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide2')) curved_guide3 = facility( 'curved_guide3', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide3')) curved_guide4 = facility( 'curved_guide4', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide4')) curved_guide5 = facility( 'curved_guide5', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide5')) curved_guide6 = facility( 'curved_guide6', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide6')) L_monitor4 = facility( 'L_monitor4', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor4')) curved_guide7 = facility( 'curved_guide7', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide7')) curved_guide8 = facility( 'curved_guide8', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide8')) curved_guide9 = facility( 'curved_guide9', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide9')) curved_guide10 = facility( 'curved_guide10', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide10')) curved_guide11 = facility( 'curved_guide11', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide11')) curved_guide12 = facility( 'curved_guide12', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide12')) curved_guide13 = facility( 'curved_guide13', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide13')) curved_guide14 = facility( 'curved_guide14', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide14')) curved_guide15 = facility( 'curved_guide15', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide15')) curved_guide16 = facility( 'curved_guide16', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide16')) curved_guide17 = facility( 'curved_guide17', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide17')) curved_guide18 = facility( 'curved_guide18', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide18')) curved_guide19 = facility( 'curved_guide19', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide19')) curved_guide20 = facility( 'curved_guide20', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide20')) curved_guide21 = facility( 'curved_guide21', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide21')) curved_guide22 = facility( 'curved_guide22', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide22')) curved_guide23 = facility( 'curved_guide23', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide23')) curved_guide24 = facility( 'curved_guide24', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide24')) curved_guide25 = facility( 'curved_guide25', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide25')) curved_guide26 = facility( 'curved_guide26', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide26')) curved_guide27 = facility( 'curved_guide27', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide27')) curved_guide28 = facility( 'curved_guide28', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide28')) curved_guide29 = facility( 'curved_guide29', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide29')) curved_guide30 = facility( 'curved_guide30', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide30')) curved_guide31 = facility( 'curved_guide31', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide31')) curved_guide32 = facility( 'curved_guide32', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide32')) curved_guide33 = facility( 'curved_guide33', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide33')) curved_guide34 = facility( 'curved_guide34', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide34')) curved_guide35 = facility( 'curved_guide35', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide35')) curved_guide36 = facility( 'curved_guide36', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide36')) curved_guide37 = facility( 'curved_guide37', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide37')) curved_guide38 = facility( 'curved_guide38', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide38')) curved_guide39 = facility( 'curved_guide39', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide39')) curved_guide40 = facility( 'curved_guide40', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide40')) curved_guide41 = facility( 'curved_guide41', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide41')) curved_guide42 = facility( 'curved_guide42', default=component('optics', 'Guide', supplier='mcstas2')('curved_guide42')) L_monitor5 = facility( 'L_monitor5', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor5')) straight_section1 = facility( 'straight_section1', default=component('optics', 'Guide', supplier='mcstas2')('straight_section1')) straight_section2 = facility( 'straight_section2', default=component('optics', 'Guide', supplier='mcstas2')('straight_section2')) straight_section3 = facility( 'straight_section3', default=component('optics', 'Guide', supplier='mcstas2')('straight_section3')) L_monitor6 = facility( 'L_monitor6', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor6')) VTG_Slit = facility('VTG_Slit', default=component('optics', 'Slit', supplier='mcstas2')('VTG_Slit')) vertical_tapered_guide1 = facility( 'vertical_tapered_guide1', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide1')) vertical_tapered_guide2 = facility( 'vertical_tapered_guide2', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide2')) vertical_tapered_guide3 = facility( 'vertical_tapered_guide3', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide3')) vertical_tapered_guide4 = facility( 'vertical_tapered_guide4', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide4')) vertical_tapered_guide5 = facility( 'vertical_tapered_guide5', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide5')) vertical_tapered_guide6 = facility( 'vertical_tapered_guide6', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide6')) vertical_tapered_guide7 = facility( 'vertical_tapered_guide7', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide7')) vertical_tapered_guide8 = facility( 'vertical_tapered_guide8', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide8')) vertical_tapered_guide9 = facility( 'vertical_tapered_guide9', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide9')) vertical_tapered_guide10 = facility( 'vertical_tapered_guide10', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide10')) vertical_tapered_guide11 = facility( 'vertical_tapered_guide11', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide11')) vertical_tapered_guide12 = facility( 'vertical_tapered_guide12', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide12')) vertical_tapered_guide13 = facility( 'vertical_tapered_guide13', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide13')) vertical_tapered_guide14 = facility( 'vertical_tapered_guide14', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide14')) vertical_tapered_guide15 = facility( 'vertical_tapered_guide15', default=component('optics', 'Guide_gravity', supplier='mcstas2')('vertical_tapered_guide15')) L_monitor7 = facility( 'L_monitor7', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor7')) TG_Slit = facility('TG_Slit', default=component('optics', 'Slit', supplier='mcstas2')('TG_Slit')) tapered_guide1 = facility('tapered_guide1', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide1')) tapered_guide2 = facility('tapered_guide2', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide2')) tapered_guide3 = facility('tapered_guide3', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide3')) tapered_guide4 = facility('tapered_guide4', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide4')) tapered_guide5 = facility('tapered_guide5', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide5')) tapered_guide6 = facility('tapered_guide6', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide6')) tapered_guide7 = facility('tapered_guide7', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide7')) tapered_guide8 = facility('tapered_guide8', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide8')) tapered_guide9 = facility('tapered_guide9', default=component( 'optics', 'Guide_gravity', supplier='mcstas2')('tapered_guide9')) L_monitor8 = facility( 'L_monitor8', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor8')) L_monitor9 = facility( 'L_monitor9', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor9')) L_monitor10 = facility( 'L_monitor10', default=component('monitors', 'L_monitor', supplier='mcstas2')('L_monitor10')) psd_sample_position = facility( 'psd_sample_position', default=component('monitors', 'PSD_monitor', supplier='mcstas2')('psd_sample_position')) psd_xscan_L = facility('psd_xscan_L', default=component( 'monitors', 'Monitor_nD', supplier='mcstas2')('psd_xscan_L')) psd_yscan_L = facility('psd_yscan_L', default=component( 'monitors', 'Monitor_nD', supplier='mcstas2')('psd_yscan_L'))