updated user instructions at the beginning of the script
This commit is contained in:
@@ -1,5 +1,25 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
# author J.Beale
|
||||||
|
|
||||||
|
"""
|
||||||
|
# aim
|
||||||
|
use .poni file from pyFAI or pixel x, y, clen inputs and energy to convert geom
|
||||||
|
file ready for initial hewl processing
|
||||||
|
|
||||||
|
# usage
|
||||||
|
<no poni file>
|
||||||
|
python update-geom-from-lab6.py -g <path-to-geom-file>, -x beam x position (in pixels),
|
||||||
|
-y beam y postion (in pixels), -c camera length (in m),
|
||||||
|
-e pulse energy (in eV), -j name of jungfrau, -p p-group name
|
||||||
|
<with poni file>
|
||||||
|
python update-geom-from-lab6.py -g <path-to-geom-file>, -i <path-to-poni-file>,
|
||||||
|
-j name of jungfrau, -p p-group name
|
||||||
|
|
||||||
|
# output
|
||||||
|
creates an updated .geom file with a naming convention <jungfrau>_<p-group>_<date>.geom
|
||||||
|
"""
|
||||||
|
|
||||||
from runpy import run_path
|
from runpy import run_path
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -100,8 +120,7 @@ def write_new_positions( path_to_geom, beam_x, beam_y, clen, energy, jungfrau, p
|
|||||||
current_geom_file = re.sub( current_energy, new_energy, current_geom_file )
|
current_geom_file = re.sub( current_energy, new_energy, current_geom_file )
|
||||||
|
|
||||||
# create geom new file
|
# create geom new file
|
||||||
geom_start = path_to_geom[:-5]
|
new_geom_name = "{0}_{1}_{2}.geom".format( jungfrau, p_group, date )
|
||||||
new_geom_name = "crmx8M_{0}_{1}.geom".format( p_group, date )
|
|
||||||
|
|
||||||
# write new geom file
|
# write new geom file
|
||||||
f = open( new_geom_name, "w" )
|
f = open( new_geom_name, "w" )
|
||||||
|
|||||||
Reference in New Issue
Block a user