Commit a4e802ff authored by myron's avatar myron
Browse files

retrievel of peaks shifts for the ants scan

parent 8bf57899
......@@ -1697,7 +1697,7 @@ def create_rois(mydata):
filterMask=None
if mydata is not None and ("filter_path" in mydata ) :
filter_path = mydata["filter_path"]
if filter_path is not None and len(filter_path):
if filter_path not in [None,"None"] and len(filter_path):
filename, dataname = split_hdf5_address(filter_path)
h5f = h5py.File( filename,"r" )
filterMask = h5f[dataname][:]
......
......@@ -439,7 +439,7 @@ def tools_sequencer( peaks_shifts = None,
roi_target_path = None,
first_scan_num = None ,
Ydim = None ,
Ydim = None , # not used
Zdim = None ,
Edim = None ,
......
......@@ -103,10 +103,6 @@ Enominal = np.median(cenom[:,1])
cenom[:,1] -= Enominal
import os
def process_input(s, go=0):
......
......@@ -7,6 +7,8 @@ import h5py
import math
from XRStools import tools_sequencer_interp
from XRStools import tools_sequencer_esynth
from XRStools import xrs_read, xrs_rois
import os
def main():
......@@ -16,18 +18,20 @@ def main():
filter_path = None
# filter_path = "mask.h5:/FILTER_MASK/filter"
roi_scan_num = [592]
reference_scan_list = [245, 246, 247]
roi_scan_num = list(range(592,600))
reference_scan_list = list(range(592,600))
monitor_column = "izero/0.000001"
first_scan_num = 651
Ydim = 25
Zdim = 10
Edim = 7
first_scan_num = 464
Ydim = None # not used, it is the scan lenght , it is given by the data, contained in the scan
Zdim = 2
Edim = 62
elastic_scan_for_peaks_shifts = 69
rois_are_ready = True
elastic_scan_for_peaks_shifts = 68
datadir = "/data/id20/inhouse/data/run5_17/run7_ihr/"
......@@ -60,10 +64,9 @@ def main():
volume_retrieval_beta = 6.0e-20
volume_retrieval_niter = 100
rois_are_ready = False
steps_to_do = {
"do_step_make_roi": True,
"do_step_make_roi": False,
"do_step_sample_extraction": False,
"do_step_interpolation": False,
"do_step_extract_reference_scan": False,
......@@ -105,9 +108,13 @@ def main():
elastic.get_compensation_factor( elastic_scan_for_peaks_shifts , method='sum')
el_dict = elastic.cenom_dict
Enominal = np.median( list( el_dict.values() ) )
peaks_shift = np.array([ el_dict["ROI%02d"%i] if ("ROI%02d"%i) in el_dict else nan for i in range( 72) ] )
peaks_shift = np.array([ el_dict["ROI%02d"%i] if ("ROI%02d"%i) in el_dict else nan for i in range( 72) ] )
for p in peaks_shift:
print( p)
raise
Enominal = np.median(peaks_shifts)
peaks_shifts-= Enominal
else:
peaks_shifts = None
......@@ -123,7 +130,7 @@ def main():
steps_to_do = steps_to_do,
first_scan_num = first_scan_num,
Ydim = Ydim ,
Ydim = Ydim , # not used
Zdim = Zdim ,
Edim = Edim ,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment