예제 #1
0
        '--select_from_tablelog_ranges_index',
        None,  # Export tracks
        '--gpx_names_fun_format',
        '{1:%y%m%d}_{0:}',  # track name of format(timeLocal, tblD_safe)
        '--gpx_names_funs_list',
        '"i, row.Index"',
        '--gpx_names_funs_cobined',
        ''
    ])
    st.go = False  # Hey! Prepare gpx tracks _manually_ before continue and rerun from st.start = 70!

if st(70, 'Save waypoints/routes from _manually_ prepared gpx to hdf5'
      ):  # False: #
    gpx2h5([
        '', '--path',
        str(path_cruise / r'navigation\CTD-sections=routes.gpx'),
        '--table_prefix', r'navigation/sectionsCTD'
    ])  # need copy reult from {path_db}_not_sorted manually, todo: auto copy

if st(80, 'Gridding'):  # and False: #
    # Note: Prepare veusz "zabor" pattern before
    grid2d_vsz([
        'ini/grid2d_vsz.ini',
        '--db_path',
        str(path_db),
        '--table_sections',
        r'navigation/sectionsCTD_routes',
        '--subdir',
        'CTD-sections',
        '--begin_from_section_int',
        '11',  #'1',  # values <= 1 means no skip
예제 #2
0
        '\\ \\',  # ''\s+',
        '--table',
        'CTD_SST_48Mc',
        '--b_interact',
        '0',
        # '--b_raise_on_err', '0'
    ])

if start <= 3 and False:  # go: #  # already done in scripts/181005_ABP44sst.py
    # Save navigation to DB
    gpx2h5([
        '',
        '--db_path',
        path_db,
        '--path',
        os_path.join(path_cruise, r'navigation\source_OpenCPN\*.gpx'),
        '--tables_list',
        ',navigation,',  # skip waypoints
        '--table_prefix',
        r''
    ])

