Commit e519bd69 authored by myron's avatar myron
Browse files

tests OK

parent 2fd2b1ad
......@@ -7,18 +7,14 @@ import json
BATCH_PARALLELISM = 1
import os
def main():
peaks_shifts = np.array(
[ 6471.983002,
6471.318152,
6470.612314,
6471.217828,
])
Enominal = 6470.6
peaks_shifts -= Enominal
]) - 6470.6
datadir = "/data/scisofttmp/mirone/Loic1/data/"
filter_path = datadir + "../mask.h5:/filter"
filename_template = "HC-D_2Dmap_%04d"
......@@ -26,13 +22,14 @@ def main():
monitor_path_template = datadir + filename_template +"_monitor.hd5:/monitor"
# energy_custom_grid = np.array([6746.0,6754.0,6755.5,6756.2,6757.5,6759.3,6762.5,6770.0,6790.5])
energy_custom_grid = np.array([6744.0,6754.0,6755.5,6756.2,6757.5,6759.3,6762.5,6770.0,6792])
# energy_custom_grid = np.array([6744.0,6754.0, 6754.8, 6755.5,6756.2,6757.5, 6758.63, 6759.3,6762.5,6770.0,6792])
# energy_custom_grid = np.array([6744.0,6754.0,6755.5,6756.2,6757.5,6759.3,6762.5,6770.0,6792])
energy_custom_grid = np.array([6744.0,6754.0, 6754.8, 6755.5,6756.2,6757.5, 6758.63, 6759.3,6762.5,6770.0,6792])
energy_exp_grid = h5py.File( datadir +(filename_template%1)+".nxs" ,"r")["/root.spyc.config1d_RIXS_0024/scan_data/actuator_1_1"][()]
scan_interval = [1,476] # from 1 to 475 included
scans_to_use_for_roi = list(range(1,20))
Ydim = 25
Zdim = 19
......@@ -56,6 +53,9 @@ def main():
use_custom_components = None
# use_custom_components = "components.h5"
scans_to_use_for_roi = list(range(1,20))
tools_sequencer( peaks_shifts = peaks_shifts ,
datadir = datadir ,
filter_path = filter_path ,
......
......@@ -9,7 +9,7 @@ model = NMF(n_components=NC, init='random', random_state=0, max_iter = 200)
d=File("solution_all_spectra.h5","r") ["data"][()]
d.shape = 9,-1
d.shape = d.shape[0],-1
W = model.fit_transform(d.T)
......
Supports Markdown
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