Reference and API
This page covers the various functions inside the sealhits project and is intended for Python programmers.
There are a number of modules, but typically, one starts with the pytritech.GLF module to load the file.
ciheader
The CI Header used at the top of each record in the tritech glf file.
CIHeader
The Common interface header. Our GLF Dat file contains lots of these that contain various sonar data.
Source code in src/pytritech/ciheader.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
__init__(dat, ids)
Initialise our CIHeader object.
Parameters: |
|
---|
src/pytritech/ciheader.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
glf
Reading data from the Tritech Gemini files.
This module contains the following
- GLF - The GLF class representing a GLF file
>>> from glf import GLF
>>> glfobj = GLF("path/to/file.glf")
>>> record = glfobj.images[0]
>>> bitmap, dims = glfobj.extract_image(record)
GLF
A class that represents the GLF file. We hold the various records in order with headers and values, but not the raw image/sonar data. We hold pointers to these into the GLF file.
Source code in src/pytritech/glf.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
__init__(glfpath)
Initialise our glf object.
Parameters: |
|
---|
src/pytritech/glf.py
36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
extract_image(image_rec)
Return the data for the image, along with the dimensions - (bearing, range).
Parameters: |
|
---|
Returns: |
|
---|
src/pytritech/glf.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
glftimes
Reading time data from the Tritech Gemini files.
This module contains the following
- glftimes - A faster way to read the GLF time ranges. This is handy if you have many files to read.
>>> from glftimes import time_range
>>> start, end = time_range("path/to/file.glf")
glf_times(glf_path)
Given a path to a GLF file, extract the times from the CFG file contained within the uncompressed Zip.
src/pytritech/glftimes.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
image
The ImageRecord from the GLF File.
This module contains the following
- ImageRecord - the record of the actual reading from the sonar at a particular time.
ImageRecord
The main image record from the sonar. This starts with a record header structure, followed by a GMainImage structure (from the Tritech PDF). GMainImage also contains a GImage structure first.
This ImageRecord object does not contain the binary image data itself, but a pointer to where this data lives in the GLF file. The image can be retrieved using the GLF object and this ImageRecord object.
Source code in src/pytritech/image.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
|
__init__(ciheader, dat, ids)
Initialise our ImageRecord object.
Parameters: |
|
---|
src/pytritech/image.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
status
The Status record from the GLF file.
This module contains the following
- StatusRecord - The StatusRecord class representing the status of the sonar at a particular time.
StatusRecord
The current status of the Sonar at this time.
Source code in src/pytritech/status.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
|
__init__(ciheader, dat, ids)
Initialise our StatusRecord object.
Parameters: |
|
---|
src/pytritech/status.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|