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 MOMA 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 MOMA 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 MOMA 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 |
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
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 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 |
|
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
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 3589 3590 |
|
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
2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 |
|
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
3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 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 |
|
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
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 2746 2747 |
|
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
2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 |
|
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
2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 |
|
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
1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 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 |
|
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
3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 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 |
|
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. |