2.8.8. quick_web.py guidelines¶
These tools require the full Python CODAS installation.
In all cases, you will need to type the name with --help
to get more information about usage.
Some of these are pretty simple, some are more sophisticated.
2.8.8.1. choosing good sections¶
Usually we want sections that will allow someone to get a sense of the cruise, and see the currents in sufficient detail to look at the interesting features.
Sections are seclected as contiguous chunks of time, so we are looking for periods time that are
going to plot well as function of longitude or latitude
1-3days long
not covering more than 10deg longitude or latitude
2.8.8.2. how to select a section with the tool¶
The tool for section selection is txyselect.py
.
It has 4 quadrants, with logical combinations of time, longitude, and latitude in each. The bottom left is for orientation – never zoomed. The other three can zoom.
There are 3 modes:
navigation (nav): in this mode, the Pan and Soom buttons work so you can zoom in on a complicated cruise track
- selection (select): in this mode, sections are selected by
swiping left-right in the time vs/ latitude plot (upper left)
swiping up/down in the time vs/ longitude plot (lower right)
deletion (del): single-click on any section you don’t like
The selections are stored up as timeranges and are available as decimal day ranges or as Python “slice” into the data array.
You can use this tool on a flat ascii file with 3 columns of
[decimal day, longitude, latitude]
such as in the nav/*.gps
file in CODAS processing.
2.8.8.3. Example¶
Using the cruise KM1001c in the demo, we have the following sequence of events…
(click on each image to enlarge)
Bring up the tool by typing the following in the CODAS processing directory:
txyselect nav/aship.gps
This screenshot shows the initial tool display. It comes up in nav mode. The Pan and Zoom buttons are indicated. This is waht it looks like on the CODAS Virtual computer; your tool decorations might be different, but the functionality should still be there.
This screenshot shows a zoom taking place in the nav mode.
This screenshot shows the select mode, and the two quadrants that can be used for selections.
This screenshot shows a selection being made (a ‘section’ in the cruisetrack).
This screenshot shows an entire cruise chopped up into reasonable ‘sections’, but the delete butt is pushed and we can now choose to remove some of the sections.
This screenshot shows the sections after deletion of one
Note
To close the window and finish the session, click the X in the corner of the window.
This is the display that would come out on your command-line terminal if you selected the regions shown in #7 and (quit the program before deleting any sections)
First are the decimal day ranges of the sections:
(29.731708943598793, 30.219944263752019) (30.219944263752019, 30.682024120325611) (30.682024120325611, 31.056919098300408) (31.056919098300408, 31.213851879778233) (31.213851879778233, 31.405658612695571) (31.405658612695571, 31.684650224211701)
And then the same information as indexes (slices):
slice(0, 139, None) slice(139, 272, None) slice(272, 373, None) slice(373, 417, None) slice(417, 472, None) slice(472, 545, None)
2.8.8.4. quick_web.py sections¶
The slices are used in quick_web.py to grab data selections and make the figures.
The time ranges are written in
webpy/sectinfo.txt
To leverage the sections chosen for one processing directory (eg. wh300
)
do the following.
Let’s assume all the processing was done in a directory called km1001c_proc
and you have finished the wh300
and have made the web plots. Then you have:
km1001c_proc # directory for all your km1001c processing
km1001c/wh300 # wh300 processing
km1001c/wh300/webpy # after you ran quick_we.py this was created
# [etc] # ... all the rest of the contents of wh300
And you just finished the os38nb
processing and want to use the same sections
you chose in wh300
. You have this:
km1001c_proc # directory for all your km1001c processing
km1001c/os38nb # os38nb processing
Then from km1001c_proc
, run these commands:
cd os38nb
mkdir webpy
cp ../wh300/webpy/sectinfo.txt webpy
quick_web.py --redo
and you should have a web page for os38nb
that has the same sections as wh300
.