3-Reconstruct_template, q resolved | mumott v 0.2.1

  • For more detailed information about this script, check 3-reconstruct_template

Step 1 - Set environment parameters for Mumott

[1]:
import os
#--- User Input with the number of cores that you requested, 12-20 seems to work good for numba --------------------#
nthreads = 16 # 12-20 typically a good choice

#--- End Input  ----------------------------------------------------------------------------------------------------#

#---- Do not modify ----#
os.environ["NUMBA_NUM_THREADS"] = f'{nthreads}'
os.environ["NUMBA_DEFAULT_NUM_THREADS"] = f'{nthreads}'
os.environ["OMP_NUM_THREADS"] = f'{nthreads}'

import numba

Step 1.1 - Please run this one after the cell above

[2]:
#---- Do not modify ----#
numba.config.NUMBA_DEFAULT_NUM_THREADS = nthreads
numba.config.NUMBA_NUM_THREADS = nthreads
numba.set_num_threads(nthreads)

Step 1.2 - Package and libraries

[3]:
#---- Do not modify ----#
%matplotlib ipympl
import h5py
import matplotlib.pyplot as plt
import numpy as np
from IPython.display import display
from ipywidgets import interact
# Mumott related inports
from mumott.data_handling import DataContainer, TransformParameters
from mumott.output_handling import OutputHandler, LiveViewHandler, ProjectionViewer
from mumott.optimization import OptimizationParameters, Optimizer, Regularizer, RegularizationParameters

Step 2 - Load data

  • The correctly prepared data needs to be loaded first. For this, please use the script 2-Export_template.

  • In Mumott this is performed using the path, name, and input type are defined as strings. The path can be either relative or absolute. The file name needs to include the file ending.

  • The two allowed formats are 'mat' (Aligned CSAXS-type Matlab file with a projection structure containing necessary data and metadata), and 'h5' (which requires a specially formated hdf5 file as done in the 2-Export_template).

Load first args from file

[4]:
#---- Modify input for your sample! ----#
filepath_args = '/das/work/p18/p18877/Christian/work_dir_Christian/Au_rod_short/args_Au_rod_short.pickle'
#--- End Input to load the exported args file ---------------------#

import pickle
## ---------- Don't change this if not needed ----------------- ##
with open(filepath_args,'rb') as fid:
    args = pickle.load(fid)

Fix path for data loading of Mumott

[7]:
#---- Modify input for your sample! ----#
#path = '/data/visitors/formax/20220566/2023031408/process/reconstructions/big_brain/'
#path = '/data/visitors/formax/20220566/2023031408/process/reconstructions/9425L_4w_XHP_NT/'
path = os.path.join(args['work_directory'] , args['sample_name'])

input_type = 'h5'
name = f'dataset_q_0.047_0.066.{input_type}'#f'dataset_q_0.079_0.090.{input_type}' # f"dataset_q_{q_range[0]:.3f}_{q_range[1]:.3f}"

Step 2.1 - Initializing the DataContainer

  • Mumott is working with the object DataContainer. It will be created based on the input paths.

  • We will also use the next cell to remove outliers. Be aware that you might have to adjust the threshold value

[1]:
#---- Do not modify ----#
try:
    data_container = DataContainer(data_path=path,
                                   data_filename=name,
                                   data_type=input_type)
except FileNotFoundError:
    print('No data file found!')

#---- transform parameters ----# ForMAX, loaded from args.
transform_parameters = TransformParameters(
    data_sorting = args['data_sorting'], #(1, 0, 2)
    data_index_origin = args['data_index_origin'], #(0, 0),
    principal_rotation_right_handed = args['principal_rotation_right_handed'], #True,
    secondary_rotation_right_handed = args['secondary_rotation_right_handed'], #True,
    detector_angle_0 = args['detector_angle_0'], #(1, 0),
    detector_angle_right_handed = args['detector_angle_right_handed'], #=False,
    offset_positive = args['offset_positive']) #(True, True))

# --- Fix stack.volume_shape
print(data_container)

# ---- adjust geometry for datacontainer
data_container.transform(transform_parameters)

# The volume shape needs to be restored here
data_container.stack.volume_shape = np.array([data_container.stack[0].diode.shape[0], *data_container.stack[0].diode.shape])

print(data_container)

reconstruction_parameters = data_container.reconstruction_parameters

# potentially fix NANs np.isnan(reconstruction_parameters.data).any()

# Remove outliers per default
thres = 99.6# or e.g. 99.9
vmin, vmax = np.percentile(reconstruction_parameters.data, [0,thres])
reconstruction_parameters.projection_weights[reconstruction_parameters.data>vmax] = 0

live_view_handler = LiveViewHandler(
    reconstruction_parameters=reconstruction_parameters,
    shown_orders=[2, 4, 6],
    plane=1,
    cut_index='middle',
    orientation='transversal')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[1], line 3
      1 #---- Do not modify ----#
      2 try:
----> 3     data_container = DataContainer(data_path=path,
      4                                    data_filename=name,
      5                                    data_type=input_type)
      6 except FileNotFoundError:
      7     print('No data file found!')

NameError: name 'DataContainer' is not defined

Step 3 - Loop reconstructions over q

  • More in detail explanation can be found in the other templates. Be aware that you will have to change a coupld of parameters in the cell below.

We can now take a quick look at the container object to see that the parameters make sense. Correct input values in case they are off, e.g. corrected for transmission is a candidate that might be off in case data has already been normalized during the Export

[ ]:
path = '/data/visitors/formax/20220566/2023031408/process/reconstructions/implant_9425L_4w_XHP_NT/'
input_type = 'h5'

filenames =[]
for file in os.listdir(path):
    if file.endswith('h5') and file.startswith('dataset_q_'):
        filenames.append(file)

#print(len(filenames))
input_type = 'h5'

for ii, name in enumerate(filenames):
    print(ii, name)
    try:
        data_container = DataContainer(data_path=path,
                                       data_filename=name,
                                       data_type=input_type)
    except FileNotFoundError:
        print('No data file found!')
    # Initiate transform parameters
    transform_parameters = TransformParameters(
        data_sorting = args['data_sorting'], #(1, 0, 2)
        data_index_origin = args['data_index_origin'], #(0, 0),
        principal_rotation_right_handed = args['principal_rotation_right_handed'], #True,
        secondary_rotation_right_handed = args['secondary_rotation_right_handed'], #True,
        detector_angle_0 = args['detector_angle_0'], #(1, 0),
        detector_angle_right_handed = args['detector_angle_right_handed'], #=False,
        offset_positive = args['offset_positive']) #(True, True))
    # Transform data_container
    data_container.transform(transform_parameters)

    ###### ------- Input needed ------- ######
    # The volume shape needs to be restored here
    data_container.stack.volume_shape = [55, 55, 124]
    ###### ------- Input needed ------- ######

    reconstruction_parameters = data_container.reconstruction_parameters

    # potentially fix NANs np.isnan(reconstruction_parameters.data).any()

    # Remove outliers per default
    thres = 99.9# or e.g. 99.9
    vmin, vmax = np.percentile(reconstruction_parameters.data, [0,thres])
    reconstruction_parameters.projection_weights[reconstruction_parameters.data>vmax] = 0


    # Create optimization parameters
    optimization_parameters = OptimizationParameters(
        reconstruction_parameters=reconstruction_parameters,
        integration_step_size=0.5,
        maximum_order=6,
        initial_value=1e-5,
        minimize_args=dict(method='L-BFGS-B'),
        minimize_options=dict(maxiter=45, # mb ~40-50 iteration
                              ftol=7e-4,#1e-3/4
                              gtol=1e-5,
                              disp=1,
                              maxls=10,
                              maxcor=3))
    #Regul Parameters
    fun_name = 'nearest_neighbor_l2',
    l2_dict = RegularizationParameters(
        function_name=fun_name,
        regularization_coefficients= tuple([9.5e-4 for i in range(4)]),#tuple([1e-7 for i in range(4)]),# Input here value
        orders=(0, 2, 4, 6))


    regularization_parameter_list = [l2_dict]

    regularizer = Regularizer(
        reconstruction_parameters=reconstruction_parameters,
        regularization_parameter_list=regularization_parameter_list)
    #Output handler
    output_handler = OutputHandler(
        reconstruction_parameters=reconstruction_parameters,
        base_output_path='.',
        create_enclosing_folder=True,
        overwrite_existing_files=True,
        enclosing_folder_name='output_q_res_recon',
        output_file_name=f'{name}_{fun_name}_{regularization_parameter_list:1.2e}_opt')
    #Optimizer
    optimizer = Optimizer(
        optimization_parameters=optimization_parameters,
        regularizer=regularizer,
        live_view_handler=live_view_handler)

    optimizer.run_optimization()
    output_handler.save_output()
