Skip to content

Commit

Permalink
Refs #16. workflow.create_violini_model added
Browse files Browse the repository at this point in the history
  • Loading branch information
yxqd committed Apr 17, 2019
1 parent dc4e703 commit c9ed0d1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dgsres/singlextal/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,3 +654,18 @@ def plot_interpolated_resolution_on_grid(model, qs, Es, dqgrid, dEgrid, figsize=
continue
plt.tight_layout()
return

def create_violini_model(config, sample_thickness):
from .violini import VioliniModel
from . import use_covmat
civ = config.instrument.violini
tofwidths = use_covmat.tofwidths(P=civ.tau_P, M=civ.tau_M)
beamdivs = use_covmat.beamdivs(theta=civ.sigma_thetai, phi=civ.sigma_phii)
samplethickness = sample_thickness
instrument = config.instrument.instrument
pixel = config.instrument.pixel
return VioliniModel(
instrument, pixel, tofwidths, beamdivs,
config.sample_yaml, samplethickness,
config.Ei, config.psi_scan)

0 comments on commit c9ed0d1

Please sign in to comment.