Closed moellep closed 4 weeks ago
For SRW simulation with a tabulated undulator zip file, the generated run.py file has a method:
def setup_magnetic_measurement_files(filename, v): # ...
This logic should be moved to the srwl_bl module to hide the complexity and could be called something like this:
v.und_mfs, v.und_mdir = srwl_bl.unzip_magnetic_measurements( 'input_files/magn_meas_chx.zip', v.fdir, )
This would allow that line to be commented out easily by a power user, and replaced with a magnetic measurements which already exist on the file system:
# v.und_mfs, v.und_mdir = srwl_bl.unzip_magnetic_measurements( # 'input_files/magn_meas_chx.zip', # v.fdir, # ) v.und_mfs, v.und_mdir = 'ivu20_chx_sum.txt', '/home/user/magn_meas/chx'
For this issue, a new PR should be submitted to srw repo with the new method.
Yes. Note that some related functions may already exist in srwl_bl.py; I'll send my current version of this file by e-mail.
For SRW simulation with a tabulated undulator zip file, the generated run.py file has a method:
This logic should be moved to the srwl_bl module to hide the complexity and could be called something like this:
This would allow that line to be commented out easily by a power user, and replaced with a magnetic measurements which already exist on the file system:
For this issue, a new PR should be submitted to srw repo with the new method.