omega_data
Importation and correction of OMEGA/MEx observations from binaries files.
omega_data.CubeError(message)
omega_data.OMEGAdata(obs='', empty=False, data_path='_omega_bin_path', corrV=True, corrL=True, disp=True)
Importation of OMEGA/MEx observation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs
|
str
|
The name of the OMEGA observation. |
''
|
empty
|
bool
|
If |
False
|
data_path
|
str
|
The path of the directory containing the data (.QUB) and navigation (.NAV) files. |
_omega_bin_path
|
corrV
|
bool
|
If |
True
|
corrL
|
bool
|
If |
True
|
disp
|
bool
|
Enable or disable the display of informations during the file reading.
| |
True
|
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The observation ID. |
lam |
1D array
|
The wavelength array (in µm). |
cube_i |
3D array
|
The hyperspectral data cube in physical units (W.m-2.sr-1.µm-1).
|
cube_rf |
3D array
|
The I/F ratio hyperspectral data cube.
|
ls |
float
|
The Solar longitude of the observation (deg). |
my |
int
|
The Martian Year number at the time of the observation. |
loct |
2D array of floats
|
The array of the local time for each pixel of the observation. |
lat |
2D array
|
The latitude of each pixel (deg). C channel |
lon |
2D array
|
The longitude of each pixel (deg). C channel |
alt |
2D array
|
The elevation of the pixel footprint center point from MOLA topography (km). C channel |
dist |
2D array
|
The slant distance from the spacecraft to the pixel footprint center point (km). C channel |
emer |
2D array
|
The angle of emergent line (from the surface) (deg). W.r.t. the outward normal to the reference ellipsoid. C channel |
inci |
2D array
|
The incidence angle at the surface (deg). W.r.t. the outward normal to the reference ellipsoid. C channel |
emer_n |
2D array
|
The angle of emergent line (from the surface) (deg). W.r.t. the local normal. C channel |
inci_n |
2D array
|
The incidence angle at the surface (deg). W.r.t. the local normal. C channel |
phase_n |
2D array
|
The phase angle at the surface (deg). W.r.t. the local normal. C channel |
specmars |
1D array
|
The Solar radiation spectrum on Mars (W.m-2.sr-1.µm-1). |
utc |
datetime
|
The average UTC time of the observation. |
ic |
dict
|
The index of the used spectral pixels for each channel. |
lat_grid |
2D array
|
The latitude grid of the observation (from the edge of the pixels). C & L channels |
lon_grid |
2D array
|
The longitude grid of the observation (from the edge of the pixels). C & L channels |
surf_temp |
2D array
|
The retrieved surface temperature of each pixel (from the thermal correction). |
sensor_temp_c |
1D array
|
The temperature of the sensor for each line of the (for the C-channel). |
sensor_temp_l |
1D array
|
The temperature of the sensor for each line of the (for the L-channel). |
saturation_c |
2D array
|
Information about the saturation of the C-channel. |
saturation_vis |
2D array
|
Information about the saturation of the Vis-channel. |
ref_C |
2D array
|
Average reflectance at λ = 1.285/1.299/1.314 μm, to be compared
with |
lat_v |
2D array
|
The latitude of each pixel (deg). V channel |
lon_v |
2D array
|
The longitude of each pixel (deg). V channel |
alt_v |
2D array
|
The elevation of the pixel footprint center point from MOLA topography (km). V channel |
dist_v |
2D array
|
The slant distance from the spacecraft to the pixel footprint center point (km). V channel |
emer_n_v |
2D array
|
The angle of emergent line (from the surface) (deg). W.r.t. the local normal. V channel |
inci_n_v |
2D array
|
The incidence angle at the surface (deg). W.r.t. the local normal. V channel |
phase_n_v |
2D array
|
The phase angle at the surface (deg). W.r.t. the local normal. V channel |
lat_grid_v |
2D array
|
The latitude grid of the observation (from the edge of the pixels). V channel |
lon_grid_v |
2D array
|
The longitude grid of the observation (from the edge of the pixels). V channel |
lat_l |
2D array
|
The latitude of each pixel (deg). L channel |
lon_l |
2D array
|
The longitude of each pixel (deg). L channel |
alt_l |
2D array
|
The elevation of the pixel footprint center point from MOLA topography (km). L channel |
dist_l |
2D array
|
The slant distance from the spacecraft to the pixel footprint center point (km). L channel |
emer_n_l |
2D array
|
The angle of emergent line (from the surface) (deg). W.r.t. the local normal. L channel |
inci_n_l |
2D array
|
The incidence angle at the surface (deg). W.r.t. the local normal. L channel |
phase_n_l |
2D array
|
The phase angle at the surface (deg). W.r.t. the local normal. L channel |
lat_grid_l |
2D array
|
The latitude grid of the observation (from the edge of the pixels). L channel |
lon_grid_l |
2D array
|
The longitude grid of the observation (from the edge of the pixels). L channel |
lam0 |
1D array
|
The wavelength array (in µm). Without overlap correction and bad spectels removal on wvl array. |
cube_i0 |
3D array
|
The hyperspectral data cube in physical units (W.m-2.sr-1.µm-1).
|
cube_rf0 |
3D array
|
The I/F ratio hyperspectral data cube.
|
specmars0 |
1D array
|
The Solar radiation spectrum on Mars (W.m-2.sr-1.µm-1). Without overlap correction and bad spectels removal on wvl array. |
ic0 |
dict
|
The index of the "good" spectral pixels for each channel.
Indexes re-ordeder to match the |
summation |
int
|
The downtrack summing. |
bits_per_data |
float
|
The compression rate in bits per data. |
data_quality |
int
|
Information about the data quality, from 0 to 5 depending on missing lines and compression errors. (See SOFT10_readme.txt or the online documentation for more details.) |
lrec |
int
|
The number of bytes in each physical record in the data product file. |
nrec |
int
|
The number of physical records that make up the PDS product label. |
sol_dist |
float
|
The distance between the center of the observation and the Sun (km). |
sol_dist_au |
float
|
The distance between the center of the observation and the Sun (a.u.). |
npixel |
int
|
The number of pixels of the length of scan (can be 16, 32, 64, or 128 pixels). |
nscan |
int
|
Number of scanned pixel lines. |
npara |
int
|
Number of parameters describing the geometry of the observation. |
point_mode |
str
|
The pointing mode of the instrument. |
target |
str
|
The name of the target of the observation ( |
mode_channel |
int
|
Information about the presence of each channel. |
orient |
array
|
The vector orientation of the spacecraft. |
subsol_lat |
float
|
Latitude of the sub-solar point at observation time (deg). |
subsol_lon |
float
|
Longitude of the sub-solar point at observation time (deg). |
min_lat |
float
|
Southernmost latitude of the observation (deg). |
max_lat |
float
|
Northernmost latitude of the observation (deg). |
min_lon |
float
|
Easternmost longitude of the observation (deg). |
max_lon |
float
|
Westernmost longitude of the observation (deg). |
slant |
float
|
Distance from the spacecraft to the center of the observation along the line of sight (km). |
focal_plane_temperatures |
dict
|
Temperatures of the C, L, V detectors (K). |
spectrometer_temperatures |
dict
|
Temperatures of the C, L, V spectrometers (K). |
quality |
int
|
The quality level of the cube.
| |
therm_corr |
bool
|
| |
therm_corr_infos |
dict
|
Information about the thermal correction (date, method). |
atm_corr |
bool
|
| |
atm_corr_infos |
dict
|
Information about the atmospheric correction (date, method). |
corrV |
bool
|
Correction state of the visible channel (Vis). |
corrL |
bool
|
Correction state of the long-IR channel (L). |
version |
int
|
The major release version of the |
add_infos |
str
|
Additional informations about the observation. Shown in the OMEGAdata representation. |
Source code in omegapy/omega_data.py
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 | |
omega_data.OMEGAdata.get_header_nav(data_path='_omega_bin_path', recursive_search=True)
Return the data from the header of the .NAV file, as a dictionary.
See the OMEGA ECAID for informations about the header entries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_path
|
str
|
The path of the directory containing the navigation (.NAV) files. |
_omega_bin_path
|
recursive_search
|
bool
|
If |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
hd_nav |
dict
|
Dictionary containing the data from the ORBXXXX_X.NAV file. |
Source code in omegapy/omega_data.py
omega_data.OMEGAdata.get_header_qub(data_path='_omega_bin_path', recursive_search=True)
Return the data from the header of the .QUB file, as a dictionary.
See the OMEGA ECAID for informations about the header entries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_path
|
str
|
The path of the directory containing the data (.QUB) files. |
_omega_bin_path
|
recursive_search
|
bool
|
If |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
hd_qub |
dict
|
Dictionary containing the data from the ORBXXXX_X.QUB file. |
Source code in omegapy/omega_data.py
omega_data.BD_omega(omega, lam0, lamc1, lamc2, norm=True)
Compute the band depth on an OMEGA observation cube. Continuum linear between lamc1 and lamc2.
If an array is passed as argument for a wavelength value, the average is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA/MEx observation. |
required |
lam0
|
float or array - like
|
The wavelength of the center of the band. |
required |
lamc1
|
float or array - like
|
The wavelength of the bluer point for the continuum determination. |
required |
lamc2
|
float or array - like
|
The wavelength of the redder point for the continuum determination. |
required |
norm
|
bool
|
| |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
band_depth |
2D array
|
The array of the band depth values for the observation
(normalized or not depending on |
rf_c |
2D array
|
The value of the continuum used to measure the band depth. |
Source code in omegapy/omega_data.py
3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 | |
omega_data.autoload_omega(obs_name, folder='auto', version=_Version, base_folder='_omega_py_path', therm_corr=None, atm_corr=None, disp=True, bin_folder='_omega_bin_path', recursive=False)
Load and return a previously saved OMEGAdata object using pickle (with autosave_omega()).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs_name
|
str
|
The observation ID. |
required |
folder
|
str
|
The subfolder where the data is.
| If |
'auto'
|
version
|
float
|
The version of the target file (if folder is |
_Version
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
therm_corr
|
bool or None
|
| |
None
|
atm_corr
|
bool or None
|
| |
None
|
disp
|
bool
|
Control the display.
| |
True
|
bin_folder
|
str
|
The path of the directory containing the data (.QUB) and navigation (.NAV) files. |
_omega_bin_path
|
recursive
|
bool
|
Option passed to the |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
omega |
OMEGAdata
|
The loaded object of OMEGA/MEx observation. |
Source code in omegapy/omega_data.py
2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 | |
omega_data.autosave_omega(omega, folder='auto', base_folder='_omega_py_path', security=True, disp=True)
Save an OMEGAdata object at the selected path using the pickle module, with automatic
configuration of the target name.
Final_path = base_folder + folder + name{_corr_therm_atm}.pkl
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA/MEx observation object. |
required |
folder
|
str
|
The subfolder to save the data.
| If |
'auto'
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
security
|
bool
|
Enable / disable checking before overwriting a file.
| |
True
|
disp
|
bool
|
Control the display.
| |
True
|
Source code in omegapy/omega_data.py
omega_data.compute_list_good_observations(savfilename='liste_good_obs.csv', folder='../data/OMEGA/liste_obs', security=True)
Scan the available OMEGA/MEx data cubes and list the observations considered as good quality.
The results are saved in the specified csv file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
savfilename
|
str
|
The name of the csv file to save the data. |
'liste_good_obs.csv'
|
folder
|
str
|
The name of the folder where the saved file will be located. Final saved file path = folder + savfilename |
'../data/OMEGA/liste_obs'
|
security
|
bool
|
Enable / disable checking before overwriting a file.
| |
True
|
Source code in omegapy/omega_data.py
3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 | |
omega_data.corr_atm(omega)
Remove the atmospheric component in the OMEGA hyperspectral cube.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
omega_corr |
OMEGAdata
|
The input OMEGA observation, where the reflectance is corrected from the atmospheric component. |
Source code in omegapy/omega_data.py
omega_data.corr_atm2(omega)
Remove the atmospheric component in the OMEGA hyperspectral cube.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
omega_corr |
OMEGAdata
|
The input OMEGA observation, where the reflectance is corrected from the atmospheric component. |
Source code in omegapy/omega_data.py
omega_data.corr_atm2_sp(lam, sp_rf, tr_atm)
Remove the atmospheric component in an OMEGA spectrum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
1D array
|
The wavelength array. |
required |
sp_rf
|
1D array
|
The reflectance spectrum. |
required |
tr_atm
|
1D array
|
Atmospheric transmission spectrum. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
sp_rf_corr |
1D array
|
The reflectance spectrum, corrected from the atmospheric component. |
Source code in omegapy/omega_data.py
omega_data.corr_atm_sp(lam, sp_rf, tr_atm)
Remove the atmospheric component in an OMEGA spectrum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam
|
1D array
|
The wavelength array. |
required |
sp_rf
|
1D array
|
The reflectance spectrum. |
required |
tr_atm
|
1D array
|
Atmospheric transmission spectrum. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
sp_rf_corr |
1D array
|
The reflectance spectrum, corrected from the atmospheric component. |
Source code in omegapy/omega_data.py
omega_data.corr_mode_128(omega)
Correction corrupted pixels mode 128.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
omega_corr |
OMEGAdata
|
The input OMEGA observation, where data from the corrupted columns of 128-pixels wide observations have been corrected if possible. |
Source code in omegapy/omega_data.py
2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 | |
omega_data.corr_save_omega(obsname, folder='auto', base_folder='_omega_py_path', security=True, overwrite=True, compress=True, npool=1)
Correction and saving of OMEGA/MEx observations.
Parallelization is implemented using the multiprocessing module. The number of
process to run is controlled by the npool argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obsname
|
str
|
The name of the OMEGA observation. |
required |
folder
|
str
|
The subfolder to save the data.
| If |
'auto'
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
security
|
bool
|
Enable / disable checking before overwriting a file.
| |
True
|
overwrite
|
bool
|
If security is |
True
|
compress
|
bool
|
If |
True
|
npool
|
int
|
Number of parallelized worker process to use. |
1
|
Source code in omegapy/omega_data.py
omega_data.corr_save_omega2(obsname, folder='auto', base_folder='_omega_py_path', security=True, overwrite=True, compress=True, npool=1)
Correction and saving of OMEGA/MEx observations.
Parallelization is implemented using the multiprocessing module. The number of
process to run is controlled by the npool argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obsname
|
str
|
The name of the OMEGA observation. |
required |
folder
|
str
|
The subfolder to save the data.
| If |
'auto'
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
security
|
bool
|
Enable / disable checking before overwriting a file.
| |
True
|
overwrite
|
bool
|
If security is |
True
|
compress
|
bool
|
If |
True
|
npool
|
int
|
Number of parallelized worker process to use. |
1
|
Source code in omegapy/omega_data.py
omega_data.corr_save_omega2_list(liste_obs, folder='auto', base_folder='_omega_py_path', security=True, overwrite=True, compress=True, npool=1)
Correction and saving of a list of OMEGA/MEx observations.
Parallelization is implemented using the multiprocessing module. The number of
process to run is controlled by the npool argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
liste_obs
|
list of str
|
The list of the name of the OMEGA observations. |
required |
folder
|
str
|
The subfolder to save the data.
| If |
'auto'
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
security
|
bool
|
Enable / disable checking before overwriting a file.
| |
True
|
overwrite
|
bool
|
If security is |
True
|
compress
|
bool
|
If |
True
|
npool
|
int
|
Number of parallelized worker process to use. |
1
|
Source code in omegapy/omega_data.py
omega_data.corr_save_omega_list(liste_obs, folder='auto', base_folder='_omega_py_path', security=True, overwrite=True, compress=True, npool=1)
Correction and saving of a list of OMEGA/MEx observations.
Parallelization is implemented using the multiprocessing module. The number of
process to run is controlled by the npool argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
liste_obs
|
list of str
|
The list of the name of the OMEGA observations. |
required |
folder
|
str
|
The subfolder to save the data.
| If |
'auto'
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
security
|
bool
|
Enable / disable checking before overwriting a file.
| |
True
|
overwrite
|
bool
|
If security is |
True
|
compress
|
bool
|
If |
True
|
npool
|
int
|
Number of parallelized worker process to use. |
1
|
Source code in omegapy/omega_data.py
omega_data.corr_therm(omega, npool=1)
Remove the thermal component in the OMEGA hyperspectral cube.
Parallelization is implemented using the multiprocessing module. The number of
process to run is controlled by the npool argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
npool
|
int
|
Number of parallelized worker process to use. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
omega_corr |
OMEGAdata
|
The input OMEGA observation, where the reflectance is corrected from the thermal component. |
Source code in omegapy/omega_data.py
2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 | |
omega_data.corr_therm2(omega)
Remove the thermal component in the OMEGA hyperspectral cube, with simultaneous retriving of reflectance and temperature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
omega_corr |
OMEGAdata
|
The input OMEGA observation, where the reflectance is corrected from the thermal component. |
Source code in omegapy/omega_data.py
omega_data.corr_therm2_sp(omega, x, y, disp=True)
Remove the thermal component in an OMEGA spectrum, with simultaneous retriving of reflectance and temperature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
x
|
int
|
The x-coordinate of the pixel. |
required |
y
|
int
|
The y-coordinate of the pixel. |
required |
disp
|
bool
|
If |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
lam |
1D array
|
The wavelength array (in µm). |
sp_rf_corr |
1D array
|
The reflectance spectrum, corrected from the thermal component. |
T_fit |
float
|
The retrieved surface temperature (in K). |
Source code in omegapy/omega_data.py
omega_data.corr_therm_atm(omega, npool=1)
Remove the thermal and atmospheric component in the OMEGA hyperspectral cube.
Parallelization is implemented using the multiprocessing module. The number of
process to run is controlled by the npool argument.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
npool
|
int
|
Number of parallelized worker process to use. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
omega_corr |
OMEGAdata
|
The input OMEGA observation, where the reflectance is corrected from the thermal and atmospheric component. |
Source code in omegapy/omega_data.py
2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 | |
omega_data.find_cube(lon0, lat0, cmin=0, cmax=10000, out=False, data_path='_omega_bin_path', nadir_only=False, recursive_search=True)
Display the available OMEGA/MEx cubes with observations of the target
latitude and longitude, Python translation of the IDL procedure findcub.pro.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lon0
|
float
|
The target longitude (in degrees). |
required |
lat0
|
float
|
The target latitude (in degrees). |
required |
cmin
|
float
|
The minimum orbit number. |
0
|
cmax
|
float
|
The maximum orbit number. |
10000
|
out
|
bool
|
If |
False
|
data_path
|
str
|
The path of the directory containing the data (.QUB) and navigation (.NAV) files. |
_omega_bin_path
|
nadir_only
|
bool
|
If |
False
|
recursive_search
|
bool
|
If |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
cub_list |
array - like
|
List of matching observations.
|
Source code in omegapy/omega_data.py
1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 | |
omega_data.get_ls(omega_list)
Return the array of the Solar longitude of each OMEGA/MEx observation in omega_list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega_list
|
array of OMEGAdata
|
The input array of OMEGA observations. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ls |
ndarray
|
The array of the |
Source code in omegapy/omega_data.py
omega_data.get_names(omega_list)
Return the array of the observation ID of each OMEGA/MEx observation in omega_list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega_list
|
array of OMEGAdata
|
The input array of OMEGA observations. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
names |
ndarray
|
The array of the |
Source code in omegapy/omega_data.py
omega_data.get_omega_bin_path()
Return the vavue of the global private _omega_bin_path variable.
Returns:
| Name | Type | Description |
|---|---|---|
omega_bin_path |
str
|
The path of the OMEGA binary files (.QUB and .NAV). |
Source code in omegapy/omega_data.py
omega_data.get_omega_py_path()
Return the vavue of the global private _omega_py_path variable.
Returns:
| Name | Type | Description |
|---|---|---|
omega_py_path |
str
|
The new path of the OMEGA python-made files. |
omega_data.import_list_obs_csv(filename)
Import a list of observations ID from a csv file generated by JMars.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
The target path of the csv file. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
liste_obs |
array of str
|
The list of observations ID from the csv file. |
Source code in omegapy/omega_data.py
omega_data.load_omega(filename, disp=True)
Load and return a previously saved OMEGAdata object (with save_omega()).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
The file path. |
required |
disp
|
bool
|
Control the display.
| |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
omega |
OMEGAdata
|
The loaded object of OMEGA/MEx observation. |
Source code in omegapy/omega_data.py
omega_data.load_omega_list(basename, disp=True)
Load a list of saved OMEGAdata objects, using load_omega().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
basename
|
str
|
The file path basename. |
required |
disp
|
bool
|
Control the display.
| |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
omega_list |
ndarray of OMEGAdata objects
|
The array of loaded objects of OMEGA/MEx observation. |
Source code in omegapy/omega_data.py
omega_data.load_omega_list2(liste_obs, therm_corr=True, atm_corr=True, **kwargs)
Load a list of saved OMEGAdata objects, using load_omega().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
liste_obs
|
array of str
|
List of OMEGA/MEx observations ID. |
required |
therm_corr
|
bool or None
|
| |
None
|
atm_corr
|
bool or None
|
| |
None
|
**kwargs
|
Optional arguments for |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
omega_list |
list of OMEGAdata objects
|
The list of loaded objects of OMEGA/MEx observation. |
Source code in omegapy/omega_data.py
omega_data.omega_mask(omega, emer_lim=None, inci_lim=None, tempc_lim=None, limsat_c=None, hide_128=True, reject_low_quality=False)
Return a mask to remove the bad, corrupted or undesired pixels of an observation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA observation data. |
required |
emer_lim
|
float or None
|
The maximum emergence angle. |
None
|
inci_lim
|
float or None
|
The maximum incidence angle. |
None
|
tempc_lim
|
float or None
|
The maximum temperature for the C-channel. |
None
|
limsat_c
|
float or None
|
The maximum value of the C-channel saturation [DN]. The maximum value in DN for the spectel #40 (i.e., λ=1.486μm).
|
None
|
hide_128
|
bool
|
If |
True
|
reject_low_quality
|
bool
|
Reject observations flagged as low quality, as defined in Stcherbinine et al. (2021). I.e., if:
|
False
|
Returns:
| Name | Type | Description |
|---|---|---|
mask |
2D array
|
The array that identify the bad/corrupted pixels to remove.
| |
Source code in omegapy/omega_data.py
3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 | |
omega_data.save_omega(omega, savname='auto', folder='', base_folder='_omega_py_path', pref='', suff='', disp=True)
Save an OMEGA object at the selected path using the pickle module.
Final_path = base_folder + folder + savname
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega
|
OMEGAdata
|
The OMEGA/MEx observation object. |
required |
savname
|
str
|
The saving filename.
| If |
'auto'
|
folder
|
str
|
The subfolder to save the data. |
''
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
pref
|
str
|
The prefix of the savname. |
''
|
suff
|
str
|
The suffix of the savname. |
''
|
disp
|
bool
|
Control the display.
| |
True
|
Source code in omegapy/omega_data.py
omega_data.set_omega_bin_path(new_path)
Set the global private _omega_bin_path variable to new_path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_path
|
str
|
The new path of the OMEGA binary files (.QUB and .NAV). |
required |
Source code in omegapy/omega_data.py
omega_data.set_omega_py_path(new_path)
Set the global private _omega_py_path variable to new_path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_path
|
str
|
The new path of the OMEGA python-made files. |
required |
Source code in omegapy/omega_data.py
omega_data.shared_lam(lam_list)
Return a list of wavelength shared by all the input wavelength arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lam_list
|
list of 1D np.array
|
The list of wavelength array. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
lam2 |
1D np.array
|
The wavelength array that contains only wavelength shared by all the arrays of
|
Source code in omegapy/omega_data.py
omega_data.shared_lam_omegalist(omega_list)
Return a list of wavelength shared by all the wavelength arrays of the input OMEGA/MEx observations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omega_list
|
list of OMEGAdata
|
The list of OMEGA/MEx observations. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
lam2 |
1D np.array
|
The wavelength array that contains only wavelength shared by all the arrays of
|
Source code in omegapy/omega_data.py
omega_data.test_cube(obs)
Test the quality of an OMEGA/MEx observation from the header informations witout open it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs
|
str
|
The name of the OMEGA observation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
test_quality |
bool
|
| |
Source code in omegapy/omega_data.py
omega_data.update_cube_quality(obs_name='ORB*.pkl', folder='auto', version=_Version, base_folder='_omega_py_path', recursive=False)
Update the quality attribute of previously saved OMEGAdata objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs_name
|
str
|
The files basename. |
'ORB*.pkl'
|
folder
|
str
|
The subfolder where the data is.
| If |
'auto'
|
version
|
float
|
The version of the target file (if folder is |
_Version
|
base_folder
|
str
|
The base folder path. |
_omega_py_path
|
recursive
|
bool
|
Option passed to the |
False
|
Source code in omegapy/omega_data.py
omega_data.utc_to_my(dt)
Convert a UTC datetime to the corresponding Martian Year (MY).
Martian Years are numbered according to the calendar proposed by R. Todd Clancy (Clancy et al., Journal of Geophys. Res 105, p 9553, 2000): Martian Year 1 begins (at a time such that Ls=0) on April 11th, 1955.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dt
|
datetime
|
The UTC datetime object. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
my |
int
|
The corresponding Martian Year. |