- - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - These are relevant to any codas processing of shipboard ADCP data Options are specified on the command line or in a file. (see below) help = False # print help howto_ping = False # print a HOWTO for pingdata howto_lta = False # print a HOWTO for LTA varvals = False # print dictionary values vardoc = False # detailed use for each variable overview = False # print overview help commands = None # print specific help setup_info = False # print help for setting up tips = False # print tips quiet = False # turn off verbose error messages. # This includes # writing messages to the screen # and appending the same error messages # to the log file. debug = False # allow exceptions for noncritical errors # (otherwise pass); can also manually use # assert 1==0, 'testing assert' # and ipyton -pdb. # for development only; not implemented # at present # === directories and files === # # variable default # description # ------- ---------- # ----------------- # cntfile = None # override defaults with values from this # control file. Format is the same as # command line options, but whitespace is # unimportant. Do not quote wildcard # characters in the cnt file (whereas # you would for the command line) # Defaults are overridden by this cntfile # Commandline options can override either. cruisename = os.path.basename(os.getcwd()) #title name only # defaults to the averaged data case, where # cruise name is the same as procdir name procdir = os.path.basename(os.getcwd()) # processing directory # name datadir = None # data path. defaults are: # (1) relative to scan or load directory # (2) full path # ../ping (for LTA, ENS, pingdata) # uhdas_dirbase/raw/instname (for uhdas) progdir = None # where to find the programs binos = None # subdirectory name with executables datafile_glob = None #look for sequential data files. # defaults are: # pingdata.??? (for pingdata) # *.LTA (for LTA files) # *.ENS (for ENS files) # *.raw (for uhdas) ### these do not have useful defaults and are REQUIRED for use # TRANSITIONAL: proc_yearbase = None # 4 digits (defaults to yearbase, # i.e. acquisition year) yearbase = None # 4 digits (acquisition year) dbname = None # limit 5 characters, start with "a" # then append 4 characters ### some of these are required; some have defaults use_refsm = True ## use refsm for reference layer (default use_smoothr = False ## use smoothr for reference layer # (overrides use_refsm). # Plots are done with smoothr regardless beamangle = None # first run of quick_adcp.py -- determines # beam angle from instrument type # (wh = 20deg, others are usually 30deg). # Override with this argument. pingtype = None # only required for instrument "os" # (then choose "nb" or "bb") # For all others, only one pingtype is # possible ( therefore pingtype defaults # to instrument type) datatype = None # choose what kind of data logging (and # hence which kind of data files # are being processed) # # default is "pingdata" # # name what # ---- ---- # "pingdata" implies DAS2.48 (or 2.49) NB # data, already averaged # "uhdas" implies known directory # structure for access # to raw data # "lta", "sta" VmDAS averages # "enx" implies VmDAS single-ping # data,time-corrected, # navigated with attitude ub_type = '1920' # For NB DAS only: User buffer type: # 720 for demo; 1920 for recent cruises ens_len = 300 # seconds in an ensemble # # === processing options === # # variable default # description # ------- ---------- ----------------- rotate_amplitude = 1 # start with 1.0 for amp and 0.0 for phase rotate_angle = 0 # transducer offset (from calibrations) # (apply this constant value) rotate_file = None # transducer offset in a file, eg. ash-gyro # (requires an existing file; # REQUIRES one angle correction per ensemble # with the correct times for ensembles rl_startbin = 2 # first bin for reference layer rl_endbin = 20 # last bin for reference layer pgmin = 50 # only accept PG greater than this value # --> don't go below 30 <-- # default is 50 for pre-averaged datatypes # ('pingdata', 'lta', and 'sta') # default is 20 for single-ping datatypes # ('uhdas', 'enr', 'ens', 'enx') jitter = 15 # jitter cutoff (increase value to keep # more data) hcorr_inst = 'gyro' # heading correction exists for two # schemes only: # FOR PINGDATA: # set to 'ashrot' for ue4 output # (uses cal/rotate/[dbname].ang) # set to 'None' for no heading correction # FOR UHDAS, need to specify instrument # and method # set to 'ashtech', 'posmv', 'seapath', # 'gyro', 'phins','mahrs','genhdg' # ('gyro' effectively disables) # (uses cal/rotate/ens_hcorr.ang) # To apply the heading correction, # choose method: # --ping_headcorr (or) --post_headcorr # see further web-based documentation for # more details acc_heading_cutoff = .065 # heading accuracy cutoff for posmv # the default (in qc_rbin.m) is .065 # for some posmv installations it # needs to be smaller # ## posmv minimum heading accuracy # KM .013 # Knorr .018 # Ka`imimoana .015 # Thompson .055 # Hi`ialakai .018 fixfile = None # override the default fix file. # defaults are: # if datatype is pingdata, default is # [dbname].ags (for pingdata) # [dbname].gps (for LTA, ENS, or uhraw) # The next two variables cause the matlab # program "xducerxy" to run, creating # a new fix file (dbname.agt). These # values must be specified any time the fix # file is used, including steps2rerun # xducer_dx = False # athwartship distance between transducer # and gps antenna: positive if transducer # is starboard of the antenna. # This option is usually not necessary # xducer_dy = False # fore/aft distance between transducer # and gps antenna: positive if transducer # is forward of the antenna. # This option is usually not necessary find_pflags = False # automatically find profile flags # apply editing (dbupdate, etc) # You should be familiar with gautoedit # before using this... # === REPROCESSING options === # # # variable default # description # ------- ---------- ----------------- steps2rerun = '' # colon-separated list of the following: # 'rotate:apply_edit:navsteps:calib:matfiles' # designed for batch mode; assumes codasdb # already in place, operates on entire # database. # # 'rotate' is: # apply amplitude and phase corrections # using these (if specified): # rotate_angle (contstant angle) # rotate_amplitude (scale factor) # Does NOT support time-dependent correction # # 'navsteps' is: # [adcpsect+refabs+smoothr] for ref plots # and refsm (if specified) # and putnav (using specified navigation) ## NOTE: always specify # ## --instname xxx # 'apply_edit' is: ## when using "apply_edit" # badbin, dbupdate, set_lgb, setflags # # 'calib' is: # botmtrk (refabsbt, btcaluv) # watertrk (adcpsect, timslip, adcpcal) # # 'matfiles' is: # adcpsect for vector and contour # Always use "instname" for defaults # (specify top_plotbin for better results # IF you have codas python extensions) # or use "firstdepth" to tweak top values # === Data extraction options === instname = None # instrument name; This is used to set default # time and depth resolution for adcpsect # matlab file extractions (steps2rerun # "matfiles") # - default is "os75" # - override the shallowest bin with either # * firstdepth (works for everyone) # * top_plotbin (works if codas python # extensions are compiled # options are: # nb150 # os150, os75, os38 # hr50, hr140 # wh150, wh300, wh600, wh1200 # bb75, bb150 # NOTE: if this is set, "apply_edit" will get # beamangle from this numbins = 128 # max number of bins to extract for editing firstdepth = None # depth of shallowest bin for matlab extraction # --> does not require codas python extensions top_plotbin = None # shallowest bin to use for data extraction # bins are 1,2,3,... # --> overrides 'firstdepth' if both ar chosen # --> requires codas python extensions ## === specialized processing options === auto = False # 1: whiz along (do not prompt); do all # requested steps (default is all step) # 0 to prompt at each step ############### for vmdas or uhdas, singleping only ################ # # === raw processing, ENS or ENX files from VmDAS === # variable default # description # ------- ---------- ----------------- rawstd_cutoff = None # positive number is a multiplier of # med(abs(errvel(edited))) for refavg # residual editing. # eg. 3 edits some, 5 edits very little ############### for VMDAS only ################ # # === raw processing, ENS or ENX files from VmDAS === # variable default # description # ------- ---------- ----------------- enddday_file = None # single-ping processing only: use this # file for ensemble dday delimiters; gets # copied to directory as ensemble.enddday # Dday should be first column, (as lst_hdg # or lst_temp output from other database) # (VmDAS Only) ducer_depth = None # for VmDAS processing, need to # specify transducer depth -- REQUIRED ens_halign = None # for ENS processing only, conversion from # beam to earth coordinates: need to # specify transducer alignment -- REQUIRED # (ENX files are already in earth coordinates) # (see 'rotate_angle' and 'rotate_file' # for rotation of codas database # as part of calibration steps ensgyrorbin = False # for ENS processing only; leave behind # an rbin file with synchro gyro input # (for later heading correction) head_func = None # If an appropriate function has been added to # quick_user.py, it will be run prior to rotate. # Must specify 'rotate_file'. Expert only. lastfiles = False # for incremental processing of pre-averaged # data (i.e. STA, LTA, or pingdata) only: # to account for N data files. Reload the files ## UNTESTED OF LATE: probably broken ############## for UHDAS processing only #################### cfgpath = 'config' # UHDAS only # Find cfg files (*_cfg.m, *_proc.m) here. cfgbase = None # UHDAS only # path and processing information # (file name prefix only) instclass = None # instrument category, describes instrument # Default is "nb" # choose from: # os (phased array "ocean surveyor") # bb (broadband instrument) # nb (narrowband instrument) # son (sontek) tktail = False # use a Tk widget to display uhdas averaging # (requires Tk package) use_topo4edit = None # use predicted topography to extend weak_bins delblks = 0 # for incremental processing of UHDAS data: # delete this number of blocks from the # database. Averaging will continue with # whatever is new. Reload unloaded # ens_blk*.cmd files. usual usage: # --delblks 1 (standard incremental) # debugging only: --delblks 0 (WILL reload) maxrunsecs = None # For incremental recovery at sea, set to # something smaller than the timeout. # Averaging code will stop after this duration timeout_secs = 86400 # For batch processing, disable # (set large) the timeout. # for underway (incremental) processing, # set to 1000 max_BLKprofiles = 399 # max number of profiles per block. Might # want to make smaller to test incremental # processing (must be 399 or less) update_gbin = False # batch mode, UHDAS; update gbin files ############## for UHDAS processing only, incremental ################## hidedisplay = False # show figures as they are made (turn off # to run from a script with cron on a ship dday_bailout = None # may be useful for testing (UHDAS only) # (bail out of averaging at this time) editcfg_file = 'override_editcfg' # run this program to override editcfg defaults # (single ping editing; for section-based # editing) (full path, or copy to load/ and # use relative # UHDAS only #hcorr_inst # FOR UHDAS, specify instrument and method # see above # set to 'ashtech', 'posmv', 'seapath', 'gyro' # ('gyro' effectively disables) # (uses cal/rotate/hcorr.ang) # To apply the heading correction, choose method: # --ping_headcorr (or) --post_headcorr # see further web-based documentation for # more details ping_headcorr = False # Choose at most one of these methods post_headcorr = False # to apply the heading correction num_persistence = 24 # attempt to use good heading corrections from # previous N heading corrections. # - persistence will be attempted # - if num_persistence > 0 # - if ping_headcorr was chosen # - if post_headcorr, the ens_hcorr files are # still generated, but are not applied to the # data. See html documentation under UHDAS save_lastens = 0 # save average and raw data from last 5-minute # ensemble as "lastens.mat" (for underway # access to lastens). Slows down progress ## (usually implimented through run_lastensq.py) # --> leave this as an integer nosave_editcfg = 0 # usually write editcfg parameters to a log file # Turn this on to avoid saving, if incremental # processing, to avoid excessively large # log files # --> leave this as an integer skip_avg = False # underway UHDAS processing: 5-minute averages # are done by an outside source. results: # (1) scan only first and last file # (2) skip write_ensblk.m; go straight to # ldcodas # NOTE: this means 'load_uhblk' is not being run. npycalc None # or specify particular routines (subset) # refsm # ('refsm' is the only one so far) # NOTE: only works on the command line # (does not work in the control file) mplplots = None # make these plots with matplotlib # colon-delimited list: see "quick_mplplots.py" # 'all' or subset of # temp:nav:refl:hcorr:btcal:wtcal:calib # ('calib' is equivalent to 'btcal:wtcal') # NOTE: only works on the command line # (does not work in the control file) ------- ---------- ----------------- variable default # description (SEE PREVIOUS TEXT) --------------------------------------------------------------------------- NOTE: files can be identified in two ways: (1) file names after all the switches must be explicit files with path names correct as seen from the load/ or scan/ direcories. Fully qualified filenames will work (2) See note above about datadir and datafile_glob usage usage depends on data type. try these for help: (unix:) # Simple example for: # ------------------- quick_adcp.py --commands LTA # LTA or STA files quick_adcp.py --commands ENX # ENX or ENS files quick_adcp.py --commands UHDAS # UHDAS files quick_adcp.py --commands pingdata # pingdata files quick_adcp.py --commands lastfiles # at-sea processing ("incremental") (Windows): NOTE to Windows users: make sure your PATH includes the location of quick_adcp.py make sure your PYTHONPATH is set correctly make sure you associate *.py extensions with the python program in general,... quick_adcp.py --proc_yearbase num --dbname axxxx \ --datatype [pingdata | lta | sta | ens | enx | uhdas] \ --pingtype [nb | bb] \ --instclass [os | nb | wh | bb ] \ [--datadir dirname --datafile_glob "quoted_expression"] file1 [file2 ...]