Sei sulla pagina 1di 2

Using the Raw Data Analysis Tools ================================= Requirements -----------To use these functions, they need to be on the

octave path. This can be done using addpath and savepath.

Plotting Detection Functions ---------------------------mdet_plot(directory_name) Plots raw detection files written by the GLS software as time domain plots. Plots all files in the specified directory. Files are assumed to be named in the format "dtn_%d_%d.bin" (C printf format). Calls plot_dat(file_name,num_channels,channels,data_type) to do the plotting. fdet_plot(directory_name) Plots raw detection files written by the GLS software as frequency domain plots. Plots all files in the specified directory. Files are assumed to be named in the format "dtn_%d_%d.bin" (C printf format). Calls plot_fdat(file_name,num_channels,channels,data_type) to do the plotting.

Raw Data Manipulation Functions ------------------------------crop_dat(in_filename, out_filename, start_pos, end_pos, data_type) Crops binary data from in_filename and puts it into out_filename. The argument data_type determines the element size and must be one of "uint8", "uint16", "uint32", "uint64", "int8", "int16", "int32", "int64", "single" or "double" if provided. It defaults to "int32" if not specified. The arguments start_pos and end_pos are specified in units of the size of data_type. The first start_pos elements are discarded and the next end_pos-start_pos elements are retained and written into out_filename. The interval retained is [start_pos,end_pos) if the positions are thought of as 0-based or (start_pos,end_pos] if they are thought of as 1-based. scale_dat(in_filename, out_filename, scale, data_type, shift) Scales or shifts binary data from in_filename and puts it into out_filename. The argument data_type determines the element size and must be one of "uint8", "uint16", "uint32", "uint64", "int8", "int16", "int32", "int64", "single" or "double" if provided. It defaults to "int32" if not specified. If the shift argument is not given or zero then each element is scaled (multiplied) by the scale argument. If the shift argument is nonzero, data_type is an integral type and scale has an integer value then this function shifts instead of scaling and the scale argument is taken as the shift value.

merge(dir_name, out_filename, channels, seg_len, overlap) Merges all of the binary data files in directory dir_name into one file named out_filename. The data are assumed to be signed 32 bit integers with samples alternating between channels channels. Segments of length seg_len+overlap centered around the index with maximum total energy are extracted from each input file. Linear weighted blending between adjacent segments is performed over subsegments of length overlap at each end of each segment. Beginning and ending segments of zeros are blended to the beginning and end of the output file.

Potrebbero piacerti anche