process_using.m

From Spinach Documentation Wiki
Revision as of 15:30, 20 July 2018 by Worswick (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Runs the processing on a supplied DEER trace using a specified network file.

Syntax

    answers=process_using(deer_traces,net_file_name)

Arguments

    deer_traces    - DEER trace(s) as a column vector or a 
		     matrix of multiple columns. The number 
		     of rows must be equal to the number of 
		     neurons in the network input layer.
    net_file_name  - the name of the checkpoint file prod-
		     uced during network training. 
                     

Outputs

    answers        - distance distribution(s) as a column
		     vector or a matrix of multiple colum-
		     ns.The number of rows is defined by 
		     the number of neurons in the output 
		     layer of the network.

Examples

In the example below, a batch of 100 distribution and DEER trace pairs are generated and then

       % Load the parameters
       run('net_set_any_peaks/netset_params.m'); 

       % Specify number of traces to produce
       parameters.ntraces=100;
 
       % Generate test batch
       [time_grid,dist_grid,dist_distr_lib,~,~,deer_trace_lib,~,~,parameters]=deer_lib_gen([],parameters);

       % Run the analysis on the example set
       answers=process_using(deer_trace_lib,'net_set_any_peaks/1.mat');

The network answers can be plotted against the correct answer:

       % Plot an example
       example=randi(100); figure; 
       subplot(1,2,1); plot(time_grid,deer_trace_lib(:,example)); 
       title('Input DEER trace');
       xlabel('time, $\mu$s','interpreter','LaTex');
       subplot(1,2,2); plot(dist_grid,[answers(:,example) dist_distr_lib(:,example)]); 
       title('Output distribution');
       xlabel('distance, $\rm{\AA}$','interpreter','LaTex');
       legend('Network answer','True answer');

Notes

  • Input and intermediate layers must have the 'tansig' activation function.
  • The function supports 'logsig' or 'tansig' activation functions in the output layer, if a different function is detected then an error will be returned.
  • The function assumes a simple feed-forward network topology.
  • The number of points in the input signal must equal the input layer dimensions.
  • The output signal length will be defined by the network output layer dimensions.
  • Network layers are not required to be uniform.

See also

deernet.m, netset_curate.m


Version 2.2, authors: Ilya Kuprov, Steve Worswick