Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

projects/maven/mag/

mvn_mag_pkts_read.pro


*NAME: mvn_mag_pkts_read *PURPOSE: Read the MAVEN MAG data. Formats handled are from instrument, engineering packet from University of California at Berkeley (UCB) DPU, or science packets (multiple formats) from UCB DPU. *CALLING SEQUENCE: mvn_mag_pkts_read,filename,data,input_path=input_path,verbose=verbose *PARAMETERS: filename (required) (input) (string) (scalar) Input filename - without path. data (required) (output) (structure) (array) Data in a array of structures. One array entry per packet. input_path (keyword) (input) (string) (scalar) Path to input file. verbose (keyword) (input) (integer) (scalar) Set to have additional output to screen. *EXAMPLES: ucb_input_path = '/data4/maven/data/ucb/' file26 = 'APID_26.dat' mvn_mag_pkts_read,file26,data26,input_path=ucb_input_path,/verbose file40 = 'APID_40.dat' mvn_mag_pkts_read,file40,data40,input_path=ucb_input_path,/verbose file40avg = 'APID_40_avg2.dat' mvn_mag_pkts_read,file40avg,data40avg,input_path=ucb_input_path *SYSTEM VARIABLES USED: none *INTERACTIVE INPUT: none *SUBROUTINES CALLED: parsestr marker_search bitlis decom_2s_complement *FILES USED: File given in input parameters. *SIDE EFFECTS: none *RESTRICTIONS: assumes data in input files is all from the instrument, or all engineering via UCB DPU (ApIds 26 and 27), or all science via UCB DPU (ApIds 40, 41, 42, and 43). If that is not how it is going to be delivered, then data sample as will be delivered is required to be supplied ApId 30 not coded for Maximum of 550,000 packets per file currently permitted. *NOTES: need to - test bit sections - calculate and check checksum - add rms fields (2's complement?) - not in UCB CTM - clarification required - engr b field - work error cases (out of data, not in sync) - work difference word between header and checksum - work UCB header field names (JEPC will not care about these) - rework for UCB message ids being incorrect (mostly done) - increment engr & science packet numbers - test with ApID 30 (no data in that format) - test with mixed message ids (no data in that format) - clean up two arrays - think about ib vs ob packets - test resync section testing (special attention to) - bit sections Problems - message ids not as expected for UCB packets - decom id not as expected for engr pkt 9set to 0 not expected 1) *PROCEDURE: *MODIFICATION HISTORY: 30 Mar 2012 started writing 26 Apr 2012 continued 27 Apr 2012 continued 8 May 2012 determined that message ids in UCB supplied data and not as expected; change code to check second 9 May 2012 byte to determine type - perfer to use message id - will need to rework after data is corrected 18 May 2012 might be able to handle muplitple UCB ApIds in one file now - not tested Feb 2013 added CCSDC header; more of UCB header 24 May 2013 add code to skip bytes if PFP, but not MAG pkt 13 Mar 2013 add check for if marker_search found additional data; before each readu, check that there are enough bytes remaining 24 May 2013 skip data thta is not MAG data 29 May 2013 corrected data subseting at end (0.4.1)

Routines

top source mvn_mag_pkts_read

mvn_mag_pkts_read, filename, data, input_path=input_path, verbose=verbose

Parameters

filename
data

Keywords

input_path
verbose

File attributes

Modification date: Thu Feb 13 16:42:19 2014
Lines: 955