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). |
lat |
2D array
|
The latitude of each pixel (deg). C & L channels |
lon |
2D array
|
The longitude of each pixel (deg). C & L channels |
alt |
2D array
|
The elevation of the pixel footprint center point from MOMA topography (km). C & L channels |
loct |
2D array of floats
|
The array of the local time for each pixel of the observation. |
my |
int
|
The Martian Year number at the time of the observation. |
emer |
2D array
|
The angle of emergent line (from the surface) (deg). W.r.t. the outward normal to the reference ellipsoid. C & L channels |
inci |
2D array
|
The incidence angle at the surface (deg). W.r.t. the outward normal to the reference ellipsoid. C & L channels |
emer_n |
2D array
|
The angle of emergent line (from the surface) (deg). W.r.t. the local normal. C & L channels |
inci_n |
2D array
|
The incidence angle at the surface (deg). W.r.t. the local normal. C & L channels |
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 |
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 |
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 |
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
947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 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 |
|
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
3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 |
|
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
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 1956 1957 1958 1959 1960 1961 1962 1963 |
|
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
3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 |
|
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
2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 |
|
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
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 |
|
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
2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 |
|
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
1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 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 |
|
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
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 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 |
|
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. |