if st(5):  # False: #
    # Extract CTD runs (if files are not splitted on runs):
    CTD_calc([
        'CTD_calc-find_runs.ini',
        '--db_path',
        path_db,
        '--tables_list',
        'CTD_SST_48Mc',
        '--min_samples',
예제 #3
0
start = 30  # 70
end = 120  # 60 80 120
# Stop before steps that need manual preparings (70) i.e. set end < 70 at first
# Gridding (last step) needs debugging if interactive filtering is needed
# ---------------------------------------------------------------------------------------------
st = partial(st_full, start=start, end=end)

if st(1):
    # Save navigation to DB
    gpx2h5([
        '',
        '--db_path',
        str(path_db),
        '--path',
        str(path_cruise / r'navigation\_raw\*.gpx'),
        '--tables_list',
        ',navigation,',  # skip waypoints
        '--table_prefix',
        r'',
        # '--min_date', '2019-07-17T14:00:00',
        '--b_interact',
        '0',
    ])

if st(10):  # False: #
    # Save {device} data to DB
    csv2h5([
        'ini\csv_CTD_IdrRedas.ini',
        '--path',
        r'c:\RedasData\Nord\txt\Nord002.TXT',  # str(path_cruise / device / '_raw' / '[20|42]*.txt')
        '--db_path',
        str(path_db),
# ---------------------------------------------------------------------------------------------
def st(current):
    if (start <= current < end) and go:
        print(f'step {current}')
        return True
    return False


if st(1):  # nav with depth is in next section
    # Save navigation to DB
    gpx2h5([
        '',
        '--db_path',
        str(path_db),
        '--path',
        str(path_cruise / r'navigation\_raw\*.gpx'),
        '--tables_list',
        ',navigation,',  # skip waypoints
        '--table_prefix',
        r'',
        # '--min_date', '2019-07-17T14:00:00',
    ])

if st(10):  # False: #
    # Save CTD_SST_48Mc Underway to DB
    from to_pandas_hdf5.csv_specific_proc import proc_loaded_sea_and_sun

    csv2h5(
        [
            'ini/csv_CTD_Sea&Sun.ini',
            '--path',
            str(path_cruise / device / '_raw' / '19*[0-9].TOB'),
예제 #5
0
        str(path_cruise / device / '20*p1.txt'), '--delimiter_chars', '\\t',
        '--table', device_tbl
    ])
if go:  # True: #
    h5toGpx([
        f'ini/h5toGpx_{device}.ini', '--db_path',
        str(path_db), '--select_from_tablelog_ranges_index', '0'
    ])
# also to get gpx is possible to execute ../scripts/filetime_to_gpx.py without csv2h5

# Now change starts of sections and excluded stations with specified symbol using MapSource

if go:  # True: #
    gpx2h5([
        '', '--db_path',
        str(path_db), '--path',
        str(path_cruise / 'navigation' / f'{device_tbl}_sections.gpx'),
        '--table_prefix', f'navigation/sections{device_tbl}'
    ])

go = False
########################################################################################

# extract all navigation tracks
if False:  # True: #
    # sys.argv[0]= argv0   os_path.join(os_path.dirname(file_h5toGpx)
    h5toGpx([
        'ini/h5toGpx_nav_all.ini', '--path_cruise',
        str(path_cruise), '--tables_list', 'navigation',
        '--simplify_tracks_error_m_float', '10',
        '--select_from_tablelog_ranges_index', None
    ])
예제 #6
0
        "pd.to_datetime(file_stem[:6], format='%y%m%d')",
        '--sort',
        'False',
        '--b_interact',
        '0',
        # '--fs_float', '4'
    ])

if st(4):  # nav with depth is in next section
    # Save navigation to DB
    gpx2h5([
        '',
        '--db_path',
        str(path_db),
        '--path',
        str(path_cruise / r'navigation\source_OpenCPN\*.gpx'),
        '--tables_list',
        ',navigation,',  # skip waypoints
        '--table_prefix',
        r'',
        # '--min_date', '2019-07-17T14:00:00',
    ])

if st(5):  # False: #
    # Extract CTD runs (if files are not splitted on runs):
    CTD_calc([
        'CTD_calc-find_runs.ini',
        '--db_path',
        str(path_db),
        '--tables_list',
        f'{device}',
        '--min_samples',
예제 #7
0
min_coord = 'Lat:53, Lon:10'
max_coord = 'Lat:60, Lon:24'
if st(1, 'Save gpx navigation to DB'):
    # Save navigation to DB
    for folder in (['OpenCPN']):
        gpx2h5([
            '',
            '--db_path',
            str(path_db),
            '--path',
            str(path_cruise / 'navigation' / folder / '*.gpx'),
            '--tables_list',
            ',navigation,',  # skip waypoints
            '--table_prefix',
            r'',
            #'--b_search_in_subdirs', if set True to get rid of this loop then will be problems with overlapped data files
            # '--min_date', '2019-07-17T14:00:00',
            '--b_interact',
            '0',
            #'--b_skip_if_up_to_date', '0',  # '1' coerce to delete data loaded in same table in previous steps
            '--min_dict',
            f'{min_coord}',  # use at least -32768 to replace it by NaN
            '--max_dict',
            f'{max_coord}',
            '--sort',
            'delete_inversions',
        ])

device = 'CTD_Idronaut_OS310'
device_veusz_prefix = 'i0_'
common_ctd_params_list = [
    '--db_path',
예제 #8
0
#     h5toGpx(['ini/h5toGpx_CTDs.ini',
#              '--db_path', str(path_db),
#              '--tables_list', f'{device}',
#              '--tables_log_list', 'logRuns',
#              '--select_from_tablelog_ranges_index', None,  # Export tracks
#              '--gpx_names_fun_format', '{1:%y%m%d}_{0:}',      # track name of format(timeLocal, tblD_safe)
#              '--gpx_names_funs_list', '"i, row.Index"',
#              '--gpx_names_funs_cobined', ''
#              ])

# go=False
if st(13):  # False: #
    # Save waypoints/routes from _manually_ prepared gpx to hdf5
    gpx2h5([
        '', '--path',
        str(path_cruise / r'navigation\CTD-sections=routes.gpx'),
        '--table_prefix', r'navigation/sectionsCTD'
    ])

if st(15):  # False: #
    # Gridding
    grid2d_vsz([
        'ini/grid2d_vsz.ini',
        '--db_path',
        str(path_db),
        '--table_sections',
        r'navigation/sectionsCTD_routes',
        '--subdir',
        'CTD-sections',
        '--begin_from_section_int',
        '2',  # 0,1 means no skip