Skip to content

NSLS-II-CHX/profile_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Simulation profile for SRW data analysis

Start bsui as follows:

$ BS_PROFILE=simulation BS_ENV=collection-2018-2.1 bsui

How to use:

Prepare the detector and trigger it:

  • Specify the input SRW file: srw_writer.update_file('/home/xf11id/res_int_pr_me_s2_0_03mm_smp50nm_det.dat')
  • Specify the detector distance: srw_writer.update_distance(16.046)
  • Count the simulated detector: RE(bp.count([srw_writer]), Simulation='random posts (SRW)')

Get data back as a NumPy array:

hdr = db[-1]
imgs, = list(hdr.data('srw_writer_image'))
plt.imshow(np.log10(imgs), origin='bottom')

Check the configuration attributes:

In [26]: hdr.config_data('srw_writer')
Out[26]: 
{'primary': [{'srw_writer_beam_center_x': 1035,
   'srw_writer_beam_center_y': 1081,
   'srw_writer_wavelength': 1.2848102140613589,
   'srw_writer_det_distance': 16.046,
   'srw_writer_threshold_energy': 0,
   'srw_writer_photon_energy': 9650.0}]}

About

IPython profile for simulation data analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages