Skip to content
Snippets Groups Projects
Select Git revision
  • 36911fa4d25c9cfb8664493af891444db8a72d49
  • master default protected
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

plot_data.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    readACC.m 790 B
    function ACC1B = readACC(file)
    % Input: ascii file containing GRACE ACC1B data 
    % Output: matrix containing ACC1B data
    % 
    % cf. GRACE Level 1B Data Product User Handbook
    %
    % Example: ACC1B = readACC('ACC1B_2002-12-02_A_02.asc')
    
    % Counts header lines and removes them.
    header=0;
    fid = fopen(file);
      while 1
          line = fgetl(fid);
          header = header+1;
          if (~isempty(strfind(line,'END OF HEADER')))
               break
          end
      end
    
    % Reads the desired values from ACC1B data.
    [gps_time, lin_acc_x, lin_acc_y, lin_acc_z, ang_acc_x, ang_acc_y, ang_acc_z] = textread(file,'%f %*s %f %f %f %f %f %f %*f %*f %*f %*f','headerlines',header);
    
    % Produces the matrix containing the desired values.
    ACC1B = [gps_time, lin_acc_x, lin_acc_y, lin_acc_z, ang_acc_x, ang_acc_y, ang_acc_z];
    
    end