0 dataset_q_0.247_0.256.h5
Increasing maximum order ...
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.57
Total projection time forward: 3.50
Residual norm: 6.6404e+03
Regularizing...
Regularization norm: ['8.2234e-09']
End time adjoint: 3.65
Total projection time adjoint: 3.11
Gradient norm: 2.6724e-02
Regularizer call: 2
Regularization gradients: ['4.9463e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  6.64039D+03    |proj g|=  2.67245D-02
Iteration wall time: 12.21
Total wall time: 12.21
Updating plot...
Calculating residual...
End time forward: 3.60
Total projection time forward: 3.53
Residual norm: 6.6262e+03
Regularizing...
Regularization norm: ['4.8153e-05']
End time adjoint: 3.77
Total projection time adjoint: 3.29
Gradient norm: 2.6698e-02
Regularizer call: 4
Regularization gradients: ['5.2395e-06']
Iteration wall time: 10.21
Total wall time: 22.42
Updating plot...
Calculating residual...
End time forward: 3.57
Total projection time forward: 3.49
Residual norm: 6.5696e+03
Regularizing...
Regularization norm: ['1.2036e-03']
End time adjoint: 7.51
Total projection time adjoint: 5.21
Gradient norm: 2.6593e-02
Regularizer call: 6
Regularization gradients: ['2.6273e-05']
Iteration wall time: 14.25
Total wall time: 36.67
Updating plot...
Calculating residual...
End time forward: 3.38
Total projection time forward: 3.32
Residual norm: 6.5397e+03
Regularizing...
Regularization norm: ['2.4381e-03']
End time adjoint: 3.75
Total projection time adjoint: 3.24
Gradient norm: 2.6538e-02
Regularizer call: 8
Regularization gradients: ['3.7402e-05']

At iterate    1    f=  6.53974D+03    |proj g|=  2.65251D-02
Iteration wall time: 10.46
Total wall time: 47.12
Updating plot...
Calculating residual...
End time forward: 3.64
Total projection time forward: 3.58
Residual norm: 6.3533e+02
Regularizing...
Regularization norm: ['3.5710e+01']
End time adjoint: 4.12
Total projection time adjoint: 3.63
Gradient norm: 5.4423e-03
Regularizer call: 10
Regularization gradients: ['1.5254e-03']

At iterate    2    f=  6.71043D+02    |proj g|=  5.17039D-03
Iteration wall time: 11.23
Total wall time: 58.35
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.86
Residual norm: 4.0011e+02
Regularizing...
Regularization norm: ['5.4512e+01']
End time adjoint: 4.08
Total projection time adjoint: 3.60
Gradient norm: 3.7922e-03
Regularizer call: 12
Regularization gradients: ['1.8936e-03']

At iterate    3    f=  4.54623D+02    |proj g|=  3.41295D-03
Iteration wall time: 11.47
Total wall time: 69.82
Updating plot...
Calculating residual...
End time forward: 3.84
Total projection time forward: 3.79
Residual norm: 1.9402e+02
Regularizing...
Regularization norm: ['1.5606e+02']
End time adjoint: 4.08
Total projection time adjoint: 3.60
Gradient norm: 2.5248e-03
Regularizer call: 14
Regularization gradients: ['5.7768e-03']

At iterate    4    f=  3.50082D+02    |proj g|=  5.61430D-03
Iteration wall time: 11.32
Total wall time: 81.14
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.90
Residual norm: 1.6210e+02
Regularizing...
Regularization norm: ['1.2665e+02']
End time adjoint: 4.10
Total projection time adjoint: 3.62
Gradient norm: 2.1572e-03
Regularizer call: 16
Regularization gradients: ['3.2084e-03']

At iterate    5    f=  2.88753D+02    |proj g|=  2.32890D-03
Iteration wall time: 11.46
Total wall time: 92.60
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.89
Residual norm: 1.6142e+02
Regularizing...
Regularization norm: ['1.1179e+02']
End time adjoint: 4.07
Total projection time adjoint: 3.59
Gradient norm: 2.2378e-03
Regularizer call: 18
Regularization gradients: ['2.1421e-03']

At iterate    6    f=  2.73213D+02    |proj g|=  7.98157D-04
Iteration wall time: 11.44
Total wall time: 104.04
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.86
Residual norm: 1.5186e+02
Regularizing...
Regularization norm: ['1.1355e+02']
End time adjoint: 4.05
Total projection time adjoint: 3.56
Gradient norm: 2.2617e-03
Regularizer call: 20
Regularization gradients: ['2.1601e-03']

At iterate    7    f=  2.65411D+02    |proj g|=  6.21228D-04
Iteration wall time: 11.39
Total wall time: 115.43
Updating plot...
Calculating residual...
End time forward: 3.90
Total projection time forward: 3.84
Residual norm: 1.3671e+02
Regularizing...
Regularization norm: ['1.2150e+02']
End time adjoint: 4.07
Total projection time adjoint: 3.59
Gradient norm: 2.2283e-03
Regularizer call: 22
Regularization gradients: ['2.3046e-03']

At iterate    8    f=  2.58213D+02    |proj g|=  6.12694D-04
Iteration wall time: 11.39
Total wall time: 126.82
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.85
Residual norm: 1.2619e+02
Regularizing...
Regularization norm: ['1.3341e+02']
End time adjoint: 4.07
Total projection time adjoint: 3.58
Gradient norm: 2.1026e-03
Regularizer call: 24
Regularization gradients: ['3.2663e-03']
Iteration wall time: 10.57
Total wall time: 137.39
Updating plot...
Calculating residual...
End time forward: 3.93
Total projection time forward: 3.87
Residual norm: 1.3281e+02
Regularizing...
Regularization norm: ['1.2381e+02']
End time adjoint: 4.10
Total projection time adjoint: 3.61
Gradient norm: 2.1885e-03
Regularizer call: 26
Regularization gradients: ['2.2385e-03']

At iterate    9    f=  2.56623D+02    |proj g|=  7.88025D-04
Iteration wall time: 11.49
Total wall time: 148.88
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.89
Residual norm: 1.2618e+02
Regularizing...
Regularization norm: ['1.2847e+02']
End time adjoint: 4.08
Total projection time adjoint: 3.60
Gradient norm: 2.1175e-03
Regularizer call: 28
Regularization gradients: ['2.1849e-03']

At iterate   10    f=  2.54656D+02    |proj g|=  3.54593D-04
Iteration wall time: 11.49
Total wall time: 160.37
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.86
Residual norm: 1.2285e+02
Regularizing...
Regularization norm: ['1.3101e+02']
End time adjoint: 4.04
Total projection time adjoint: 3.57
Gradient norm: 2.0842e-03
Regularizer call: 30
Regularization gradients: ['2.2687e-03']

At iterate   11    f=  2.53861D+02    |proj g|=  3.49726D-04
Iteration wall time: 11.42
Total wall time: 171.79
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.85
Residual norm: 1.2181e+02
Regularizing...
Regularization norm: ['1.3223e+02']
End time adjoint: 4.04
Total projection time adjoint: 3.56
Gradient norm: 2.0774e-03
Regularizer call: 32
Regularization gradients: ['2.2722e-03']
Iteration wall time: 10.55
Total wall time: 182.34
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.86
Residual norm: 1.2240e+02
Regularizing...
Regularization norm: ['1.3113e+02']
End time adjoint: 4.03
Total projection time adjoint: 3.56
Gradient norm: 2.0821e-03
Regularizer call: 34
Regularization gradients: ['2.1996e-03']

At iterate   12    f=  2.53530D+02    |proj g|=  2.21468D-04
Iteration wall time: 11.34
Total wall time: 193.68
Updating plot...
Calculating residual...
End time forward: 3.93
Total projection time forward: 3.87
Residual norm: 1.2241e+02
Regularizing...
Regularization norm: ['1.3109e+02']
End time adjoint: 4.12
Total projection time adjoint: 3.63
Gradient norm: 2.0902e-03
Regularizer call: 36
Regularization gradients: ['2.1735e-03']

At iterate   13    f=  2.53497D+02    |proj g|=  2.06133D-04

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
*****     13     18   6080     0  7654   2.061D-04   2.535D+02
  F =   253.49742909684124

CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
/data/visitors/formax/sw/envs/mumott-env/lib/python3.9/site-packages/mumott-0.2-py3.9.egg/mumott/output_handling/output_handler.py:222: RuntimeWarning: divide by zero encountered in divide
  return np.nan_to_num(self._std_of_amplitude() / self._mean_of_amplitude(),
Saving coefficients to h5 ...
Saving rms_of_amplitude to h5 ...
Saving mean_of_amplitude to h5 ...
Saving std_of_amplitude to h5 ...
Saving relative_std_of_amplitude to h5 ...
Saving eigenvectors to h5 ...
Saving eigenvalues to h5 ...
Saving order_amplitude to h5 ...
Saving rank_2_tensor to h5 ...
Saving synthetic_data to h5 ...
reconstruction_type
algorithm
1 dataset_q_0.059_0.061.h5
Increasing maximum order ...
Output directory already exists!
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.97
Total projection time forward: 3.90
Residual norm: 3.8685e+07
Regularizing...
Regularization norm: ['8.2209e-09']
End time adjoint: 4.16
Total projection time adjoint: 3.64
Gradient norm: 2.1314e+00
Regularizer call: 2
Regularization gradients: ['5.1014e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  3.86847D+07    |proj g|=  2.13141D+00
Iteration wall time: 13.23
Total wall time: 13.23
Updating plot...
Calculating residual...
End time forward: 3.97
Total projection time forward: 3.91
Residual norm: 3.8684e+07
Regularizing...
Regularization norm: ['5.3692e-05']
End time adjoint: 5.25
Total projection time adjoint: 3.64
Gradient norm: 2.1314e+00
Regularizer call: 4
Regularization gradients: ['5.0440e-06']
Iteration wall time: 12.08
Total wall time: 25.31
Updating plot...
Calculating residual...
End time forward: 4.53
Total projection time forward: 4.47
Residual norm: 3.8679e+07
Regularizing...
Regularization norm: ['1.3421e-03']
End time adjoint: 4.10
Total projection time adjoint: 3.61
Gradient norm: 2.1313e+00
Regularizer call: 6
Regularization gradients: ['2.5297e-05']
Iteration wall time: 11.49
Total wall time: 36.80
Updating plot...
Calculating residual...
End time forward: 3.98
Total projection time forward: 3.91
Residual norm: 3.8662e+07
Regularizing...
Regularization norm: ['2.3674e-02']
End time adjoint: 4.09
Total projection time adjoint: 3.61
Gradient norm: 2.1308e+00
Regularizer call: 8
Regularization gradients: ['1.0631e-04']
Iteration wall time: 10.83
Total wall time: 47.63
Updating plot...
Calculating residual...
End time forward: 3.98
Total projection time forward: 3.91
Residual norm: 3.8594e+07
Regularizing...
Regularization norm: ['3.8785e-01']
End time adjoint: 4.20
Total projection time adjoint: 3.63
Gradient norm: 2.1291e+00
Regularizer call: 10
Regularization gradients: ['4.3036e-04']
Iteration wall time: 10.97
Total wall time: 58.60
Updating plot...
Calculating residual...
End time forward: 3.81
Total projection time forward: 3.74
Residual norm: 3.8321e+07
Regularizing...
Regularization norm: ['6.2422e+00']
End time adjoint: 4.05
Total projection time adjoint: 3.55
Gradient norm: 2.1220e+00
Regularizer call: 12
Regularization gradients: ['1.7266e-03']
Iteration wall time: 10.67
Total wall time: 69.27
Updating plot...
Calculating residual...
End time forward: 3.76
Total projection time forward: 3.69
Residual norm: 3.8113e+07
Regularizing...
Regularization norm: ['1.5429e+01']
End time adjoint: 4.00
Total projection time adjoint: 3.51
Gradient norm: 2.1166e+00
Regularizer call: 14
Regularization gradients: ['2.7144e-03']

At iterate    1    f=  3.81135D+07    |proj g|=  2.11553D+00
Iteration wall time: 11.11
Total wall time: 80.37
Updating plot...
Calculating residual...
End time forward: 3.80
Total projection time forward: 3.73
Residual norm: 4.1661e+06
Regularizing...
Regularization norm: ['2.4465e+05']
End time adjoint: 4.03
Total projection time adjoint: 3.54
Gradient norm: 4.4994e-01
Regularizer call: 16
Regularization gradients: ['1.3863e-01']

At iterate    2    f=  4.41072D+06    |proj g|=  4.19261D-01
Iteration wall time: 11.35
Total wall time: 91.72
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.71
Residual norm: 2.6486e+06
Regularizing...
Regularization norm: ['3.7810e+05']
End time adjoint: 3.96
Total projection time adjoint: 3.47
Gradient norm: 3.4798e-01
Regularizer call: 18
Regularization gradients: ['1.8566e-01']

At iterate    3    f=  3.02670D+06    |proj g|=  2.93125D-01
Iteration wall time: 11.37
Total wall time: 103.09
Updating plot...
Calculating residual...
End time forward: 3.78
Total projection time forward: 3.72
Residual norm: 1.2931e+06
Regularizing...
Regularization norm: ['1.0701e+06']
End time adjoint: 3.97
Total projection time adjoint: 3.47
Gradient norm: 2.1979e-01
Regularizer call: 20
Regularization gradients: ['4.6982e-01']

At iterate    4    f=  2.36320D+06    |proj g|=  4.67546D-01
Iteration wall time: 11.38
Total wall time: 114.48
Updating plot...
Calculating residual...
End time forward: 3.74
Total projection time forward: 3.69
Residual norm: 1.0914e+06
Regularizing...
Regularization norm: ['8.7355e+05']
End time adjoint: 4.07
Total projection time adjoint: 3.58
Gradient norm: 2.2294e-01
Regularizer call: 22
Regularization gradients: ['3.1211e-01']

At iterate    5    f=  1.96498D+06    |proj g|=  1.91506D-01
Iteration wall time: 11.25
Total wall time: 125.72
Updating plot...
Calculating residual...
End time forward: 3.71
Total projection time forward: 3.65
Residual norm: 1.0916e+06
Regularizing...
Regularization norm: ['7.7452e+05']
End time adjoint: 3.95
Total projection time adjoint: 3.45
Gradient norm: 2.3962e-01
Regularizer call: 24
Regularization gradients: ['2.3369e-01']

At iterate    6    f=  1.86613D+06    |proj g|=  6.10324D-02
Iteration wall time: 11.11
Total wall time: 136.83
Updating plot...
Calculating residual...
End time forward: 3.76
Total projection time forward: 3.70
Residual norm: 1.0339e+06
Regularizing...
Regularization norm: ['7.8389e+05']
End time adjoint: 4.01
Total projection time adjoint: 3.52
Gradient norm: 2.4014e-01
Regularizer call: 26
Regularization gradients: ['2.2471e-01']

At iterate    7    f=  1.81779D+06    |proj g|=  4.66294D-02
Iteration wall time: 11.24
Total wall time: 148.07
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.71
Residual norm: 9.3883e+05
Regularizing...
Regularization norm: ['8.3337e+05']
End time adjoint: 4.01
Total projection time adjoint: 3.51
Gradient norm: 2.3447e-01
Regularizer call: 28
Regularization gradients: ['2.3577e-01']

At iterate    8    f=  1.77220D+06    |proj g|=  4.93599D-02
Iteration wall time: 11.23
Total wall time: 159.31
Updating plot...
Calculating residual...
End time forward: 3.76
Total projection time forward: 3.70
Residual norm: 8.6775e+05
Regularizing...
Regularization norm: ['9.1163e+05']
End time adjoint: 4.04
Total projection time adjoint: 3.49
Gradient norm: 2.2396e-01
Regularizer call: 30
Regularization gradients: ['2.8327e-01']
Iteration wall time: 10.43
Total wall time: 169.74
Updating plot...
Calculating residual...
End time forward: 3.85
Total projection time forward: 3.79
Residual norm: 9.1119e+05
Regularizing...
Regularization norm: ['8.5063e+05']
End time adjoint: 4.12
Total projection time adjoint: 3.63
Gradient norm: 2.3094e-01
Regularizer call: 32
Regularization gradients: ['2.4558e-01']

At iterate    9    f=  1.76182D+06    |proj g|=  6.36900D-02
Iteration wall time: 11.42
Total wall time: 181.16
Updating plot...
Calculating residual...
End time forward: 4.00
Total projection time forward: 3.94
Residual norm: 8.6680e+05
Regularizing...
Regularization norm: ['8.8262e+05']
End time adjoint: 4.12
Total projection time adjoint: 3.63
Gradient norm: 2.2469e-01
Regularizer call: 34
Regularization gradients: ['2.3557e-01']

At iterate   10    f=  1.74942D+06    |proj g|=  2.68116D-02
Iteration wall time: 11.56
Total wall time: 192.72
Updating plot...
Calculating residual...
End time forward: 4.02
Total projection time forward: 3.97
Residual norm: 8.4662e+05
Regularizing...
Regularization norm: ['8.9827e+05']
End time adjoint: 4.17
Total projection time adjoint: 3.68
Gradient norm: 2.2226e-01
Regularizer call: 36
Regularization gradients: ['2.3219e-01']

At iterate   11    f=  1.74489D+06    |proj g|=  2.76441D-02
Iteration wall time: 11.65
Total wall time: 204.37
Updating plot...
Calculating residual...
End time forward: 4.03
Total projection time forward: 3.97
Residual norm: 8.3930e+05
Regularizing...
Regularization norm: ['9.0702e+05']
End time adjoint: 4.11
Total projection time adjoint: 3.62
Gradient norm: 2.2153e-01
Regularizer call: 38
Regularization gradients: ['2.4833e-01']
Iteration wall time: 10.79
Total wall time: 215.17
Updating plot...
Calculating residual...
End time forward: 4.01
Total projection time forward: 3.95
Residual norm: 8.4388e+05
Regularizing...
Regularization norm: ['8.9933e+05']
End time adjoint: 4.14
Total projection time adjoint: 3.65
Gradient norm: 2.2206e-01
Regularizer call: 40
Regularization gradients: ['2.2829e-01']

At iterate   12    f=  1.74320D+06    |proj g|=  2.28002D-02
Iteration wall time: 11.58
Total wall time: 226.75
Updating plot...
Calculating residual...
End time forward: 4.01
Total projection time forward: 3.94
Residual norm: 8.4334e+05
Regularizing...
Regularization norm: ['9.0028e+05']
End time adjoint: 4.17
Total projection time adjoint: 3.64
Gradient norm: 2.2294e-01
Regularizer call: 42
Regularization gradients: ['2.3381e-01']
Iteration wall time: 10.89
Total wall time: 237.64
Updating plot...
Calculating residual...
End time forward: 4.00
Total projection time forward: 3.93
Residual norm: 8.4327e+05
Regularizing...
Regularization norm: ['8.9929e+05']
End time adjoint: 4.13
Total projection time adjoint: 3.64
Gradient norm: 2.2228e-01
Regularizer call: 44
Regularization gradients: ['2.2920e-01']

At iterate   13    f=  1.74255D+06    |proj g|=  1.78742D-02

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
*****     13     22  33976     0 42673   1.787D-02   1.743D+06
  F =   1742553.9575592235

CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
Saving coefficients to h5 ...
Saving rms_of_amplitude to h5 ...
Saving mean_of_amplitude to h5 ...
Saving std_of_amplitude to h5 ...
Saving relative_std_of_amplitude to h5 ...
Saving eigenvectors to h5 ...
Saving eigenvalues to h5 ...
Saving order_amplitude to h5 ...
Saving rank_2_tensor to h5 ...
Saving synthetic_data to h5 ...
reconstruction_type
algorithm
2 dataset_q_0.407_0.421.h5
Increasing maximum order ...
Output directory already exists!
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.96
Total projection time forward: 3.89
Residual norm: 3.9739e+02
Regularizing...
Regularization norm: ['8.2070e-09']
End time adjoint: 4.10
Total projection time adjoint: 3.62
Gradient norm: 5.9735e-03
Regularizer call: 2
Regularization gradients: ['5.2242e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  3.97392D+02    |proj g|=  5.97351D-03
Iteration wall time: 12.85
Total wall time: 12.85
Updating plot...
Calculating residual...
End time forward: 3.97
Total projection time forward: 3.91
Residual norm: 3.9382e+02
Regularizing...
Regularization norm: ['3.7916e-05']
End time adjoint: 4.11
Total projection time adjoint: 3.62
Gradient norm: 5.9493e-03
Regularizer call: 4
Regularization gradients: ['5.4940e-06']
Iteration wall time: 10.72
Total wall time: 23.57
Updating plot...
Calculating residual...
End time forward: 3.98
Total projection time forward: 3.92
Residual norm: 3.9099e+02
Regularizing...
Regularization norm: ['1.2217e-04']
End time adjoint: 4.18
Total projection time adjoint: 3.69
Gradient norm: 5.9300e-03
Regularizer call: 6
Regularization gradients: ['9.8602e-06']

At iterate    1    f=  3.90987D+02    |proj g|=  5.92733D-03
Iteration wall time: 11.34
Total wall time: 34.91
Updating plot...
Calculating residual...
End time forward: 3.89
Total projection time forward: 3.83
Residual norm: 2.7783e+01
Regularizing...
Regularization norm: ['1.4496e+00']
End time adjoint: 3.99
Total projection time adjoint: 3.50
Gradient norm: 1.1201e-03
Regularizer call: 8
Regularization gradients: ['3.2370e-04']

At iterate    2    f=  2.92322D+01    |proj g|=  1.05779D-03
Iteration wall time: 11.19
Total wall time: 46.10
Updating plot...
Calculating residual...
End time forward: 3.76
Total projection time forward: 3.69
Residual norm: 1.7580e+01
Regularizing...
Regularization norm: ['2.1234e+00']
End time adjoint: 3.96
Total projection time adjoint: 3.48
Gradient norm: 7.9579e-04
Regularizer call: 10
Regularization gradients: ['3.8537e-04']

At iterate    3    f=  1.97030D+01    |proj g|=  7.32932D-04
Iteration wall time: 11.19
Total wall time: 57.29
Updating plot...
Calculating residual...
End time forward: 3.75
Total projection time forward: 3.69
Residual norm: 9.3652e+00
Regularizing...
Regularization norm: ['5.6616e+00']
End time adjoint: 3.96
Total projection time adjoint: 3.48
Gradient norm: 4.9425e-04
Regularizer call: 12
Regularization gradients: ['1.0147e-03']

At iterate    4    f=  1.50268D+01    |proj g|=  9.98538D-04
Iteration wall time: 11.18
Total wall time: 68.47
Updating plot...
Calculating residual...
End time forward: 3.75
Total projection time forward: 3.69
Residual norm: 7.7199e+00
Regularizing...
Regularization norm: ['4.7679e+00']
End time adjoint: 3.96
Total projection time adjoint: 3.47
Gradient norm: 4.2078e-04
Regularizer call: 14
Regularization gradients: ['5.9206e-04']

At iterate    5    f=  1.24878D+01    |proj g|=  4.20863D-04
Iteration wall time: 11.14
Total wall time: 79.61
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.70
Residual norm: 7.5091e+00
Regularizing...
Regularization norm: ['4.3284e+00']
End time adjoint: 4.00
Total projection time adjoint: 3.50
Gradient norm: 4.2330e-04
Regularizer call: 16
Regularization gradients: ['4.3076e-04']

At iterate    6    f=  1.18375D+01    |proj g|=  1.76518D-04
Iteration wall time: 12.01
Total wall time: 91.62
Updating plot...
Calculating residual...
End time forward: 4.82
Total projection time forward: 4.74
Residual norm: 6.9486e+00
Regularizing...
Regularization norm: ['4.4617e+00']
End time adjoint: 4.07
Total projection time adjoint: 3.57
Gradient norm: 4.3077e-04
Regularizer call: 18
Regularization gradients: ['4.1615e-04']

At iterate    7    f=  1.14103D+01    |proj g|=  1.17663D-04
Iteration wall time: 12.41
Total wall time: 104.03
Updating plot...
Calculating residual...
End time forward: 4.00
Total projection time forward: 3.93
Residual norm: 6.3849e+00
Regularizing...
Regularization norm: ['4.7608e+00']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 4.3130e-04
Regularizer call: 20
Regularization gradients: ['4.3950e-04']

At iterate    8    f=  1.11456D+01    |proj g|=  1.25705D-04
Iteration wall time: 11.60
Total wall time: 115.63
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.71
Residual norm: 5.8854e+00
Regularizing...
Regularization norm: ['5.3762e+00']
End time adjoint: 3.99
Total projection time adjoint: 3.50
Gradient norm: 4.0667e-04
Regularizer call: 22
Regularization gradients: ['6.7142e-04']
Iteration wall time: 10.46
Total wall time: 126.09
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.71
Residual norm: 6.2209e+00
Regularizing...
Regularization norm: ['4.8472e+00']
End time adjoint: 4.02
Total projection time adjoint: 3.53
Gradient norm: 4.2481e-04
Regularizer call: 24
Regularization gradients: ['4.3395e-04']

At iterate    9    f=  1.10681D+01    |proj g|=  1.28539D-04
Iteration wall time: 11.30
Total wall time: 137.39
Updating plot...
Calculating residual...
End time forward: 3.87
Total projection time forward: 3.80
Residual norm: 5.9183e+00
Regularizing...
Regularization norm: ['5.0550e+00']
End time adjoint: 4.57
Total projection time adjoint: 4.07
Gradient norm: 4.0891e-04
Regularizer call: 26
Regularization gradients: ['4.2448e-04']

At iterate   10    f=  1.09733D+01    |proj g|=  6.06087D-05
Iteration wall time: 11.95
Total wall time: 149.34
Updating plot...
Calculating residual...
End time forward: 3.90
Total projection time forward: 3.83
Residual norm: 5.7744e+00
Regularizing...
Regularization norm: ['5.1600e+00']
End time adjoint: 3.99
Total projection time adjoint: 3.49
Gradient norm: 3.9740e-04
Regularizer call: 28
Regularization gradients: ['4.4022e-04']

At iterate   11    f=  1.09344D+01    |proj g|=  7.77758D-05
Iteration wall time: 11.43
Total wall time: 160.77
Updating plot...
Calculating residual...
End time forward: 3.81
Total projection time forward: 3.75
Residual norm: 5.7286e+00
Regularizing...
Regularization norm: ['5.2264e+00']
End time adjoint: 4.09
Total projection time adjoint: 3.60
Gradient norm: 4.0088e-04
Regularizer call: 30
Regularization gradients: ['4.3997e-04']
Iteration wall time: 10.57
Total wall time: 171.34
Updating plot...
Calculating residual...
End time forward: 3.99
Total projection time forward: 3.92
Residual norm: 5.7557e+00
Regularizing...
Regularization norm: ['5.1637e+00']
End time adjoint: 4.11
Total projection time adjoint: 3.62
Gradient norm: 3.9525e-04
Regularizer call: 32
Regularization gradients: ['4.2102e-04']

At iterate   12    f=  1.09194D+01    |proj g|=  4.94438D-05
Iteration wall time: 11.59
Total wall time: 182.93
Updating plot...
Calculating residual...
End time forward: 4.00
Total projection time forward: 3.93
Residual norm: 5.7526e+00
Regularizing...
Regularization norm: ['5.1719e+00']
End time adjoint: 4.12
Total projection time adjoint: 3.63
Gradient norm: 3.9719e-04
Regularizer call: 34
Regularization gradients: ['4.1542e-04']
Iteration wall time: 10.80
Total wall time: 193.73
Updating plot...
Calculating residual...
End time forward: 4.01
Total projection time forward: 3.94
Residual norm: 5.7506e+00
Regularizing...
Regularization norm: ['5.1630e+00']
End time adjoint: 4.21
Total projection time adjoint: 3.72
Gradient norm: 3.9572e-04
Regularizer call: 36
Regularization gradients: ['4.1820e-04']

At iterate   13    f=  1.09136D+01    |proj g|=  4.52015D-05

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
*****     13     18   1151     0  2634   4.520D-05   1.091D+01
  F =   10.913587969536596

CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
Saving coefficients to h5 ...
Saving rms_of_amplitude to h5 ...
Saving mean_of_amplitude to h5 ...
Saving std_of_amplitude to h5 ...
Saving relative_std_of_amplitude to h5 ...
Saving eigenvectors to h5 ...
Saving eigenvalues to h5 ...
Saving order_amplitude to h5 ...
Saving rank_2_tensor to h5 ...
Saving synthetic_data to h5 ...
reconstruction_type
algorithm
3 dataset_q_0.101_0.104.h5
Increasing maximum order ...
Output directory already exists!
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.71
Residual norm: 5.5661e+06
Regularizing...
Regularization norm: ['8.2147e-09']
End time adjoint: 3.95
Total projection time adjoint: 3.47
Gradient norm: 7.9466e-01
Regularizer call: 2
Regularization gradients: ['5.0591e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  5.56606D+06    |proj g|=  7.94660D-01
Iteration wall time: 12.58
Total wall time: 12.58
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.71
Residual norm: 5.5657e+06
Regularizing...
Regularization norm: ['5.4376e-05']
End time adjoint: 3.98
Total projection time adjoint: 3.50
Gradient norm: 7.9463e-01
Regularizer call: 4
Regularization gradients: ['4.9726e-06']
Iteration wall time: 10.39
Total wall time: 22.97
Updating plot...
Calculating residual...
End time forward: 3.75
Total projection time forward: 3.69
Residual norm: 5.5640e+06
Regularizing...
Regularization norm: ['1.3592e-03']
End time adjoint: 3.91
Total projection time adjoint: 3.43
Gradient norm: 7.9453e-01
Regularizer call: 6
Regularization gradients: ['2.4901e-05']
Iteration wall time: 10.31
Total wall time: 33.27
Updating plot...
Calculating residual...
End time forward: 3.75
Total projection time forward: 3.69
Residual norm: 5.5575e+06
Regularizing...
Regularization norm: ['2.3976e-02']
End time adjoint: 3.96
Total projection time adjoint: 3.48
Gradient norm: 7.9409e-01
Regularizer call: 8
Regularization gradients: ['1.0461e-04']
Iteration wall time: 10.32
Total wall time: 43.59
Updating plot...
Calculating residual...
End time forward: 3.73
Total projection time forward: 3.66
Residual norm: 5.5316e+06
Regularizing...
Regularization norm: ['3.9281e-01']
End time adjoint: 3.96
Total projection time adjoint: 3.47
Gradient norm: 7.9237e-01
Regularizer call: 10
Regularization gradients: ['4.2346e-04']
Iteration wall time: 10.29
Total wall time: 53.88
Updating plot...
Calculating residual...
End time forward: 3.72
Total projection time forward: 3.66
Residual norm: 5.4840e+06
Regularizing...
Regularization norm: ['2.2452e+00']
End time adjoint: 3.96
Total projection time adjoint: 3.47
Gradient norm: 7.8917e-01
Regularizer call: 12
Regularization gradients: ['1.0124e-03']

At iterate    1    f=  5.48398D+06    |proj g|=  7.88821D-01
Iteration wall time: 10.83
Total wall time: 64.71
Updating plot...
Calculating residual...
End time forward: 3.75
Total projection time forward: 3.69
Residual norm: 6.0523e+05
Regularizing...
Regularization norm: ['3.5786e+04']
End time adjoint: 3.98
Total projection time adjoint: 3.50
Gradient norm: 1.6741e-01
Regularizer call: 14
Regularization gradients: ['5.0997e-02']

At iterate    2    f=  6.41018D+05    |proj g|=  1.56002D-01
Iteration wall time: 11.05
Total wall time: 75.76
Updating plot...
Calculating residual...
End time forward: 3.76
Total projection time forward: 3.70
Residual norm: 3.8405e+05
Regularizing...
Regularization norm: ['5.5310e+04']
End time adjoint: 3.99
Total projection time adjoint: 3.51
Gradient norm: 1.1780e-01
Regularizer call: 16
Regularization gradients: ['6.3749e-02']

At iterate    3    f=  4.39361D+05    |proj g|=  1.06629D-01
Iteration wall time: 11.26
Total wall time: 87.01
Updating plot...
Calculating residual...
End time forward: 3.79
Total projection time forward: 3.72
Residual norm: 1.8589e+05
Regularizing...
Regularization norm: ['1.5627e+05']
End time adjoint: 3.97
Total projection time adjoint: 3.48
Gradient norm: 7.6936e-02
Regularizer call: 18
Regularization gradients: ['1.7531e-01']

At iterate    4    f=  3.42160D+05    |proj g|=  1.74572D-01
Iteration wall time: 11.21
Total wall time: 98.23
Updating plot...
Calculating residual...
End time forward: 3.73
Total projection time forward: 3.67
Residual norm: 1.5648e+05
Regularizing...
Regularization norm: ['1.2790e+05']
End time adjoint: 3.96
Total projection time adjoint: 3.47
Gradient norm: 7.3885e-02
Regularizer call: 20
Regularization gradients: ['1.0399e-01']

At iterate    5    f=  2.84381D+05    |proj g|=  7.32313D-02
Iteration wall time: 11.11
Total wall time: 109.34
Updating plot...
Calculating residual...
End time forward: 3.72
Total projection time forward: 3.66
Residual norm: 1.5664e+05
Regularizing...
Regularization norm: ['1.1324e+05']
End time adjoint: 3.96
Total projection time adjoint: 3.47
Gradient norm: 7.8079e-02
Regularizer call: 22
Regularization gradients: ['7.4669e-02']

At iterate    6    f=  2.69880D+05    |proj g|=  2.28109D-02
Iteration wall time: 11.13
Total wall time: 120.48
Updating plot...
Calculating residual...
End time forward: 3.72
Total projection time forward: 3.66
Residual norm: 1.4851e+05
Regularizing...
Regularization norm: ['1.1448e+05']
End time adjoint: 4.01
Total projection time adjoint: 3.49
Gradient norm: 7.8307e-02
Regularizer call: 24
Regularization gradients: ['7.5453e-02']

At iterate    7    f=  2.62991D+05    |proj g|=  1.73500D-02
Iteration wall time: 11.24
Total wall time: 131.71
Updating plot...
Calculating residual...
End time forward: 6.20
Total projection time forward: 6.13
Residual norm: 1.3497e+05
Regularizing...
Regularization norm: ['1.2145e+05']
End time adjoint: 4.15
Total projection time adjoint: 3.67
Gradient norm: 7.6908e-02
Regularizer call: 26
Regularization gradients: ['7.9170e-02']

At iterate    8    f=  2.56417D+05    |proj g|=  1.77704D-02
Iteration wall time: 13.83
Total wall time: 145.54
Updating plot...
Calculating residual...
End time forward: 3.98
Total projection time forward: 3.93
Residual norm: 1.2478e+05
Regularizing...
Regularization norm: ['1.3240e+05']
End time adjoint: 4.07
Total projection time adjoint: 3.59
Gradient norm: 7.3370e-02
Regularizer call: 28
Regularization gradients: ['9.9958e-02']
Iteration wall time: 10.68
Total wall time: 156.22
Updating plot...
Calculating residual...
End time forward: 3.97
Total projection time forward: 3.90
Residual norm: 1.3069e+05
Regularizing...
Regularization norm: ['1.2417e+05']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 7.5617e-02
Regularizer call: 30
Regularization gradients: ['7.8652e-02']

At iterate    9    f=  2.54858D+05    |proj g|=  2.54791D-02
Iteration wall time: 11.50
Total wall time: 167.71
Updating plot...
Calculating residual...
End time forward: 3.97
Total projection time forward: 3.91
Residual norm: 1.2447e+05
Regularizing...
Regularization norm: ['1.2860e+05']
End time adjoint: 4.08
Total projection time adjoint: 3.60
Gradient norm: 7.3579e-02
Regularizer call: 32
Regularization gradients: ['7.6539e-02']

At iterate   10    f=  2.53073D+05    |proj g|=  9.69626D-03
Iteration wall time: 11.47
Total wall time: 179.19
Updating plot...
Calculating residual...
End time forward: 3.76
Total projection time forward: 3.70
Residual norm: 1.2175e+05
Regularizing...
Regularization norm: ['1.3067e+05']
End time adjoint: 4.00
Total projection time adjoint: 3.51
Gradient norm: 7.2733e-02
Regularizer call: 34
Regularization gradients: ['7.7363e-02']

At iterate   11    f=  2.52420D+05    |proj g|=  8.51529D-03
Iteration wall time: 11.18
Total wall time: 190.37
Updating plot...
Calculating residual...
End time forward: 3.78
Total projection time forward: 3.71
Residual norm: 1.2057e+05
Regularizing...
Regularization norm: ['1.3205e+05']
End time adjoint: 4.05
Total projection time adjoint: 3.56
Gradient norm: 7.2344e-02
Regularizer call: 36
Regularization gradients: ['8.0060e-02']
Iteration wall time: 10.46
Total wall time: 200.83
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.83
Residual norm: 1.2132e+05
Regularizing...
Regularization norm: ['1.3086e+05']
End time adjoint: 4.02
Total projection time adjoint: 3.52
Gradient norm: 7.2627e-02
Regularizer call: 38
Regularization gradients: ['7.6184e-02']

At iterate   12    f=  2.52188D+05    |proj g|=  6.98279D-03
Iteration wall time: 11.43
Total wall time: 212.26
Updating plot...
Calculating residual...
End time forward: 3.78
Total projection time forward: 3.71
Residual norm: 1.2114e+05
Regularizing...
Regularization norm: ['1.3112e+05']
End time adjoint: 3.97
Total projection time adjoint: 3.47
Gradient norm: 7.2786e-02
Regularizer call: 40
Regularization gradients: ['7.4598e-02']
Iteration wall time: 10.38
Total wall time: 222.64
Updating plot...
Calculating residual...
End time forward: 3.78
Total projection time forward: 3.71
Residual norm: 1.2120e+05
Regularizing...
Regularization norm: ['1.3089e+05']
End time adjoint: 3.97
Total projection time adjoint: 3.48
Gradient norm: 7.2667e-02
Regularizer call: 42
Regularization gradients: ['7.5769e-02']

At iterate   13    f=  2.52087D+05    |proj g|=  6.84220D-03

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
*****     13     21  43246     0 54536   6.842D-03   2.521D+05
  F =   252086.78863695165

CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
Saving coefficients to h5 ...
Saving rms_of_amplitude to h5 ...
Saving mean_of_amplitude to h5 ...
Saving std_of_amplitude to h5 ...
Saving relative_std_of_amplitude to h5 ...
Saving eigenvectors to h5 ...
Saving eigenvalues to h5 ...
Saving order_amplitude to h5 ...
Saving rank_2_tensor to h5 ...
Saving synthetic_data to h5 ...
reconstruction_type
algorithm
4 dataset_q_0.050_0.052.h5
Increasing maximum order ...
Output directory already exists!
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.77
Total projection time forward: 3.70
Residual norm: 5.7796e+07
Regularizing...
Regularization norm: ['8.2422e-09']
End time adjoint: 4.00
Total projection time adjoint: 3.51
Gradient norm: 2.6265e+00
Regularizer call: 2
Regularization gradients: ['5.0583e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  5.77963D+07    |proj g|=  2.62647D+00
Iteration wall time: 12.60
Total wall time: 12.60
Updating plot...
Calculating residual...
End time forward: 3.82
Total projection time forward: 3.74
Residual norm: 5.7795e+07
Regularizing...
Regularization norm: ['5.3124e-05']
End time adjoint: 4.04
Total projection time adjoint: 3.56
Gradient norm: 2.6264e+00
Regularizer call: 4
Regularization gradients: ['5.0711e-06']
Iteration wall time: 10.71
Total wall time: 23.31
Updating plot...
Calculating residual...
End time forward: 3.80
Total projection time forward: 3.73
Residual norm: 5.7790e+07
Regularizing...
Regularization norm: ['1.3279e-03']
End time adjoint: 4.04
Total projection time adjoint: 3.55
Gradient norm: 2.6263e+00
Regularizer call: 6
Regularization gradients: ['2.5485e-05']
Iteration wall time: 10.49
Total wall time: 33.81
Updating plot...
Calculating residual...
End time forward: 4.95
Total projection time forward: 4.89
Residual norm: 5.7769e+07
Regularizing...
Regularization norm: ['2.3424e-02']
End time adjoint: 5.21
Total projection time adjoint: 4.73
Gradient norm: 2.6259e+00
Regularizer call: 8
Regularization gradients: ['1.0714e-04']
Iteration wall time: 12.86
Total wall time: 46.66
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.88
Residual norm: 5.7685e+07
Regularizing...
Regularization norm: ['3.8376e-01']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 2.6242e+00
Regularizer call: 10
Regularization gradients: ['4.3377e-04']
Iteration wall time: 10.68
Total wall time: 57.34
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.88
Residual norm: 5.7351e+07
Regularizing...
Regularization norm: ['6.1763e+00']
End time adjoint: 4.11
Total projection time adjoint: 3.62
Gradient norm: 2.6172e+00
Regularizer call: 12
Regularization gradients: ['1.7403e-03']
Iteration wall time: 10.69
Total wall time: 68.03
Updating plot...
Calculating residual...
End time forward: 3.78
Total projection time forward: 3.72
Residual norm: 5.6941e+07
Regularizing...
Regularization norm: ['2.2854e+01']
End time adjoint: 4.03
Total projection time adjoint: 3.54
Gradient norm: 2.6087e+00
Regularizer call: 14
Regularization gradients: ['3.3476e-03']

At iterate    1    f=  5.69411D+07    |proj g|=  2.60719D+00
Iteration wall time: 10.97
Total wall time: 79.00
Updating plot...
Calculating residual...
End time forward: 3.80
Total projection time forward: 3.73
Residual norm: 6.1496e+06
Regularizing...
Regularization norm: ['3.6017e+05']
End time adjoint: 4.12
Total projection time adjoint: 3.63
Gradient norm: 5.5399e-01
Regularizer call: 16
Regularization gradients: ['1.7488e-01']

At iterate    2    f=  6.50977D+06    |proj g|=  5.07936D-01
Iteration wall time: 11.25
Total wall time: 90.25
Updating plot...
Calculating residual...
End time forward: 3.83
Total projection time forward: 3.77
Residual norm: 3.9113e+06
Regularizing...
Regularization norm: ['5.5607e+05']
End time adjoint: 4.19
Total projection time adjoint: 3.69
Gradient norm: 4.3643e-01
Regularizer call: 18
Regularization gradients: ['2.3455e-01']

At iterate    3    f=  4.46737D+06    |proj g|=  3.53254D-01
Iteration wall time: 11.52
Total wall time: 101.77
Updating plot...
Calculating residual...
End time forward: 3.87
Total projection time forward: 3.81
Residual norm: 1.9179e+06
Regularizing...
Regularization norm: ['1.5737e+06']
End time adjoint: 4.07
Total projection time adjoint: 3.58
Gradient norm: 2.7950e-01
Regularizer call: 20
Regularization gradients: ['5.7994e-01']

At iterate    4    f=  3.49166D+06    |proj g|=  5.78990D-01
Iteration wall time: 11.41
Total wall time: 113.18
Updating plot...
Calculating residual...
End time forward: 3.85
Total projection time forward: 3.78
Residual norm: 1.6206e+06
Regularizing...
Regularization norm: ['1.2823e+06']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 2.8118e-01
Regularizer call: 22
Regularization gradients: ['3.8931e-01']

At iterate    5    f=  2.90289D+06    |proj g|=  2.33238D-01
Iteration wall time: 11.37
Total wall time: 124.55
Updating plot...
Calculating residual...
End time forward: 3.83
Total projection time forward: 3.77
Residual norm: 1.6197e+06
Regularizing...
Regularization norm: ['1.1384e+06']
End time adjoint: 4.09
Total projection time adjoint: 3.59
Gradient norm: 3.0141e-01
Regularizer call: 24
Regularization gradients: ['2.9879e-01']

At iterate    6    f=  2.75815D+06    |proj g|=  7.33993D-02
Iteration wall time: 11.40
Total wall time: 135.95
Updating plot...
Calculating residual...
End time forward: 3.80
Total projection time forward: 3.73
Residual norm: 1.5330e+06
Regularizing...
Regularization norm: ['1.1530e+06']
End time adjoint: 4.19
Total projection time adjoint: 3.70
Gradient norm: 3.0348e-01
Regularizer call: 26
Regularization gradients: ['2.8580e-01']

At iterate    7    f=  2.68605D+06    |proj g|=  5.77872D-02
Iteration wall time: 11.46
Total wall time: 147.40
Updating plot...
Calculating residual...
End time forward: 3.98
Total projection time forward: 3.91
Residual norm: 1.3918e+06
Regularizing...
Regularization norm: ['1.2270e+06']
End time adjoint: 6.15
Total projection time adjoint: 5.67
Gradient norm: 2.9881e-01
Regularizer call: 28
Regularization gradients: ['2.9546e-01']

At iterate    8    f=  2.61877D+06    |proj g|=  6.10401D-02
Iteration wall time: 13.59
Total wall time: 160.99
Updating plot...
Calculating residual...
End time forward: 4.05
Total projection time forward: 3.99
Residual norm: 1.2861e+06
Regularizing...
Regularization norm: ['1.3449e+06']
End time adjoint: 6.01
Total projection time adjoint: 5.52
Gradient norm: 2.8528e-01
Regularizer call: 30
Regularization gradients: ['3.6047e-01']
Iteration wall time: 12.69
Total wall time: 173.69
Updating plot...
Calculating residual...
End time forward: 4.04
Total projection time forward: 3.98
Residual norm: 1.3523e+06
Regularizing...
Regularization norm: ['1.2514e+06']
End time adjoint: 4.13
Total projection time adjoint: 3.64
Gradient norm: 2.9446e-01
Regularizer call: 32
Regularization gradients: ['3.1121e-01']

At iterate    9    f=  2.60371D+06    |proj g|=  7.57090D-02
Iteration wall time: 11.64
Total wall time: 185.33
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.87
Residual norm: 1.2857e+06
Regularizing...
Regularization norm: ['1.2995e+06']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 2.8642e-01
Regularizer call: 34
Regularization gradients: ['2.9645e-01']

At iterate   10    f=  2.58528D+06    |proj g|=  3.33685D-02
Iteration wall time: 11.49
Total wall time: 196.82
Updating plot...
Calculating residual...
End time forward: 3.90
Total projection time forward: 3.84
Residual norm: 1.2549e+06
Regularizing...
Regularization norm: ['1.3237e+06']
End time adjoint: 4.09
Total projection time adjoint: 3.60
Gradient norm: 2.8312e-01
Regularizer call: 36
Regularization gradients: ['2.9654e-01']

At iterate   11    f=  2.57854D+06    |proj g|=  3.24411D-02
Iteration wall time: 11.48
Total wall time: 208.29
Updating plot...
Calculating residual...
End time forward: 3.96
Total projection time forward: 3.89
Residual norm: 1.2446e+06
Regularizing...
Regularization norm: ['1.3360e+06']
End time adjoint: 4.12
Total projection time adjoint: 3.63
Gradient norm: 2.8210e-01
Regularizer call: 38
Regularization gradients: ['3.1474e-01']
Iteration wall time: 10.76
Total wall time: 219.05
Updating plot...
Calculating residual...
End time forward: 3.83
Total projection time forward: 3.76
Residual norm: 1.2509e+06
Regularizing...
Regularization norm: ['1.3250e+06']
End time adjoint: 4.10
Total projection time adjoint: 3.61
Gradient norm: 2.8282e-01
Regularizer call: 40
Regularization gradients: ['2.9328e-01']

At iterate   12    f=  2.57595D+06    |proj g|=  2.47628D-02
Iteration wall time: 11.45
Total wall time: 230.50
Updating plot...
Calculating residual...
End time forward: 3.89
Total projection time forward: 3.82
Residual norm: 1.2506e+06
Regularizing...
Regularization norm: ['1.3259e+06']
End time adjoint: 4.10
Total projection time adjoint: 3.60
Gradient norm: 2.8371e-01
Regularizer call: 42
Regularization gradients: ['2.9686e-01']
Iteration wall time: 10.66
Total wall time: 241.16
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.86
Residual norm: 1.2502e+06
Regularizing...
Regularization norm: ['1.3248e+06']
End time adjoint: 4.08
Total projection time adjoint: 3.58
Gradient norm: 2.8305e-01
Regularizer call: 44
Regularization gradients: ['2.9250e-01']

At iterate   13    f=  2.57500D+06    |proj g|=  2.11988D-02

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
*****     13     22  29535     0 36261   2.120D-02   2.575D+06
  F =   2575001.6614767630

CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
Saving coefficients to h5 ...
Saving rms_of_amplitude to h5 ...
Saving mean_of_amplitude to h5 ...
Saving std_of_amplitude to h5 ...
Saving relative_std_of_amplitude to h5 ...
Saving eigenvectors to h5 ...
Saving eigenvalues to h5 ...
Saving order_amplitude to h5 ...
Saving rank_2_tensor to h5 ...
Saving synthetic_data to h5 ...
reconstruction_type
algorithm
5 dataset_q_0.196_0.203.h5
Increasing maximum order ...
Output directory already exists!
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.96
Total projection time forward: 3.89
Residual norm: 4.1358e+04
Regularizing...
Regularization norm: ['8.1931e-09']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 6.7313e-02
Regularizer call: 2
Regularization gradients: ['5.1300e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  4.13584D+04    |proj g|=  6.73128D-02
Iteration wall time: 12.85
Total wall time: 12.85
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.88
Residual norm: 4.1323e+04
Regularizing...
Regularization norm: ['5.0975e-05']
End time adjoint: 4.08
Total projection time adjoint: 3.60
Gradient norm: 6.7286e-02
Regularizer call: 4
Regularization gradients: ['5.1758e-06']
Iteration wall time: 10.66
Total wall time: 23.51
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.86
Residual norm: 4.1183e+04
Regularizing...
Regularization norm: ['1.2742e-03']
End time adjoint: 4.07
Total projection time adjoint: 3.58
Gradient norm: 6.7178e-02
Regularizer call: 6
Regularization gradients: ['2.5807e-05']
Iteration wall time: 10.60
Total wall time: 34.11
Updating plot...
Calculating residual...
End time forward: 5.74
Total projection time forward: 5.67
Residual norm: 4.0742e+04
Regularizing...
Regularization norm: ['1.5797e-02']
End time adjoint: 4.31
Total projection time adjoint: 3.81
Gradient norm: 6.6837e-02
Regularizer call: 8
Regularization gradients: ['9.0824e-05']

At iterate    1    f=  4.07424D+04    |proj g|=  6.68021D-02
Iteration wall time: 13.21
Total wall time: 47.33
Updating plot...
Calculating residual...
End time forward: 6.87
Total projection time forward: 6.79
Residual norm: 4.1898e+03
Regularizing...
Regularization norm: ['2.4185e+02']
End time adjoint: 4.17
Total projection time adjoint: 3.61
Gradient norm: 1.3740e-02
Regularizer call: 10
Regularization gradients: ['3.9501e-03']

At iterate    2    f=  4.43161D+03    |proj g|=  1.30305D-02
Iteration wall time: 14.91
Total wall time: 62.23
Updating plot...
Calculating residual...
End time forward: 3.98
Total projection time forward: 3.90
Residual norm: 2.6371e+03
Regularizing...
Regularization norm: ['3.7143e+02']
End time adjoint: 4.12
Total projection time adjoint: 3.61
Gradient norm: 9.5383e-03
Regularizer call: 12
Regularization gradients: ['4.8522e-03']

At iterate    3    f=  3.00851D+03    |proj g|=  8.48845D-03
Iteration wall time: 11.68
Total wall time: 73.91
Updating plot...
Calculating residual...
End time forward: 4.01
Total projection time forward: 3.95
Residual norm: 1.2719e+03
Regularizing...
Regularization norm: ['1.0569e+03']
End time adjoint: 4.11
Total projection time adjoint: 3.62
Gradient norm: 6.4847e-03
Regularizer call: 14
Regularization gradients: ['1.5311e-02']

At iterate    4    f=  2.32880D+03    |proj g|=  1.45077D-02
Iteration wall time: 11.65
Total wall time: 85.56
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.88
Residual norm: 1.0652e+03
Regularizing...
Regularization norm: ['8.5431e+02']
End time adjoint: 4.16
Total projection time adjoint: 3.65
Gradient norm: 5.5357e-03
Regularizer call: 16
Regularization gradients: ['8.3094e-03']

At iterate    5    f=  1.91951D+03    |proj g|=  5.89198D-03
Iteration wall time: 11.66
Total wall time: 97.22
Updating plot...
Calculating residual...
End time forward: 4.01
Total projection time forward: 3.95
Residual norm: 1.0614e+03
Regularizing...
Regularization norm: ['7.5847e+02']
End time adjoint: 4.12
Total projection time adjoint: 3.62
Gradient norm: 5.7863e-03
Regularizer call: 18
Regularization gradients: ['5.5209e-03']

At iterate    6    f=  1.81987D+03    |proj g|=  2.01188D-03
Iteration wall time: 11.65
Total wall time: 108.87
Updating plot...
Calculating residual...
End time forward: 3.96
Total projection time forward: 3.90
Residual norm: 1.0002e+03
Regularizing...
Regularization norm: ['7.6905e+02']
End time adjoint: 4.10
Total projection time adjoint: 3.61
Gradient norm: 5.8496e-03
Regularizer call: 20
Regularization gradients: ['5.6009e-03']

At iterate    7    f=  1.76929D+03    |proj g|=  1.58650D-03
Iteration wall time: 11.54
Total wall time: 120.41
Updating plot...
Calculating residual...
End time forward: 3.93
Total projection time forward: 3.86
Residual norm: 9.0403e+02
Regularizing...
Regularization norm: ['8.1904e+02']
End time adjoint: 4.10
Total projection time adjoint: 3.60
Gradient norm: 5.7625e-03
Regularizer call: 22
Regularization gradients: ['5.9413e-03']

At iterate    8    f=  1.72307D+03    |proj g|=  1.56751D-03
Iteration wall time: 11.50
Total wall time: 131.91
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.88
Residual norm: 8.3223e+02
Regularizing...
Regularization norm: ['8.9974e+02']
End time adjoint: 4.09
Total projection time adjoint: 3.60
Gradient norm: 5.4129e-03
Regularizer call: 24
Regularization gradients: ['8.4895e-03']
Iteration wall time: 10.70
Total wall time: 142.61
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.85
Residual norm: 8.7727e+02
Regularizing...
Regularization norm: ['8.3527e+02']
End time adjoint: 4.10
Total projection time adjoint: 3.60
Gradient norm: 5.6509e-03
Regularizer call: 26
Regularization gradients: ['5.6852e-03']

At iterate    9    f=  1.71254D+03    |proj g|=  2.04390D-03
Iteration wall time: 11.52
Total wall time: 154.13
Updating plot...
Calculating residual...
End time forward: 5.59
Total projection time forward: 5.52
Residual norm: 8.3267e+02
Regularizing...
Regularization norm: ['8.6688e+02']
End time adjoint: 4.79
Total projection time adjoint: 4.30
Gradient norm: 5.4561e-03
Regularizer call: 28
Regularization gradients: ['5.5600e-03']

At iterate   10    f=  1.69954D+03    |proj g|=  8.98690D-04
Iteration wall time: 13.90
Total wall time: 168.03
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.88
Residual norm: 8.1124e+02
Regularizing...
Regularization norm: ['8.8313e+02']
End time adjoint: 4.10
Total projection time adjoint: 3.59
Gradient norm: 5.3780e-03
Regularizer call: 30
Regularization gradients: ['5.8425e-03']

At iterate   11    f=  1.69436D+03    |proj g|=  8.61047D-04
Iteration wall time: 11.60
Total wall time: 179.64
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.88
Residual norm: 8.0402e+02
Regularizing...
Regularization norm: ['8.9130e+02']
End time adjoint: 4.09
Total projection time adjoint: 3.59
Gradient norm: 5.3641e-03
Regularizer call: 32
Regularization gradients: ['5.7267e-03']
Iteration wall time: 10.72
Total wall time: 190.36
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.87
Residual norm: 8.0817e+02
Regularizing...
Regularization norm: ['8.8409e+02']
End time adjoint: 4.09
Total projection time adjoint: 3.59
Gradient norm: 5.3737e-03
Regularizer call: 34
Regularization gradients: ['5.6688e-03']

At iterate   12    f=  1.69226D+03    |proj g|=  5.68795D-04
Iteration wall time: 11.54
Total wall time: 201.90
Updating plot...
Calculating residual...
End time forward: 3.90
Total projection time forward: 3.84
Residual norm: 8.0801e+02
Regularizing...
Regularization norm: ['8.8413e+02']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 5.3970e-03
Regularizer call: 36
Regularization gradients: ['5.4969e-03']

At iterate   13    f=  1.69215D+03    |proj g|=  5.29673D-04

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
*****     13     18  22717     0 24307   5.297D-04   1.692D+03
  F =   1692.1468960789091

CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
Saving coefficients to h5 ...
Saving rms_of_amplitude to h5 ...
Saving mean_of_amplitude to h5 ...
Saving std_of_amplitude to h5 ...
Saving relative_std_of_amplitude to h5 ...
Saving eigenvectors to h5 ...
Saving eigenvalues to h5 ...
Saving order_amplitude to h5 ...
Saving rank_2_tensor to h5 ...
Saving synthetic_data to h5 ...
reconstruction_type
algorithm
6 dataset_q_0.161_0.166.h5
Increasing maximum order ...
Output directory already exists!
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.90
Total projection time forward: 3.84
Residual norm: 2.1451e+05
Regularizing...
Regularization norm: ['8.2043e-09']
End time adjoint: 4.12
Total projection time adjoint: 3.59
Gradient norm: 1.5401e-01
Regularizer call: 2
Regularization gradients: ['4.9289e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  2.14509D+05    |proj g|=  1.54012D-01
Iteration wall time: 13.20
Total wall time: 13.20
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.83
Residual norm: 2.1443e+05
Regularizing...
Regularization norm: ['5.2332e-05']
End time adjoint: 4.14
Total projection time adjoint: 3.61
Gradient norm: 1.5398e-01
Regularizer call: 4
Regularization gradients: ['5.1308e-06']
Iteration wall time: 10.98
Total wall time: 24.18
Updating plot...
Calculating residual...
End time forward: 4.10
Total projection time forward: 4.01
Residual norm: 2.1411e+05
Regularizing...
Regularization norm: ['1.3081e-03']
End time adjoint: 4.15
Total projection time adjoint: 3.62
Gradient norm: 1.5388e-01
Regularizer call: 6
Regularization gradients: ['2.5590e-05']
Iteration wall time: 11.51
Total wall time: 35.69
Updating plot...
Calculating residual...
End time forward: 3.97
Total projection time forward: 3.89
Residual norm: 2.1284e+05
Regularizing...
Regularization norm: ['2.3075e-02']
End time adjoint: 4.16
Total projection time adjoint: 3.60
Gradient norm: 1.5345e-01
Regularizer call: 8
Regularization gradients: ['1.0743e-04']
Iteration wall time: 11.06
Total wall time: 46.75
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.85
Residual norm: 2.1133e+05
Regularizing...
Regularization norm: ['8.3677e-02']
End time adjoint: 4.11
Total projection time adjoint: 3.57
Gradient norm: 1.5294e-01
Regularizer call: 10
Regularization gradients: ['2.0456e-04']

At iterate    1    f=  2.11330D+05    |proj g|=  1.52867D-01
Iteration wall time: 11.29
Total wall time: 58.04
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.85
Residual norm: 2.2301e+04
Regularizing...
Regularization norm: ['1.3039e+03']
End time adjoint: 4.07
Total projection time adjoint: 3.57
Gradient norm: 3.1871e-02
Regularizer call: 12
Regularization gradients: ['9.0653e-03']

At iterate    2    f=  2.36050D+04    |proj g|=  3.00079D-02
Iteration wall time: 11.49
Total wall time: 69.53
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.85
Residual norm: 1.4058e+04
Regularizing...
Regularization norm: ['2.0071e+03']
End time adjoint: 4.06
Total projection time adjoint: 3.58
Gradient norm: 2.2120e-02
Regularizer call: 14
Regularization gradients: ['1.1462e-02']

At iterate    3    f=  1.60654D+04    |proj g|=  1.95818D-02
Iteration wall time: 11.47
Total wall time: 81.00
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.84
Residual norm: 6.7821e+03
Regularizing...
Regularization norm: ['5.6816e+03']
End time adjoint: 4.09
Total projection time adjoint: 3.60
Gradient norm: 1.4875e-02
Regularizer call: 16
Regularization gradients: ['3.4911e-02']

At iterate    4    f=  1.24636D+04    |proj g|=  3.29580D-02
Iteration wall time: 11.47
Total wall time: 92.48
Updating plot...
Calculating residual...
End time forward: 3.93
Total projection time forward: 3.86
Residual norm: 5.6875e+03
Regularizing...
Regularization norm: ['4.6081e+03']
End time adjoint: 4.08
Total projection time adjoint: 3.58
Gradient norm: 1.2733e-02
Regularizer call: 18
Regularization gradients: ['1.9293e-02']

At iterate    5    f=  1.02956D+04    |proj g|=  1.36498D-02
Iteration wall time: 11.50
Total wall time: 103.97
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.84
Residual norm: 5.6725e+03
Regularizing...
Regularization norm: ['4.0965e+03']
End time adjoint: 4.06
Total projection time adjoint: 3.57
Gradient norm: 1.3509e-02
Regularizer call: 20
Regularization gradients: ['1.3097e-02']

At iterate    6    f=  9.76899D+03    |proj g|=  4.50951D-03
Iteration wall time: 11.45
Total wall time: 115.43
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.85
Residual norm: 5.3560e+03
Regularizing...
Regularization norm: ['4.1486e+03']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 1.3624e-02
Regularizer call: 22
Regularization gradients: ['1.3122e-02']

At iterate    7    f=  9.50463D+03    |proj g|=  3.59647D-03
Iteration wall time: 11.47
Total wall time: 126.90
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.86
Residual norm: 4.8551e+03
Regularizing...
Regularization norm: ['4.4074e+03']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 1.3450e-02
Regularizer call: 24
Regularization gradients: ['1.3561e-02']

At iterate    8    f=  9.26257D+03    |proj g|=  3.56548D-03
Iteration wall time: 11.47
Total wall time: 138.37
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.89
Residual norm: 4.4714e+03
Regularizing...
Regularization norm: ['4.8327e+03']
End time adjoint: 4.10
Total projection time adjoint: 3.61
Gradient norm: 1.2551e-02
Regularizer call: 26
Regularization gradients: ['1.9362e-02']
Iteration wall time: 10.71
Total wall time: 149.07
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.87
Residual norm: 4.7070e+03
Regularizing...
Regularization norm: ['4.4989e+03']
End time adjoint: 4.05
Total projection time adjoint: 3.56
Gradient norm: 1.3152e-02
Regularizer call: 28
Regularization gradients: ['1.3384e-02']

At iterate    9    f=  9.20586D+03    |proj g|=  4.79525D-03
Iteration wall time: 11.47
Total wall time: 160.54
Updating plot...
Calculating residual...
End time forward: 3.90
Total projection time forward: 3.83
Residual norm: 4.4706e+03
Regularizing...
Regularization norm: ['4.6668e+03']
End time adjoint: 4.05
Total projection time adjoint: 3.56
Gradient norm: 1.2682e-02
Regularizer call: 30
Regularization gradients: ['1.3143e-02']

At iterate   10    f=  9.13738D+03    |proj g|=  1.98445D-03
Iteration wall time: 11.41
Total wall time: 171.95
Updating plot...
Calculating residual...
End time forward: 3.93
Total projection time forward: 3.86
Residual norm: 4.3618e+03
Regularizing...
Regularization norm: ['4.7488e+03']
End time adjoint: 4.10
Total projection time adjoint: 3.60
Gradient norm: 1.2516e-02
Regularizer call: 32
Regularization gradients: ['1.3446e-02']

At iterate   11    f=  9.11068D+03    |proj g|=  2.23058D-03
Iteration wall time: 11.48
Total wall time: 183.42
Updating plot...
Calculating residual...
End time forward: 3.94
Total projection time forward: 3.87
Residual norm: 4.3209e+03
Regularizing...
Regularization norm: ['4.7953e+03']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 1.2458e-02
Regularizer call: 34
Regularization gradients: ['1.3376e-02']
Iteration wall time: 10.65
Total wall time: 194.07
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.89
Residual norm: 4.3452e+03
Regularizing...
Regularization norm: ['4.7551e+03']
End time adjoint: 4.07
Total projection time adjoint: 3.58
Gradient norm: 1.2499e-02
Regularizer call: 36
Regularization gradients: ['1.3052e-02']

At iterate   12    f=  9.10030D+03    |proj g|=  1.54586D-03
Iteration wall time: 11.50
Total wall time: 205.57
Updating plot...
Calculating residual...
End time forward: 3.91
Total projection time forward: 3.84
Residual norm: 4.3421e+03
Regularizing...
Regularization norm: ['4.7585e+03']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 1.2527e-02
Regularizer call: 38
Regularization gradients: ['1.2672e-02']
Iteration wall time: 10.68
Total wall time: 216.25
Updating plot...
Calculating residual...
End time forward: 3.97
Total projection time forward: 3.90
Residual norm: 4.3417e+03
Regularizing...
Regularization norm: ['4.7546e+03']
End time adjoint: 4.09
Total projection time adjoint: 3.59
Gradient norm: 1.2507e-02
Regularizer call: 40
Regularization gradients: ['1.2944e-02']

At iterate   13    f=  9.09634D+03    |proj g|=  1.31278D-03

           * * *

Tit   = total number of iterations
Tnf   = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip  = number of BFGS updates skipped
Nact  = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F     = final function value

           * * *

   N    Tit     Tnf  Tnint  Skip  Nact     Projg        F
*****     13     20  34609     0 41099   1.313D-03   9.096D+03
  F =   9096.3389148701153

CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
Saving coefficients to h5 ...
Saving rms_of_amplitude to h5 ...
Saving mean_of_amplitude to h5 ...
Saving std_of_amplitude to h5 ...
Saving relative_std_of_amplitude to h5 ...
Saving eigenvectors to h5 ...
Saving eigenvalues to h5 ...
Saving order_amplitude to h5 ...
Saving rank_2_tensor to h5 ...
Saving synthetic_data to h5 ...
reconstruction_type
algorithm
7 dataset_q_0.032_0.033.h5
Increasing maximum order ...
Output directory already exists!
Initializing optimizer...
Running optimization...
Updating plot...
Calculating residual...
End time forward: 3.96
Total projection time forward: 3.89
Residual norm: 1.8083e+08
Regularizing...
Regularization norm: ['8.2239e-09']
End time adjoint: 4.07
Total projection time adjoint: 3.59
Gradient norm: 4.5976e+00
Regularizer call: 2
Regularization gradients: ['5.2683e-08']
RUNNING THE L-BFGS-B CODE

           * * *

Machine precision = 2.220D-16
 N =     10502800     M =            3

At X0         0 variables are exactly at the bounds

At iterate    0    f=  1.80830D+08    |proj g|=  4.59759D+00
Iteration wall time: 12.92
Total wall time: 12.92
Updating plot...
Calculating residual...
End time forward: 3.95
Total projection time forward: 3.88
Residual norm: 1.8083e+08
Regularizing...
Regularization norm: ['5.0749e-05']
End time adjoint: 4.09
Total projection time adjoint: 3.60
Gradient norm: 4.5976e+00
Regularizer call: 4
Regularization gradients: ['5.2314e-06']
Iteration wall time: 10.68
Total wall time: 23.60
Updating plot...
Calculating residual...
End time forward: 3.96
Total projection time forward: 3.89
Residual norm: 1.8082e+08
Regularizing...
Regularization norm: ['1.2685e-03']
End time adjoint: 4.07
Total projection time adjoint: 3.59
Gradient norm: 4.5975e+00
Regularizer call: 6
Regularization gradients: ['2.6152e-05']
Iteration wall time: 10.67
Total wall time: 34.27
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.85
Residual norm: 1.8078e+08
Regularizing...
Regularization norm: ['2.2377e-02']
End time adjoint: 4.08
Total projection time adjoint: 3.58
Gradient norm: 4.5970e+00
Regularizer call: 8
Regularization gradients: ['1.0983e-04']
Iteration wall time: 10.64
Total wall time: 44.92
Updating plot...
Calculating residual...
End time forward: 3.99
Total projection time forward: 3.93
Residual norm: 1.8063e+08
Regularizing...
Regularization norm: ['3.6661e-01']
End time adjoint: 4.08
Total projection time adjoint: 3.59
Gradient norm: 4.5953e+00
Regularizer call: 10
Regularization gradients: ['4.4456e-04']
Iteration wall time: 10.74
Total wall time: 55.66
Updating plot...
Calculating residual...
End time forward: 3.92
Total projection time forward: 3.85
Residual norm: 1.8003e+08
Regularizing...
Regularization norm: ['5.9003e+00']
End time adjoint: 4.12
Total projection time adjoint: 3.62
Gradient norm: 4.5885e+00
Regularizer call: 12
Regularization gradients: ['1.7834e-03']
Iteration wall time: 10.70
Total wall time: 66.36
Updating plot...
Calculating residual...
End time forward: 3.90
Total projection time forward: 3.83
Residual norm: 1.7811e+08
Regularizing...
Regularization norm: ['6.9517e+01']
End time adjoint: 4.06
Total projection time adjoint: 3.57
Gradient norm: 4.5663e+00
Regularizer call: 14
Regularization gradients: ['6.1217e-03']

At iterate    1    f=  1.78107D+08    |proj g|=  4.56369D+00
Iteration wall time: 11.14
Total wall time: 77.50
Updating plot...
Calculating residual...
[ ]: