Example #1
0
def run_polychromatic(create_ref):
    from LS49.sim.step5_pad import tst_all
    prefix = "cpu_step5"
    if create_ref:
        prefix = "ref_" + prefix
    tst_all(quick=False, prefix=prefix, save_bragg=True
            )  # quick=False means: perform multiple wavelength simulation
Example #2
0
def run_polychromatic(create):
  from LS49.sim.step5_pad import tst_all
  tst_all(quick=False) #actually perform the 100-channel simulation
  from LS49.sim.step5_pad import CHDBG_singleton
  if create:
    cPickle.dump(CHDBG_singleton.data,
      open(os.path.join(ls49_big_data,"reference",filename),"wb"),cPickle.HIGHEST_PROTOCOL)
  else:
    CH_ref = cPickle.load(open(os.path.join(ls49_big_data,"reference",filename),"rb"))
    assert len(CHDBG_singleton.data)==10,"Should have recorded 10 energy channels"
    for key in CHDBG_singleton.data:
        assert CHDBG_singleton.data[key] == CH_ref[key],"Energy-channel results should agree with reference"
Example #3
0
def run_monochromatic():
    from LS49.sim.step5_pad import tst_all
    tst_all(quick=True)
Example #4
0
def run_laue(create):
    from LS49.sim import step5_laue
    step5_laue.add_spots_algorithm = "cuda"
    from LS49.sim.step5_laue import tst_all
    tst_all(quick=False, prefix="cuda_step5"
            )  #perform the 100-channel simulation with single kernel call
Example #5
0
def run_polychromatic(create):
    from LS49.sim.step5_pad import tst_all
    tst_all(quick=False,
            prefix="cuda_step5")  #actually perform the 100-channel simulation
Example #6
0
def run_monochromatic():
    from LS49.sim.step5_pad import tst_all
    tst_all(quick=True, prefix="cuda_step5")
def run_polychromatic():
    from LS49.sim.step5_pad import tst_all
    prefix = "cuda_step5"
    tst_all(quick=False, prefix=prefix, save_bragg=True
            )  # quick=False means: perform multiple wavelength simulation
def run_monochromatic():
    from LS49.sim.step5_pad import tst_all
    prefix = "cuda_step5"
    tst_all(quick=True, prefix=prefix, save_bragg=True
            )  # quick=True means: perform a single wavelength simulation