.. _UHDAS_dbmaker_index: UHDAS and adcp_database_maker.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. NOTE:: **Directory Strategy** To simplify the documentation, these instructions assume you have set up your directories as in :ref:`Directory Setup` and you are doing your processing demos in **my_codas_demos/adcp_pyproc** :: your practice directory source ----------------------- ----------- my_codas_demos my_codas_demos/adcp_pyproc (new, WORKING IN HERE) my_codas_demos/uhdas_data copy of codas_demos/uhdas_data my_codas_demos/vmdas_data copy of codas_demos/vmdas_data my_codas_demos/uhdas_style_data (new, empty, for VmDAS conversion) ----- Click the image of the **adcp_database_maker.py** overview to enlarge. .. image:: /images/adcp_database_maker/dbmaker-overview.png :alt: adcp_database_maker.py overview :scale: 20 ----- Run ``adcp_database_maker.py`` from your ``adcp_pyproc`` directory: | | .. image:: /images/dbmaker_uhdas/00-run_adcp_dbmaker.png :alt: launch adcp_database_maker for uhdas :scale: 60 :: cd ~/my_codas_demos/adcp_pyproc adcp_database_maker.py .. ------ The splash screen will pop up: .. image:: /images/adcp_database_maker/dbmaker_uhdas_launch.png :alt: launch adcp_database_maker for uhdas :scale: 60 Click **browse** and the following screen will show up: | Navigate to the ``uhdas_data`` directory (click the up-arrow) .. image:: /images/dbmaker_uhdas/after-splash_new_annot.png :alt: after-splash_new_annot.png :scale: 90 | Select the **uhdas_data** directory: .. image:: /images/dbmaker_uhdas/after-splash-uhdas-data_new_annot.png :alt: after-splash-uhdas-data_new_annot.png :scale: 90 | and choose the **km1001c** directory: .. image:: /images/dbmaker_uhdas/0-select-uhdas-dir_new_annot.png :alt: 0-select-uhdas-dir_new_annot.png :scale: 80 ------ The **Processing Configuration Form** will pop up. Make sure you have the right ``Project Directory`` selected. Click on the image to enlarge. .. image:: /images/dbmaker_uhdas/PCF1_annot.png :alt: PCF1_annot.png :scale: 60 | If you just did the post-processing demo, you can use the same **Project Directory (km1001c_uhdas)**. Click **Browse** to select (and/or create) a directory for your work. | .. image:: /images/dbmaker_uhdas/selectYourProject_new2_annot.png :alt: selectYourProject_new2_annot.png :scale: 60 Then create a new directory or choose an existent a directory for processing. | .. image:: /images/dbmaker_uhdas/PCF2_SelectYourProject_new_annot.png :alt: PCF2_SelectYourProject_new_annot.png :scale: 80 ----- | After selecting the ``Project Directory`` it will be also necessary to fill the information about the cruise and other fields in the form. Most of the information can be found in the files in the **proc** and **config** directory inside the cruise directory (``km1001c/proc/os38bb/config``). For instance, in the file :ref:`cruise_info.txt ` there is information on the cruise date and in the file :ref:`km1001c_proc.py ` one can find information about the feeds, sensor alignment and so forth. With all these information in hand, one can fill up the ``Processing Configuration Form`` above. It would end up like the following figure: (click to enlarge) | .. image:: /images/dbmaker_uhdas/PC4_new_annot.png :alt: PC4_new_annot.png :scale: 60 Make sure you fill up the contents marked on the red squares (or "disable" the check buttons when necessary). | Click on **Make Config File** button (marked with a green rectangle), see if there were any error or warnings in the ``Log Messages`` window (marked in yellow) | .. image:: /images/dbmaker_uhdas/PCF4_buttons_new2_annot.png :alt: PCF4_buttons_new2_annot.png :scale: 70 Now click **Set up Processing Directories** (the button on the right). This takes us to the next form, where we actually setup and run the :term:`preliminary processing`. ------ .. image:: /images/dbmaker_uhdas/30-make-config.png :alt: location of config directory :scale: 70 | ---- Now we work on the specific instrument and ping type desired. The available sonars are in the tabs at the top of the form. (1) First we run ``adcptree.py`` to create the **Processing directory**. (:ref:`Here ` is the similar step in the UHDAS command-line example) .. NOTE:: Be sure to choose the instrument+pingtype you want. This demo processes the **os38nb** directory, so click the **MIDDLE** Tab. .. image:: /images/dbmaker_uhdas/40-after-adcptree.png :alt: run adcptree :scale: 70 ------ (2) Now we need to set up a :term:`control file` within the **processing directory**. This is used for sonar-specific processing settings in the **preliminary processsing**. - the control file is usually called ``q_py.cnt`` and resides within the processing directory for the sonar chosen. .. image:: /images/dbmaker_uhdas/50-qpy.png :alt: location of q_py.cnt file :scale: 80 The :ref:`command-line demos ` go through the underlying steps in more detail. Specifically, details about - the :ref:`q_py.cnt ` file - :ref:`gbin ` directory (3) Last, click the button **Create CODAS database** to do the :term:`preliminary processing`. .. image:: /images/dbmaker_uhdas/60-runquick.png :alt: run quick_adcp.py :scale: 70 | .. NOTE:: For a real cruise, **this step can take a long time**. You'll see a spinning disk or some indicator of time passing and your inability do to anything. If you want some feedback, run this command from within the os38nb directory: ``tail -F /home/adcpproc/my_codas_demos/adcp_pyproc/km1001c_uhdas/os38nb/load/write_ensblk.log`` or navigate with a file browser to the ``load`` directory and watch the files being generated. ------ After processing (for instance) **os38nb** you can choose **os38bb** and again, (1) create the sonar processing directory (2) create the q_py.cnt file (3) Create CODAS Database The demo cruise had os38bb and os38nb running in *interleaved mode* for the whole cruise. You can create **processing directories** for **os38bb** and **os38nb** but for this cruise, there is no benefit to the last tab called **os38** Some cruises alternate in big chunks, eg. broadband mode over the continental shelf and narrowband mode over deep water. There might be a use for the mixed-ping mode. --------- Now you are ready for :term:`post-processing`. Go to the `UHDAS postprocessing demo` to see the steps for postprocessing this cruise. That means - start in this location in a bash terminal window:: cd /home/adcpproc/my_codas_demos/adcp_pyproc/km1001c_uhdas/os38nb .. - look at all the figures with ``figview.py`` - look at the adcp data with ``dataviewer.py`` - check the heading correction - check the calibration - manual editing with ``dataviewer.py -e`` - extraction of netCDF and/or matlab files - creation of the little web site with figures --------- | .. include:: /txtfiles/available_demos.txt