diff --git a/README.md b/README.md index 717a495..c8ebd68 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -![version](https://img.shields.io/badge/version-1.4.2-blue) +![version](https://img.shields.io/badge/version-2.0-blue) ![pythonversion](https://img.shields.io/badge/Python-3.7-blue) -![idlversion](https://img.shields.io/badge/IDL-8.3-blue) # OMEGA-Py : Python tools for OMEGA data diff --git a/docs/doc.md b/docs/doc.md index 10df02d..ac3a33c 100644 --- a/docs/doc.md +++ b/docs/doc.md @@ -1,17 +1,16 @@ -# OMEGA-Py documentation - v1.2 +# OMEGA-Py documentation - v2.0 ## [`omegapy.omega_data`](doc_omega_data.md) -Importation of OMEGA observations in the OMEGAdata class. -Using IDL routines containing in omegapy/omega_routines/*. +Importation and correction of OMEGA/MEx observations from binaries files. -`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path)` +`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True)` -`find_cube(lat, lon, cmin=0, cmax=10000, out=False)` +`find_cube(lon0, lat0, cmin=0, cmax=10000, out=False)` `autosave_omega(omega, folder='auto', base_folder=_omega_py_path, security=True, disp=True)` -`autoload_omega(obs_name, folder='auto', version=Version, base_folder=_omega_py_path, therm_corr=None, atm_corr=None, disp=True)` +`autoload_omega(obs_name, folder='auto', version=_Version, base_folder=_omega_py_path, therm_corr=None, atm_corr=None, disp=True)` `save_omega(omega, savname='auto', folder='', base_folder=_omega_py_path, pref ='', suff='', disp=True)` @@ -19,6 +18,8 @@ Using IDL routines containing in omegapy/omega_routines/*. `load_omega_list(basename, disp=True)` +`load_omega_list2(liste_obs, therm_corr=True, atm_corr=True, **kwargs)` + `import_list_obs_csv(filename)` `corr_therm(omega, npool=1)` @@ -45,7 +46,7 @@ Using IDL routines containing in omegapy/omega_routines/*. `get_ls(omega_list)` -`update_cube_quality(obs_name='ORB*.pkl', folder='auto', version=Version, base_folder=_omega_py_path)` +`update_cube_quality(obs_name='ORB*.pkl', folder='auto', version=_Version, base_folder=_omega_py_path)` `test_cube(obs)` @@ -53,6 +54,10 @@ Using IDL routines containing in omegapy/omega_routines/*. `utc_to_my(dt)` +`shared_lam(lam_list)` + +`shared_lam_omegalist(omega_list)` + ## [`omegapy.omega_plots`](doc_omega_plots.md) @@ -60,13 +65,13 @@ Display of OMEGAdata cubes. `show_omega(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, title='auto', xlim=(None, None), ylim=(None, None), Nfig=None)` -`show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, alpha=None, title='auto', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True)` +`show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, alpha=None, title='auto', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto')` `show_omega_interactif(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, title='auto', autoyscale=True, xlim=(None, None), ylim=(None, None))` -`show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=None, cmap='Greys_r', cb_title='IBD', title='auto', vmin=None, vmax=None, autoyscale=True, ylim_sp=(None, None), alpha=None, lonlim=(None, None), latlim=(None, None), polar=False, cbar=True, grid=True)` +`show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=None, cmap='Greys_r', cb_title='data', title='auto', vmin=None, vmax=None, autoyscale=True, ylim_sp=(None, None), alpha=None, lonlim=(None, None), latlim=(None, None), polar=False, cbar=True, grid=True, mask=None, lam_mask=None, negatives_longitudes='auto')` -`show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', cb_title = 'IBD', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True)` +`show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', cb_title = 'data', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto')` `show_omega_list_v2(omega_list, lam=1.085, lat_min=-90, lat_max=90, lon_min=0, lon_max=360, pas_lat=0.1, pas_lon=0.1, cmap='Greys_r', vmin=None, vmax=None, title='auto', Nfig=None, polar=False, cbar=True, cb_title='auto', data_list=None, mask_list=None, plot=True, grid=True, out=False, negatives_longitudes=False, **kwargs)` @@ -76,6 +81,8 @@ Display of OMEGAdata cubes. `show_omega_list_v2_man(data, grid_lat, grid_lon, infos, cmap='Greys_r', vmin=None, vmax=None, title='auto', Nfig=None, polar=False, cbar=True, cb_title='auto', grid=True, negatives_longitudes=False, **kwargs)` +`plot_psp(sp1_id, *args, sp2_id=(None, None), Nfig=None, sp_dict=picked_spectra, **kwargs)` + ## [`omegapy.useful_functions`](doc_useful_functions.md) diff --git a/docs/doc_omega_data.md b/docs/doc_omega_data.md index 2fd861c..6056d74 100644 --- a/docs/doc_omega_data.md +++ b/docs/doc_omega_data.md @@ -1,13 +1,12 @@ -# OMEGA-Py documentation - v1.2 +# OMEGA-Py documentation - v2.0 ## `omegapy.omega_data` -Importation of OMEGA observations in the OMEGAdata class. -Using IDL routines containing in omegapy/omega_routines/*. +Importation and correction of OMEGA/MEx observations from binaries files. -`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path)` +`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True)` -`find_cube(lat, lon, cmin=0, cmax=10000, out=False)` +`find_cube(lon0, lat0, cmin=0, cmax=10000, out=False)` `autosave_omega(omega, folder='auto', base_folder=_omega_py_path, security=True, disp=True)` @@ -55,11 +54,15 @@ Using IDL routines containing in omegapy/omega_routines/*. `utc_to_my(dt)` +`shared_lam(lam_list)` + +`shared_lam_omegalist(omega_list)` + ### OMEGAdata class ~~~python -class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_path): - Importation of OMEGA/MEx observation, using the readomega_vpy.pro IDL routine. +class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True): + Importation of OMEGA/MEx observation. Parameters ========== @@ -70,6 +73,10 @@ class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_pat data_path : str, optional (default _omega_py_path) The path of the directory containing the data (.QUB) and navigation (.NAV) files. + corrV : bool, optional (default True) + If True, compute the correction on the visible channel (Vis). + corrL : bool, optional (default True) + If True, compute the correction on the long-IR channel (L). Attributes ========== @@ -93,6 +100,8 @@ class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_pat The elevation of the pixel footprint center point (km). 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). inci : 2D array @@ -117,7 +126,7 @@ class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_pat Information about the saturation of the Vis-channel. summation : int The downtrack summing. - bits_per_data : int + 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 @@ -190,16 +199,16 @@ class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_pat ### Observation search ~~~python -omegapy.omega_data.find_cube(lat, lon, cmin=0, cmax=10000, out=False): +omegapy.omega_data.find_cube(lon0, lat0, cmin=0, cmax=10000, out=False): Display the available OMEGA/MEx cubes with observations of the target - latitude and longitude, using the IDL procedure `findcub.pro`. + latitude and longitude, Python translation of the IDL procedure `findcub.pro`. Parameters ========== - lat : float - The target latitude (in degrees). - lon : float + lon0 : float The target longitude (in degrees). + lat0 : float + The target latitude (in degrees). cmin : float, optional (default 0) The minimum orbit number. cmax : float, optional (default 10000) @@ -211,7 +220,7 @@ omegapy.omega_data.find_cube(lat, lon, cmin=0, cmax=10000, out=False): ======= cub_list : array-like List of matching observations. - Format : (orbit, x, y, dmin, altMEx, inci, emer, phas, Ls) + Format : (orbit, x, y, dmin, altMEx, inci, emer, phas, loct, Ls, MY) ~~~ ### OMEGAdata files handling @@ -678,3 +687,37 @@ omegapy.omega_data.utc_to_my(dt): my : int The corresponding Martian Year. ~~~ + +### Shared wavelength array between different observations +~~~python +omegapy.omega_data.shared_lam(lam_list): + Return a list of wavelength shared by all the input wavelength arrays. + + Parameters + ========== + lam_list : list of 1D np.array + The list of wavelength array. + + Returns + ======= + lam2 : 1D np.array + The wavelength array that contains only wavelength shared by all the arrays of + lam_list. +~~~ + +~~~python +omegapy.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 + ========== + omega_list : list of OMEGAdata + The list of OMEGA/MEx observations. + + Returns + ======= + lam2 : 1D np.array + The wavelength array that contains only wavelength shared by all the arrays of + lam_list. +~~~ diff --git a/docs/doc_omega_plots.md b/docs/doc_omega_plots.md index a64a116..602e0bb 100644 --- a/docs/doc_omega_plots.md +++ b/docs/doc_omega_plots.md @@ -1,4 +1,4 @@ -# OMEGA-Py documentation - v1.2 +# OMEGA-Py documentation - v2.0 ## `omegapy.omega_plots` @@ -6,13 +6,13 @@ Display of OMEGAdata cubes. `show_omega(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, title='auto', xlim=(None, None), ylim=(None, None), Nfig=None)` -`show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, alpha=None, title='auto', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True, grid=True)` +`show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, alpha=None, title='auto', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto')` `show_omega_interactif(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, title='auto', autoyscale=True, xlim=(None, None), ylim=(None, None))` -`show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=None, cmap='Greys_r', cb_title='IBD', title='auto', vmin=None, vmax=None, autoyscale=True, ylim_sp=(None, None), alpha=None, lonlim=(None, None), latlim=(None, None), polar=False, cbar=True, grid=True)` +`show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=None, cmap='Greys_r', cb_title='data', title='auto', vmin=None, vmax=None, autoyscale=True, ylim_sp=(None, None), alpha=None, lonlim=(None, None), latlim=(None, None), polar=False, cbar=True, grid=True, mask=None, lam_mask=None, negatives_longitudes='auto')` -`show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', cb_title = 'IBD', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True, grid=True)` +`show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', cb_title = 'data', lonlim=(None, None), latlim=(None, None), Nfig=None, polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto')` `show_omega_list_v2(omega_list, lam=1.085, lat_min=-90, lat_max=90, lon_min=0, lon_max=360, pas_lat=0.1, pas_lon=0.1, cmap='Greys_r', vmin=None, vmax=None, title='auto', Nfig=None, polar=False, cbar=True, cb_title='auto', data_list=None, mask_list=None, plot=True, grid=True, out=False, negatives_longitudes=False, **kwargs)` @@ -22,6 +22,8 @@ Display of OMEGAdata cubes. `show_omega_list_v2_man(data, grid_lat, grid_lon, infos, cmap='Greys_r', vmin=None, vmax=None, title='auto', Nfig=None, polar=False, cbar=True, cb_title='auto', grid=True, negatives_longitudes=False, **kwargs)` +`plot_psp(sp1_id, *args, sp2_id=(None, None), Nfig=None, sp_dict=picked_spectra, **kwargs)` + ### Display cube @@ -62,7 +64,7 @@ omegapy.omega_plots.show_omega(omega, lam, refl=True, lam_unit='m', cmap='Greys_ ~~~python omegapy.omega_plots.show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, alpha=None, title='auto', lonlim=(None, None), latlim=(None, None), Nfig=None, - polar=False, cbar=True, grid=True): + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto'): Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -101,6 +103,16 @@ omegapy.omega_plots.show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Gre If True -> Diplay the colorbar. grid : bool, optional (default True) Enable the display of the lat/lon grid. + mask : 2D array or None, optional (default None) + The array that identify the bad/corrupted pixels to remove. + If None, all the pixels are conserved. + | 1 -> Good pixel + | NaN -> Bad pixel + negatives_longitudes : str or bool, optional (default 'auto') + Argument for non-polar plots. + | True -> longitudes between 0° and 360°. + | False -> longitudus between -180° and 180°. + | 'auto' -> automatic detection of the best case. ~~~ ### Display cube interactive version @@ -142,13 +154,15 @@ omegapy.omega_plots.show_omega_interactif(omega, lam, refl=True, lam_unit='m', c ~~~python omegapy.omega_plots.show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=None, - cmap='Greys_r', cb_title='IBD', title='auto', + cmap='Greys_r', cb_title='data', title='auto', vmin=None, vmax=None, autoyscale=True, ylim_sp=(None, None), alpha=None, lonlim=(None, None), latlim=(None, None), - polar=False, cbar=True, grid=True): + polar=False, cbar=True, grid=True, mask=None, lam_mask=None, + negatives_longitudes='auto'): Affichage interactif d'un cube de données. Possibilité d'afficher le spectre associé à un pixel en cliquant dessus (maintenir Ctrl pour supperposer plusieurs spectres), ou en se déplaçant avec les flèches. + Les spectres affichés sont stockés dans le dictionnaire `picked_spectra[nfig]`. Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -170,7 +184,7 @@ omegapy.omega_plots.show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_un Array of high-level data (e.g. IBD map) computed from the omega observation. cmap : str, optional (default 'Greys_r') The matplotlib colormap. - cb_title : str, optional (default 'IBD') + cb_title : str, optional (default 'data') The title of the colorbar. Note : Only for the `data` plots. title : str, optional (default 'auto') @@ -197,15 +211,30 @@ omegapy.omega_plots.show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_un If True -> Diplay the colorbar. grid : bool, optional (default True) Enable the display of the lat/lon grid. + mask : 2D array or None, optional (default None) + The array that identify the bad/corrupted pixels to remove. + If None, all the pixels are conserved. + | 1 -> Good pixel + | NaN -> Bad pixel + lam_mask : 1D array or None, optional (default None) + The array that identify the bad/corrupted spectels to remove. + If None, all the spectels are conserved. + | True -> Good spectel + | False -> Bad spectel + negatives_longitudes : str or bool, optional (default 'auto') + Argument for non-polar plots. + | True -> longitudes between 0° and 360°. + | False -> longitudus between -180° and 180°. + | 'auto' -> automatic detection of the best case. ~~~ -### Display derived data map from OMEGA observation (ex IBD) +### Display derived high-level data map from OMEGA observation ~~~python -omegapy.omega_plots.show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', +omegapy.omega_plots.show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', cb_title = 'IBD', lonlim=(None, None), latlim=(None, None), Nfig=None, - polar=False, cbar=True, grid=True): - Affichage IBD avec pcolormesh. + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto'): + Affichage données haut-niveau avec pcolormesh. Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -213,8 +242,8 @@ omegapy.omega_plots.show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None ========== omega : OMEGAdata The OMEGA/MEx observation - ibd : 2D array - The array of the computed IBD values from the omega observation + data : 2D array + The array of the computed data values from the omega observation cmap : str, optional (default 'Greys_r') The matplotlib colormap. vmin : float or None, optional (default None) @@ -225,7 +254,7 @@ omegapy.omega_plots.show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None Opacity of the plot. title : str, optional (default 'auto') The title of the figure. - cb_title : str, optional (default 'IBD') + cb_title : str, optional (default 'data') The title of the colorbar. lonlim : tuple of int or None, optional (default (None, None)) The longitude bounds of the figure. @@ -239,6 +268,16 @@ omegapy.omega_plots.show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None If True -> Display the colorbar. grid : bool, optional (default True) Enable the display of the lat/lon grid. + mask : 2D array or None, optional (default None) + The array that identify the bad/corrupted pixels to remove. + If None, all the pixels are conserved. + | 1 -> Good pixel + | NaN -> Bad pixel + negatives_longitudes : str or bool, optional (default 'auto') + Argument for non-polar plots. + | True -> longitudes between 0° and 360°. + | False -> longitudus between -180° and 180°. + | 'auto' -> automatic detection of the best case. ~~~ ### Display composite map of several OMEGA observations, sample on a lat/lon grid @@ -434,3 +473,28 @@ omegapy.omega_plots.show_omega_list_v2_man(data, grid_lat, grid_lon, infos, cmap **kwargs: Optional arguments for the plt.pcolormesh() function. ~~~ + +### Plot previously picked spectra from interactive plots +~~~python +omegapy.omega_plots.plot_psp(sp1_id, *args, sp2_id=(None, None), Nfig=None, sp_dict=picked_spectra, **kwargs): + Plot previously picked spectra from interactive plots. + If two spectra id are given, the ration sp1/sp2 is showed. + + Parameters + ========== + sp1_id : tuple of int (nfig, sp_nb) + nfig : The figure number of the selected spectra. + sp_nb : The number of the spectra in this figure (starting at 1). + *args : + Optional arguments for the plt.plot() function. + sp2_id : tuple of int (nfig, sp_nb), optional (default (None, None)) + nfig : The figure number of the selected spectra. + sp_nb : The number of the spectra in this figure (starting at 1). + Nfig : int or str or None, optional (default None) + The target figure ID. + sp_dict : dict, optional (default picked_spectra) + The dictionary containing the picked spectra from interactive figures. + Default is the current one. + **kwargs: + Optional arguments for the plt.plot() function. +~~~ diff --git a/docs/doc_useful_functions.md b/docs/doc_useful_functions.md index 23ee607..d4b2a11 100644 --- a/docs/doc_useful_functions.md +++ b/docs/doc_useful_functions.md @@ -1,4 +1,4 @@ -# OMEGA-Py documentation - v1.2 +# OMEGA-Py documentation - v2.0 ## `omegapy.useful_functions` diff --git a/omegapy/omega_routines/boundcur.dat b/omegapy/OMEGA_dataref/boundcur.dat similarity index 100% rename from omegapy/omega_routines/boundcur.dat rename to omegapy/OMEGA_dataref/boundcur.dat diff --git a/omegapy/omega_routines/cubindex.ref b/omegapy/OMEGA_dataref/cubindex.ref similarity index 100% rename from omegapy/omega_routines/cubindex.ref rename to omegapy/OMEGA_dataref/cubindex.ref diff --git a/omegapy/omega_routines/flatVIS050701.bin b/omegapy/OMEGA_dataref/flatVIS050701.bin similarity index 100% rename from omegapy/omega_routines/flatVIS050701.bin rename to omegapy/OMEGA_dataref/flatVIS050701.bin diff --git a/omegapy/OMEGA_dataref/fond2.dat b/omegapy/OMEGA_dataref/fond2.dat new file mode 100644 index 0000000..7c96deb --- /dev/null +++ b/omegapy/OMEGA_dataref/fond2.dat @@ -0,0 +1,256 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +1 +0 +0 +0 +1 +1 +0 +1 +1 +1 +1 +0 +1 +1 +1 +1 +1 +0 +1 +2 +1 +1 +1 +0 +1 +1 +1 +2 +3 +2 +2 +2 +2 +2 +1 +1 +2 +2 +2 +2 +3 +3 +3 +3 +3 +3 +4 +3 +3 +2 +1 +2 +3 +2 +3 +4 +4 +5 +4 +5 +5 +6 +6 +7 +6 +7 +6 +7 +7 +7 +6 +7 +7 +7 +6 +8 +9 +8 +6 +7 +6 +8 +5 +7 +7 diff --git a/omegapy/omega_routines/lambda_0403.dat b/omegapy/OMEGA_dataref/lambda_0403.dat similarity index 100% rename from omegapy/omega_routines/lambda_0403.dat rename to omegapy/OMEGA_dataref/lambda_0403.dat diff --git a/omegapy/OMEGA_dataref/linearC.dat b/omegapy/OMEGA_dataref/linearC.dat new file mode 100644 index 0000000..eaa2498 --- /dev/null +++ b/omegapy/OMEGA_dataref/linearC.dat @@ -0,0 +1,4096 @@ +0.000000 +0.903993 +1.808220 +2.712690 +3.617390 +4.522320 +5.427490 +6.332900 +7.238530 +8.144410 +9.050510 +9.956850 +10.863400 +11.770200 +12.677300 +13.584500 +14.492000 +15.399800 +16.307700 +17.215900 +18.124300 +19.033000 +19.941900 +20.851000 +21.760300 +22.669900 +23.579700 +24.489700 +25.399900 +26.310400 +27.221100 +28.132100 +29.043200 +29.954600 +30.866200 +31.778100 +32.690100 +33.602400 +34.514900 +35.427700 +36.340600 +37.253800 +38.167200 +39.080800 +39.994700 +40.908700 +41.823000 +42.737600 +43.652300 +44.567300 +45.482400 +46.397800 +47.313500 +48.229300 +49.145400 +50.061600 +50.978100 +51.894900 +52.811800 +53.728900 +54.646300 +55.563900 +56.481700 +57.399700 +58.318000 +59.236400 +60.155100 +61.074000 +61.993100 +62.912400 +63.831900 +64.751700 +65.671600 +66.591800 +67.512200 +68.432800 +69.353600 +70.274600 +71.195800 +72.117300 +73.038900 +73.960800 +74.882900 +75.805200 +76.727700 +77.650400 +78.573300 +79.496500 +80.419800 +81.343300 +82.267100 +83.191100 +84.115200 +85.039600 +85.964200 +86.889000 +87.814000 +88.739200 +89.664600 +90.590200 +91.516100 +92.442100 +93.368300 +94.294800 +95.221400 +96.148200 +97.075300 +98.002500 +98.930000 +99.857700 +100.786000 +101.714000 +102.642000 +103.570000 +104.499000 +105.428000 +106.357000 +107.286000 +108.216000 +109.145000 +110.075000 +111.005000 +111.936000 +112.866000 +113.797000 +114.728000 +115.659000 +116.590000 +117.521000 +118.453000 +119.385000 +120.317000 +121.249000 +122.182000 +123.114000 +124.047000 +124.980000 +125.913000 +126.847000 +127.780000 +128.714000 +129.648000 +130.582000 +131.517000 +132.451000 +133.386000 +134.321000 +135.256000 +136.191000 +137.127000 +138.063000 +138.998000 +139.935000 +140.871000 +141.807000 +142.744000 +143.681000 +144.618000 +145.555000 +146.493000 +147.430000 +148.368000 +149.306000 +150.244000 +151.182000 +152.121000 +153.060000 +153.999000 +154.938000 +155.877000 +156.816000 +157.756000 +158.696000 +159.636000 +160.576000 +161.517000 +162.457000 +163.398000 +164.339000 +165.280000 +166.221000 +167.163000 +168.104000 +169.046000 +169.988000 +170.931000 +171.873000 +172.816000 +173.758000 +174.701000 +175.644000 +176.588000 +177.531000 +178.475000 +179.419000 +180.363000 +181.307000 +182.251000 +183.196000 +184.140000 +185.085000 +186.030000 +186.975000 +187.921000 +188.866000 +189.812000 +190.758000 +191.704000 +192.651000 +193.597000 +194.544000 +195.490000 +196.437000 +197.385000 +198.332000 +199.279000 +200.227000 +201.175000 +202.123000 +203.071000 +204.020000 +204.968000 +205.917000 +206.866000 +207.815000 +208.764000 +209.713000 +210.663000 +211.613000 +212.562000 +213.512000 +214.463000 +215.413000 +216.364000 +217.314000 +218.265000 +219.216000 +220.167000 +221.119000 +222.070000 +223.022000 +223.974000 +224.926000 +225.878000 +226.831000 +227.783000 +228.736000 +229.689000 +230.642000 +231.595000 +232.548000 +233.502000 +234.456000 +235.409000 +236.363000 +237.318000 +238.272000 +239.226000 +240.181000 +241.136000 +242.091000 +243.046000 +244.001000 +244.957000 +245.912000 +246.868000 +247.824000 +248.780000 +249.736000 +250.693000 +251.649000 +252.606000 +253.563000 +254.520000 +255.477000 +256.435000 +257.392000 +258.350000 +259.308000 +260.265000 +261.224000 +262.182000 +263.140000 +264.099000 +265.058000 +266.017000 +266.976000 +267.935000 +268.894000 +269.854000 +270.813000 +271.773000 +272.733000 +273.693000 +274.653000 +275.614000 +276.574000 +277.535000 +278.496000 +279.457000 +280.418000 +281.380000 +282.341000 +283.303000 +284.264000 +285.226000 +286.188000 +287.151000 +288.113000 +289.075000 +290.038000 +291.001000 +291.964000 +292.927000 +293.890000 +294.854000 +295.817000 +296.781000 +297.745000 +298.709000 +299.673000 +300.637000 +301.601000 +302.566000 +303.531000 +304.495000 +305.460000 +306.425000 +307.391000 +308.356000 +309.322000 +310.287000 +311.253000 +312.219000 +313.185000 +314.151000 +315.118000 +316.084000 +317.051000 +318.018000 +318.985000 +319.952000 +320.919000 +321.887000 +322.854000 +323.822000 +324.790000 +325.757000 +326.725000 +327.694000 +328.662000 +329.630000 +330.599000 +331.568000 +332.537000 +333.506000 +334.475000 +335.444000 +336.414000 +337.383000 +338.353000 +339.323000 +340.293000 +341.263000 +342.233000 +343.203000 +344.174000 +345.145000 +346.115000 +347.086000 +348.057000 +349.028000 +350.000000 +350.971000 +351.943000 +352.914000 +353.886000 +354.858000 +355.830000 +356.802000 +357.775000 +358.747000 +359.720000 +360.693000 +361.665000 +362.638000 +363.612000 +364.585000 +365.558000 +366.532000 +367.505000 +368.479000 +369.453000 +370.427000 +371.401000 +372.375000 +373.350000 +374.324000 +375.299000 +376.274000 +377.249000 +378.224000 +379.199000 +380.174000 +381.149000 +382.125000 +383.101000 +384.076000 +385.052000 +386.028000 +387.004000 +387.981000 +388.957000 +389.934000 +390.910000 +391.887000 +392.864000 +393.841000 +394.818000 +395.795000 +396.772000 +397.750000 +398.728000 +399.705000 +400.683000 +401.661000 +402.639000 +403.617000 +404.596000 +405.574000 +406.553000 +407.531000 +408.510000 +409.489000 +410.468000 +411.447000 +412.426000 +413.406000 +414.385000 +415.365000 +416.345000 +417.324000 +418.304000 +419.284000 +420.265000 +421.245000 +422.225000 +423.206000 +424.186000 +425.167000 +426.148000 +427.129000 +428.110000 +429.091000 +430.073000 +431.054000 +432.036000 +433.017000 +433.999000 +434.981000 +435.963000 +436.945000 +437.927000 +438.910000 +439.892000 +440.875000 +441.857000 +442.840000 +443.823000 +444.806000 +445.789000 +446.772000 +447.756000 +448.739000 +449.723000 +450.706000 +451.690000 +452.674000 +453.658000 +454.642000 +455.626000 +456.611000 +457.595000 +458.579000 +459.564000 +460.549000 +461.534000 +462.519000 +463.504000 +464.489000 +465.474000 +466.459000 +467.445000 +468.430000 +469.416000 +470.402000 +471.388000 +472.374000 +473.360000 +474.346000 +475.332000 +476.319000 +477.305000 +478.292000 +479.278000 +480.265000 +481.252000 +482.239000 +483.226000 +484.214000 +485.201000 +486.188000 +487.176000 +488.163000 +489.151000 +490.139000 +491.127000 +492.115000 +493.103000 +494.091000 +495.079000 +496.068000 +497.056000 +498.045000 +499.034000 +500.023000 +501.011000 +502.000000 +502.990000 +503.979000 +504.968000 +505.957000 +506.947000 +507.937000 +508.926000 +509.916000 +510.906000 +511.896000 +512.886000 +513.876000 +514.866000 +515.857000 +516.847000 +517.838000 +518.828000 +519.819000 +520.810000 +521.801000 +522.792000 +523.783000 +524.774000 +525.765000 +526.757000 +527.748000 +528.740000 +529.731000 +530.723000 +531.715000 +532.707000 +533.699000 +534.691000 +535.683000 +536.675000 +537.668000 +538.660000 +539.653000 +540.646000 +541.638000 +542.631000 +543.624000 +544.617000 +545.610000 +546.603000 +547.597000 +548.590000 +549.583000 +550.577000 +551.571000 +552.564000 +553.558000 +554.552000 +555.546000 +556.540000 +557.534000 +558.528000 +559.523000 +560.517000 +561.512000 +562.506000 +563.501000 +564.496000 +565.490000 +566.485000 +567.480000 +568.475000 +569.471000 +570.466000 +571.461000 +572.457000 +573.452000 +574.448000 +575.443000 +576.439000 +577.435000 +578.431000 +579.427000 +580.423000 +581.419000 +582.415000 +583.412000 +584.408000 +585.405000 +586.401000 +587.398000 +588.395000 +589.391000 +590.388000 +591.385000 +592.382000 +593.379000 +594.377000 +595.374000 +596.371000 +597.369000 +598.366000 +599.364000 +600.362000 +601.359000 +602.357000 +603.355000 +604.353000 +605.351000 +606.349000 +607.348000 +608.346000 +609.344000 +610.343000 +611.341000 +612.340000 +613.339000 +614.337000 +615.336000 +616.335000 +617.334000 +618.333000 +619.332000 +620.332000 +621.331000 +622.330000 +623.330000 +624.329000 +625.329000 +626.329000 +627.328000 +628.328000 +629.328000 +630.328000 +631.328000 +632.328000 +633.328000 +634.329000 +635.329000 +636.329000 +637.330000 +638.330000 +639.331000 +640.332000 +641.332000 +642.333000 +643.334000 +644.335000 +645.336000 +646.337000 +647.338000 +648.340000 +649.341000 +650.342000 +651.344000 +652.345000 +653.347000 +654.349000 +655.350000 +656.352000 +657.354000 +658.356000 +659.358000 +660.360000 +661.362000 +662.364000 +663.367000 +664.369000 +665.371000 +666.374000 +667.376000 +668.379000 +669.382000 +670.384000 +671.387000 +672.390000 +673.393000 +674.396000 +675.399000 +676.402000 +677.405000 +678.409000 +679.412000 +680.415000 +681.419000 +682.422000 +683.426000 +684.430000 +685.433000 +686.437000 +687.441000 +688.445000 +689.449000 +690.453000 +691.457000 +692.461000 +693.465000 +694.470000 +695.474000 +696.478000 +697.483000 +698.487000 +699.492000 +700.497000 +701.501000 +702.506000 +703.511000 +704.516000 +705.521000 +706.526000 +707.531000 +708.536000 +709.541000 +710.547000 +711.552000 +712.557000 +713.563000 +714.568000 +715.574000 +716.579000 +717.585000 +718.591000 +719.597000 +720.602000 +721.608000 +722.614000 +723.620000 +724.626000 +725.633000 +726.639000 +727.645000 +728.651000 +729.658000 +730.664000 +731.671000 +732.677000 +733.684000 +734.690000 +735.697000 +736.704000 +737.711000 +738.718000 +739.724000 +740.732000 +741.739000 +742.746000 +743.753000 +744.760000 +745.767000 +746.775000 +747.782000 +748.789000 +749.797000 +750.804000 +751.812000 +752.820000 +753.827000 +754.835000 +755.843000 +756.851000 +757.859000 +758.866000 +759.874000 +760.883000 +761.891000 +762.899000 +763.907000 +764.915000 +765.924000 +766.932000 +767.940000 +768.949000 +769.957000 +770.966000 +771.975000 +772.983000 +773.992000 +775.001000 +776.010000 +777.018000 +778.027000 +779.036000 +780.045000 +781.054000 +782.064000 +783.073000 +784.082000 +785.091000 +786.100000 +787.110000 +788.119000 +789.129000 +790.138000 +791.148000 +792.157000 +793.167000 +794.177000 +795.187000 +796.196000 +797.206000 +798.216000 +799.226000 +800.236000 +801.246000 +802.256000 +803.266000 +804.276000 +805.287000 +806.297000 +807.307000 +808.317000 +809.328000 +810.338000 +811.349000 +812.359000 +813.370000 +814.380000 +815.391000 +816.402000 +817.413000 +818.423000 +819.434000 +820.445000 +821.456000 +822.467000 +823.478000 +824.489000 +825.500000 +826.511000 +827.523000 +828.534000 +829.545000 +830.557000 +831.568000 +832.579000 +833.591000 +834.602000 +835.614000 +836.625000 +837.637000 +838.649000 +839.660000 +840.672000 +841.684000 +842.696000 +843.707000 +844.719000 +845.731000 +846.743000 +847.755000 +848.767000 +849.780000 +850.792000 +851.804000 +852.816000 +853.828000 +854.841000 +855.853000 +856.865000 +857.878000 +858.890000 +859.903000 +860.915000 +861.928000 +862.941000 +863.953000 +864.966000 +865.979000 +866.991000 +868.004000 +869.017000 +870.030000 +871.043000 +872.056000 +873.069000 +874.082000 +875.095000 +876.108000 +877.121000 +878.134000 +879.148000 +880.161000 +881.174000 +882.188000 +883.201000 +884.214000 +885.228000 +886.241000 +887.255000 +888.268000 +889.282000 +890.295000 +891.309000 +892.323000 +893.336000 +894.350000 +895.364000 +896.378000 +897.392000 +898.406000 +899.420000 +900.434000 +901.448000 +902.462000 +903.476000 +904.490000 +905.504000 +906.518000 +907.532000 +908.546000 +909.561000 +910.575000 +911.589000 +912.604000 +913.618000 +914.633000 +915.647000 +916.662000 +917.676000 +918.691000 +919.705000 +920.720000 +921.734000 +922.749000 +923.764000 +924.779000 +925.793000 +926.808000 +927.823000 +928.838000 +929.853000 +930.868000 +931.883000 +932.898000 +933.913000 +934.928000 +935.943000 +936.958000 +937.973000 +938.988000 +940.004000 +941.019000 +942.034000 +943.049000 +944.065000 +945.080000 +946.096000 +947.111000 +948.126000 +949.142000 +950.157000 +951.173000 +952.189000 +953.204000 +954.220000 +955.235000 +956.251000 +957.267000 +958.283000 +959.298000 +960.314000 +961.330000 +962.346000 +963.362000 +964.378000 +965.393000 +966.409000 +967.425000 +968.441000 +969.457000 +970.473000 +971.490000 +972.506000 +973.522000 +974.538000 +975.554000 +976.570000 +977.587000 +978.603000 +979.619000 +980.636000 +981.652000 +982.668000 +983.685000 +984.701000 +985.718000 +986.734000 +987.751000 +988.767000 +989.784000 +990.800000 +991.817000 +992.833000 +993.850000 +994.867000 +995.883000 +996.900000 +997.917000 +998.934000 +999.951000 +1000.970000 +1001.980000 +1003.000000 +1004.020000 +1005.030000 +1006.050000 +1007.070000 +1008.090000 +1009.100000 +1010.120000 +1011.140000 +1012.150000 +1013.170000 +1014.190000 +1015.210000 +1016.220000 +1017.240000 +1018.260000 +1019.270000 +1020.290000 +1021.310000 +1022.330000 +1023.340000 +1024.360000 +1025.380000 +1026.400000 +1027.410000 +1028.430000 +1029.450000 +1030.470000 +1031.480000 +1032.500000 +1033.520000 +1034.540000 +1035.550000 +1036.570000 +1037.590000 +1038.610000 +1039.620000 +1040.640000 +1041.660000 +1042.680000 +1043.690000 +1044.710000 +1045.730000 +1046.750000 +1047.770000 +1048.780000 +1049.800000 +1050.820000 +1051.840000 +1052.850000 +1053.870000 +1054.890000 +1055.910000 +1056.930000 +1057.940000 +1058.960000 +1059.980000 +1061.000000 +1062.020000 +1063.040000 +1064.050000 +1065.070000 +1066.090000 +1067.110000 +1068.130000 +1069.140000 +1070.160000 +1071.180000 +1072.200000 +1073.220000 +1074.240000 +1075.250000 +1076.270000 +1077.290000 +1078.310000 +1079.330000 +1080.350000 +1081.360000 +1082.380000 +1083.400000 +1084.420000 +1085.440000 +1086.460000 +1087.480000 +1088.490000 +1089.510000 +1090.530000 +1091.550000 +1092.570000 +1093.590000 +1094.610000 +1095.620000 +1096.640000 +1097.660000 +1098.680000 +1099.700000 +1100.720000 +1101.740000 +1102.760000 +1103.770000 +1104.790000 +1105.810000 +1106.830000 +1107.850000 +1108.870000 +1109.890000 +1110.910000 +1111.930000 +1112.940000 +1113.960000 +1114.980000 +1116.000000 +1117.020000 +1118.040000 +1119.060000 +1120.080000 +1121.100000 +1122.120000 +1123.130000 +1124.150000 +1125.170000 +1126.190000 +1127.210000 +1128.230000 +1129.250000 +1130.270000 +1131.290000 +1132.310000 +1133.330000 +1134.350000 +1135.370000 +1136.380000 +1137.400000 +1138.420000 +1139.440000 +1140.460000 +1141.480000 +1142.500000 +1143.520000 +1144.540000 +1145.560000 +1146.580000 +1147.600000 +1148.620000 +1149.640000 +1150.660000 +1151.680000 +1152.690000 +1153.710000 +1154.730000 +1155.750000 +1156.770000 +1157.790000 +1158.810000 +1159.830000 +1160.850000 +1161.870000 +1162.890000 +1163.910000 +1164.930000 +1165.950000 +1166.970000 +1167.990000 +1169.010000 +1170.030000 +1171.050000 +1172.070000 +1173.090000 +1174.110000 +1175.130000 +1176.150000 +1177.170000 +1178.190000 +1179.210000 +1180.230000 +1181.250000 +1182.270000 +1183.280000 +1184.300000 +1185.320000 +1186.340000 +1187.360000 +1188.380000 +1189.400000 +1190.420000 +1191.440000 +1192.460000 +1193.480000 +1194.500000 +1195.520000 +1196.540000 +1197.560000 +1198.580000 +1199.600000 +1200.620000 +1201.640000 +1202.660000 +1203.680000 +1204.700000 +1205.720000 +1206.740000 +1207.760000 +1208.780000 +1209.800000 +1210.820000 +1211.840000 +1212.860000 +1213.890000 +1214.910000 +1215.930000 +1216.950000 +1217.970000 +1218.990000 +1220.010000 +1221.030000 +1222.050000 +1223.070000 +1224.090000 +1225.110000 +1226.130000 +1227.150000 +1228.170000 +1229.190000 +1230.210000 +1231.230000 +1232.250000 +1233.270000 +1234.290000 +1235.310000 +1236.330000 +1237.350000 +1238.370000 +1239.390000 +1240.410000 +1241.430000 +1242.450000 +1243.470000 +1244.490000 +1245.510000 +1246.530000 +1247.560000 +1248.580000 +1249.600000 +1250.620000 +1251.640000 +1252.660000 +1253.680000 +1254.700000 +1255.720000 +1256.740000 +1257.760000 +1258.780000 +1259.800000 +1260.820000 +1261.840000 +1262.860000 +1263.880000 +1264.900000 +1265.920000 +1266.940000 +1267.970000 +1268.990000 +1270.010000 +1271.030000 +1272.050000 +1273.070000 +1274.090000 +1275.110000 +1276.130000 +1277.150000 +1278.170000 +1279.190000 +1280.210000 +1281.230000 +1282.250000 +1283.280000 +1284.300000 +1285.320000 +1286.340000 +1287.360000 +1288.380000 +1289.400000 +1290.420000 +1291.440000 +1292.460000 +1293.480000 +1294.500000 +1295.520000 +1296.550000 +1297.570000 +1298.590000 +1299.610000 +1300.630000 +1301.650000 +1302.670000 +1303.690000 +1304.710000 +1305.730000 +1306.750000 +1307.770000 +1308.800000 +1309.820000 +1310.840000 +1311.860000 +1312.880000 +1313.900000 +1314.920000 +1315.940000 +1316.960000 +1317.980000 +1319.000000 +1320.030000 +1321.050000 +1322.070000 +1323.090000 +1324.110000 +1325.130000 +1326.150000 +1327.170000 +1328.190000 +1329.210000 +1330.230000 +1331.260000 +1332.280000 +1333.300000 +1334.320000 +1335.340000 +1336.360000 +1337.380000 +1338.400000 +1339.420000 +1340.450000 +1341.470000 +1342.490000 +1343.510000 +1344.530000 +1345.550000 +1346.570000 +1347.590000 +1348.610000 +1349.630000 +1350.660000 +1351.680000 +1352.700000 +1353.720000 +1354.740000 +1355.760000 +1356.780000 +1357.800000 +1358.830000 +1359.850000 +1360.870000 +1361.890000 +1362.910000 +1363.930000 +1364.950000 +1365.970000 +1366.990000 +1368.020000 +1369.040000 +1370.060000 +1371.080000 +1372.100000 +1373.120000 +1374.140000 +1375.160000 +1376.190000 +1377.210000 +1378.230000 +1379.250000 +1380.270000 +1381.290000 +1382.310000 +1383.330000 +1384.360000 +1385.380000 +1386.400000 +1387.420000 +1388.440000 +1389.460000 +1390.480000 +1391.500000 +1392.530000 +1393.550000 +1394.570000 +1395.590000 +1396.610000 +1397.630000 +1398.650000 +1399.680000 +1400.700000 +1401.720000 +1402.740000 +1403.760000 +1404.780000 +1405.800000 +1406.830000 +1407.850000 +1408.870000 +1409.890000 +1410.910000 +1411.930000 +1412.950000 +1413.980000 +1415.000000 +1416.020000 +1417.040000 +1418.060000 +1419.080000 +1420.100000 +1421.130000 +1422.150000 +1423.170000 +1424.190000 +1425.210000 +1426.230000 +1427.250000 +1428.280000 +1429.300000 +1430.320000 +1431.340000 +1432.360000 +1433.380000 +1434.400000 +1435.430000 +1436.450000 +1437.470000 +1438.490000 +1439.510000 +1440.530000 +1441.560000 +1442.580000 +1443.600000 +1444.620000 +1445.640000 +1446.660000 +1447.690000 +1448.710000 +1449.730000 +1450.750000 +1451.770000 +1452.790000 +1453.810000 +1454.840000 +1455.860000 +1456.880000 +1457.900000 +1458.920000 +1459.940000 +1460.970000 +1461.990000 +1463.010000 +1464.030000 +1465.050000 +1466.070000 +1467.100000 +1468.120000 +1469.140000 +1470.160000 +1471.180000 +1472.210000 +1473.230000 +1474.250000 +1475.270000 +1476.290000 +1477.310000 +1478.340000 +1479.360000 +1480.380000 +1481.400000 +1482.420000 +1483.440000 +1484.470000 +1485.490000 +1486.510000 +1487.530000 +1488.550000 +1489.580000 +1490.600000 +1491.620000 +1492.640000 +1493.660000 +1494.680000 +1495.710000 +1496.730000 +1497.750000 +1498.770000 +1499.790000 +1500.820000 +1501.840000 +1502.860000 +1503.880000 +1504.900000 +1505.930000 +1506.950000 +1507.970000 +1508.990000 +1510.010000 +1511.030000 +1512.060000 +1513.080000 +1514.100000 +1515.120000 +1516.140000 +1517.170000 +1518.190000 +1519.210000 +1520.230000 +1521.250000 +1522.280000 +1523.300000 +1524.320000 +1525.340000 +1526.360000 +1527.390000 +1528.410000 +1529.430000 +1530.450000 +1531.470000 +1532.500000 +1533.520000 +1534.540000 +1535.560000 +1536.580000 +1537.610000 +1538.630000 +1539.650000 +1540.670000 +1541.700000 +1542.720000 +1543.740000 +1544.760000 +1545.780000 +1546.810000 +1547.830000 +1548.850000 +1549.870000 +1550.890000 +1551.920000 +1552.940000 +1553.960000 +1554.980000 +1556.010000 +1557.030000 +1558.050000 +1559.070000 +1560.090000 +1561.120000 +1562.140000 +1563.160000 +1564.180000 +1565.210000 +1566.230000 +1567.250000 +1568.270000 +1569.300000 +1570.320000 +1571.340000 +1572.360000 +1573.380000 +1574.410000 +1575.430000 +1576.450000 +1577.470000 +1578.500000 +1579.520000 +1580.540000 +1581.560000 +1582.590000 +1583.610000 +1584.630000 +1585.650000 +1586.680000 +1587.700000 +1588.720000 +1589.740000 +1590.770000 +1591.790000 +1592.810000 +1593.830000 +1594.860000 +1595.880000 +1596.900000 +1597.920000 +1598.950000 +1599.970000 +1600.990000 +1602.010000 +1603.040000 +1604.060000 +1605.080000 +1606.100000 +1607.130000 +1608.150000 +1609.170000 +1610.190000 +1611.220000 +1612.240000 +1613.260000 +1614.280000 +1615.310000 +1616.330000 +1617.350000 +1618.380000 +1619.400000 +1620.420000 +1621.440000 +1622.470000 +1623.490000 +1624.510000 +1625.540000 +1626.560000 +1627.580000 +1628.600000 +1629.630000 +1630.650000 +1631.670000 +1632.690000 +1633.720000 +1634.740000 +1635.760000 +1636.790000 +1637.810000 +1638.830000 +1639.850000 +1640.880000 +1641.900000 +1642.920000 +1643.950000 +1644.970000 +1645.990000 +1647.020000 +1648.040000 +1649.060000 +1650.080000 +1651.110000 +1652.130000 +1653.150000 +1654.180000 +1655.200000 +1656.220000 +1657.250000 +1658.270000 +1659.290000 +1660.320000 +1661.340000 +1662.360000 +1663.380000 +1664.410000 +1665.430000 +1666.450000 +1667.480000 +1668.500000 +1669.520000 +1670.550000 +1671.570000 +1672.590000 +1673.620000 +1674.640000 +1675.660000 +1676.690000 +1677.710000 +1678.730000 +1679.760000 +1680.780000 +1681.800000 +1682.830000 +1683.850000 +1684.870000 +1685.900000 +1686.920000 +1687.940000 +1688.970000 +1689.990000 +1691.010000 +1692.040000 +1693.060000 +1694.090000 +1695.110000 +1696.130000 +1697.160000 +1698.180000 +1699.200000 +1700.230000 +1701.250000 +1702.270000 +1703.300000 +1704.320000 +1705.350000 +1706.370000 +1707.390000 +1708.420000 +1709.440000 +1710.460000 +1711.490000 +1712.510000 +1713.540000 +1714.560000 +1715.580000 +1716.610000 +1717.630000 +1718.650000 +1719.680000 +1720.700000 +1721.730000 +1722.750000 +1723.770000 +1724.800000 +1725.820000 +1726.850000 +1727.870000 +1728.890000 +1729.920000 +1730.940000 +1731.970000 +1732.990000 +1734.010000 +1735.040000 +1736.060000 +1737.090000 +1738.110000 +1739.130000 +1740.160000 +1741.180000 +1742.210000 +1743.230000 +1744.260000 +1745.280000 +1746.300000 +1747.330000 +1748.350000 +1749.380000 +1750.400000 +1751.430000 +1752.450000 +1753.480000 +1754.500000 +1755.520000 +1756.550000 +1757.570000 +1758.600000 +1759.620000 +1760.650000 +1761.670000 +1762.700000 +1763.720000 +1764.740000 +1765.770000 +1766.790000 +1767.820000 +1768.840000 +1769.870000 +1770.890000 +1771.920000 +1772.940000 +1773.970000 +1774.990000 +1776.020000 +1777.040000 +1778.070000 +1779.090000 +1780.120000 +1781.140000 +1782.170000 +1783.190000 +1784.220000 +1785.240000 +1786.270000 +1787.290000 +1788.320000 +1789.340000 +1790.370000 +1791.390000 +1792.420000 +1793.440000 +1794.470000 +1795.490000 +1796.520000 +1797.540000 +1798.570000 +1799.590000 +1800.620000 +1801.640000 +1802.670000 +1803.690000 +1804.720000 +1805.740000 +1806.770000 +1807.790000 +1808.820000 +1809.850000 +1810.870000 +1811.900000 +1812.920000 +1813.950000 +1814.970000 +1816.000000 +1817.020000 +1818.050000 +1819.080000 +1820.100000 +1821.130000 +1822.150000 +1823.180000 +1824.200000 +1825.230000 +1826.260000 +1827.280000 +1828.310000 +1829.330000 +1830.360000 +1831.390000 +1832.410000 +1833.440000 +1834.460000 +1835.490000 +1836.520000 +1837.540000 +1838.570000 +1839.590000 +1840.620000 +1841.650000 +1842.670000 +1843.700000 +1844.720000 +1845.750000 +1846.780000 +1847.800000 +1848.830000 +1849.860000 +1850.880000 +1851.910000 +1852.940000 +1853.960000 +1854.990000 +1856.020000 +1857.040000 +1858.070000 +1859.090000 +1860.120000 +1861.150000 +1862.170000 +1863.200000 +1864.230000 +1865.260000 +1866.280000 +1867.310000 +1868.340000 +1869.360000 +1870.390000 +1871.420000 +1872.440000 +1873.470000 +1874.500000 +1875.520000 +1876.550000 +1877.580000 +1878.610000 +1879.630000 +1880.660000 +1881.690000 +1882.710000 +1883.740000 +1884.770000 +1885.800000 +1886.820000 +1887.850000 +1888.880000 +1889.910000 +1890.930000 +1891.960000 +1892.990000 +1894.020000 +1895.040000 +1896.070000 +1897.100000 +1898.130000 +1899.150000 +1900.180000 +1901.210000 +1902.240000 +1903.260000 +1904.290000 +1905.320000 +1906.350000 +1907.380000 +1908.400000 +1909.430000 +1910.460000 +1911.490000 +1912.520000 +1913.540000 +1914.570000 +1915.600000 +1916.630000 +1917.660000 +1918.690000 +1919.710000 +1920.740000 +1921.770000 +1922.800000 +1923.830000 +1924.860000 +1925.880000 +1926.910000 +1927.940000 +1928.970000 +1930.000000 +1931.030000 +1932.060000 +1933.080000 +1934.110000 +1935.140000 +1936.170000 +1937.200000 +1938.230000 +1939.260000 +1940.290000 +1941.320000 +1942.340000 +1943.370000 +1944.400000 +1945.430000 +1946.460000 +1947.490000 +1948.520000 +1949.550000 +1950.580000 +1951.610000 +1952.640000 +1953.670000 +1954.700000 +1955.720000 +1956.750000 +1957.780000 +1958.810000 +1959.840000 +1960.870000 +1961.900000 +1962.930000 +1963.960000 +1964.990000 +1966.020000 +1967.050000 +1968.080000 +1969.110000 +1970.140000 +1971.170000 +1972.200000 +1973.230000 +1974.260000 +1975.290000 +1976.320000 +1977.350000 +1978.380000 +1979.410000 +1980.440000 +1981.470000 +1982.500000 +1983.540000 +1984.570000 +1985.600000 +1986.630000 +1987.660000 +1988.690000 +1989.720000 +1990.750000 +1991.780000 +1992.810000 +1993.840000 +1994.870000 +1995.900000 +1996.940000 +1997.970000 +1999.000000 +2000.030000 +2001.060000 +2002.090000 +2003.120000 +2004.150000 +2005.180000 +2006.220000 +2007.250000 +2008.280000 +2009.310000 +2010.340000 +2011.370000 +2012.410000 +2013.440000 +2014.470000 +2015.500000 +2016.530000 +2017.560000 +2018.600000 +2019.630000 +2020.660000 +2021.690000 +2022.720000 +2023.760000 +2024.790000 +2025.820000 +2026.850000 +2027.890000 +2028.920000 +2029.950000 +2030.980000 +2032.010000 +2033.050000 +2034.080000 +2035.110000 +2036.150000 +2037.180000 +2038.210000 +2039.240000 +2040.280000 +2041.310000 +2042.340000 +2043.380000 +2044.410000 +2045.440000 +2046.470000 +2047.510000 +2048.540000 +2049.570000 +2050.610000 +2051.640000 +2052.670000 +2053.710000 +2054.740000 +2055.770000 +2056.810000 +2057.840000 +2058.880000 +2059.910000 +2060.940000 +2061.980000 +2063.010000 +2064.050000 +2065.080000 +2066.110000 +2067.150000 +2068.180000 +2069.220000 +2070.250000 +2071.280000 +2072.320000 +2073.350000 +2074.390000 +2075.420000 +2076.460000 +2077.490000 +2078.530000 +2079.560000 +2080.600000 +2081.630000 +2082.670000 +2083.700000 +2084.740000 +2085.770000 +2086.810000 +2087.840000 +2088.880000 +2089.910000 +2090.950000 +2091.980000 +2093.020000 +2094.050000 +2095.090000 +2096.120000 +2097.160000 +2098.190000 +2099.230000 +2100.270000 +2101.300000 +2102.340000 +2103.370000 +2104.410000 +2105.450000 +2106.480000 +2107.520000 +2108.550000 +2109.590000 +2110.630000 +2111.660000 +2112.700000 +2113.740000 +2114.770000 +2115.810000 +2116.850000 +2117.880000 +2118.920000 +2119.960000 +2120.990000 +2122.030000 +2123.070000 +2124.100000 +2125.140000 +2126.180000 +2127.220000 +2128.250000 +2129.290000 +2130.330000 +2131.370000 +2132.400000 +2133.440000 +2134.480000 +2135.520000 +2136.550000 +2137.590000 +2138.630000 +2139.670000 +2140.710000 +2141.740000 +2142.780000 +2143.820000 +2144.860000 +2145.900000 +2146.940000 +2147.970000 +2149.010000 +2150.050000 +2151.090000 +2152.130000 +2153.170000 +2154.210000 +2155.240000 +2156.280000 +2157.320000 +2158.360000 +2159.400000 +2160.440000 +2161.480000 +2162.520000 +2163.560000 +2164.600000 +2165.640000 +2166.680000 +2167.720000 +2168.760000 +2169.800000 +2170.840000 +2171.880000 +2172.920000 +2173.960000 +2175.000000 +2176.040000 +2177.080000 +2178.120000 +2179.160000 +2180.200000 +2181.240000 +2182.280000 +2183.320000 +2184.360000 +2185.400000 +2186.440000 +2187.480000 +2188.520000 +2189.560000 +2190.610000 +2191.650000 +2192.690000 +2193.730000 +2194.770000 +2195.810000 +2196.850000 +2197.900000 +2198.940000 +2199.980000 +2201.020000 +2202.060000 +2203.100000 +2204.150000 +2205.190000 +2206.230000 +2207.270000 +2208.320000 +2209.360000 +2210.400000 +2211.440000 +2212.490000 +2213.530000 +2214.570000 +2215.610000 +2216.660000 +2217.700000 +2218.740000 +2219.790000 +2220.830000 +2221.870000 +2222.920000 +2223.960000 +2225.000000 +2226.050000 +2227.090000 +2228.130000 +2229.180000 +2230.220000 +2231.270000 +2232.310000 +2233.350000 +2234.400000 +2235.440000 +2236.490000 +2237.530000 +2238.580000 +2239.620000 +2240.660000 +2241.710000 +2242.750000 +2243.800000 +2244.840000 +2245.890000 +2246.930000 +2247.980000 +2249.020000 +2250.070000 +2251.120000 +2252.160000 +2253.210000 +2254.250000 +2255.300000 +2256.340000 +2257.390000 +2258.440000 +2259.480000 +2260.530000 +2261.570000 +2262.620000 +2263.670000 +2264.710000 +2265.760000 +2266.810000 +2267.850000 +2268.900000 +2269.950000 +2270.990000 +2272.040000 +2273.090000 +2274.130000 +2275.180000 +2276.230000 +2277.280000 +2278.320000 +2279.370000 +2280.420000 +2281.470000 +2282.510000 +2283.560000 +2284.610000 +2285.660000 +2286.710000 +2287.760000 +2288.800000 +2289.850000 +2290.900000 +2291.950000 +2293.000000 +2294.050000 +2295.100000 +2296.140000 +2297.190000 +2298.240000 +2299.290000 +2300.340000 +2301.390000 +2302.440000 +2303.490000 +2304.540000 +2305.590000 +2306.640000 +2307.690000 +2308.740000 +2309.790000 +2310.840000 +2311.890000 +2312.940000 +2313.990000 +2315.040000 +2316.090000 +2317.140000 +2318.190000 +2319.240000 +2320.300000 +2321.350000 +2322.400000 +2323.450000 +2324.500000 +2325.550000 +2326.600000 +2327.660000 +2328.710000 +2329.760000 +2330.810000 +2331.860000 +2332.910000 +2333.970000 +2335.020000 +2336.070000 +2337.120000 +2338.180000 +2339.230000 +2340.280000 +2341.340000 +2342.390000 +2343.440000 +2344.490000 +2345.550000 +2346.600000 +2347.650000 +2348.710000 +2349.760000 +2350.820000 +2351.870000 +2352.920000 +2353.980000 +2355.030000 +2356.090000 +2357.140000 +2358.190000 +2359.250000 +2360.300000 +2361.360000 +2362.410000 +2363.470000 +2364.520000 +2365.580000 +2366.630000 +2367.690000 +2368.740000 +2369.800000 +2370.860000 +2371.910000 +2372.970000 +2374.020000 +2375.080000 +2376.140000 +2377.190000 +2378.250000 +2379.300000 +2380.360000 +2381.420000 +2382.470000 +2383.530000 +2384.590000 +2385.650000 +2386.700000 +2387.760000 +2388.820000 +2389.870000 +2390.930000 +2391.990000 +2393.050000 +2394.110000 +2395.160000 +2396.220000 +2397.280000 +2398.340000 +2399.400000 +2400.460000 +2401.510000 +2402.570000 +2403.630000 +2404.690000 +2405.750000 +2406.810000 +2407.870000 +2408.930000 +2409.990000 +2411.050000 +2412.110000 +2413.170000 +2414.230000 +2415.290000 +2416.350000 +2417.410000 +2418.470000 +2419.530000 +2420.590000 +2421.650000 +2422.710000 +2423.770000 +2424.830000 +2425.890000 +2426.950000 +2428.020000 +2429.080000 +2430.140000 +2431.200000 +2432.260000 +2433.320000 +2434.390000 +2435.450000 +2436.510000 +2437.570000 +2438.640000 +2439.700000 +2440.760000 +2441.820000 +2442.890000 +2443.950000 +2445.010000 +2446.080000 +2447.140000 +2448.200000 +2449.270000 +2450.330000 +2451.400000 +2452.460000 +2453.520000 +2454.590000 +2455.650000 +2456.720000 +2457.780000 +2458.850000 +2459.910000 +2460.980000 +2462.040000 +2463.110000 +2464.170000 +2465.240000 +2466.300000 +2467.370000 +2468.430000 +2469.500000 +2470.570000 +2471.630000 +2472.700000 +2473.770000 +2474.830000 +2475.900000 +2476.970000 +2478.030000 +2479.100000 +2480.170000 +2481.230000 +2482.300000 +2483.370000 +2484.440000 +2485.500000 +2486.570000 +2487.640000 +2488.710000 +2489.780000 +2490.850000 +2491.910000 +2492.980000 +2494.050000 +2495.120000 +2496.190000 +2497.260000 +2498.330000 +2499.400000 +2500.470000 +2501.540000 +2502.610000 +2503.680000 +2504.750000 +2505.820000 +2506.890000 +2507.960000 +2509.030000 +2510.100000 +2511.170000 +2512.240000 +2513.310000 +2514.380000 +2515.450000 +2516.530000 +2517.600000 +2518.670000 +2519.740000 +2520.810000 +2521.890000 +2522.960000 +2524.030000 +2525.100000 +2526.180000 +2527.250000 +2528.320000 +2529.400000 +2530.470000 +2531.540000 +2532.620000 +2533.690000 +2534.760000 +2535.840000 +2536.910000 +2537.980000 +2539.060000 +2540.130000 +2541.210000 +2542.280000 +2543.360000 +2544.430000 +2545.510000 +2546.580000 +2547.660000 +2548.730000 +2549.810000 +2550.890000 +2551.960000 +2553.040000 +2554.110000 +2555.190000 +2556.270000 +2557.340000 +2558.420000 +2559.500000 +2560.580000 +2561.650000 +2562.730000 +2563.810000 +2564.890000 +2565.960000 +2567.040000 +2568.120000 +2569.200000 +2570.280000 +2571.350000 +2572.430000 +2573.510000 +2574.590000 +2575.670000 +2576.750000 +2577.830000 +2578.910000 +2579.990000 +2581.070000 +2582.150000 +2583.230000 +2584.310000 +2585.390000 +2586.470000 +2587.550000 +2588.630000 +2589.710000 +2590.790000 +2591.880000 +2592.960000 +2594.040000 +2595.120000 +2596.200000 +2597.280000 +2598.370000 +2599.450000 +2600.530000 +2601.610000 +2602.700000 +2603.780000 +2604.860000 +2605.950000 +2607.030000 +2608.110000 +2609.200000 +2610.280000 +2611.370000 +2612.450000 +2613.530000 +2614.620000 +2615.700000 +2616.790000 +2617.870000 +2618.960000 +2620.040000 +2621.130000 +2622.210000 +2623.300000 +2624.390000 +2625.470000 +2626.560000 +2627.640000 +2628.730000 +2629.820000 +2630.910000 +2631.990000 +2633.080000 +2634.170000 +2635.250000 +2636.340000 +2637.430000 +2638.520000 +2639.610000 +2640.690000 +2641.780000 +2642.870000 +2643.960000 +2645.050000 +2646.140000 +2647.230000 +2648.320000 +2649.410000 +2650.500000 +2651.590000 +2652.680000 +2653.770000 +2654.860000 +2655.950000 +2657.040000 +2658.130000 +2659.220000 +2660.310000 +2661.400000 +2662.490000 +2663.590000 +2664.680000 +2665.770000 +2666.860000 +2667.960000 +2669.050000 +2670.140000 +2671.230000 +2672.330000 +2673.420000 +2674.510000 +2675.610000 +2676.700000 +2677.790000 +2678.890000 +2679.980000 +2681.080000 +2682.170000 +2683.270000 +2684.360000 +2685.460000 +2686.550000 +2687.650000 +2688.740000 +2689.840000 +2690.940000 +2692.030000 +2693.130000 +2694.220000 +2695.320000 +2696.420000 +2697.510000 +2698.610000 +2699.710000 +2700.810000 +2701.900000 +2703.000000 +2704.100000 +2705.200000 +2706.300000 +2707.400000 +2708.490000 +2709.590000 +2710.690000 +2711.790000 +2712.890000 +2713.990000 +2715.090000 +2716.190000 +2717.290000 +2718.390000 +2719.490000 +2720.590000 +2721.690000 +2722.800000 +2723.900000 +2725.000000 +2726.100000 +2727.200000 +2728.300000 +2729.410000 +2730.510000 +2731.610000 +2732.710000 +2733.820000 +2734.920000 +2736.020000 +2737.130000 +2738.230000 +2739.330000 +2740.440000 +2741.540000 +2742.650000 +2743.750000 +2744.860000 +2745.960000 +2747.070000 +2748.170000 +2749.280000 +2750.380000 +2751.490000 +2752.590000 +2753.700000 +2754.810000 +2755.910000 +2757.020000 +2758.130000 +2759.240000 +2760.340000 +2761.450000 +2762.560000 +2763.670000 +2764.780000 +2765.880000 +2766.990000 +2768.100000 +2769.210000 +2770.320000 +2771.430000 +2772.540000 +2773.650000 +2774.760000 +2775.870000 +2776.980000 +2778.090000 +2779.200000 +2780.310000 +2781.420000 +2782.530000 +2783.640000 +2784.760000 +2785.870000 +2786.980000 +2788.090000 +2789.210000 +2790.320000 +2791.430000 +2792.540000 +2793.660000 +2794.770000 +2795.880000 +2797.000000 +2798.110000 +2799.230000 +2800.340000 +2801.460000 +2802.570000 +2803.690000 +2804.800000 +2805.920000 +2807.030000 +2808.150000 +2809.260000 +2810.380000 +2811.500000 +2812.610000 +2813.730000 +2814.850000 +2815.970000 +2817.080000 +2818.200000 +2819.320000 +2820.440000 +2821.560000 +2822.670000 +2823.790000 +2824.910000 +2826.030000 +2827.150000 +2828.270000 +2829.390000 +2830.510000 +2831.630000 +2832.750000 +2833.870000 +2834.990000 +2836.110000 +2837.240000 +2838.360000 +2839.480000 +2840.600000 +2841.720000 +2842.840000 +2843.970000 +2845.090000 +2846.210000 +2847.340000 +2848.460000 +2849.580000 +2850.710000 +2851.830000 +2852.960000 +2854.080000 +2855.210000 +2856.330000 +2857.460000 +2858.580000 +2859.710000 +2860.830000 +2861.960000 +2863.080000 +2864.210000 +2865.340000 +2866.470000 +2867.590000 +2868.720000 +2869.850000 +2870.970000 +2872.100000 +2873.230000 +2874.360000 +2875.490000 +2876.620000 +2877.750000 +2878.880000 +2880.010000 +2881.140000 +2882.270000 +2883.400000 +2884.530000 +2885.660000 +2886.790000 +2887.920000 +2889.050000 +2890.180000 +2891.310000 +2892.450000 +2893.580000 +2894.710000 +2895.840000 +2896.980000 +2898.110000 +2899.240000 +2900.380000 +2901.510000 +2902.640000 +2903.780000 +2904.910000 +2906.050000 +2907.180000 +2908.320000 +2909.450000 +2910.590000 +2911.730000 +2912.860000 +2914.000000 +2915.130000 +2916.270000 +2917.410000 +2918.550000 +2919.680000 +2920.820000 +2921.960000 +2923.100000 +2924.240000 +2925.380000 +2926.510000 +2927.650000 +2928.790000 +2929.930000 +2931.070000 +2932.210000 +2933.350000 +2934.490000 +2935.640000 +2936.780000 +2937.920000 +2939.060000 +2940.200000 +2941.340000 +2942.490000 +2943.630000 +2944.770000 +2945.910000 +2947.060000 +2948.200000 +2949.340000 +2950.490000 +2951.630000 +2952.780000 +2953.920000 +2955.070000 +2956.210000 +2957.360000 +2958.500000 +2959.650000 +2960.800000 +2961.940000 +2963.090000 +2964.240000 +2965.380000 +2966.530000 +2967.680000 +2968.830000 +2969.970000 +2971.120000 +2972.270000 +2973.420000 +2974.570000 +2975.720000 +2976.870000 +2978.020000 +2979.170000 +2980.320000 +2981.470000 +2982.620000 +2983.770000 +2984.920000 +2986.080000 +2987.230000 +2988.380000 +2989.530000 +2990.690000 +2991.840000 +2992.990000 +2994.150000 +2995.300000 +2996.450000 +2997.610000 +2998.760000 +2999.920000 +3001.070000 +3002.230000 +3003.380000 +3004.540000 +3005.690000 +3006.850000 +3008.010000 +3009.160000 +3010.320000 +3011.480000 +3012.640000 +3013.790000 +3014.950000 +3016.110000 +3017.270000 +3018.430000 +3019.590000 +3020.750000 +3021.910000 +3023.070000 +3024.230000 +3025.390000 +3026.550000 +3027.710000 +3028.870000 +3030.030000 +3031.190000 +3032.360000 +3033.520000 +3034.680000 +3035.840000 +3037.010000 +3038.170000 +3039.340000 +3040.500000 +3041.660000 +3042.830000 +3043.990000 +3045.160000 +3046.320000 +3047.490000 +3048.650000 +3049.820000 +3050.990000 +3052.150000 +3053.320000 +3054.490000 +3055.660000 +3056.820000 +3057.990000 +3059.160000 +3060.330000 +3061.500000 +3062.670000 +3063.840000 +3065.010000 +3066.180000 +3067.350000 +3068.520000 +3069.690000 +3070.860000 +3072.030000 +3073.200000 +3074.370000 +3075.550000 +3076.720000 +3077.890000 +3079.060000 +3080.240000 +3081.410000 +3082.590000 +3083.760000 +3084.930000 +3086.110000 +3087.280000 +3088.460000 +3089.640000 +3090.810000 +3091.990000 +3093.160000 +3094.340000 +3095.520000 +3096.700000 +3097.870000 +3099.050000 +3100.230000 +3101.410000 +3102.590000 +3103.760000 +3104.940000 +3106.120000 +3107.300000 +3108.480000 +3109.660000 +3110.850000 +3112.030000 +3113.210000 +3114.390000 +3115.570000 +3116.750000 +3117.940000 +3119.120000 +3120.300000 +3121.490000 +3122.670000 +3123.850000 +3125.040000 +3126.220000 +3127.410000 +3128.590000 +3129.780000 +3130.960000 +3132.150000 +3133.340000 +3134.520000 +3135.710000 +3136.900000 +3138.080000 +3139.270000 +3140.460000 +3141.650000 +3142.840000 +3144.030000 +3145.220000 +3146.410000 +3147.600000 +3148.790000 +3149.980000 +3151.170000 +3152.360000 +3153.550000 +3154.740000 +3155.930000 +3157.130000 +3158.320000 +3159.510000 +3160.710000 +3161.900000 +3163.090000 +3164.290000 +3165.480000 +3166.680000 +3167.870000 +3169.070000 +3170.260000 +3171.460000 +3172.660000 +3173.850000 +3175.050000 +3176.250000 +3177.440000 +3178.640000 +3179.840000 +3181.040000 +3182.240000 +3183.440000 +3184.640000 +3185.840000 +3187.040000 +3188.240000 +3189.440000 +3190.640000 +3191.840000 +3193.040000 +3194.240000 +3195.450000 +3196.650000 +3197.850000 +3199.060000 +3200.260000 +3201.460000 +3202.670000 +3203.870000 +3205.080000 +3206.280000 +3207.490000 +3208.690000 +3209.900000 +3211.110000 +3212.310000 +3213.520000 +3214.730000 +3215.940000 +3217.140000 +3218.350000 +3219.560000 +3220.770000 +3221.980000 +3223.190000 +3224.400000 +3225.610000 +3226.820000 +3228.030000 +3229.240000 +3230.450000 +3231.670000 +3232.880000 +3234.090000 +3235.300000 +3236.520000 +3237.730000 +3238.940000 +3240.160000 +3241.370000 +3242.590000 +3243.800000 +3245.020000 +3246.240000 +3247.450000 +3248.670000 +3249.890000 +3251.100000 +3252.320000 +3253.540000 +3254.760000 +3255.980000 +3257.190000 +3258.410000 +3259.630000 +3260.850000 +3262.070000 +3263.290000 +3264.510000 +3265.740000 +3266.960000 +3268.180000 +3269.400000 +3270.620000 +3271.850000 +3273.070000 +3274.300000 +3275.520000 +3276.740000 +3277.970000 +3279.190000 +3280.420000 +3281.640000 +3282.870000 +3284.100000 +3285.320000 +3286.550000 +3287.780000 +3289.010000 +3290.230000 +3291.460000 +3292.690000 +3293.920000 +3295.150000 +3296.380000 +3297.610000 +3298.840000 +3300.070000 +3301.300000 +3302.540000 +3303.770000 +3305.000000 +3306.230000 +3307.470000 +3308.700000 +3309.930000 +3311.170000 +3312.400000 +3313.640000 +3314.870000 +3316.110000 +3317.340000 +3318.580000 +3319.820000 +3321.050000 +3322.290000 +3323.530000 +3324.770000 +3326.000000 +3327.240000 +3328.480000 +3329.720000 +3330.960000 +3332.200000 +3333.440000 +3334.680000 +3335.920000 +3337.170000 +3338.410000 +3339.650000 +3340.890000 +3342.140000 +3343.380000 +3344.620000 +3345.870000 +3347.110000 +3348.360000 +3349.600000 +3350.850000 +3352.090000 +3353.340000 +3354.590000 +3355.830000 +3357.080000 +3358.330000 +3359.580000 +3360.830000 +3362.080000 +3363.320000 +3364.570000 +3365.820000 +3367.070000 +3368.330000 +3369.580000 +3370.830000 +3372.080000 +3373.330000 +3374.580000 +3375.840000 +3377.090000 +3378.350000 +3379.600000 +3380.850000 +3382.110000 +3383.360000 +3384.620000 +3385.880000 +3387.130000 +3388.390000 +3389.650000 +3390.900000 +3392.160000 +3393.420000 +3394.680000 +3395.940000 +3397.200000 +3398.460000 +3399.720000 +3400.980000 +3402.240000 +3403.500000 +3404.760000 +3406.020000 +3407.290000 +3408.550000 +3409.810000 +3411.080000 +3412.340000 +3413.600000 +3414.870000 +3416.130000 +3417.400000 +3418.670000 +3419.930000 +3421.200000 +3422.470000 +3423.730000 +3425.000000 +3426.270000 +3427.540000 +3428.810000 +3430.080000 +3431.350000 +3432.620000 +3433.890000 +3435.160000 +3436.430000 +3437.700000 +3438.980000 +3440.250000 +3441.520000 +3442.790000 +3444.070000 +3445.340000 +3446.620000 +3447.890000 +3449.170000 +3450.440000 +3451.720000 +3453.000000 +3454.270000 +3455.550000 +3456.830000 +3458.110000 +3459.380000 +3460.660000 +3461.940000 +3463.220000 +3464.500000 +3465.780000 +3467.060000 +3468.350000 +3469.630000 +3470.910000 +3472.190000 +3473.480000 +3474.760000 +3476.040000 +3477.330000 +3478.610000 +3479.900000 +3481.180000 +3482.470000 +3483.760000 +3485.040000 +3486.330000 +3487.620000 +3488.900000 +3490.190000 +3491.480000 +3492.770000 +3494.060000 +3495.350000 +3496.640000 +3497.930000 +3499.220000 +3500.520000 +3501.810000 +3503.100000 +3504.390000 +3505.690000 +3506.980000 +3508.270000 +3509.570000 +3510.860000 +3512.160000 +3513.450000 +3514.750000 +3516.050000 +3517.340000 +3518.640000 +3519.940000 +3521.240000 +3522.540000 +3523.840000 +3525.140000 +3526.440000 +3527.740000 +3529.040000 +3530.340000 +3531.640000 +3532.940000 +3534.250000 +3535.550000 +3536.850000 +3538.160000 +3539.460000 +3540.770000 +3542.070000 +3543.380000 +3544.680000 +3545.990000 +3547.300000 +3548.600000 +3549.910000 +3551.220000 +3552.530000 +3553.840000 +3555.150000 +3556.460000 +3557.770000 +3559.080000 +3560.390000 +3561.700000 +3563.010000 +3564.320000 +3565.640000 +3566.950000 +3568.260000 +3569.580000 +3570.890000 +3572.210000 +3573.520000 +3574.840000 +3576.160000 +3577.470000 +3578.790000 +3580.110000 +3581.430000 +3582.750000 +3584.060000 +3585.380000 +3586.700000 +3588.030000 +3589.350000 +3590.670000 +3591.990000 +3593.310000 +3594.630000 +3595.960000 +3597.280000 +3598.600000 +3599.930000 +3601.250000 +3602.580000 +3603.910000 +3605.230000 +3606.560000 +3607.890000 +3609.210000 +3610.540000 +3611.870000 +3613.200000 +3614.530000 +3615.860000 +3617.190000 +3618.520000 +3619.850000 +3621.180000 +3622.510000 +3623.850000 +3625.180000 +3626.510000 +3627.850000 +3629.180000 +3630.520000 +3631.850000 +3633.190000 +3634.520000 +3635.860000 +3637.200000 +3638.540000 +3639.870000 +3641.210000 +3642.550000 +3643.890000 +3645.230000 +3646.570000 +3647.910000 +3649.250000 +3650.600000 +3651.940000 +3653.280000 +3654.620000 +3655.970000 +3657.310000 +3658.660000 +3660.000000 +3661.350000 +3662.690000 +3664.040000 +3665.390000 +3666.730000 +3668.080000 +3669.430000 +3670.780000 +3672.130000 +3673.480000 +3674.830000 +3676.180000 +3677.530000 +3678.880000 +3680.240000 +3681.590000 +3682.940000 +3684.300000 +3685.650000 +3687.000000 +3688.360000 +3689.710000 +3691.070000 +3692.430000 +3693.780000 +3695.140000 +3696.500000 +3697.860000 +3699.220000 +3700.580000 +3701.940000 +3703.300000 +3704.660000 +3706.020000 +3707.380000 +3708.740000 +3710.100000 +3711.470000 +3712.830000 +3714.200000 +3715.560000 +3716.930000 +3718.290000 +3719.660000 +3721.020000 +3722.390000 +3723.760000 +3725.130000 +3726.500000 +3727.870000 +3729.240000 +3730.610000 +3731.980000 +3733.350000 +3734.720000 +3736.090000 +3737.460000 +3738.840000 +3740.210000 +3741.580000 +3742.960000 +3744.330000 +3745.710000 +3747.090000 +3748.460000 +3749.840000 +3751.220000 +3752.590000 +3753.970000 +3755.350000 +3756.730000 +3758.110000 +3759.490000 +3760.870000 +3762.260000 +3763.640000 +3765.020000 +3766.400000 +3767.790000 +3769.170000 +3770.550000 +3771.940000 +3773.330000 +3774.710000 +3776.100000 +3777.490000 +3778.870000 +3780.260000 +3781.650000 +3783.040000 +3784.430000 +3785.820000 +3787.210000 +3788.600000 +3789.990000 +3791.390000 +3792.780000 +3794.170000 +3795.570000 +3796.960000 +3798.350000 +3799.750000 +3801.150000 +3802.540000 +3803.940000 +3805.340000 +3806.730000 +3808.130000 +3809.530000 +3810.930000 +3812.330000 +3813.730000 +3815.130000 +3816.530000 +3817.940000 +3819.340000 +3820.740000 +3822.150000 +3823.550000 +3824.950000 +3826.360000 +3827.770000 +3829.170000 +3830.580000 +3831.990000 +3833.390000 +3834.800000 +3836.210000 +3837.620000 +3839.030000 +3840.440000 +3841.850000 +3843.260000 +3844.680000 +3846.090000 +3847.500000 +3848.920000 +3850.330000 +3851.740000 +3853.160000 +3854.580000 +3855.990000 +3857.410000 +3858.830000 +3860.240000 +3861.660000 +3863.080000 +3864.500000 +3865.920000 +3867.340000 +3868.760000 +3870.190000 +3871.610000 +3873.030000 +3874.450000 +3875.880000 +3877.300000 +3878.730000 +3880.150000 +3881.580000 +3883.010000 +3884.430000 +3885.860000 +3887.290000 +3888.720000 +3890.150000 +3891.580000 +3893.010000 +3894.440000 +3895.870000 +3897.300000 +3898.740000 +3900.170000 +3901.600000 +3903.040000 +3904.470000 +3905.910000 +3907.340000 +3908.780000 +3910.220000 +3911.660000 +3913.090000 +3914.530000 +3915.970000 +3917.410000 +3918.850000 +3920.290000 +3921.730000 +3923.180000 +3924.620000 +3926.060000 +3927.510000 +3928.950000 +3930.400000 +3931.840000 +3933.290000 +3934.730000 +3936.180000 +3937.630000 +3939.080000 +3940.530000 +3941.980000 +3943.430000 +3944.880000 +3946.330000 +3947.780000 +3949.230000 +3950.680000 +3952.140000 +3953.590000 +3955.050000 +3956.500000 +3957.960000 +3959.410000 +3960.870000 +3962.330000 +3963.790000 +3965.240000 +3966.700000 +3968.160000 +3969.620000 +3971.080000 +3972.540000 +3974.010000 +3975.470000 +3976.930000 +3978.400000 +3979.860000 +3981.330000 +3982.790000 +3984.260000 +3985.720000 +3987.190000 +3988.660000 +3990.130000 +3991.600000 +3993.070000 +3994.540000 +3996.010000 +3997.480000 +3998.950000 +4000.420000 +4001.900000 +4003.370000 +4004.840000 +4006.320000 +4007.790000 +4009.270000 +4010.750000 +4012.220000 +4013.700000 +4015.180000 +4016.660000 +4018.140000 +4019.620000 +4021.100000 +4022.580000 +4024.060000 +4025.540000 +4027.030000 +4028.510000 +4030.000000 +4031.480000 +4032.970000 +4034.450000 +4035.940000 +4037.430000 +4038.910000 +4040.400000 +4041.890000 +4043.380000 +4044.870000 +4046.360000 +4047.850000 +4049.350000 +4050.840000 +4052.330000 +4053.830000 +4055.320000 +4056.820000 +4058.310000 +4059.810000 +4061.300000 +4062.800000 +4064.300000 +4065.800000 +4067.300000 +4068.800000 +4070.300000 +4071.800000 +4073.300000 +4074.800000 +4076.310000 +4077.810000 +4079.320000 +4080.820000 +4082.330000 +4083.830000 +4085.340000 +4086.850000 +4088.350000 +4089.860000 +4091.370000 +4092.880000 +4094.390000 +4095.900000 +4097.410000 +4098.930000 +4100.440000 +4101.950000 +4103.470000 +4104.980000 +4106.500000 +4108.010000 +4109.530000 +4111.050000 +4112.570000 +4114.080000 +4115.600000 +4117.120000 +4118.640000 +4120.160000 +4121.690000 +4123.210000 +4124.730000 +4126.250000 +4127.780000 +4129.300000 +4130.830000 +4132.350000 +4133.880000 +4135.410000 +4136.940000 +4138.470000 +4140.000000 +4141.530000 +4143.060000 +4144.590000 +4146.120000 +4147.650000 +4149.180000 +4150.720000 +4152.250000 +4153.790000 +4155.320000 +4156.860000 +4158.400000 +4159.930000 +4161.470000 +4163.010000 +4164.550000 +4166.090000 +4167.630000 +4169.170000 +4170.710000 +4172.260000 +4173.800000 +4175.340000 +4176.890000 +4178.430000 +4179.980000 +4181.530000 +4183.070000 +4184.620000 +4186.170000 +4187.720000 +4189.270000 +4190.820000 +4192.370000 +4193.920000 +4195.470000 +4197.030000 +4198.580000 +4200.140000 +4201.690000 +4203.250000 +4204.800000 +4206.360000 +4207.920000 +4209.480000 +4211.030000 +4212.590000 +4214.150000 +4215.720000 +4217.280000 +4218.840000 +4220.400000 +4221.970000 +4223.530000 +4225.100000 +4226.660000 +4228.230000 +4229.790000 +4231.360000 +4232.930000 +4234.500000 +4236.070000 +4237.640000 +4239.210000 +4240.780000 +4242.350000 +4243.930000 +4245.500000 +4247.070000 +4248.650000 +4250.220000 +4251.800000 +4253.380000 +4254.960000 +4256.530000 +4258.110000 +4259.690000 +4261.270000 +4262.850000 +4264.440000 +4266.020000 +4267.600000 +4269.190000 +4270.770000 +4272.350000 +4273.940000 +4275.530000 +4277.110000 +4278.700000 +4280.290000 +4281.880000 +4283.470000 +4285.060000 +4286.650000 +4288.240000 +4289.840000 +4291.430000 +4293.020000 +4294.620000 +4296.210000 +4297.810000 +4299.410000 +4301.000000 +4302.600000 +4304.200000 +4305.800000 +4307.400000 +4309.000000 +4310.600000 +4312.210000 +4313.810000 +4315.410000 +4317.020000 +4318.620000 +4320.230000 +4321.830000 +4323.440000 +4325.050000 +4326.660000 +4328.270000 +4329.880000 +4331.490000 +4333.100000 +4334.710000 +4336.320000 +4337.940000 +4339.550000 +4341.170000 +4342.780000 +4344.400000 +4346.010000 +4347.630000 +4349.250000 +4350.870000 +4352.490000 +4354.110000 +4355.730000 +4357.350000 +4358.980000 +4360.600000 +4362.220000 +4363.850000 +4365.470000 +4367.100000 +4368.730000 +4370.360000 +4371.980000 +4373.610000 +4375.240000 +4376.870000 +4378.500000 +4380.140000 +4381.770000 +4383.400000 +4385.040000 +4386.670000 +4388.310000 +4389.940000 +4391.580000 +4393.220000 +4394.860000 +4396.500000 +4398.140000 +4399.780000 +4401.420000 +4403.060000 +4404.700000 +4406.350000 +4407.990000 +4409.640000 +4411.280000 +4412.930000 +4414.570000 +4416.220000 +4417.870000 +4419.520000 +4421.170000 +4422.820000 +4424.470000 +4426.130000 +4427.780000 +4429.430000 +4431.090000 +4432.740000 +4434.400000 +4436.050000 +4437.710000 +4439.370000 +4441.030000 +4442.690000 +4444.350000 +4446.010000 +4447.670000 +4449.330000 +4451.000000 +4452.660000 +4454.330000 +4455.990000 +4457.660000 +4459.330000 +4460.990000 +4462.660000 +4464.330000 +4466.000000 +4467.670000 +4469.340000 +4471.020000 +4472.690000 +4474.360000 +4476.040000 +4477.710000 +4479.390000 +4481.070000 +4482.740000 +4484.420000 +4486.100000 +4487.780000 +4489.460000 +4491.140000 +4492.830000 +4494.510000 +4496.190000 +4497.880000 +4499.560000 +4501.250000 +4502.930000 +4504.620000 +4506.310000 +4508.000000 +4509.690000 +4511.380000 +4513.070000 +4514.760000 +4516.460000 +4518.150000 +4519.840000 +4521.540000 +4523.230000 +4524.930000 +4526.630000 +4528.330000 +4530.030000 +4531.730000 +4533.430000 +4535.130000 +4536.830000 +4538.530000 +4540.240000 +4541.940000 +4543.650000 +4545.350000 +4547.060000 +4548.770000 +4550.470000 +4552.180000 +4553.890000 +4555.600000 +4557.310000 +4559.030000 +4560.740000 +4562.450000 +4564.170000 +4565.880000 +4567.600000 +4569.320000 +4571.030000 +4572.750000 +4574.470000 +4576.190000 +4577.910000 +4579.630000 +4581.350000 +4583.080000 +4584.800000 +4586.530000 +4588.250000 +4589.980000 +4591.700000 +4593.430000 +4595.160000 +4596.890000 +4598.620000 +4600.350000 +4602.080000 +4603.820000 +4605.550000 +4607.280000 +4609.020000 +4610.760000 +4612.490000 +4614.230000 +4615.970000 +4617.710000 +4619.450000 +4621.190000 +4622.930000 +4624.670000 +4626.410000 +4628.160000 diff --git a/omegapy/omega_routines/mtf120315_25.dat b/omegapy/OMEGA_dataref/mtf120315_25.dat similarity index 100% rename from omegapy/omega_routines/mtf120315_25.dat rename to omegapy/OMEGA_dataref/mtf120315_25.dat diff --git a/omegapy/omega_routines/mtf120315_50.dat b/omegapy/OMEGA_dataref/mtf120315_50.dat similarity index 100% rename from omegapy/omega_routines/mtf120315_50.dat rename to omegapy/OMEGA_dataref/mtf120315_50.dat diff --git a/omegapy/omega_routines/rapcur_25.dat b/omegapy/OMEGA_dataref/rapcur_25.dat similarity index 100% rename from omegapy/omega_routines/rapcur_25.dat rename to omegapy/OMEGA_dataref/rapcur_25.dat diff --git a/omegapy/omega_routines/rapcur_50.dat b/omegapy/OMEGA_dataref/rapcur_50.dat similarity index 100% rename from omegapy/omega_routines/rapcur_50.dat rename to omegapy/OMEGA_dataref/rapcur_50.dat diff --git a/omegapy/omega_routines/rapmtflcur.bin b/omegapy/OMEGA_dataref/rapmtflcur.bin similarity index 100% rename from omegapy/omega_routines/rapmtflcur.bin rename to omegapy/OMEGA_dataref/rapmtflcur.bin diff --git a/omegapy/omega_routines/specsol_0403.dat b/omegapy/OMEGA_dataref/specsol_0403.dat similarity index 100% rename from omegapy/omega_routines/specsol_0403.dat rename to omegapy/OMEGA_dataref/specsol_0403.dat diff --git a/omegapy/omega_data.py b/omegapy/omega_data.py index 9c5b66a..c176aba 100644 --- a/omegapy/omega_data.py +++ b/omegapy/omega_data.py @@ -3,11 +3,10 @@ ## omega_data.py ## Created by Aurélien STCHERBININE -## Last modified by Aurélien STCHERBININE : 13/05/2020 +## Last modified by Aurélien STCHERBININE : 07/10/2020 ##---------------------------------------------------------------------------------------- -"""Importation of OMEGA observations in the OMEGAdata class. -Using IDL routines containing in omegapy/omega_routines/. +"""Importation and correction of OMEGA/MEx observations from binaries files. """ ##---------------------------------------------------------------------------------------- ##---------------------------------------------------------------------------------------- @@ -16,11 +15,12 @@ import numpy as np from copy import deepcopy from tqdm import tqdm -import pidly import scipy.constants as const from scipy.optimize import curve_fit from scipy.optimize import minimize from scipy.io import readsav +from scipy import interpolate +from scipy import ndimage import datetime import pickle import os @@ -28,16 +28,16 @@ import pandas as pd import multiprocessing as mp import itertools +import ctypes # Local from . import useful_functions as uf # Name of the current file _py_file = 'omega_data.py' -_Version = 1.4 +_Version = 2.0 # Path of the package files package_path = os.path.abspath(os.path.dirname(__file__)) -omega_routines_path = os.path.join(package_path, 'omega_routines') # Path of the directory containing the OMEGA binary files (.QUB and .NAV) _omega_bin_path = os.getenv('OMEGA_BIN_PATH', default='/data2/opt/geomeg/data/product/') # Path of the directory containing the OMEGA python-made files @@ -48,11 +48,674 @@ if os.getenv('OMEGA_PY_PATH') is None: print("\033[33mWarning: $OMEGA_PY_PATH not defined, set to '/data/mex-omegj/data1/omega_python/omegapy/' by default.\033[0m") +##----------------------------------------------------------------------------------- +## Fonctions internes privées pour importation données OMEGAdata +def _read_header(filename): + """Lecture du header d'un fichier .NAV ou .QUB d'une observation OMEGA/MEx + (format PDS). -##---------------------------------------------------------------------------------------- -## Class OMEGAdata - Importation of OMEGA data cubes + Parameters + ========== + filename : str + The path of the target file. + + Returns + ======= + header_dict : dict + The data contained in the header. + type : {'keyword' : 'value', ...} + """ + # Initialisation + nav_file = open(filename, 'rb') + header_dict = {} + ktemp = '' + # lecture du header ligne par ligne + for line in nav_file: + lined = line.decode('utf8').replace('\r\n', '') # décodage en UTF-8 + i_eq = lined.find('=') + if i_eq != -1: # Cas "keyword = value" + keyword = lined[:i_eq].replace(' ', '') # keyword : retrait espaces + value = lined[i_eq+2:].lstrip() # valeur : retrait espaces après le '=' + header_dict[keyword] = value + ktemp = keyword + elif (lined == '') or (lined[:2] == '/*'): # ligne vide ou commentaire + continue + elif lined == 'END': # fin header + break + else: # description sur plusieurs lignes + header_dict[ktemp] += lined.lstrip() + # Fermeture du fichier + nav_file.close() + # Uniformisation des clés + keys = header_dict.keys() + if not 'SPACECRAFT_POINTING_MODE' in keys: + if 'SC_POINTING_MODE' in keys: + header_dict['SPACECRAFT_POINTING_MODE'] = deepcopy(header_dict['SC_POINTING_MODE']) + del header_dict['SC_POINTING_MODE'] + elif 'SPACECRACRAFT_POINTING_MODE' in keys: + header_dict['SPACECRAFT_POINTING_MODE'] = deepcopy(header_dict['SPACECRACRAFT_POINTING_MODE']) + del header_dict['SPACECRACRAFT_POINTING_MODE'] + else: + header_dict['SPACECRAFT_POINTING_MODE'] = '"N/A"' + if header_dict['SPACECRAFT_POINTING_MODE'] == '"UNK"': + header_dict['SPACECRAFT_POINTING_MODE'] = '"UNKNOWN"' + # Sortie + return header_dict + +def _compute_local_time(lon, subsol_lon): + """Compute the local time at each point of an OMEGA observation. + + Parameters + ========== + lon : 2D array + The longitude of each pixel (deg). + subsol_lon : float + The longitude of the sub-solar point at observation time. + + Returns + ======= + loct : 2D array of floats + The array of the local time for each pixel of the observation. + """ + # Initialisation + loct = -np.ones(lon.shape) + # Note : sub_solar_longitude = longitude du midi au moment de l'orbite + # Calcul écart au point sub-solaire + delta_lon = subsol_lon - lon # en longitude + delta_loct = np.abs(delta_lon * 12/180) # conversion en heure + mask0 = (delta_loct > 12) + delta_loct[mask0] = 24 - delta_loct[mask0] # écart à midi < 12h (en absolu) + # Calcul heure locale en chaque point + mask = (delta_lon > 180) | ((delta_lon < 0) & (delta_lon > -180)) + loct[mask] = 12 + delta_loct[mask] # Aprem -> on rajoute des heures + loct[mask==False] = 12 - delta_loct[mask==False] # Matin -> on retire des heures + # Output + return loct + +def _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 + ========== + dt : datetime.datetime + The UTC datetime object. + + Returns + ======= + my : int + The corresponding Martian Year. + """ + datetime_my1 = datetime.datetime(1955, 4, 11) # Start MY 1 + my_sol_duration = 668.6 # Nb of Martian sols during a MY + sol_sec_duration = 88775.245 # Duration of a sol in seconds + my = int( (dt - datetime_my1).total_seconds() // (my_sol_duration * sol_sec_duration)) + 1 + return my + +def _read_cube(filename_qub, disp=True): + """Python implementation of the `readcube.pro` routine from the SOFT09 OMEGA pipeline. + Extract and return the binary data from an OMEGA/MEx .QUB file. + + Parameters + ========== + filename_qub : str + The path to the .QUB file. + disp : bool, optional (default True) + Enable or disable the display of informations during the file reading. + | True -> Enable display. + + Returns + ======= + idat : 3D ndarray + + sdat0 : 2D ndarray + + sdat1 : 3D ndarray + + info : 1D ndarray + + """ + # Initialisation + info = np.zeros(6) + # Lecture header + hd_qub = _read_header(filename_qub) + test = int.from_bytes(str.encode(hd_qub['COMMAND_DESC'][34]), byteorder='big') - 48 + if test > 9: + test -= 7 + flagc = np.zeros(3, dtype=np.int64) + if test // 8: + flagc[2] = 1 + if (test // 4) and 1: + flagc[1] = 1 + if (test // 2) and 1: + flagc[0] = 1 + lrec = np.int64(hd_qub['RECORD_BYTES']) + dqual = np.float64(hd_qub['DATA_QUALITY_ID']) + info[5] = dqual + 0.001 + nrec = np.int64(hd_qub['LABEL_RECORDS']) + # ^IMAGE ? (nrec + nax) ? + tps_exp = np.array(hd_qub['EXPOSURE_DURATION'][1:14].split(','), dtype=np.float64) + info[:3] = tps_exp * flagc + info[3] = np.int64(hd_qub['DOWNTRACK_SUMMING']) + info[4] = np.float64(hd_qub['INST_CMPRS_RATE']) + npixel, npara, nscan = np.array(hd_qub['CORE_ITEMS'][1:-1].split(','), dtype=np.int64) + cbyte = np.int64(hd_qub['CORE_ITEM_BYTES']) + sax0, sax1, sax2 = np.array(hd_qub['SUFFIX_ITEMS'][1:6].split(','), dtype=np.int64) + sbyte = np.int64(hd_qub['SUFFIX_BYTES']) + # print infos + if disp: + print('core: {0:>8d}{1:>8d}{2:>8d} cbyte:{3:>8d}'.format(npixel, npara, nscan, cbyte)) + print('suffix: {0:>8d}{1:>8d}{2:>8d} sbyte:{3:>8d}'.format(sax0, sax1, sax2, sbyte)) + #---------------------------- + # Lecture données cube + # nscan + # |-- npara + npixel x sax1 (int 32bits) + # |-- npixel (int 16bits) + 1 (int 32 bits) + class F_line(ctypes.Structure): + _fields_ = [('C_line', ctypes.c_int16 * npixel), ('S_line', ctypes.c_int32)] + + class SS_line(ctypes.Structure): + _fields_ = [('SS_line', ctypes.c_int32 * npixel)] + + class F_frame(ctypes.Structure): + _fields_ = [('F_line', F_line * npara), ('SS_frame', SS_line * sax1)] + + class F_Qube(ctypes.Structure): + _fields_ = [('F_frame', F_frame * nscan)] + + fqube = F_Qube() + skip = lrec * nrec # taille header (en bytes) + with open(filename_qub, 'rb') as cube_file: + data_hd = cube_file.read(skip) # bytes header + data_qub = cube_file.readinto(fqube) # bytes data + + idat = np.ndarray((nscan, npara, npixel), np.int32) + sdat0 = np.ndarray((nscan, npara), np.int32) + sdat1 = np.ndarray((nscan, sax1, npixel), np.int32) + + fqube2 = np.ctypeslib.as_array(fqube.F_frame) + idat[:,:,:] = fqube2['F_line']['C_line'] + sdat0[:,:] = fqube2['F_line']['S_line'] + if sax1 > 0: + sdat1[:,:,:] = fqube2['SS_frame']['SS_line'] + # On remet dans le même ordre que readomega + # idat : (npixel, npara, nscan) + # sdat0: (sax0, npara, nscan) = (npara, nscan) + # sdat1: (npixel, sax1, nscan) + idat = np.swapaxes(idat, 0, 2) + sdat0 = np.transpose(sdat0) + sdat1 = np.swapaxes(sdat1, 0, 2) + return idat, sdat0, sdat1, info + +class CubeError(Exception): + """Exception raised if encounter an issue when reading the OMEGA/MEx cube + binaries data. + """ + def __init__(self, message): + self.message = message + +def _readomega(cube_id, disp=True, corrV=True, corrL=True): + """Python implementation of the `readomega.pro` routine from the SOFT09 OMEGA pipeline. + + Parameters + ========== + cube_id : str + The observation ID (format XXXX_X). + disp : bool, optional (default True) + Enable or disable the display of informations during the file reading. + | True -> Enable display. + corrV : bool, optional (default True) + If True, compute the correction on the visible channel (Vis). + corrL : bool, optional (default True) + If True, compute the correction on the long-IR channel (L). + + Returns + ======= + out_data : dict + {'ldat', 'jdat', 'wvl', 'ic', 'specmars'} + out_geom : dict + {'latitude', 'longitude', 'emergence', 'incidence', 'altitude', 'ut_time', + 'temperature, 'saturation_C', 'saturation_vis', 'lat_grid', 'lon_grid'} + """ + # Filename + nomgeo0 = cube_id + '.NAV' + nomfic0 = cube_id + '.QUB' + nomfic = os.path.join(_omega_bin_path, nomfic0) + nomgeo = os.path.join(_omega_bin_path, nomgeo0) + print('\n\033[1mComputing OMEGA observation {0:s}\033[0m'.format(cube_id)) + # Orbit number in base 10 + orbnum = int.from_bytes(str.encode(nomfic0[3]), byteorder='big') - 48 + if orbnum > 9: + orbnum -= 7 + orbnum = 1000 * orbnum + int(nomfic0[4:7]) + # Read cube data + idat, sdat0, sdat1, info = _read_cube(nomfic, disp) + # Stop if only one line in the cube + if (len(idat.shape) != 3) or (len(idat) == 1): + raise CubeError('Only one line in cube {0:s}'.format(nomfic0)) + # Extract data from info array + exposure = info[0:3] + summation = info[3] + bits_per_data = info[4] + data_quality = int(info[5]) + + #-------------------------- + # Test presence geometry cube + if not os.path.exists(nomgeo): + raise CubeError('No corresponding NAV cube {0:s}'.format(nomgeo0)) + + #-------------------------- + # Data from the geometry file + #-------------------------- + # Data from the .NAV header + #-------------------------- + hd_nav = _read_header(nomgeo) + npixel, npara, nscan = np.array(hd_nav['CORE_ITEMS'][1:-1].split(','), dtype=np.int64) + lrec = np.int64(hd_nav['RECORD_BYTES']) + nrec = np.int64(hd_nav['LABEL_RECORDS']) + try: + nau = np.int64(np.float64(hd_nav['SOLAR_DISTANCE']) / 14960) + except KeyError: + nau = 15000 + print('\033[1;33mNo Solar distance -> 1.5 AU\033[0m') + #-------------------------- + # > Lien dossier à adapter + specmars = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'specsol_0403.dat')) # Spectre solaire Terre + dmars = nau*1e-4 + specmars /= dmars**2 # Spectre solaire au niveau de Mars + #-------------------------- + # Lecture géometrie + class F_line_nav(ctypes.Structure): + _fields_ = [('C_line', ctypes.c_int32 * npixel)] + + class F_frame_nav(ctypes.Structure): + _fields_ = [('F_line', F_line_nav * npara)] + + class F_Qube_nav(ctypes.Structure): + _fields_ = [('F_frame', F_frame_nav * nscan)] + + fqube_nav = F_Qube_nav() + skip = lrec * nrec # taille header (en bytes) + geocube = np.ndarray((nscan, npara, npixel), np.int32) + with open(nomgeo, 'rb') as nav_cube: + data_hd = nav_cube.read(skip) # bytes header + data_qub = nav_cube.readinto(fqube_nav) # bytes data + + fqube_nav2 = np.ctypeslib.as_array(fqube_nav.F_frame) + geocube[:,:,:] = fqube_nav2['F_line']['C_line'] + # On remet dans le même sens que readomega + geocube = np.swapaxes(geocube, 0, 2) + + trans = np.pi / 180 * 1e-4 + # extraction données + ecl = np.cos(geocube[:, 2, :] * trans) + longitude = geocube[:, 6, :] * 1e-4 + latitude = geocube[:, 7, :] * 1e-4 + altitude = geocube[:, 12, :] * 1e-3 + emergence = geocube[:, 3, :] * 1e-4 + incidence = geocube[:, 2, :] * 1e-4 + ut_time = geocube[:, 1, :] + lon_grid = np.swapaxes(geocube[:, 13:17, :], 1, 2) * 1e-4 + lat_grid = np.swapaxes(geocube[:, 17:21, :], 1, 2) * 1e-4 + + #-------------------------- + # Preliminary pipeline tool + #-------------------------- + npix, _, nbal = idat.shape + + fond2 = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'fond2.dat'), dtype=int) + if exposure[1] > 4: + fond2 *= 2 + fondcur = np.transpose(fond2[128:] * np.ones((nbal, 128))) + + # Init jdat + jdat = deepcopy(idat).astype(np.float64) + idat_leq1 = np.where(idat <= 1) + jdat[idat_leq1] = 1e-5 + # Nombre pixels à 0 IR + pix0IR = len(np.where(idat[:, 0:256, :] <= 0)[0]) + if disp: + print(' 0 or less IR: {:>8d}'.format(pix0IR)) + + hkmin = np.min(sdat1[14, 1, :]) + if hkmin < 6: + hkmin = 6 + indj = np.where(sdat1[14, 1, :] >= hkmin)[0] + i6 = indj[0] + indj = np.where(sdat1[14, 1, :] >= hkmin+1)[0] + balHK = indj[0] - i6 + indi = np.where((sdat1[14, 1, :] >= 6) & (sdat0[10, :] >= 100))[0] + balsm = balHK*8 + + if (balHK > 0) and (nbal > indi[0]+balsm): + ndeb = indi[0] + nf = len(indi) - 1 + nfin = indi[nf] + if sdat0[26, nbal-1] < 20: + sdat0[:, nbal-1] = sdat0[:, nbal-2] + for k in range(256): + b = sdat0[k, indi].astype(np.float64) + a = np.concatenate([ + 2*b[0] - b[:balsm][::-1], b, 2*b[nf] - b[nf-balsm+1:] ]) + c = ndimage.uniform_filter(a, balsm, mode='nearest')[balsm:balsm+nf+1] + tck = interpolate.splrep(indi, c, k=3) # Cubic spline interpolation + d = (interpolate.splev(ndeb + np.arange(nbal-ndeb), tck) + - sdat0[k, ndeb:nbal]) + jdat[:, k, ndeb:nbal] += d + + jdat[:, 128:256, :] -= fondcur + # Valeur min jdat = 1e-5 (pas 0) + jdat_eq0 = np.where(jdat < 1e-5) + jdat[jdat_eq0] = 1e-5 + # Normalisation sommation + if summation != 1: + jdat /= summation + # Correction linéarité voie C + linearC = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'linearC.dat')) + jdat[:, 0:128, :] = linearC[(jdat[:, 0:128, :] + 0.5).astype(int)] + # Correspondance longueur d'onde + wvl = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'lambda_0403.dat')) + # Importation fichiers + bound = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'boundcur.dat'), unpack=True) + if exposure[1] < 4: + mtf = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'mtf120315_25.dat')) + rap = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'rapcur_25.dat'), unpack=True) + else: + mtf = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'mtf120315_50.dat')) + rap = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'rapcur_50.dat'), unpack=True) + ib0 = np.where(orbnum > bound[0, :])[0] + mtf[ib0] *= rap[0, ib0] + ib1 = np.where(orbnum > bound[1, :])[0] + mtf[ib1] *= rap[1, ib1] + ib2 = np.where(orbnum > bound[2, :])[0] + mtf[ib2] *= rap[2, ib2] + + #-------------------------- + # Correction voie L + #-------------------------- + if corrL: + orbmax = int(os.path.getsize(os.path.join(package_path, 'OMEGA_dataref', 'rapmtflcur.bin')) / 512 - 1) + orbcur = deepcopy(orbnum) + if orbcur > orbmax: + orbcur = orbmax + print("\033[1;33mWarning: L channel corrected as for orbit {:d}\033[0m".format(orbcur)) + offs = 512 * orbcur + + class Rapmtflcur(ctypes.Structure): + _fields_ = [('line', ctypes.c_float * 128)] + + raplb = Rapmtflcur() + with open(os.path.join(package_path, 'OMEGA_dataref', 'rapmtflcur.bin'), 'rb') as rapmtf_file: + _ = rapmtf_file.read(offs) + nbytes = rapmtf_file.readinto(raplb) + rapl = np.ctypeslib.as_array(raplb.line) + mtf[128:256] *= rapl + + if exposure[1] > 5: + mtf[0:256] *= (exposure[1] / 5) + jdat_tmp = np.swapaxes(jdat, 1, 2) # Réordonnement axes pour calcul + jdat_tmp[:, :, :256] /= mtf[:256] + jdat = np.swapaxes(jdat_tmp, 1, 2) # On remet dans le bon ordre + + ic = np.where(mtf < 10000)[0] + + #-------------------------- + # Correction voie Vis + #-------------------------- + if corrV: + #-------------------------- + # Bit error correction + #-------------------------- + vis = idat[:, 256:, :].astype(np.float64) + pixels, _, lines = idat.shape + exptime = info[2] / 1000 + + if pixels == 128: + level = info[3] * 4095 * 2 + else: + level = 4095 * info[3] + # VIS -> pixels négatifs + i_vis_neg = np.where(vis <= 0) + counter_neg = len(i_vis_neg[0]) + vis[i_vis_neg] = 0.001 + # VIS -> pixels supérieurs à valeur max + i_vis_pos = np.where(vis > level) + counter_pos = len(i_vis_pos[0]) + vis[i_vis_pos] = level + # VIS -> pixels saturés + i_vis_sat = np.where((vis <= level) & (vis > (0.8*level))) + counter_sat = len(i_vis_sat[0]) + vis[i_vis_sat] = 0.8 * level + # VIS -> spikes + plan3 = deepcopy(vis[:, 3, :]) + i_spike3 = np.where(plan3 > (0.5 * (vis[:, 2, :] + vis[:, 3, :]) + 50)) + counter_spike3 = len(i_spike3[0]) + plan3[i_spike3] = 0.5 * (vis[:, 2, :] + vis[:, 3, :])[i_spike3] + vis[:, 3, :] = plan3 + counter_spikes = 0 + # Despiking si plus de 10 lignes + if lines >= 10: + # Version python avec filtre sur le cube en une fois + # Note : on retire les 3 points extrêmes qui ne sont pas pris en compte avec IDL + median_lines = ndimage.median_filter(vis, size=(1,1,7), mode='nearest') + i_spikes = np.where(np.abs(median_lines[:,:,3:-3] - vis[:,:,3:-3]) > 200) + counter_spikes = len(i_spikes[0]) + vis[:,:,3:-3][i_spikes] = median_lines[:,:,3:-3][i_spikes] + + if disp: + print(' negative pixels VIS: {:>8d}'.format(counter_neg)) + print('anomalous pixels VIS: {:>8d}'.format(counter_pos)) + print('saturated pixels VIS: {:>8d}'.format(counter_sat)) + print(' spikes VIS: {:>8d}'.format(counter_spikes)) + + #-------------------------- + # Bias correction + #-------------------------- + percen = 3.4e-6 + fper = 0 + pend = 5 + if pixels == 128: + fper = 1 + elif pixels == 64: + fper = 2 + elif pixels == 32: + fper = 4 + elif pixels == 16: + fper = 8 + + lv = wvl[256:] + xa, xb = lv[0], lv[95] + ya, yb = (percen*fper), (percen*fper + (percen*fper)/100*pend) + a = (yb - ya) / (xb - xa) + b = ya - a*xa + Strl_nc = lv * a + b + # Dimensions Strl_nc : (96) -> (96, 596) pour calcul en tableaux + Strl_nc = np.repeat(np.array([Strl_nc]), lines, axis=0).T + + strL2 = np.sum(vis, axis=0) + strL1 = np.sum(vis, axis=(0,1)) + + vis = (vis - 50*strL2*percen*fper) - 0.75*strL1*Strl_nc + + #-------------------------- + # Smear correction + #-------------------------- + bands = 96 + # Correction for the CCD cleaning time + ft = 0.87 + time_int = info[2] - ft + + # Check for saturation in the 90:95 channels + vis_tmp = np.swapaxes(vis, 0, 1) # Inversions axes pour calcul (lam, npix, nscan) + means = np.mean(vis_tmp[0:85], axis=0) + i_sat = np.where(vis_tmp[85:] > means) + vis_tmp[i_sat] = 0 + vis = np.swapaxes(vis_tmp, 0, 1) # On remet dans l'ordre + + # Smearing term + smear = np.ndarray(vis.shape, dtype=np.float64) + for i in range(bands): + smear[:, i, :] = np.sum(vis[:, i:, :], axis=1) * ft / time_int / bands + + vis -= smear + + #-------------------------- + # Flat cube + #-------------------------- + # Lecture fichier binaire flat + class FlatVisLine(ctypes.Structure): + _fields_ = [('Line', ctypes.c_uint32 * 128)] + + class FlatVisFrame(ctypes.Structure): + _fields_ = [('Frame', FlatVisLine * 96)] + + Sliceb = FlatVisFrame() + with open(os.path.join(package_path, 'OMEGA_dataref', 'flatVIS050701.bin'), 'rb') as flat_file: + nbytes = flat_file.readinto(Sliceb) + Slice = np.ctypeslib.as_array(Sliceb.Frame) + Slice = Slice['Line'].T + # Indices début / fin + istart = int((128 - pixels) / 2) + iend = int(istart + pixels) + # Inversion axes pour calcul + Slice_tmp = Slice.T + vis_tmp = np.swapaxes(vis, 0, 2) + # Correction + vis_tmp = vis_tmp * 2**15 / Slice_tmp[:, istart:iend] + # On remet dans l'ordre + vis = np.swapaxes(vis_tmp, 0, 2) + + #-------------------------- + # Radiometric calibration + #-------------------------- + f = 1 + if pixels == 128: + f = 2 # Internal summation + f2 = 1 + if exptime == 0.1: + f2 = 2 + elif exptime == 0.2: + f2 = 4 + #-------------------------- + def ordcorr(lam, sp): + """ + Parameters + ========== + lam : ndarray + VNIR wavelength in microns. + sp : ndarray + The spectrum to correct. + + Returns + ======= + I_corr : ndarray + The corrected spectrum. + """ + #_______________________________________________________________________ + # Assignment of the variable k[3, kn], from file Ceoff_II_96_ias.txt + # k[0, :] = spectral channels with the second order contamination + # k[1, :] = wavelengths correspondent to each spectral channel + # k[2, :] = values of the coefficients for each channel + nk = 17 # Total number of channels with the contamination + k = np.ndarray((3, nk)) + k[0] = np.arange(nk) + 79 + k[1] = np.array([952.100, 959.600, 967.000, 974.300, 981.700, 988.900, + 996.300, 1003.70, 1010.90, 1018.20, 1025.50, 1032.90, 1040.30, + 1047.94, 1055.34, 1062.52, 1069.87]) / 1000 + k[2] = np.array([0.00478825, 0.00764561, 0.0117481, 0.0186357, 0.0291402, + 0.0430787, 0.0561666, 0.0694787, 0.0831372, 0.0993437, 0.113755, + 0.124017, 0.123925, 0.118724, 0.110151, 0.106578, 0.106578]) + #_______________________________________________________________________ + # Formula : I_corr = I_raw-kII*I_1_raw + # I_corr = corrected final Intensity + # I_raw = raw spectrum measured by VNIR (initial intensity) + # KII = coefficients for the second order + # I_1_raw = raw intensity responsable of the second order contribution + I_raw = np.zeros(96) + I_1_raw = np.zeros(96) + kII = np.zeros(96) + I_corr = np.zeros(96) + #_______________________________________________________________________ + # Assignment of I_raw + # lam = deepcopy(wvl[256:352]) + I_raw = deepcopy(sp) + #_______________________________________________________________________ + # Assignment of I_1_raw + ch = k[0] # Spectral channels concerning the II ord + l2 = k[1] # Lambda of the II order + l1 = l2/2 # Lambda of the first order + nl = len(l1) + ch_start = 16 # First spectral channel of the first order wavelength + ch_end = 23 # Last spectral channel of the first order wavelength + # Cubic spline interpolation + spl = interpolate.InterpolatedUnivariateSpline(lam[ch_start:ch_end+1], I_raw[ch_start:ch_end+1], k=3) + I_1 = spl(l1) + I_1_raw[int(k[0, 0]):int(k[0, nl-1])+1] = I_1 + #_______________________________________________________________________ + # Assignment of kII + kII[int(k[0, 0]):int(k[0, nl-1])+1] = k[2] + #_______________________________________________________________________ + # Computation of I_corr + I_corr = I_raw - kII * I_1_raw + #_______________________________________________________________________ + # Output + return I_corr + #-------------------------- + for i in range(lines): + for m in range(pixels): + I_corr = ordcorr(wvl[256:352], vis[m, : , i]) + jdat[m, 256:352, i] = I_corr / (f2 * mtf[256:352] * f * summation) + + #-------------------------- + # Reflectance factor calculation + #-------------------------- + ldat = deepcopy(jdat) + for n in range(352): + ldat[:, n, :] = ldat[:, n, :] / (specmars[n] * ecl[:, :]) + albedo = deepcopy(ldat[:, 11, :]) + + #-------------------------- + # Saturation + #-------------------------- + # Voie C + saturation_c = sdat0[39, :] - (idat[:, 39, :] / summation) + # Voie visible + saturation_vis = idat[:, 299, :] / summation + # Temperature voie C + temperature = sdat1[0, 2, :] * 0.001 + + #-------------------------- + # Output data + #-------------------------- + out_data = { + 'ldat' : np.swapaxes(ldat, 0, 2), + 'jdat' : np.swapaxes(jdat, 0, 2), + 'wvl' : wvl, + 'ic' : ic, + 'specmars' : specmars + } + out_geom = { + 'latitude' : latitude.T, + 'longitude' : longitude.T, + 'emergence' : emergence.T, + 'incidence' : incidence.T, + 'altitude' : altitude.T, + 'ut_time' : ut_time.T, + 'temperature' : temperature, + 'saturation_c' : saturation_c.T, + 'saturation_vis': saturation_vis.T, + 'lat_grid' : np.moveaxis(lat_grid, [0,1,2], [1,0,2]), + 'lon_grid' : np.moveaxis(lon_grid, [0,1,2], [1,0,2]) + } + return out_data, out_geom + +##----------------------------------------------------------------------------------- +## Class OMEGAdata - Importation and 1st correction of OMEGA data cubes class OMEGAdata: - """Importation of OMEGA/MEx observation, using the readomega_vpy.pro IDL routine. + """Importation of OMEGA/MEx observation. Parameters ========== @@ -63,6 +726,10 @@ class OMEGAdata: data_path : str, optional (default _omega_py_path) The path of the directory containing the data (.QUB) and navigation (.NAV) files. + corrV : bool, optional (default True) + If True, compute the correction on the visible channel (Vis). + corrL : bool, optional (default True) + If True, compute the correction on the long-IR channel (L). Attributes ========== @@ -86,6 +753,8 @@ class OMEGAdata: The elevation of the pixel footprint center point (km). 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). inci : 2D array @@ -110,7 +779,7 @@ class OMEGAdata: Information about the saturation of the Vis-channel. summation : int The downtrack summing. - bits_per_data : int + 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 @@ -169,7 +838,7 @@ class OMEGAdata: Show in the OMEGAdata representation. """ - def __init__(self, obs='', empty=False, data_path=_omega_bin_path): + def __init__(self, obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True): # Infos self.version = _Version self.therm_corr = False @@ -194,6 +863,7 @@ def __init__(self, obs='', empty=False, data_path=_omega_bin_path): self.inci = np.array([[]]) self.specmars = np.array([]) self.utc = datetime.datetime.now() + self.my = _utc_to_my(self.utc) self.orbit = None self.surf_temp = np.array([[]]) self.ic = {'V' : np.arange(265, 333), @@ -228,41 +898,31 @@ def __init__(self, obs='', empty=False, data_path=_omega_bin_path): self.target = None else: - idl = pidly.IDL() - idl("cd, '{0:s}'".format(omega_routines_path)) obs_name = uf.myglob(os.path.join(data_path, '*' + obs + '*.QUB')) if obs_name is None: print("\033[1;33mAborted\033[0m") return None nomfic0 = obs_name[obs_name.rfind('/')+1:-4] # Récupération nom + décodage UTF-8 - idl("readomega_vpy, '{0}', ldat, jdat, wvl, ic, specmars, ".format(nomfic0) - + "latitude, longitude, emergence, incidence, altitude, solarlongi, ut_time, " - + "geocube, temperature, saturation_c, saturation_vis") + data_dict, geom_dict = _readomega(nomfic0, disp=True, corrV=corrV, corrL=corrL) print("\n\033[01;34mComputing data extraction and correction...\033[0m", end=' ') - # Extract values from the idl session - data_dict = idl.ev_list(['ldat', 'jdat', 'wvl', 'ic', 'specmars'], use_cache=True) + # Extract values ldat = data_dict['ldat'] jdat = data_dict['jdat'] wvl = data_dict['wvl'] ic = data_dict['ic'] specmars = data_dict['specmars'] - infos_dict = idl.ev_list(['latitude', 'longitude', 'emergence', 'incidence', - 'altitude', 'solarlongi', 'ut_time', 'geocube', - 'temperature', 'saturation_c', 'saturation_vis'], use_cache=True) - lat = infos_dict['latitude'] - lon = infos_dict['longitude'] - alt = infos_dict['altitude'] - emer = infos_dict['emergence'] - inci = infos_dict['incidence'] - ls = infos_dict['solarlongi'] - utc = infos_dict['ut_time'] - geocube = infos_dict['geocube'] - temperature = infos_dict['temperature'] - saturation_c = infos_dict['saturation_c'] - saturation_vis = infos_dict['saturation_vis'] - # Close the idl session - idl.close() + lat = geom_dict['latitude'] + lon = geom_dict['longitude'] + alt = geom_dict['altitude'] + emer = geom_dict['emergence'] + inci = geom_dict['incidence'] + utc = geom_dict['ut_time'] + temperature = geom_dict['temperature'] + saturation_c = geom_dict['saturation_c'] + saturation_vis = geom_dict['saturation_vis'] + lon_px = geom_dict['lon_grid'] + lat_px = geom_dict['lat_grid'] # Correction of OMEGA data (same as clean_spec.pro) ic_C= ic[(ic >= 8) & (ic <= 122)] # IR short (voie C) ic_L = ic[(ic >= 137) & (ic <= 255)] # IR long (voie L) @@ -279,21 +939,19 @@ def __init__(self, obs='', empty=False, data_path=_omega_bin_path): # Cube of reflectance factor I/F cube_rf = ldat[:, ic2, :] # Cube as [X, Y, lam] - cube_i2 = np.moveaxis(cube_i, [0,1,2], [0,2,1]) - cube_rf2 = np.moveaxis(cube_rf, [0,1,2], [0,2,1]) + cube_i2 = np.swapaxes(cube_i, 1, 2) + cube_rf2 = np.swapaxes(cube_rf, 1, 2) # Observation UTC date & time Y, M, D, h, m, s = np.average(utc[:,:6], axis=0).astype(np.int64) utc_dt = datetime.datetime(Y, M, D, h, m, s) # Longitude pixels grid ny, nx = lon.shape - lon_px = np.moveaxis(geocube[:,13:17,:], [0,1,2], [0,2,1]) * 1e-4 lon_grid = np.zeros((ny+1, nx+1)) lon_grid[1:,1:] = lon_px[:,:,0] lon_grid[1:,0] = lon_px[:,0,1] lon_grid[0,1:] = lon_px[0,:,3] lon_grid[0,0] = lon_px[0,0,2] # Longitude pixels grid - lat_px = np.moveaxis(geocube[:,17:21,:], [0,1,2], [0,2,1]) * 1e-4 lat_grid = np.zeros((ny+1, nx+1)) lat_grid[1:,1:] = lat_px[:,:,0] lat_grid[1:,0] = lat_px[:,0,1] @@ -305,7 +963,6 @@ def __init__(self, obs='', empty=False, data_path=_omega_bin_path): self.cube_rf = cube_rf2.astype(np.float64) self.lat = lat.astype(np.float64) self.lon = lon.astype(np.float64) - self.ls = ls.astype(np.float64) self.alt = alt.astype(np.float64) self.emer = emer.astype(np.float64) self.inci = inci.astype(np.float64) @@ -352,7 +1009,7 @@ def __init__(self, obs='', empty=False, data_path=_omega_bin_path): self.nscan = nscan self.point_mode = hd_nav['SPACECRAFT_POINTING_MODE'][1:-1] self.orient = np.array(hd_nav['SPACECRAFT_ORIENTATION'][1:-1].split(','), dtype=np.int64) - # self.ls = np.float64(hd_nav['SOLAR_LONGITUDE']) + self.ls = np.float64(hd_nav['SOLAR_LONGITUDE']) self.subsol_lon = np.float64(hd_nav['SUB_SOLAR_LONGITUDE']) self.subsol_lat = np.float64(hd_nav['SUB_SOLAR_LATITUDE']) self.min_lat = np.float64(hd_nav['MINIMUM_LATITUDE']) @@ -366,13 +1023,14 @@ def __init__(self, obs='', empty=False, data_path=_omega_bin_path): temp_init[:] = np.nan self.surf_temp = temp_init #-------------------------- - # Local time + # Local time & MY self.loct = _compute_local_time(self.lon, self.subsol_lon) + self.my = _utc_to_my(self.utc) #-------------------------- # Cube quality - OBC = readsav(os.path.join(package_path, 'OMEGA_dataref/OBC_OMEGA_OCT2017.sav')) + OBC = readsav(os.path.join(package_path, 'OMEGA_dataref', 'OBC_OMEGA_OCT2017.sav')) good_orbits_OBC = np.array(OBC['good_orbits'][0], dtype=int) - corrupted_orbits_csv = pd.read_csv(os.path.join(package_path, 'OMEGA_dataref/corrupted_obs.csv'), comment='#', + corrupted_orbits_csv = pd.read_csv(os.path.join(package_path, 'OMEGA_dataref', 'corrupted_obs.csv'), comment='#', skipinitialspace=True) corrupted_orbits = np.array(corrupted_orbits_csv['corrupted_obs'], dtype=str) corrupted_orbits_comments = np.array(corrupted_orbits_csv['comment'], dtype=str) @@ -403,6 +1061,7 @@ def __copy__(self): new_omega.lon = self.lon new_omega.alt = self.alt new_omega.loct = self.loct + new_omega.my = self.my new_omega.emer = self.emer new_omega.inci = self.inci new_omega.specmars = self.specmars @@ -460,6 +1119,7 @@ def __deepcopy__(self, memo): new_omega.lon = deepcopy(self.lon, memo) new_omega.alt = deepcopy(self.alt, memo) new_omega.loct = deepcopy(self.loct, memo) + new_omega.my = deepcopy(self.my, memo) new_omega.emer = deepcopy(self.emer, memo) new_omega.inci = deepcopy(self.inci, memo) new_omega.specmars = deepcopy(self.specmars, memo) @@ -508,6 +1168,7 @@ def __eq__(self, other): if isinstance(other, OMEGAdata): return ((self.name == other.name) and (self.ls == other.ls) and + (self.my == other.my) and (self.therm_corr == other.therm_corr) and (self.atm_corr == other.atm_corr) and (self.cube_rf == other.cube_rf).all()) @@ -516,114 +1177,30 @@ def __eq__(self, other): def __repr__(self): description = """ - OMEGA/MEx observation {0} - (v{1}) - - Cube quality : {2} - Thermal correction : {3} - Atmospheric correction : {4} - - \033[3m{5}\033[0m""".format(self.name, self.version, self.quality, self.therm_corr, - self.atm_corr, self.add_infos) - # Ajout Ls ? - # Ajout UTC ? (utc.strftime('%d-%m-%Y %H:%M')) - return description - -##---------------------------------------------------------------------------------------- -## Fonctions internes privées pour importation données OMEGAdata -def _read_header(filename): - """Lecture du header d'un fichier .NAV ou .QUB d'une observation OMEGA/MEx - (format PDS). - - Parameters - ========== - filename : str - The path of the target file. + OMEGA/MEx observation {0} – (v{1}) - Returns - ======= - header_dict : dict - The data contained in the header. - type : {'keyword' : 'value', ...} - """ - # Initialisation - nav_file = open(filename, 'rb') - header_dict = {} - ktemp = '' - # lecture du header ligne par ligne - for line in nav_file: - lined = line.decode('utf8').replace('\r\n', '') # décodage en UTF-8 - i_eq = lined.find('=') - if i_eq != -1: # Cas "keyword = value" - keyword = lined[:i_eq].replace(' ', '') # keyword : retrait espaces - value = lined[i_eq+2:].lstrip() # valeur : retrait espaces après le '=' - header_dict[keyword] = value - ktemp = keyword - elif (lined == '') or (lined[:2] == '/*'): # ligne vide ou commentaire - continue - elif lined == 'END': # fin header - break - else: # description sur plusieurs lignes - header_dict[ktemp] += lined.lstrip() - # Fermeture du fichier - nav_file.close() - # Uniformisation des clés - keys = header_dict.keys() - if not 'SPACECRAFT_POINTING_MODE' in keys: - if 'SC_POINTING_MODE' in keys: - header_dict['SPACECRAFT_POINTING_MODE'] = deepcopy(header_dict['SC_POINTING_MODE']) - del header_dict['SC_POINTING_MODE'] - elif 'SPACECRACRAFT_POINTING_MODE' in keys: - header_dict['SPACECRAFT_POINTING_MODE'] = deepcopy(header_dict['SPACECRACRAFT_POINTING_MODE']) - del header_dict['SPACECRACRAFT_POINTING_MODE'] - else: - header_dict['SPACECRAFT_POINTING_MODE'] = '"N/A"' - if header_dict['SPACECRAFT_POINTING_MODE'] == '"UNK"': - header_dict['SPACECRAFT_POINTING_MODE'] = '"UNKNOWN"' - # Sortie - return header_dict - -def _compute_local_time(lon, subsol_lon): - """Compute the local time at each point of an OMEGA observation. - - Parameters - ========== - lon : 2D array - The longitude of each pixel (deg). - subsol_lon : float - The longitude of the sub-solar point at observation time. + Ls = {2:.1f}° – MY {3:d} + + Cube quality : {4} + Thermal correction : {5} + Atmospheric correction : {6} - Returns - ======= - loct : 2D array of floats - The array of the local time for each pixel of the observation. - """ - # Initialisation - loct = -np.ones(lon.shape) - # Note : sub_solar_longitude = longitude du midi au moment de l'orbite - # Calcul écart au point sub-solaire - delta_lon = subsol_lon - lon # en longitude - delta_loct = np.abs(delta_lon * 12/180) # conversion en heure - mask0 = (delta_loct > 12) - delta_loct[mask0] = 24 - delta_loct[mask0] # écart à midi < 12h (en absolu) - # Calcul heure locale en chaque point - mask = (delta_lon > 180) | ((delta_lon < 0) & (delta_lon > -180)) - loct[mask] = 12 + delta_loct[mask] # Aprem -> on rajoute des heures - loct[mask==False] = 12 - delta_loct[mask==False] # Matin -> on retire des heures - # Output - return loct + \033[3m{7}\033[0m""".format(self.name, self.version, self.ls, self.my, self.data_quality, + self.therm_corr, self.atm_corr, self.add_infos) + return description -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Recherche observation -def find_cube(lat, lon, cmin=0, cmax=10000, out=False): +def find_cube(lon0, lat0, cmin=0, cmax=10000, out=False): """Display the available OMEGA/MEx cubes with observations of the target - latitude and longitude, using the IDL procedure `findcub.pro`. + latitude and longitude, Python translation of the IDL procedure `findcub.pro`. Parameters ========== - lat : float - The target latitude (in degrees). - lon : float + lon0 : float The target longitude (in degrees). + lat0 : float + The target latitude (in degrees). cmin : float, optional (default 0) The minimum orbit number. cmax : float, optional (default 10000) @@ -635,18 +1212,209 @@ def find_cube(lat, lon, cmin=0, cmax=10000, out=False): ======= cub_list : array-like List of matching observations. - Format : (orbit, x, y, dmin, altMEx, inci, emer, phas, Ls) + Format : (orbit, x, y, dmin, altMEx, inci, emer, phas, loct, Ls, MY) """ - idl = pidly.IDL() - idl("cd, '{0:s}'".format(omega_routines_path)) - idl.pro('findcub', lon, lat, cmin, cmax) - idl.close() + #----------------------------- + # Internal function testin + def testin(x0, y0, x1, y1): + """Internal function for find_cube: test if the point of coordinates + (x0, y0) is include in the (x1, y1) grid. + + Parameters + ========== + x0 : float + X-coordinate of the point. + y0 : float + Y-coordinate of the point. + x1 : 1D array + X-coordinates of the observation. + y1 : 1D array + Y-coordinates of the observations. + + Returns + ======= + res : bool + | True if the point (x0, y0) is in the observation grid. + | False if it's not. + """ + nb = len(x1) + x2 = np.concatenate([x1, [x1[0]]]) + y2 = np.concatenate([y1, [y1[0]]]) + dx = x2 - x0 + dy = y2 - y0 + atot = 0 + for n in range(nb): + ps = dx[n] * dx[n+1] + dy[n] * dy[n+1] + pv = dx[n] * dy[n+1] - dx[n+1] * dy[n] + atot = atot + np.arctan2(pv, ps) + if np.abs(atot) > 3: + return True + else: + return False + #----------------------------- + # Initialization + res_folder = os.path.join(package_path, 'res_findcube') + trans = np.pi / 180 + x0 = np.cos(lon0*trans) * np.cos(lat0*trans) + y0 = np.sin(lon0*trans) * np.cos(lat0*trans) + z0 = np.sin(lat0*trans) + + x1, y1 = np.zeros((2, 10)) + nomc = [] + + nomout = os.path.join(res_folder, 'orbites_lg{lon:.0f}lt{lat:.0f}.dat'.format(lon=lon0, lat=lat0)) + path_cubliste = os.path.join(res_folder, 'cubelist') + path_cubindex = os.path.join(package_path, 'OMEGA_dataref', 'cubindex.ref') + with open(path_cubliste, 'w') as f: + f.write('# long: {lon:7.3f} lat: {lat:7.3f}\n\n'.format(lon=lon0, lat=lat0)) + f.write('#{0:^9s} {1:^6s}{2:^6s}{3:^8s}{4:^9s}{5:^7s}{6:^8s}{7:^8s}{8:^8s}{9:^8s}{10:^4s}\n'.format( + 'orbit', 'x', 'y', 'dmin', 'altMEx', 'inci', 'emer', 'phas', 'loct', 'Ls', 'MY')) + with open(nomout, 'w') as f: + f.write('') + nhits = 0 + geocube = 0 + cubindex = open(path_cubindex, 'rb') + # Search for matching observations + # South pole + if lat0 <= -60: + for ncube in range(10000): + nomcube = cubindex.readline().decode('utf8').replace('\n', '') + norb = int(nomcube[3:7]) + if norb == 0: + break # End of file + lon1 = np.fromstring(cubindex.readline().decode('utf8').replace('\n', ''), sep=' ') + lat1 = np.fromstring(cubindex.readline().decode('utf8').replace('\n', ''), sep=' ') + if (norb < cmin) or (norb > cmax): + continue + if np.min(lat1) > -60: + continue + x1 = np.cos(lon1*trans) * np.cos(lat1*trans) + y1 = np.sin(lon1*trans) * np.cos(lat1*trans) + if testin(x0, y0, x1, y1): + nomc.append(nomcube) + nhits += 1 + # North pole + elif lat0 >= 60: + for ncube in range(10000): + nomcube = cubindex.readline().decode('utf8').replace('\n', '') + norb = int(nomcube[3:7]) + if norb == 0: + break # End of file + lon1 = np.fromstring(cubindex.readline().decode('utf8').replace('\n', ''), sep=' ') + lat1 = np.fromstring(cubindex.readline().decode('utf8').replace('\n', ''), sep=' ') + if (norb < cmin) or (norb > cmax): + continue + if np.max(lat1) < 60: + continue + x1 = np.cos(lon1*trans) * np.cos(lat1*trans) + y1 = np.sin(lon1*trans) * np.cos(lat1*trans) + if testin(x0, y0, x1, y1): + nomc.append(nomcube) + nhits += 1 + # Intermediate region + else: + for ncube in range(10000): + nomcube = cubindex.readline().decode('utf8').replace('\n', '') + norb = int(nomcube[3:7]) + if norb == 0: + break # End of file + lon1 = np.fromstring(cubindex.readline().decode('utf8').replace('\n', ''), sep=' ') + lat1 = np.fromstring(cubindex.readline().decode('utf8').replace('\n', ''), sep=' ') + if (norb < cmin) or (norb > cmax): + continue + x1 = np.cos(lon1*trans) * np.cos(lat1*trans) + y1 = np.sin(lon1*trans) * np.cos(lat1*trans) + z1 = np.sin(lat1*trans) + ps = x0*x1 + y0*y1 + z0*z1 + if np.max(pi) < 0.85: + continue + lon2 = lon1 - lon0 + i1 = np.where(lon2 < -180)[0] + if len(i1) > 0: + lon2[i1] += 360 + i2 = np.where(lon2 > 180)[0] + if len(i2) > 0: + lon2[i2] -= 360 + if testin(0, lat0, lon2, lat11): + nomc.append(nomcube) + nhits += 1 + cubindex.close() + # Find position & infos for each observation + print('{0:^10s} {1:^6s}{2:^6s}{3:^8s}{4:^9s}{5:^7s}{6:^8s}{7:^8s}{8:^8s}{9:^8s}{10:^4s}'.format( + 'orbit', 'x', 'y', 'dmin', 'altMEx', 'inci', 'emer', 'phas', 'loct', 'Ls', 'MY')) + for n in range(nhits): + testfile = os.path.join(_omega_bin_path, nomc[n]+'.NAV') + if os.path.exists(testfile) == False: + print('{0:8s}{1:s}'.format(nomc[n], '\033[3m No corresponding .NAV file\033[0m')) + continue + #-------------------------- + # Data from the geometry .NAV file + #-------------------------- + hd_nav = _read_header(testfile) + npixel, npara, nscan = np.array(hd_nav['CORE_ITEMS'][1:-1].split(','), dtype=np.int64) + lrec = np.int64(hd_nav['RECORD_BYTES']) + nrec = np.int64(hd_nav['LABEL_RECORDS']) + solong = np.float64(hd_nav['SOLAR_LONGITUDE']) + sslong = np.float64(hd_nav['SUB_SOLAR_LONGITUDE']) + #-------------------------- + # Lecture géometrie + class F_line_nav(ctypes.Structure): + _fields_ = [('C_line', ctypes.c_int32 * npixel)] + + class F_frame_nav(ctypes.Structure): + _fields_ = [('F_line', F_line_nav * npara)] + + class F_Qube_nav(ctypes.Structure): + _fields_ = [('F_frame', F_frame_nav * nscan)] + + fqube_nav = F_Qube_nav() + skip = lrec * nrec # taille header (en bytes) + geocube = np.ndarray((nscan, npara, npixel), np.int32) + with open(testfile, 'rb') as nav_cube: + data_hd = nav_cube.read(skip) # bytes header + data_qub = nav_cube.readinto(fqube_nav) # bytes data + + fqube_nav2 = np.ctypeslib.as_array(fqube_nav.F_frame) + geocube[:,:,:] = fqube_nav2['F_line']['C_line'] + # On remet dans le même sens que readomega + geocube = np.swapaxes(geocube, 0, 2) + #-------------------------- + longa = geocube[:, 6, :] * 1e-4 + lata = geocube[:, 7, :] * 1e-4 + xa = np.cos(longa*trans) * np.cos(lata*trans) + ya = np.sin(longa*trans) * np.cos(lata*trans) + za = np.sin(lata*trans) + xr = y0 * za - z0 * ya + yr = z0 * xa - x0 * za + zr = x0 * ya - y0 * xa + dist = np.sqrt(xr*xr + yr*yr + zr*zr) * 3393 + distmin = np.min(dist) + [i0], [j0] = np.where(dist == distmin) + inci = geocube[i0, 2, j0] * 1e-4 + emer = geocube[i0, 3, j0] * 1e-4 + phas = geocube[i0, 10, j0] * 1e-4 + slant = geocube[i0, 11, j0] * 1e-3 + alt = geocube[i0, 12, j0] * 1e-3 + Y, M, D, h, m, s = geocube[:6, 1, j0] + utc_dt = datetime.datetime(Y, M, D, h, m, s) + my = _utc_to_my(utc_dt) + loct = _compute_local_time(longa, sslong)[i0, j0] + obs_output = '{0:9s}{1:6d}{2:6d}{3:8.2f}{4:9.1f}{5:8.2f}{6:8.2f}{7:8.2f}{8:8.2f}{9:8.2f}{10:4d}'.format( + nomc[n], i0, j0, distmin, slant, inci, emer, phas, loct, solong, my) + print(obs_output) + + with open(path_cubliste, 'a') as f_cublist: + f_cublist.write('{0:9s}{1:6d}{2:6d}{3:8.2f}{4:9.1f}{5:8.2f}{6:8.2f}{7:8.2f}{8:8.2f}{9:8.2f}{10:4d}\n'.format( + nomc[n], i0, j0, distmin, slant, inci, emer, phas, loct, solong, my)) + with open(nomout, 'a') as f_listeobs: + f_listeobs.write('{0:s}\n'.format(nomc[n])) + # Output (if out==True) if out: - cub_list = np.genfromtxt(os.path.join(omega_routines_path, 'cubliste'), skip_header=2, - skip_footer=1, dtype=None, encoding='utf8') + cub_list = np.genfromtxt(path_cubliste, skip_header=3, + dtype=None, encoding='utf8') return cub_list -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Sauvegarde / Importation def save_omega(omega, savname='auto', folder='', base_folder=_omega_py_path, pref ='', suff='', disp=True): @@ -851,7 +1619,7 @@ def autoload_omega(obs_name, folder='auto', version=_Version, base_folder=_omega print('\033[03m' + filename2 + '\033[0;01;34m loaded\033[0m') return omega -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Correction thermique 1 - Détermitation réflectance à 5µm à partir de celle à 2.4µm ## puis CN -- Méthode historique (Calvin & Erard 1997) _omega_tmp = None @@ -894,7 +1662,7 @@ def _corr_therm_sp(args): sp_i = omega.cube_i[y, x] ecl = np.cos(omega.inci[y, x] * np.pi/180) # spectels #97-#112 des spectres de ref <-> 2.3-2.5µm - fref = os.path.join(package_path, 'OMEGA_dataref/refclair_sombr_omega_CL.dat') # from Erard and Calvin (1997) + fref = os.path.join(package_path, 'OMEGA_dataref', 'refclair_sombr_omega_CL.dat') # from Erard and Calvin (1997) sp_clair, sp_sombre = np.loadtxt(fref, unpack=True) i_lam1, i_lam2 = uf.where_closer_array([2.3, 2.5], lam) alb_clair = np.average(sp_clair[97:113]) @@ -971,7 +1739,7 @@ def corr_therm(omega, npool=1): chunksize = 1 # pool = mp.Pool(npool) with mp.Pool(npool) as pool: - for res in tqdm(pool.imap_unordered(_corr_therm_sp, it, chunksize), total=len(it)): + for res in tqdm(pool.imap_unordered(_corr_therm_sp, it, chunksize), total=len(it), desc='Thermal correction'): sp_rf_corr, T_fit, x, y = res rf_corr[y,x] = sp_rf_corr surf_temp[y,x] = T_fit @@ -988,7 +1756,7 @@ def corr_therm(omega, npool=1): # print('Duration : {0:.0f} min {1:.2f} sec'.format((tfin-tini)//60, (tfin-tini)%60)) return omega_corr -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Correction thermique 2 - Fit CN et réflectance en même temps def corr_therm2_sp(omega, x, y, disp=True): """Remove the thermal component in an OMEGA spectrum, with simultaneous retriving @@ -1085,7 +1853,7 @@ def corr_therm2(omega): omega_corr.therm_corr_infos['method'] = '(M2) Simultaneous refl & temp' return omega_corr -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Correction atmosphérique 1 - 1.93µm & 2.01µm au même niveau de réflectance def corr_atm_sp(lam, sp_rf, tr_atm): """Remove the atmospheric component in an OMEGA spectrum. @@ -1142,15 +1910,15 @@ def corr_atm(omega): ic_CL = np.concatenate([omega.ic['C'], omega.ic['L']]) nV = len(omega.ic['V']) # Chargement données atmosphère - atmorap = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref/omega_atmorap_CL.dat')) + atmorap = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'omega_atmorap_CL.dat')) tr_atm = np.ones(nlam) tr_atm[nV:] = atmorap[ic_CL] # données atm uniquement voies C & L # Détermination exposant i_lam1, i_lam2 = uf.where_closer_array([1.93, 2.01], lam) expo = np.log(cube_rf[:,:,i_lam1] / cube_rf[:,:,i_lam2]) / np.log(tr_atm[i_lam1] / tr_atm[i_lam2]) # Correction spectres - for x in tqdm(range(nx)): - for y in tqdm(range(ny)): + for x in tqdm(range(nx), desc='Atmospheric correction'): + for y in range(ny): sp_rf_corr = cube_rf[y,x] * tr_atm**(-expo[y,x]) omega_corr.cube_rf[y,x] = sp_rf_corr # Sortie @@ -1159,7 +1927,7 @@ def corr_atm(omega): omega_corr.atm_corr_infos['method'] = 'M1 : same reflectance level at 1.93μm and 2.01μm' return omega_corr -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Correction atmosphérique 2 - Spectre plat entre 1.97µm et 2.00µm def f_min(expo, sp_rf, sp_atm): sp_rf_corr = sp_rf * sp_atm**(-expo) @@ -1226,7 +1994,7 @@ def corr_atm2(omega): ic_CL = np.concatenate([omega.ic['C'], omega.ic['L']]) nV = len(omega.ic['V']) # Chargement données atmosphère - atmorap = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref/omega_atmorap_CL.dat')) + atmorap = np.loadtxt(os.path.join(package_path, 'OMEGA_dataref', 'omega_atmorap_CL.dat')) tr_atm = np.ones(nlam) tr_atm[nV:] = atmorap[ic_CL] # données atm uniquement voies C & L # Détermination exposant @@ -1236,16 +2004,16 @@ def corr_atm2(omega): expo0 = 1 # Correction spectres for x in tqdm(range(nx)): - for y in tqdm(range(ny)): + for y in range(ny): expo = minimize(f_min, expo0, args=(cube_rf2[y,x], sp_atm2)).x[0] omega_corr.cube_rf[y,x] = cube_rf[y,x] * tr_atm**(-expo) # Sortie omega_corr.atm_corr = True omega_corr.atm_corr_infos['datetime'] = datetime.datetime.now() - omega_corr.atm_corr_infos['method'] = 'M2 : flattest specra between 1.97µm and 2.00µm' + omega_corr.atm_corr_infos['method'] = 'M2 : flattest spectra between 1.97µm and 2.00µm' return omega_corr -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Correction mode 128 def corr_mode_128(omega): """Correction corrupted pixels mode 128. @@ -1258,7 +2026,7 @@ def corr_mode_128(omega): print('\033[1mNot a 128 pixel cube\033[0m') elif (npixel==128) & (omega.orbit >= 513): print('\033[33mCorrupted 128 pixel cube\033[0m') - omega128_interp = readsav(os.path.join(package_path, 'OMEGA_dataref/omega128_interpol.sav')) + omega128_interp = readsav(os.path.join(package_path, 'OMEGA_dataref', 'omega128_interpol.sav')) if str.encode(omega.name[3:]) in omega128_interp['cublist']: i_omega = np.where(omega128_interp['cublist'] == str.encode(omega.name[3:]))[0][0] cubtype = omega128_interp['cubstatus'][i_omega] @@ -1300,7 +2068,7 @@ def corr_mode_128(omega): # omega_corr.add_infos += '\nWarning: Corrupted 128 pixel cube' return omega_corr -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Correction & sauvegarde def corr_save_omega(obsname, folder='auto', base_folder=_omega_py_path, security=True, overwrite=True, compress=True, npool=1): @@ -1394,7 +2162,7 @@ def corr_save_omega_list(liste_obs, folder='auto', base_folder=_omega_py_path, corr_save_omega(obsname, folder, base_folder, security, overwrite, compress, npool) print("\n\033[01;32m Done\033[0m\n") -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Liste observations depuis fichier CSV def import_list_obs_csv(filename): """Import a list of observations ID from a csv file generated by JMars. @@ -1414,7 +2182,7 @@ def import_list_obs_csv(filename): liste_obs = np.array(df['product_id_trunc']) return liste_obs -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Setters def set_omega_bin_path(new_path): """Set the global private _omega_bin_path variable to new_path. @@ -1442,7 +2210,7 @@ def set_omega_py_path(new_path): global _omega_py_path _omega_py_path = new_path -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Getters def get_omega_bin_path(): """Return the vavue of the global private _omega_bin_path variable. @@ -1500,7 +2268,7 @@ def get_ls(omega_list): ls.append(omega.ls) return ls -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Update cube quality def update_cube_quality(obs_name='ORB*.pkl', folder='auto', version=_Version, base_folder=_omega_py_path): @@ -1526,10 +2294,10 @@ def update_cube_quality(obs_name='ORB*.pkl', folder='auto', version=_Version, folder = 'v' + str(version) basename = uf.myglob(os.path.join(base_folder, folder, obs_name)) # Load list corrupted obs - OBC = readsav('../data/OMEGA_dataref/OBC_OMEGA_OCT2017.sav') + OBC = readsav(os.path.join(package_path, 'OMEGA_dataref', 'OBC_OMEGA_OCT2017.sav')) good_orbits_OBC = np.array(OBC['good_orbits'][0], dtype=int) - corrupted_orbits_csv = pd.read_csv('../data/OMEGA_dataref/corrupted_obs.csv', comment='#', - skipinitialspace=True) + corrupted_orbits_csv = pd.read_csv(os.path.join(package_path, 'OMEGA_dataref', 'corrupted_obs.csv'), + comment='#', skipinitialspace=True) corrupted_orbits = np.array(corrupted_orbits_csv['corrupted_obs'], dtype=str) corrupted_orbits_comments = np.array(corrupted_orbits_csv['comment'], dtype=str) # Loop on obs in the selected folder @@ -1553,7 +2321,7 @@ def update_cube_quality(obs_name='ORB*.pkl', folder='auto', version=_Version, save_omega(omega, fname, '', '', '', '', False) print('\033[1m{0} files updated\033[0m'.format(len(fnames))) -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## Importation liste OMEGAdata avec filtrage automatisé def load_omega_list2(liste_obs, therm_corr=True, atm_corr=True, **kwargs): """Load a list of saved OMEGAdata objects, using load_omega(). @@ -1580,7 +2348,7 @@ def load_omega_list2(liste_obs, therm_corr=True, atm_corr=True, **kwargs): """ omega_list = [] Nabs = 0 - OBC = readsav('../data/OMEGA_dataref/OBC_OMEGA_OCT2017.sav') + OBC = readsav(os.path.join(package_path, 'OMEGA_dataref', 'OBC_OMEGA_OCT2017.sav')) good_orbits_OBC = np.array(OBC['good_orbits'][0], dtype=int) for i, obsname in enumerate(tqdm(liste_obs)): omega = autoload_omega(obsname, therm_corr=therm_corr, atm_corr=atm_corr, disp=False, @@ -1670,7 +2438,7 @@ def test_cube(obs): else: return True -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## List available good observations & generate csv file def compute_list_good_observations(savfilename='liste_good_obs.csv', folder='../data/OMEGA/liste_obs', security=True): @@ -1763,7 +2531,7 @@ def compute_list_good_observations(savfilename='liste_good_obs.csv', '{0} accepted, {1} rejected\033[0m'.format(Nacc, Nrej)) print('\n\033[01;34mResults saved in \033[0;03m' + sav_file_path + '\033[0m') -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- ## UTC to MY def utc_to_my(dt): """Convert a UTC datetime to the corresponding Martian Year (MY). @@ -1789,5 +2557,62 @@ def utc_to_my(dt): return my ##---------------------------------------------------------------------------------------- +## Shared wavelength array +def shared_lam(lam_list): + """Return a list of wavelength shared by all the input wavelength arrays. + + Parameters + ========== + lam_list : list of 1D np.array + The list of wavelength array. + + Returns + ======= + lam2 : 1D np.array + The wavelength array that contains only wavelength shared by all the arrays of + lam_list. + """ + lam0 = deepcopy(lam_list[0]) + lam2 = [] + for lami in lam0: + test = True + for lam_array in lam_list: + if not (lami in lam_array): + test = False + break + if test: + lam2.append(lami) + lam2 = np.array(lam2) + return lam2 + +def shared_lam_omegalist(omega_list): + """Return a list of wavelength shared by all the wavelength arrays of the input + OMEGA/MEx observations. + + Parameters + ========== + omega_list : list of OMEGAdata + The list of OMEGA/MEx observations. + + Returns + ======= + lam2 : 1D np.array + The wavelength array that contains only wavelength shared by all the arrays of + lam_list. + """ + lam0 = deepcopy(omega_list[0].lam) + lam2 = [] + for lami in lam0: + test = True + for omega in omega_list: + if not (lami in omega.lam): + test = False + break + if test: + lam2.append(lami) + lam2 = np.array(lam2) + return lam2 + +##----------------------------------------------------------------------------------- ## End of code -##---------------------------------------------------------------------------------------- +##----------------------------------------------------------------------------------- diff --git a/omegapy/omega_plots.py b/omegapy/omega_plots.py index 519d4a1..04222b7 100644 --- a/omegapy/omega_plots.py +++ b/omegapy/omega_plots.py @@ -3,7 +3,7 @@ ## omega_plots.py ## Created by Aurélien STCHERBININE -## Last modified by Aurélien STCHERBININE : 19/05/2020 +## Last modified by Aurélien STCHERBININE : 07/10/2020 ##---------------------------------------------------------------------------------------- """Display of OMEGAdata cubes. @@ -37,6 +37,10 @@ # Name of the current file _py_file = 'omega_plots.py' +##---------------------------------------------------------------------------------------- +## Initialisation variables globales +picked_spectra = {} + ##---------------------------------------------------------------------------------------- ## Affichage cube def show_cube(cube, i_lam, cmap='Greys_r', vmin=None, vmax=None, cb_title='', Nfig=None): @@ -105,7 +109,7 @@ def show_omega(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, v lam = omega.lam[i_lam] if refl: cube = omega.cube_rf - cb_title = r'Reflectance at $\lambda$' + ' = {0:.2f} µm'.format(lam) + cb_title = r'Reflectance @ $\lambda$' + ' = {0:.2f} µm'.format(lam) else: cube = omega.cube_i cb_title = (r'Radiance [W.m$^{-2}$.sr$^{-1}$.µm$^{-1}$] at $\lambda$' + @@ -120,7 +124,7 @@ def show_omega(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, v def show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None, vmax=None, alpha=None, title='auto', lonlim=(None, None), latlim=(None, None), Nfig=None, - polar=False, cbar=True, grid=True): + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto'): """Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -159,6 +163,16 @@ def show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None If True -> Diplay the colorbar. grid : bool, optional (default True) Enable the display of the lat/lon grid. + mask : 2D array or None, optional (default None) + The array that identify the bad/corrupted pixels to remove. + If None, all the pixels are conserved. + | 1 -> Good pixel + | NaN -> Bad pixel + negatives_longitudes : str or bool, optional (default 'auto') + Argument for non-polar plots. + | True -> longitudes between 0° and 360°. + | False -> longitudus between -180° and 180°. + | 'auto' -> automatic detection of the best case. """ if ((lam_unit == 'm') or isinstance(lam, float)) and (lam < 10): i_lam = uf.where_closer(lam, omega.lam) @@ -166,38 +180,55 @@ def show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None i_lam = deepcopy(lam) lam = omega.lam[i_lam] if refl: - cube = omega.cube_rf - cb_title = r'Reflectance at $\lambda$' + ' = {0:.2f} µm'.format(lam) + cube = deepcopy(omega.cube_rf) + cb_title = r'Reflectance @ $\lambda$' + ' = {0:.2f} µm'.format(lam) else: - cube = omega.cube_i + cube = deepcopy(omega.cube_i) cb_title = (r'Radiance [W.m$^{-2}$.sr$^{-1}$.µm$^{-1}$] at $\lambda$' + ' = {0:.2f} µm'.format(lam)) + cube_map = cube[:, :, i_lam] # extracted map to display + if not (mask is None): + cube_map *= mask # apply mask to remove bad pixels (turned to NaN) if title == 'auto': title = 'OMEGA/MEx observation {0}'.format(omega.name) + if isinstance(negatives_longitudes, str): + mask_lat = (np.abs(omega.lat) < 85) + if (omega.lon[mask_lat] < 10).any() and (omega.lon[mask_lat] > 350).any(): + negatives_longitudes = True fig = plt.figure(Nfig) Nfig = fig.number # get the actual figure number if Nfig=None if polar: ax = plt.axes(polar=True) - plt.pcolormesh(omega.lon_grid*np.pi/180, omega.lat_grid, cube[:,:,i_lam], cmap=cmap, + plt.pcolormesh(omega.lon_grid*np.pi/180, omega.lat_grid, cube_map, cmap=cmap, alpha=alpha, vmin=vmin, vmax=vmax) ax.set_yticklabels([]) # remove the latitude values in the plot - ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom if latlim[0] is None: if np.max(omega.lat) > 0: latlim = (90, np.min(omega.lat_grid)-1) else: latlim = (-90, np.max(omega.lat_grid)+1) + if latlim[0] > 0: # Northern hemisphere + ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom + else: # Southern hemisphere + ax.set_theta_offset(np.pi/2) # longitude origin at the top + ax.set_theta_direction(-1) # clockwise theta + plt.xlim(lonlim) + plt.ylim(latlim) else: - plt.pcolormesh(omega.lon_grid, omega.lat_grid, cube[:,:,i_lam], cmap=cmap, alpha=alpha, + lon_grid2 = deepcopy(omega.lon_grid) + if negatives_longitudes: + lon_grid2[lon_grid2 > 180] -= 360 + plt.pcolormesh(lon_grid2, omega.lat_grid, cube_map, cmap=cmap, alpha=alpha, vmin=vmin, vmax=vmax) plt.gca().axis('equal') + plt.xlim(lonlim) + plt.ylim(latlim) + plt.gca().set_adjustable('box') plt.xlabel('Longitude [°]') plt.ylabel('Latitude [°]') if cbar: cb = plt.colorbar() cb.set_label(cb_title) - plt.xlim(lonlim) - plt.ylim(latlim) if grid: ax = plt.figure(Nfig).get_axes()[0] lonlim = ax.get_xlim() @@ -493,13 +524,15 @@ def change_pos(event): cid2 = fig1.canvas.mpl_connect('key_press_event', change_pos) def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=None, - cmap='Greys_r', cb_title='IBD', title='auto', + cmap='Greys_r', cb_title='data', title='auto', vmin=None, vmax=None, autoyscale=True, ylim_sp=(None, None), alpha=None, lonlim=(None, None), latlim=(None, None), - polar=False, cbar=True, grid=True): + polar=False, cbar=True, grid=True, mask=None, lam_mask=None, + negatives_longitudes='auto'): """Affichage interactif d'un cube de données. Possibilité d'afficher le spectre associé à un pixel en cliquant dessus (maintenir Ctrl pour supperposer plusieurs spectres), ou en se déplaçant avec les flèches. + Les spectres affichés sont stockés dans le dictionnaire `picked_spectra[nfig]`. Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -521,7 +554,7 @@ def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=Non Array of high-level data (e.g. IBD map) computed from the omega observation. cmap : str, optional (default 'Greys_r') The matplotlib colormap. - cb_title : str, optional (default 'IBD') + cb_title : str, optional (default 'data') The title of the colorbar. Note : Only for the `data` plots. title : str, optional (default 'auto') @@ -548,6 +581,21 @@ def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=Non If True -> Diplay the colorbar. grid : bool, optional (default True) Enable the display of the lat/lon grid. + mask : 2D array or None, optional (default None) + The array that identify the bad/corrupted pixels to remove. + If None, all the pixels are conserved. + | 1 -> Good pixel + | NaN -> Bad pixel + lam_mask : 1D array or None, optional (default None) + The array that identify the bad/corrupted spectels to remove. + If None, all the spectels are conserved. + | True -> Good spectel + | False -> Bad spectel + negatives_longitudes : str or bool, optional (default 'auto') + Argument for non-polar plots. + | True -> longitudes between 0° and 360°. + | False -> longitudus between -180° and 180°. + | 'auto' -> automatic detection of the best case. """ # Initialisation if refl: @@ -557,23 +605,37 @@ def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=Non yaxis = r'Radiance [W.m$^{-2}$.sr$^{-1}$.µm$^{-1}$]' cube = omega.cube_i ny, nx, nlam = cube.shape + if isinstance(negatives_longitudes, str): + mask_lat = (np.abs(omega.lat) < 85) + if (omega.lon[mask_lat] < 10).any() and (omega.lon[mask_lat] > 350).any(): + negatives_longitudes = True if polar: lon, lat = omega.lon*np.pi/180, omega.lat else: - lon, lat = omega.lon, omega.lat + lon = deepcopy(omega.lon) + if negatives_longitudes: + lon[lon > 180] -= 360 + # lon, lat = omega.lon, omega.lat + lat = omega.lat bij = np.zeros((ny, nx), dtype=int) for j in range(ny): for i in range(nx): bij[j,i] = 10000*j + i - # fig1, ax1 = plt.subplots(1,1) + if lam_mask is None: + lam_mask = np.ones(len(omega.lam), dtype=bool) + elif len(lam_mask) != len(omega.lam): + raise ValueError('omega.lam and lam_mask must have the same dimension') + lam2 = deepcopy(omega.lam)[lam_mask] + #--------------------------------- + # Display map fig1 = plt.figure() nfig = fig1.number if data is None: show_omega_v2(omega, lam, refl, lam_unit, cmap, vmin, vmax, alpha, title, - lonlim, latlim, nfig, polar, cbar, grid) + lonlim, latlim, nfig, polar, cbar, grid, mask, negatives_longitudes) else: - show_ibd_v2(omega, data, cmap, vmin, vmax, alpha, title, cb_title, - lonlim, latlim, nfig, polar, cbar, grid) + show_data_v2(omega, data, cmap, vmin, vmax, alpha, title, cb_title, + lonlim, latlim, nfig, polar, cbar, grid, mask, negatives_longitudes) ax1 = fig1.gca() ax1.scatter(lon, lat, c=bij, marker='s', s=1, picker=True, alpha=0) sc_pos = [] @@ -590,21 +652,27 @@ def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=Non ylim_sp[0] = vmin if ylim_sp[1] is None: ylim_sp[1] = vmax + + picked_spectra[nfig] = [lam2] #--------------------------------- # Plot spectra fig2 function def plot_sp(xcoord, ycoord, clear=True): nonlocal sc_pos + global picked_spectra fig2 = plt.figure(-nfig) if clear: fig2.clf() + picked_spectra[nfig] = [lam2] for sc in sc_pos: sc.remove() sc_pos = [] + sp_i = cube[ycoord, xcoord, lam_mask] lati = omega.lat[ycoord, xcoord] longi = omega.lon[ycoord, xcoord] - line = plt.plot(omega.lam, cube[ycoord, xcoord], - label='lat = {0:.2f}° | lon = {1:.2f}° | pixel coord = ({2:d}, {3:d})'.format( + picked_spectra[nfig].append(sp_i) # Stockage spectres dans variable globale + line = plt.plot(lam2, sp_i, + label='lat = {0:.2f}°N | lon = {1:.2f}°E | pixel coord = ({2:d}, {3:d})'.format( lati, longi, ycoord, xcoord)) plt.xlabel(r'$\lambda$ [µm]') plt.ylabel(yaxis) @@ -665,11 +733,11 @@ def change_pos(event): cid2 = fig1.canvas.mpl_connect('key_press_event', change_pos) ##---------------------------------------------------------------------------------------- -## Affichage IBD -def show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', - cb_title = 'IBD', lonlim=(None, None), latlim=(None, None), Nfig=None, - polar=False, cbar=True, grid=True): - """Affichage ibd avec pcolormesh. +## Affichage données haut-niveau +def show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=None, alpha=None, title='auto', + cb_title = 'data', lonlim=(None, None), latlim=(None, None), Nfig=None, + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto'): + """Affichage données haut-niveau avec pcolormesh. Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -677,8 +745,8 @@ def show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None, alpha=None, ti ========== omega : OMEGAdata The OMEGA/MEx observation - ibd : 2D array - The array of the computed IBD values from the omega observation + data : 2D array + The array of the computed data values from the omega observation cmap : str, optional (default 'Greys_r') The matplotlib colormap. vmin : float or None, optional (default None) @@ -689,7 +757,7 @@ def show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None, alpha=None, ti Opacity of the plot. title : str, optional (default 'auto') The title of the figure. - cb_title : str, optional (default 'IBD') + cb_title : str, optional (default 'data') The title of the colorbar. lonlim : tuple of int or None, optional (default (None, None)) The longitude bounds of the figure. @@ -703,28 +771,59 @@ def show_ibd_v2(omega, ibd, cmap='viridis', vmin=None, vmax=None, alpha=None, ti If True -> Display the colorbar. grid : bool, optional (default True) Enable the display of the lat/lon grid. + mask : 2D array or None, optional (default None) + The array that identify the bad/corrupted pixels to remove. + If None, all the pixels are conserved. + | 1 -> Good pixel + | NaN -> Bad pixel + negatives_longitudes : str or bool, optional (default 'auto') + Argument for non-polar plots. + | True -> longitudes between 0° and 360°. + | False -> longitudus between -180° and 180°. + | 'auto' -> automatic detection of the best case. """ + if isinstance(negatives_longitudes, str): + mask_lat = (np.abs(omega.lat) < 85) + if (omega.lon[mask_lat] < 10).any() and (omega.lon[mask_lat] > 350).any(): + negatives_longitudes = True if title == 'auto': title = ('OMEGA/MEx observation {0}'.format(omega.name)) fig = plt.figure(Nfig) Nfig = fig.number # get the actual figure number if Nfig=None + if not (mask is None): + data = deepcopy(data) * mask # apply mask to remove bad pixels (turned to NaN) if polar: ax = plt.axes(polar=True) - plt.pcolormesh(omega.lon_grid*np.pi/180, omega.lat_grid, ibd, cmap=cmap, + plt.pcolormesh(omega.lon_grid*np.pi/180, omega.lat_grid, data, cmap=cmap, alpha=alpha, vmin=vmin, vmax=vmax) ax.set_yticklabels([]) # remove the latitude values in the plot - ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom + if latlim[0] is None: + if np.max(omega.lat) > 0: + latlim = (90, np.min(omega.lat_grid)-1) + else: + latlim = (-90, np.max(omega.lat_grid)+1) + if latlim[0] > 0: # Northern hemisphere + ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom + else: # Southern hemisphere + ax.set_theta_offset(np.pi/2) # longitude origin at the top + ax.set_theta_direction(-1) # clockwise theta + plt.xlim(lonlim) + plt.ylim(latlim) else: - plt.pcolormesh(omega.lon_grid, omega.lat_grid, ibd, cmap=cmap, alpha=alpha, + lon_grid2 = deepcopy(omega.lon_grid) + if negatives_longitudes: + lon_grid2[lon_grid2 > 180] -= 360 + plt.pcolormesh(lon_grid2, omega.lat_grid, data, cmap=cmap, alpha=alpha, vmin=vmin, vmax=vmax) plt.gca().axis('equal') + plt.xlim(lonlim) + plt.ylim(latlim) + plt.gca().set_adjustable('box') plt.xlabel('Longitude [°]') plt.ylabel('Latitude [°]') if cbar: cb = plt.colorbar() cb.set_label(cb_title) - plt.xlim(lonlim) - plt.ylim(latlim) if grid: ax = plt.figure(Nfig).get_axes()[0] lonlim = ax.get_xlim() @@ -972,12 +1071,16 @@ def show_omega_list_v2(omega_list, lam=1.085, lat_min=-90, lat_max=90, lon_min=0 plt.pcolormesh(grid_lon*np.pi/180, grid_lat, data2, cmap=cmap, vmin=vmin, vmax=vmax, **kwargs) ax.set_yticklabels([]) # remove the latitude values in the plot - ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom plt.xlim(0, 2*np.pi) if np.abs(lat_max) >= np.abs(lat_min): latlim = (lat_max, lat_min) else: latlim = (lat_min, lat_max) + if latlim[0] > 0: # Northern hemisphere + ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom + else: # Southern hemisphere + ax.set_theta_offset(np.pi/2) # longitude origin at the top + ax.set_theta_direction(-1) # clockwise theta plt.ylim(latlim) else: if negatives_longitudes and (lon_max > 180): @@ -1003,7 +1106,7 @@ def show_omega_list_v2(omega_list, lam=1.085, lat_min=-90, lat_max=90, lon_min=0 plt.ylim(lat_min, lat_max) if cbar: if cb_title == 'auto': - cb_title = r'Reflectance at $\lambda$' + ' = {0:.2f} µm'.format(lam) + cb_title = r'Reflectance @ $\lambda$' + ' = {0:.2f} µm'.format(lam) cb = plt.colorbar() cb.set_label(cb_title) if grid: @@ -1033,8 +1136,8 @@ def show_omega_list_v2(omega_list, lam=1.085, lat_min=-90, lat_max=90, lon_min=0 ## Sauvegarde résultats def save_map_omega_list(omega_list, lat_min=-90, lat_max=90, lon_min=0, lon_max=360, pas_lat=0.1, pas_lon=0.1, lam=1.085, data_list=None, data_desc='', - mask_list=None, sav_filename='auto', - base_folder='../data/OMEGA/sav_map_list_v2/', ext=''): + mask_list=None, sav_filename='auto', ext='', + base_folder='../data/OMEGA/sav_map_list_v2/', sub_folder=''): """Save the output of the omega_plots.show_omega_list_v2() function with the requested parameters as a dictionary. @@ -1069,19 +1172,22 @@ def save_map_omega_list(omega_list, lat_min=-90, lat_max=90, lon_min=0, lon_max= sav_filename : str, optional (default 'auto') The saving file name. | If 'auto' -> Automatically generated. - base_folder : str, optional (default '../data/OMEGA/sav_map_list_v2/') - The base folder to save the data. ext : str, optional (default '') Extension to add at the end of the filename (useful in case of automatic generation). + base_folder : str, optional (default '../data/OMEGA/sav_map_list_v2/') + The base folder to save the data. + sub_folder : str, optional (default '') + The subfolder to save the data. + Final path = "base_folder / sub_folder / sav_filename" """ # Initialization filename if sav_filename == 'auto': sav_filename = ('res_show_omega_list_v2__lat{0:0>2d}-{1:0>2d}_pas{2:0}_' + 'lon{3:0>3d}-{4:0>3d}_pas{5:0}__{6:s}.pkl').format( lat_min, lat_max, pas_lat, lon_min, lon_max, pas_lon, ext) - sav_filename2 = os.path.join(base_folder, sav_filename) + sav_filename2 = os.path.join(base_folder, sub_folder, sav_filename) if data_list is None: - data_desc = 'Reflectance at λ = {0:0} µm'.format(lam) + data_desc = 'Reflectance @ λ = {0:0} µm'.format(lam) elif data_desc == '': data_desc = 'unknown input data' # Compute the data sampling @@ -1190,13 +1296,16 @@ def show_omega_list_v2_man(data, grid_lat, grid_lon, infos, cmap='Greys_r', vmin plt.pcolormesh(grid_lon*np.pi/180, grid_lat, data, cmap=cmap, vmin=vmin, vmax=vmax, **kwargs) ax.set_yticklabels([]) # remove the latitude values in the plot - ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom plt.xlim(0, 2*np.pi) - # if (lat_max == 90) & (lat_min >= 0): if np.abs(lat_max) >= np.abs(lat_min): latlim = (lat_max, lat_min) else: latlim = (lat_min, lat_max) + if latlim[0] > 0: # Northern hemisphere + ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom + else: # Southern hemisphere + ax.set_theta_offset(np.pi/2) # longitude origin at the top + ax.set_theta_direction(-1) # clockwise theta plt.ylim(latlim) else: if negatives_longitudes and (lon_max > 180): @@ -1244,6 +1353,385 @@ def show_omega_list_v2_man(data, grid_lat, grid_lon, infos, cmap='Greys_r', vmin plt.title(title) plt.tight_layout() +##---------------------------------------------------------------------------------------- +## Affichage spectres spécifiques extraits plots interactifs +def plot_psp(sp1_id, *args, sp2_id=(None, None), Nfig=None, sp_dict=picked_spectra, **kwargs): + """Plot previously picked spectra from interactive plots. + If two spectra id are given, the ration sp1/sp2 is showed. + + Parameters + ========== + sp1_id : tuple of int (nfig, sp_nb) + nfig : The figure number of the selected spectra. + sp_nb : The number of the spectra in this figure (starting at 1). + *args : + Optional arguments for the plt.plot() function. + sp2_id : tuple of int (nfig, sp_nb), optional (default (None, None)) + nfig : The figure number of the selected spectra. + sp_nb : The number of the spectra in this figure (starting at 1). + Nfig : int or str or None, optional (default None) + The target figure ID. + sp_dict : dict, optional (default picked_spectra) + The dictionary containing the picked spectra from interactive figures. + Default is the current one. + **kwargs: + Optional arguments for the plt.plot() function. + """ + nfig1, n_sp1 = sp1_id + nfig2, n_sp2 = sp2_id + if (n_sp2 is None) or (nfig2 is None): + lam = sp_dict[nfig1][0] + sp = sp_dict[nfig1][n_sp1] + ylabel = 'Reflectance' + else: + lam1, lam2 = sp_dict[nfig1][0], sp_dict[nfig2][0] + sp_1, sp_2 = sp_dict[nfig1][n_sp1], sp_dict[nfig2][n_sp2] + lam = od.shared_lam([lam1, lam2]) + mask_lam1 = uf.where_closer_array(lam, lam1) + mask_lam2 = uf.where_closer_array(lam, lam2) + sp = sp_1[mask_lam1] / sp_2[mask_lam2] + ylabel = 'Ratioed reflectance' + plt.figure(Nfig) + plt.plot(lam, sp, *args, **kwargs) + plt.xlabel('λ [µm]') + plt.ylabel(ylabel) + plt.tight_layout() + +# ##---------------------------------------------------------------------------------------- +# ## Affichage cartes composites - sauvegardées high-level +# def proj_grid_v3(Lat, Lon, data, lat_min=-90, lat_max=90, lon_min=0, lon_max=360, + # pas_lat=0.1, pas_lon=0.1): + # """Sample the data from the input OMEGA/MEx observation on a given lat/lon grid. + + # Parameters + # ========== + # Lat : 2D array + # The array of latitudes for each pixel of data. + # Lon : 2D array + # The array of longitudes for each pixel of data. + # data : 2D array + # The initial array of values from an OMEGA/MEx observation. + # e.g.: Refelectance at selected wvl, spectra, or derived data such as IBD map. + # lat_min : float, optional (default -90) + # The minimal latitude of the grid. + # lat_max : float, optional (default 90) + # The maximum latitude of the grid. + # lon_min : float, optional (default 0) + # The minimal longitude of the grid. + # lon_max : float, optional (default 360) + # The maximal longitude of the grid. + # pas_lat : float, optional (default 0.1) + # The latitude intervals of the grid. + # pas_lon : float, optional (default 0.1) + # The longitude intervals of the grid. + + # Returns + # ======= + # grid_data : 2D array (dim : Nlon x Nlat) + # The data values, sampled on the new lat/lon grid. + # mask : 2D array + # The array indicating where the new grid has been filled by the OMEGA data. + # grid lat : 2D array + # The new latitude grid. + # grid lon : 2D array + # The new longitude grid. + # """ + # # Initialisation + # lat_array = np.arange(lat_min, lat_max+pas_lat, pas_lat) + # lon_array = np.arange(lon_min, lon_max+pas_lon, pas_lon) + # Nlon, Nlat = len(lon_array)-1, len(lat_array)-1 + # grid_lat, grid_lon = np.meshgrid(lat_array, lon_array) + # grid_data = np.zeros((Nlon, Nlat)) + # mask = np.zeros((Nlon, Nlat)) + # lat2 = np.floor(np.clip(Lat, lat_min, lat_max-0.1*pas_lat) /pas_lat) * pas_lat + # lon2 = np.floor(np.clip(Lon, lon_min, lon_max-0.1*pas_lon) /pas_lon) * pas_lon + # nx, ny = lat2.shape + # # Sampling on the new grid + # for j in range(ny): + # for i in range(nx): + # longi, lati = lon2[i,j], lat2[i,j] + # i_lon = int(longi/pas_lon - lon_min/pas_lon) + # j_lat = int(lati/pas_lat - lat_min/pas_lat) + # data_tmp = data[i,j] + # if (not np.isnan(data_tmp)) & (data_tmp > 0): # Filtrage régions sans données + # grid_data[i_lon,j_lat] += data_tmp + # mask[i_lon,j_lat] += 1 + # grid_data[grid_data==0] = np.nan + # grid_data2 = grid_data / mask # Normalisation + # mask2 = np.clip(mask, 0, 1) + # return grid_data2, mask2, grid_lat, grid_lon + +# def check_list_data_mask(data_list, mask_list, disp=True): + # """Check the compatibility between data_list and mask_list. + # Raise ValueError if uncompatibility. + + # Parameters + # ========== + # data_list : 3D array + # List of high-level map associated to a sample of OMEGA/MEx observations. + # mask_list : 3D array + # List of masks to remove the corrupted pixels of each OMEGA/MEx observation. + # disp : bool, optional (default True) + # Enable the display of the result of the test. + # """ + # if len(mask_list) != len(data_list): + # raise ValueError("data_list and mask_list must have the same size") + # else: + # for i in range(len(data_list)): + # if mask_list[i].shape != data_list[i].shape: + # raise ValueError("The shapes of items {0} of data_list and mask_list does not match.".format(i)) + # if disp: + # print("\033[01;32mCompatibility between data_list and mask_list OK\033[0m") + +# def show_omega_list_v3(data_list, geom_list, lat_min=-90, lat_max=90, lon_min=0, lon_max=360, + # pas_lat=0.1, pas_lon=0.1, cmap='Greys_r', vmin=None, vmax=None, + # title='auto', Nfig=None, polar=False, cbar=True, cb_title='auto', + # mask_list=None, plot=True, grid=True, out=False, + # negatives_longitudes=False, **kwargs): + # """Display an composite map from a list OMEGA/MEx observations, sampled on a new lat/lon grid. + + # Specificities of v3 : use previously saved high-level data from OMEGA/MEx observations. + + # Parameters + # ========== + # data_list : 3D array + # List of 2D array maps corresponding to severals OMEGA/MEx observations. + # geom_list : 1D array of dict + # List of dictionaries containing geometric informations corresponding to the + # OMEGA/MEx observations that are in `data_list` in the **same order**. + # lat_min : float, optional (default -90) + # The minimal latitude of the grid. + # lat_max : float, optional (default 90) + # The maximum latitude of the grid. + # lon_min : float, optional (default 0) + # The minimal longitude of the grid. + # lon_max : float, optional (default 360) + # The maximal longitude of the grid. + # pas_lat : float, optional (default 0.1) + # The latitude intervals of the grid. + # pas_lon : float, optional (default 0.1) + # The longitude intervals of the grid. + # cmap : str, optional (default 'Greys_r') + # The matplotlib colormap. + # vmin : float or None, optional (default None) + # The lower bound of the coloscale. + # vmax : float or None, optional (default None) + # The upper bound of the colorscale. + # title : str, optional (default 'auto') + # The title of the figure. + # Nfig : int or str or None, optional (default None) + # The target figure ID. + # polar : bool, optional (default False) + # If True -> Use a polar projection for the plot. + # cbar : bool, optional (default True) + # If True -> Diplay the colorbar. + # cb_title : str, optional (default 'auto') + # The title of the colorbar. + # mask_list : 3D array + # 1D array of the same dimension of `omega_list` containing the masks to remove the + # corrupted pixels of each observaiton, in the **same order** that the observations of + # `data_list`. + # Each mask is a 2D array, filled with 1 for good pixels and NaN for bad ones. + # plot : bool, optional (default True) + # If True -> Diplay the final figure. + # grid : bool, optional (default True) + # Enable the display of the lat/lon grid. + # out : bool, optional (default False) + # If True -> Return output. + # negatives_longitudes : bool, optional (default False) + # Argument for non-polar plots. + # | True -> longitudes between 0° and 360°. + # | False -> longitudus between -180° and 180°. + # **kwargs: + # Optional arguments for the plt.pcolormesh() function. + + # Returns (if out=True) + # ======= + # data : 2D array (dim : Nlon x Nlat) + # The omega reflectance at lam, sampled on the new lat/lon grid. + # mask : 2D array + # The array indicating where the new grid has been filled by the OMEGA data. + # grid lat : 2D array + # The new latitude grid. + # grid lon : 2D array + # The new longitude grid. + # mask_obs : 2D array of str + # The array indicating which observations have been used to fill each grid position. + # """ + # # Init grids + # lat_array = np.arange(lat_min, lat_max+pas_lat, pas_lat) + # lon_array = np.arange(lon_min, lon_max+pas_lon, pas_lon) + # Nlon, Nlat = len(lon_array)-1, len(lat_array)-1 + # grid_lat, grid_lon = np.meshgrid(lat_array, lon_array) + # data, mask = np.zeros((Nlon, Nlat)), np.zeros((Nlon, Nlat)) + # mask_obs = np.ndarray((Nlon, Nlat), dtype=object) + # mask_obs.fill('') + # # Test compatibility + # # > add test avec geom + # if not (mask_list is None): + # check_list_data_mask(data_list, mask_list, disp=True) + # # Loop on observations -> sampling and projection on the same grid + # for i in tqdm(range(len(data_list))): + # if mask_list is None: + # data_tmp = data_list[i] # Data without mask + # else: + # data_tmp = data_list[i] * mask_list[i] # Data with mask + # data0, mask0 = proj_grid_v3(geom_list[i]['lat'], geom_list[i]['lon'], data_tmp, + # lat_min, lat_max, lon_min, lon_max, pas_lat, pas_lon)[:2] + # data += np.nan_to_num(data0) # Conversion NaN -> 0 pour somme des images + # mask += mask0 + # mask_obs[mask0 == 1] += (geom_list[i]['obsname'] + ',') + # data[mask == 0] = np.nan + # data2 = data/mask # Normalisation + # # Affichage figure + # if plot: + # if title == 'auto': + # title = 'Composite map from OMEGA/MEx observations' + # fig = plt.figure(Nfig) + # Nfig = fig.number # get the actual figure number if Nfig=None + # if polar: + # ax = plt.axes(polar=True) + # plt.pcolormesh(grid_lon*np.pi/180, grid_lat, data2, cmap=cmap, + # vmin=vmin, vmax=vmax, **kwargs) + # ax.set_yticklabels([]) # remove the latitude values in the plot + # plt.xlim(0, 2*np.pi) + # if np.abs(lat_max) >= np.abs(lat_min): + # latlim = (lat_max, lat_min) + # else: + # latlim = (lat_min, lat_max) + # if latlim[0] > 0: # Northern hemisphere + # ax.set_theta_offset(-np.pi/2) # longitude origin at the bottom + # else: # Southern hemisphere + # ax.set_theta_offset(np.pi/2) # longitude origin at the top + # ax.set_theta_direction(-1) # clockwise theta + # plt.ylim(latlim) + # else: + # if negatives_longitudes and (lon_max > 180): + # n_neg_lon = np.sum(grid_lon[:,0] > 180) # nb of negative longitudes (>180°) + # i_lon180 = np.where(grid_lon[:,0] > 180)[0][0] # 1st index of lon > 180° + # grid_lon_nl = deepcopy(grid_lon) # new longitude grid [-180°, 180°] + # grid_lon_nl[:n_neg_lon] = grid_lon[i_lon180-1:-1] - 360 + # grid_lon_nl[n_neg_lon:] = grid_lon[:i_lon180] + # data2_nl = deepcopy(data2) # new data array + # data2_nl[:n_neg_lon] = data2[i_lon180-1:] + # data2_nl[n_neg_lon:] = data2[:i_lon180-1] + # plt.pcolormesh(grid_lon_nl, grid_lat, data2_nl, cmap=cmap, vmin=vmin, + # vmax=vmax, **kwargs) + # lon_min, lon_max = grid_lon_nl[[0,-1], 0] # new longitude bounds + # else: + # plt.pcolormesh(grid_lon, grid_lat, data2, cmap=cmap, vmin=vmin, + # vmax=vmax, **kwargs) + # plt.gca().axis('equal') + # plt.gca().set_adjustable('box') + # plt.xlabel('Longitude [°]') + # plt.ylabel('Latitude [°]') + # plt.xlim(lon_min, lon_max) + # plt.ylim(lat_min, lat_max) + # if cbar: + # if cb_title == 'auto': + # cb_title = r'Reflectance @ $\lambda$' + ' = {0:.2f} µm'.format(lam) + # cb = plt.colorbar() + # cb.set_label(cb_title) + # if grid: + # ax = plt.figure(Nfig).get_axes()[0] + # lonlim = ax.get_xlim() + # latlim = ax.get_ylim() + # lon_sgn = np.sign(lonlim[1] - lonlim[0]) + # lat_sgn = np.sign(latlim[1] - latlim[0]) + # lon_grid = np.arange(np.round(lonlim[0]/10)*10, np.round(lonlim[1]/10)*10+lon_sgn, + # 10 * lon_sgn) # 10° grid in longitude + # lat_grid = np.arange(np.round(latlim[0]/10)*10, np.round(latlim[1]/10)*10+lat_sgn, + # 10 * lat_sgn) # 10° grid in latitude + # plt.grid() + # if polar: + # ax.set_rticks(lat_grid) + # else: + # ax.set_xticks(lon_grid) + # ax.set_yticks(lat_grid) + # plt.title(title) + # plt.tight_layout() + # # Output + # if out: + # mask2 = np.clip(mask, 0, 1) + # return data2, mask2, grid_lat, grid_lon, mask_obs + +# def save_map_omega_list_v3(data_list, geom_list, lat_min=-90, lat_max=90, lon_min=0, lon_max=360, + # pas_lat=0.1, pas_lon=0.1, data_desc='', mask_list=None, sav_filename='auto', ext='', + # base_folder='../data/OMEGA/sav_map_list_v2/', sub_folder=''): + # """Save the output of the omega_plots.show_omega_list_v2() function with the requested + # parameters as a dictionary. + + # Parameters + # ========== + # data_list : 3D array + # List of 2D array maps corresponding to severals OMEGA/MEx observations. + # geom_list : 1D array of dict + # List of dictionaries containing geometric informations corresponding to the + # OMEGA/MEx observations that are in `data_list` in the **same order**. + # lat_min : float, optional (default -90) + # The minimal latitude of the grid. + # lat_max : float, optional (default 90) + # The maximum latitude of the grid. + # lon_min : float, optional (default 0) + # The minimal longitude of the grid. + # lon_max : float, optional (default 360) + # The maximal longitude of the grid. + # pas_lat : float, optional (default 0.1) + # The latitude intervals of the grid. + # pas_lon : float, optional (default 0.1) + # The longitude intervals of the grid. + # data_desc : str, optional (default '') + # Description of the data contained in data_list (if used). + # mask_list : 3D array + # 1D array of the same dimension of `omega_list` containing the masks to remove the + # corrupted pixels of each observaiton, in the **same order** than the observations of + # `omega_list`. + # Each mask is a 2D array, filled with 1 for good pixels and NaN for bad ones. + # sav_filename : str, optional (default 'auto') + # The saving file name. + # | If 'auto' -> Automatically generated. + # ext : str, optional (default '') + # Extension to add at the end of the filename (useful in case of automatic generation). + # base_folder : str, optional (default '../data/OMEGA/sav_map_list_v2/') + # The base folder to save the data. + # sub_folder : str, optional (default '') + # The subfolder to save the data. + # Final path = "base_folder / sub_folder / sav_filename" + # """ + # # Initialization filename + # if sav_filename == 'auto': + # sav_filename = ('res_show_omega_list_v3__lat{0:0>2d}-{1:0>2d}_pas{2:0}_' + # + 'lon{3:0>3d}-{4:0>3d}_pas{5:0}__{6:s}.pkl').format( + # lat_min, lat_max, pas_lat, lon_min, lon_max, pas_lon, ext) + # sav_filename2 = os.path.join(base_folder, sub_folder, sav_filename) + # if data_desc == '': + # data_desc = 'unknown data' + # # Compute the data sampling + # data, mask, grid_lat, grid_lon, mask_obs = show_omega_list_v3(data_list, + # geom_list, lat_min, lat_max, lon_min, lon_max, pas_lat, pas_lon, + # mask_list=mask_list, plot=False, out=True) + # # Sav file + # input_params = { + # 'omega_list' : np.array([geom_obs['obsname'] for geom_obs in geom_list]), + # 'lat_min' : lat_min, + # 'lat_max' : lat_max, + # 'lon_min' : lon_min, + # 'lon_max' : lon_max, + # 'pas_lat' : pas_lat, + # 'pas_lon' : pas_lon, + # 'data' : data_desc, + # 'filename': sav_filename, + # 'datetime': datetime.datetime.now().strftime('%d/%m/%Y %H:%M')} + # save_file = { + # 'data' : data, + # 'mask' : mask, + # 'grid_lat' : grid_lat, + # 'grid_lon' : grid_lon, + # 'mask_obs' : mask_obs, + # 'infos' : input_params + # } + # uf.save_pickle(save_file, sav_filename2, True) + ##---------------------------------------------------------------------------------------- ## End of code ##---------------------------------------------------------------------------------------- diff --git a/omegapy/omega_routines/atmorap.dat b/omegapy/omega_routines/atmorap.dat deleted file mode 100644 index c658936..0000000 --- a/omegapy/omega_routines/atmorap.dat +++ /dev/null @@ -1,43 +0,0 @@ - 0.955804 1.00006 0.999061 0.997492 1.00300 0.999866 - 0.999317 1.00596 1.00137 0.998103 1.00088 1.00348 - 1.00349 1.00132 0.997995 0.999823 1.00495 0.999933 - 1.00214 0.998024 0.991000 0.995868 0.998337 0.999208 - 0.997855 0.992113 0.991966 0.988086 0.997504 0.998081 - 0.991956 0.980082 0.975416 0.976255 0.977794 0.919145 - 0.896275 0.972583 0.980596 0.983356 0.989677 0.998539 - 0.977001 0.986188 0.991883 0.927059 0.963408 0.931988 - 0.941336 0.967378 0.967652 0.978467 0.987750 0.998867 - 1.00331 1.00133 1.00411 1.00319 1.00280 1.00265 - 1.00094 0.999010 0.998733 0.994973 0.990954 0.991671 - 0.968241 0.955547 0.975253 0.979602 0.983963 0.907371 - 0.634042 0.718706 0.916008 0.676349 0.370433 0.699814 - 0.726866 0.686564 0.701763 0.832430 0.897731 0.949218 - 0.977574 0.985955 0.978272 0.977222 0.991928 1.00146 - 1.00264 1.00284 1.00289 1.00597 1.00485 1.00432 - 1.00331 1.00512 1.00083 0.994896 0.994748 0.994198 - 0.994886 0.993462 0.996304 0.997585 0.995685 1.00014 - 1.00279 0.999508 0.997444 0.985674 0.990134 0.984542 - 0.988690 0.984399 0.981197 0.964968 0.951064 0.936957 - 0.934380 0.937699 0.940584 0.953680 0.855687 0.406719 - 0.125354 0.213733 1.02431 0.997835 0.958337 0.950013 - 0.930567 0.910832 0.568367 0.0285529 0.0397995 0.205742 - 0.164486 0.0485281 0.0782712 0.205016 0.407991 0.579830 - 0.744110 0.859683 0.913946 0.892477 0.906357 0.877581 - 0.899909 0.946908 0.924926 0.912963 0.942390 0.941488 - 0.943058 0.934435 0.948354 0.949338 0.948154 0.973177 - 0.971640 0.970048 0.971110 0.974095 0.975888 0.988518 - 0.985323 0.993431 0.998755 0.998739 1.00288 0.998421 - 1.00522 0.988311 1.00014 1.00352 0.996346 0.994134 - 1.00554 1.01289 1.00731 1.03388 1.03679 1.03060 - 1.02230 1.01223 1.00051 0.983891 0.984881 0.987685 - 0.994200 1.01287 1.02327 1.01393 0.997087 0.993267 - 0.987072 0.994870 0.983489 0.981856 0.985196 0.950968 - 0.905567 0.808314 0.630337 0.407780 0.157755 0.122710 - 0.131058 0.131058 0.131058 0.131058 0.131058 0.131058 - 0.131058 0.131058 0.131058 0.0736805 0.0856856 0.191719 - 0.404094 0.671317 0.817235 0.897525 0.899047 0.886518 - 0.866970 0.858687 0.848349 0.868880 0.908843 0.870273 - 0.816521 0.830097 0.826405 0.842052 0.823927 0.790729 - 0.708541 0.767156 0.753122 0.781828 0.850816 0.883838 - 0.926288 0.942757 0.959300 0.967333 0.971970 0.966035 - 0.972327 0.978152 0.973242 0.968872 diff --git a/omegapy/omega_routines/findcub.pro b/omegapy/omega_routines/findcub.pro deleted file mode 100644 index 1ac8fd6..0000000 --- a/omegapy/omega_routines/findcub.pro +++ /dev/null @@ -1,152 +0,0 @@ -;Version YL 25 mai 2011 -;mathieu : ajout erreur cube .PRE non présent (omega_path -> dataom/ -;mathieu : ajout lecture fichier findcube.pro -;mathieu : ajout affichage Ls - -pro findcub,long0,lat0,cdeb,cfin - -openr,2,'omega_path' -path='' -readf,2,path & readf,2,path -close,2 - -trans= !pi/180. -x0=cos(long0*trans)*cos(lat0*trans) -y0=sin(long0*trans)*cos(lat0*trans) -z0=sin(lat0*trans) -nomc=strarr(300) - -long1=fltarr(10) -lat1=fltarr(10) -x1=long1 -y1=lat1 -nomcube=' ' -close,/all - - -nomout='orbites_lg'+string(long0,format='(I0)')+'lt'+string(lat0,format='(I0)')+'.dat' -openw,4,nomout -openw,3,'cubliste' -printf,3,long0,lat0,format='(%" long: %7.3f lat: %7.3f\n")' -openr,2,'cubindex.ref' -nhits=0 -geocube=0 - -if(lat0 lt -60) then goto, sud -if(lat0 gt 60.) then goto, nord -for ncube=0,10000 do begin - readf,2,nomcube - norb=fix(strmid(nomcube,3,4)) - if(norb eq 0) then goto, fin - readf,2,long1 - readf,2,lat1 - if(norb lt cdeb) then continue - if(norb gt cfin) then goto,fin - x1=cos(long1*trans)*cos(lat1*trans) - y1=sin(long1*trans)*cos(lat1*trans) - z1=sin(lat1*trans) - ps=x0*x1+y0*y1+z0*z1 - if(max(ps) lt 0.85) then continue - long2=long1-long0 - i=where(long2 lt -180.) - if(i(0) ne -1) then long2(i)=long2(i)+360. - i=where(long2 gt 180.) - if(i(0) ne -1) then long2(i)=long2(i)-360. - if(testin(0,lat0,long2,lat1) eq 1) then begin - nomc(nhits)=nomcube - nhits=nhits+1 - endif -endfor -goto, fin -nord: -for ncube=0,10000 do begin - readf,2,nomcube - norb=fix(strmid(nomcube,3,4)) - if(norb eq 0) then goto, fin - readf,2,long1 - readf,2,lat1 - if(norb lt cdeb) then continue - if(norb gt cfin) then goto,fin - if(max(lat1) lt 60.) then continue - x1=cos(long1*trans)*cos(lat1*trans) - y1=sin(long1*trans)*cos(lat1*trans) - if(testin(x0,y0,x1,y1) eq 1) then begin - nomc(nhits)=nomcube - nhits=nhits+1 - endif -endfor -goto, fin -sud: -for ncube=0,10000 do begin - readf,2,nomcube - norb=fix(strmid(nomcube,3,4)) - if(norb eq 0) then goto, fin - readf,2,long1 - readf,2,lat1 - if(norb lt cdeb) then continue - if(norb gt cfin) then goto,fin - if(min(lat1) gt -60.) then continue - x1=cos(long1*trans)*cos(lat1*trans) - y1=sin(long1*trans)*cos(lat1*trans) - if(testin(x0,y0,x1,y1) eq 1) then begin - nomc(nhits)=nomcube - nhits=nhits+1 - endif -endfor -fin: -close,2 -print,' orbit x y dmin altMEx inci emer phas Ls' -for n=0,nhits-1 do begin - ;testfile='dataom/'+nomc(n)+'.NAV' - testfile=path+nomc(n)+'.NAV' - a=FILE_SEARCH(testfile) - ;if(a eq '') then testfile='dataom/'+nomc(n)+'.PRE' - if(a eq '') then testfile=path+nomc(n)+'.PRE' - ;a=FILE_SEARCH(testfile) ;ajout mathieu - ;if(a eq '') then begin - ; print,'donnees manquantes : ',testfile - ; goto,anomalie - ;endif - data=0B - values=0B - close,1 - read_geolbl,testfile,'',values,data - lrec=fix(data(0)) - nrec=fix(data(1)) - npix=fix(data(2)) - npara=fix(data(3)) - nscan=fix(data(4)) - solong=float(data(8)) - geocube=lonarr(npix,npara,nscan) - close,1 - openr,1,testfile - point_lun,1,lrec*nrec - readu,1,geocube - close,1 - if(geocube(1,1,0) gt 13) then geocube=swap_endian(geocube) - longa=geocube(*,6,*)*1.e-4 - lata=geocube(*,7,*)*1.e-4 - xa=cos(longa*trans)*cos(lata*trans) - ya=sin(longa*trans)*cos(lata*trans) - za=sin(lata*trans) - xr=y0*za-z0*ya - yr=z0*xa-x0*za - zr=x0*ya-y0*xa - dist=sqrt(xr*xr+yr*yr+zr*zr)*3393. - distmin=min(dist,ij) - j0=long(ij/npix) - i0=ij-j0*npix - slant=geocube(i0,11,j0)*1.e-3 - inci=geocube(i0,2,j0)*1.e-4 - emer=geocube(i0,3,j0)*1.e-4 - phas=geocube(i0,10,j0)*1.e-4 -print,nomc(n),i0,j0,distmin,slant,inci,emer,phas,solong,format='(A9,i5,i5,f8.2,f9.1,3f7.2,3f7.2)' -printf,3,nomc(n),i0,j0,distmin,slant,inci,emer,phas,solong,format='(A9,i5,i5,f8.2,f9.1,3f7.2,3f7.2)' -printf,4,nomc(n) -anomalie: - -endfor -;printf,3,'000000000' -close,3 -close,4 -end diff --git a/omegapy/omega_routines/fond2.dat b/omegapy/omega_routines/fond2.dat deleted file mode 100644 index 928a8f3..0000000 --- a/omegapy/omega_routines/fond2.dat +++ /dev/null @@ -1,29 +0,0 @@ - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 1 0 0 - 1 0 0 0 1 1 0 1 1 - 1 1 0 1 1 1 1 1 0 - 1 2 1 1 1 0 1 1 1 - 2 3 2 2 2 2 2 1 1 - 2 2 2 2 3 3 3 3 3 - 3 4 3 3 2 1 2 3 2 - 3 4 4 5 4 5 5 6 6 - 7 6 7 6 7 7 7 6 7 - 7 7 6 8 9 8 6 7 6 - 8 5 7 7 diff --git a/omegapy/omega_routines/linearC.dat b/omegapy/omega_routines/linearC.dat deleted file mode 100644 index 95c3dee..0000000 --- a/omegapy/omega_routines/linearC.dat +++ /dev/null @@ -1,683 +0,0 @@ - 0.00000 0.903993 1.80822 2.71269 3.61739 4.52232 - 5.42749 6.33290 7.23853 8.14441 9.05051 9.95685 - 10.8634 11.7702 12.6773 13.5845 14.4920 15.3998 - 16.3077 17.2159 18.1243 19.0330 19.9419 20.8510 - 21.7603 22.6699 23.5797 24.4897 25.3999 26.3104 - 27.2211 28.1321 29.0432 29.9546 30.8662 31.7781 - 32.6901 33.6024 34.5149 35.4277 36.3406 37.2538 - 38.1672 39.0808 39.9947 40.9087 41.8230 42.7376 - 43.6523 44.5673 45.4824 46.3978 47.3135 48.2293 - 49.1454 50.0616 50.9781 51.8949 52.8118 53.7289 - 54.6463 55.5639 56.4817 57.3997 58.3180 59.2364 - 60.1551 61.0740 61.9931 62.9124 63.8319 64.7517 - 65.6716 66.5918 67.5122 68.4328 69.3536 70.2746 - 71.1958 72.1173 73.0389 73.9608 74.8829 75.8052 - 76.7277 77.6504 78.5733 79.4965 80.4198 81.3433 - 82.2671 83.1911 84.1152 85.0396 85.9642 86.8890 - 87.8140 88.7392 89.6646 90.5902 91.5161 92.4421 - 93.3683 94.2948 95.2214 96.1482 97.0753 98.0025 - 98.9300 99.8577 100.786 101.714 102.642 103.570 - 104.499 105.428 106.357 107.286 108.216 109.145 - 110.075 111.005 111.936 112.866 113.797 114.728 - 115.659 116.590 117.521 118.453 119.385 120.317 - 121.249 122.182 123.114 124.047 124.980 125.913 - 126.847 127.780 128.714 129.648 130.582 131.517 - 132.451 133.386 134.321 135.256 136.191 137.127 - 138.063 138.998 139.935 140.871 141.807 142.744 - 143.681 144.618 145.555 146.493 147.430 148.368 - 149.306 150.244 151.182 152.121 153.060 153.999 - 154.938 155.877 156.816 157.756 158.696 159.636 - 160.576 161.517 162.457 163.398 164.339 165.280 - 166.221 167.163 168.104 169.046 169.988 170.931 - 171.873 172.816 173.758 174.701 175.644 176.588 - 177.531 178.475 179.419 180.363 181.307 182.251 - 183.196 184.140 185.085 186.030 186.975 187.921 - 188.866 189.812 190.758 191.704 192.651 193.597 - 194.544 195.490 196.437 197.385 198.332 199.279 - 200.227 201.175 202.123 203.071 204.020 204.968 - 205.917 206.866 207.815 208.764 209.713 210.663 - 211.613 212.562 213.512 214.463 215.413 216.364 - 217.314 218.265 219.216 220.167 221.119 222.070 - 223.022 223.974 224.926 225.878 226.831 227.783 - 228.736 229.689 230.642 231.595 232.548 233.502 - 234.456 235.409 236.363 237.318 238.272 239.226 - 240.181 241.136 242.091 243.046 244.001 244.957 - 245.912 246.868 247.824 248.780 249.736 250.693 - 251.649 252.606 253.563 254.520 255.477 256.435 - 257.392 258.350 259.308 260.265 261.224 262.182 - 263.140 264.099 265.058 266.017 266.976 267.935 - 268.894 269.854 270.813 271.773 272.733 273.693 - 274.653 275.614 276.574 277.535 278.496 279.457 - 280.418 281.380 282.341 283.303 284.264 285.226 - 286.188 287.151 288.113 289.075 290.038 291.001 - 291.964 292.927 293.890 294.854 295.817 296.781 - 297.745 298.709 299.673 300.637 301.601 302.566 - 303.531 304.495 305.460 306.425 307.391 308.356 - 309.322 310.287 311.253 312.219 313.185 314.151 - 315.118 316.084 317.051 318.018 318.985 319.952 - 320.919 321.887 322.854 323.822 324.790 325.757 - 326.725 327.694 328.662 329.630 330.599 331.568 - 332.537 333.506 334.475 335.444 336.414 337.383 - 338.353 339.323 340.293 341.263 342.233 343.203 - 344.174 345.145 346.115 347.086 348.057 349.028 - 350.000 350.971 351.943 352.914 353.886 354.858 - 355.830 356.802 357.775 358.747 359.720 360.693 - 361.665 362.638 363.612 364.585 365.558 366.532 - 367.505 368.479 369.453 370.427 371.401 372.375 - 373.350 374.324 375.299 376.274 377.249 378.224 - 379.199 380.174 381.149 382.125 383.101 384.076 - 385.052 386.028 387.004 387.981 388.957 389.934 - 390.910 391.887 392.864 393.841 394.818 395.795 - 396.772 397.750 398.728 399.705 400.683 401.661 - 402.639 403.617 404.596 405.574 406.553 407.531 - 408.510 409.489 410.468 411.447 412.426 413.406 - 414.385 415.365 416.345 417.324 418.304 419.284 - 420.265 421.245 422.225 423.206 424.186 425.167 - 426.148 427.129 428.110 429.091 430.073 431.054 - 432.036 433.017 433.999 434.981 435.963 436.945 - 437.927 438.910 439.892 440.875 441.857 442.840 - 443.823 444.806 445.789 446.772 447.756 448.739 - 449.723 450.706 451.690 452.674 453.658 454.642 - 455.626 456.611 457.595 458.579 459.564 460.549 - 461.534 462.519 463.504 464.489 465.474 466.459 - 467.445 468.430 469.416 470.402 471.388 472.374 - 473.360 474.346 475.332 476.319 477.305 478.292 - 479.278 480.265 481.252 482.239 483.226 484.214 - 485.201 486.188 487.176 488.163 489.151 490.139 - 491.127 492.115 493.103 494.091 495.079 496.068 - 497.056 498.045 499.034 500.023 501.011 502.000 - 502.990 503.979 504.968 505.957 506.947 507.937 - 508.926 509.916 510.906 511.896 512.886 513.876 - 514.866 515.857 516.847 517.838 518.828 519.819 - 520.810 521.801 522.792 523.783 524.774 525.765 - 526.757 527.748 528.740 529.731 530.723 531.715 - 532.707 533.699 534.691 535.683 536.675 537.668 - 538.660 539.653 540.646 541.638 542.631 543.624 - 544.617 545.610 546.603 547.597 548.590 549.583 - 550.577 551.571 552.564 553.558 554.552 555.546 - 556.540 557.534 558.528 559.523 560.517 561.512 - 562.506 563.501 564.496 565.490 566.485 567.480 - 568.475 569.471 570.466 571.461 572.457 573.452 - 574.448 575.443 576.439 577.435 578.431 579.427 - 580.423 581.419 582.415 583.412 584.408 585.405 - 586.401 587.398 588.395 589.391 590.388 591.385 - 592.382 593.379 594.377 595.374 596.371 597.369 - 598.366 599.364 600.362 601.359 602.357 603.355 - 604.353 605.351 606.349 607.348 608.346 609.344 - 610.343 611.341 612.340 613.339 614.337 615.336 - 616.335 617.334 618.333 619.332 620.332 621.331 - 622.330 623.330 624.329 625.329 626.329 627.328 - 628.328 629.328 630.328 631.328 632.328 633.328 - 634.329 635.329 636.329 637.330 638.330 639.331 - 640.332 641.332 642.333 643.334 644.335 645.336 - 646.337 647.338 648.340 649.341 650.342 651.344 - 652.345 653.347 654.349 655.350 656.352 657.354 - 658.356 659.358 660.360 661.362 662.364 663.367 - 664.369 665.371 666.374 667.376 668.379 669.382 - 670.384 671.387 672.390 673.393 674.396 675.399 - 676.402 677.405 678.409 679.412 680.415 681.419 - 682.422 683.426 684.430 685.433 686.437 687.441 - 688.445 689.449 690.453 691.457 692.461 693.465 - 694.470 695.474 696.478 697.483 698.487 699.492 - 700.497 701.501 702.506 703.511 704.516 705.521 - 706.526 707.531 708.536 709.541 710.547 711.552 - 712.557 713.563 714.568 715.574 716.579 717.585 - 718.591 719.597 720.602 721.608 722.614 723.620 - 724.626 725.633 726.639 727.645 728.651 729.658 - 730.664 731.671 732.677 733.684 734.690 735.697 - 736.704 737.711 738.718 739.724 740.732 741.739 - 742.746 743.753 744.760 745.767 746.775 747.782 - 748.789 749.797 750.804 751.812 752.820 753.827 - 754.835 755.843 756.851 757.859 758.866 759.874 - 760.883 761.891 762.899 763.907 764.915 765.924 - 766.932 767.940 768.949 769.957 770.966 771.975 - 772.983 773.992 775.001 776.010 777.018 778.027 - 779.036 780.045 781.054 782.064 783.073 784.082 - 785.091 786.100 787.110 788.119 789.129 790.138 - 791.148 792.157 793.167 794.177 795.187 796.196 - 797.206 798.216 799.226 800.236 801.246 802.256 - 803.266 804.276 805.287 806.297 807.307 808.317 - 809.328 810.338 811.349 812.359 813.370 814.380 - 815.391 816.402 817.413 818.423 819.434 820.445 - 821.456 822.467 823.478 824.489 825.500 826.511 - 827.523 828.534 829.545 830.557 831.568 832.579 - 833.591 834.602 835.614 836.625 837.637 838.649 - 839.660 840.672 841.684 842.696 843.707 844.719 - 845.731 846.743 847.755 848.767 849.780 850.792 - 851.804 852.816 853.828 854.841 855.853 856.865 - 857.878 858.890 859.903 860.915 861.928 862.941 - 863.953 864.966 865.979 866.991 868.004 869.017 - 870.030 871.043 872.056 873.069 874.082 875.095 - 876.108 877.121 878.134 879.148 880.161 881.174 - 882.188 883.201 884.214 885.228 886.241 887.255 - 888.268 889.282 890.295 891.309 892.323 893.336 - 894.350 895.364 896.378 897.392 898.406 899.420 - 900.434 901.448 902.462 903.476 904.490 905.504 - 906.518 907.532 908.546 909.561 910.575 911.589 - 912.604 913.618 914.633 915.647 916.662 917.676 - 918.691 919.705 920.720 921.734 922.749 923.764 - 924.779 925.793 926.808 927.823 928.838 929.853 - 930.868 931.883 932.898 933.913 934.928 935.943 - 936.958 937.973 938.988 940.004 941.019 942.034 - 943.049 944.065 945.080 946.096 947.111 948.126 - 949.142 950.157 951.173 952.189 953.204 954.220 - 955.235 956.251 957.267 958.283 959.298 960.314 - 961.330 962.346 963.362 964.378 965.393 966.409 - 967.425 968.441 969.457 970.473 971.490 972.506 - 973.522 974.538 975.554 976.570 977.587 978.603 - 979.619 980.636 981.652 982.668 983.685 984.701 - 985.718 986.734 987.751 988.767 989.784 990.800 - 991.817 992.833 993.850 994.867 995.883 996.900 - 997.917 998.934 999.951 1000.97 1001.98 1003.00 - 1004.02 1005.03 1006.05 1007.07 1008.09 1009.10 - 1010.12 1011.14 1012.15 1013.17 1014.19 1015.21 - 1016.22 1017.24 1018.26 1019.27 1020.29 1021.31 - 1022.33 1023.34 1024.36 1025.38 1026.40 1027.41 - 1028.43 1029.45 1030.47 1031.48 1032.50 1033.52 - 1034.54 1035.55 1036.57 1037.59 1038.61 1039.62 - 1040.64 1041.66 1042.68 1043.69 1044.71 1045.73 - 1046.75 1047.77 1048.78 1049.80 1050.82 1051.84 - 1052.85 1053.87 1054.89 1055.91 1056.93 1057.94 - 1058.96 1059.98 1061.00 1062.02 1063.04 1064.05 - 1065.07 1066.09 1067.11 1068.13 1069.14 1070.16 - 1071.18 1072.20 1073.22 1074.24 1075.25 1076.27 - 1077.29 1078.31 1079.33 1080.35 1081.36 1082.38 - 1083.40 1084.42 1085.44 1086.46 1087.48 1088.49 - 1089.51 1090.53 1091.55 1092.57 1093.59 1094.61 - 1095.62 1096.64 1097.66 1098.68 1099.70 1100.72 - 1101.74 1102.76 1103.77 1104.79 1105.81 1106.83 - 1107.85 1108.87 1109.89 1110.91 1111.93 1112.94 - 1113.96 1114.98 1116.00 1117.02 1118.04 1119.06 - 1120.08 1121.10 1122.12 1123.13 1124.15 1125.17 - 1126.19 1127.21 1128.23 1129.25 1130.27 1131.29 - 1132.31 1133.33 1134.35 1135.37 1136.38 1137.40 - 1138.42 1139.44 1140.46 1141.48 1142.50 1143.52 - 1144.54 1145.56 1146.58 1147.60 1148.62 1149.64 - 1150.66 1151.68 1152.69 1153.71 1154.73 1155.75 - 1156.77 1157.79 1158.81 1159.83 1160.85 1161.87 - 1162.89 1163.91 1164.93 1165.95 1166.97 1167.99 - 1169.01 1170.03 1171.05 1172.07 1173.09 1174.11 - 1175.13 1176.15 1177.17 1178.19 1179.21 1180.23 - 1181.25 1182.27 1183.28 1184.30 1185.32 1186.34 - 1187.36 1188.38 1189.40 1190.42 1191.44 1192.46 - 1193.48 1194.50 1195.52 1196.54 1197.56 1198.58 - 1199.60 1200.62 1201.64 1202.66 1203.68 1204.70 - 1205.72 1206.74 1207.76 1208.78 1209.80 1210.82 - 1211.84 1212.86 1213.89 1214.91 1215.93 1216.95 - 1217.97 1218.99 1220.01 1221.03 1222.05 1223.07 - 1224.09 1225.11 1226.13 1227.15 1228.17 1229.19 - 1230.21 1231.23 1232.25 1233.27 1234.29 1235.31 - 1236.33 1237.35 1238.37 1239.39 1240.41 1241.43 - 1242.45 1243.47 1244.49 1245.51 1246.53 1247.56 - 1248.58 1249.60 1250.62 1251.64 1252.66 1253.68 - 1254.70 1255.72 1256.74 1257.76 1258.78 1259.80 - 1260.82 1261.84 1262.86 1263.88 1264.90 1265.92 - 1266.94 1267.97 1268.99 1270.01 1271.03 1272.05 - 1273.07 1274.09 1275.11 1276.13 1277.15 1278.17 - 1279.19 1280.21 1281.23 1282.25 1283.28 1284.30 - 1285.32 1286.34 1287.36 1288.38 1289.40 1290.42 - 1291.44 1292.46 1293.48 1294.50 1295.52 1296.55 - 1297.57 1298.59 1299.61 1300.63 1301.65 1302.67 - 1303.69 1304.71 1305.73 1306.75 1307.77 1308.80 - 1309.82 1310.84 1311.86 1312.88 1313.90 1314.92 - 1315.94 1316.96 1317.98 1319.00 1320.03 1321.05 - 1322.07 1323.09 1324.11 1325.13 1326.15 1327.17 - 1328.19 1329.21 1330.23 1331.26 1332.28 1333.30 - 1334.32 1335.34 1336.36 1337.38 1338.40 1339.42 - 1340.45 1341.47 1342.49 1343.51 1344.53 1345.55 - 1346.57 1347.59 1348.61 1349.63 1350.66 1351.68 - 1352.70 1353.72 1354.74 1355.76 1356.78 1357.80 - 1358.83 1359.85 1360.87 1361.89 1362.91 1363.93 - 1364.95 1365.97 1366.99 1368.02 1369.04 1370.06 - 1371.08 1372.10 1373.12 1374.14 1375.16 1376.19 - 1377.21 1378.23 1379.25 1380.27 1381.29 1382.31 - 1383.33 1384.36 1385.38 1386.40 1387.42 1388.44 - 1389.46 1390.48 1391.50 1392.53 1393.55 1394.57 - 1395.59 1396.61 1397.63 1398.65 1399.68 1400.70 - 1401.72 1402.74 1403.76 1404.78 1405.80 1406.83 - 1407.85 1408.87 1409.89 1410.91 1411.93 1412.95 - 1413.98 1415.00 1416.02 1417.04 1418.06 1419.08 - 1420.10 1421.13 1422.15 1423.17 1424.19 1425.21 - 1426.23 1427.25 1428.28 1429.30 1430.32 1431.34 - 1432.36 1433.38 1434.40 1435.43 1436.45 1437.47 - 1438.49 1439.51 1440.53 1441.56 1442.58 1443.60 - 1444.62 1445.64 1446.66 1447.69 1448.71 1449.73 - 1450.75 1451.77 1452.79 1453.81 1454.84 1455.86 - 1456.88 1457.90 1458.92 1459.94 1460.97 1461.99 - 1463.01 1464.03 1465.05 1466.07 1467.10 1468.12 - 1469.14 1470.16 1471.18 1472.21 1473.23 1474.25 - 1475.27 1476.29 1477.31 1478.34 1479.36 1480.38 - 1481.40 1482.42 1483.44 1484.47 1485.49 1486.51 - 1487.53 1488.55 1489.58 1490.60 1491.62 1492.64 - 1493.66 1494.68 1495.71 1496.73 1497.75 1498.77 - 1499.79 1500.82 1501.84 1502.86 1503.88 1504.90 - 1505.93 1506.95 1507.97 1508.99 1510.01 1511.03 - 1512.06 1513.08 1514.10 1515.12 1516.14 1517.17 - 1518.19 1519.21 1520.23 1521.25 1522.28 1523.30 - 1524.32 1525.34 1526.36 1527.39 1528.41 1529.43 - 1530.45 1531.47 1532.50 1533.52 1534.54 1535.56 - 1536.58 1537.61 1538.63 1539.65 1540.67 1541.70 - 1542.72 1543.74 1544.76 1545.78 1546.81 1547.83 - 1548.85 1549.87 1550.89 1551.92 1552.94 1553.96 - 1554.98 1556.01 1557.03 1558.05 1559.07 1560.09 - 1561.12 1562.14 1563.16 1564.18 1565.21 1566.23 - 1567.25 1568.27 1569.30 1570.32 1571.34 1572.36 - 1573.38 1574.41 1575.43 1576.45 1577.47 1578.50 - 1579.52 1580.54 1581.56 1582.59 1583.61 1584.63 - 1585.65 1586.68 1587.70 1588.72 1589.74 1590.77 - 1591.79 1592.81 1593.83 1594.86 1595.88 1596.90 - 1597.92 1598.95 1599.97 1600.99 1602.01 1603.04 - 1604.06 1605.08 1606.10 1607.13 1608.15 1609.17 - 1610.19 1611.22 1612.24 1613.26 1614.28 1615.31 - 1616.33 1617.35 1618.38 1619.40 1620.42 1621.44 - 1622.47 1623.49 1624.51 1625.54 1626.56 1627.58 - 1628.60 1629.63 1630.65 1631.67 1632.69 1633.72 - 1634.74 1635.76 1636.79 1637.81 1638.83 1639.85 - 1640.88 1641.90 1642.92 1643.95 1644.97 1645.99 - 1647.02 1648.04 1649.06 1650.08 1651.11 1652.13 - 1653.15 1654.18 1655.20 1656.22 1657.25 1658.27 - 1659.29 1660.32 1661.34 1662.36 1663.38 1664.41 - 1665.43 1666.45 1667.48 1668.50 1669.52 1670.55 - 1671.57 1672.59 1673.62 1674.64 1675.66 1676.69 - 1677.71 1678.73 1679.76 1680.78 1681.80 1682.83 - 1683.85 1684.87 1685.90 1686.92 1687.94 1688.97 - 1689.99 1691.01 1692.04 1693.06 1694.09 1695.11 - 1696.13 1697.16 1698.18 1699.20 1700.23 1701.25 - 1702.27 1703.30 1704.32 1705.35 1706.37 1707.39 - 1708.42 1709.44 1710.46 1711.49 1712.51 1713.54 - 1714.56 1715.58 1716.61 1717.63 1718.65 1719.68 - 1720.70 1721.73 1722.75 1723.77 1724.80 1725.82 - 1726.85 1727.87 1728.89 1729.92 1730.94 1731.97 - 1732.99 1734.01 1735.04 1736.06 1737.09 1738.11 - 1739.13 1740.16 1741.18 1742.21 1743.23 1744.26 - 1745.28 1746.30 1747.33 1748.35 1749.38 1750.40 - 1751.43 1752.45 1753.48 1754.50 1755.52 1756.55 - 1757.57 1758.60 1759.62 1760.65 1761.67 1762.70 - 1763.72 1764.74 1765.77 1766.79 1767.82 1768.84 - 1769.87 1770.89 1771.92 1772.94 1773.97 1774.99 - 1776.02 1777.04 1778.07 1779.09 1780.12 1781.14 - 1782.17 1783.19 1784.22 1785.24 1786.27 1787.29 - 1788.32 1789.34 1790.37 1791.39 1792.42 1793.44 - 1794.47 1795.49 1796.52 1797.54 1798.57 1799.59 - 1800.62 1801.64 1802.67 1803.69 1804.72 1805.74 - 1806.77 1807.79 1808.82 1809.85 1810.87 1811.90 - 1812.92 1813.95 1814.97 1816.00 1817.02 1818.05 - 1819.08 1820.10 1821.13 1822.15 1823.18 1824.20 - 1825.23 1826.26 1827.28 1828.31 1829.33 1830.36 - 1831.39 1832.41 1833.44 1834.46 1835.49 1836.52 - 1837.54 1838.57 1839.59 1840.62 1841.65 1842.67 - 1843.70 1844.72 1845.75 1846.78 1847.80 1848.83 - 1849.86 1850.88 1851.91 1852.94 1853.96 1854.99 - 1856.02 1857.04 1858.07 1859.09 1860.12 1861.15 - 1862.17 1863.20 1864.23 1865.26 1866.28 1867.31 - 1868.34 1869.36 1870.39 1871.42 1872.44 1873.47 - 1874.50 1875.52 1876.55 1877.58 1878.61 1879.63 - 1880.66 1881.69 1882.71 1883.74 1884.77 1885.80 - 1886.82 1887.85 1888.88 1889.91 1890.93 1891.96 - 1892.99 1894.02 1895.04 1896.07 1897.10 1898.13 - 1899.15 1900.18 1901.21 1902.24 1903.26 1904.29 - 1905.32 1906.35 1907.38 1908.40 1909.43 1910.46 - 1911.49 1912.52 1913.54 1914.57 1915.60 1916.63 - 1917.66 1918.69 1919.71 1920.74 1921.77 1922.80 - 1923.83 1924.86 1925.88 1926.91 1927.94 1928.97 - 1930.00 1931.03 1932.06 1933.08 1934.11 1935.14 - 1936.17 1937.20 1938.23 1939.26 1940.29 1941.32 - 1942.34 1943.37 1944.40 1945.43 1946.46 1947.49 - 1948.52 1949.55 1950.58 1951.61 1952.64 1953.67 - 1954.70 1955.72 1956.75 1957.78 1958.81 1959.84 - 1960.87 1961.90 1962.93 1963.96 1964.99 1966.02 - 1967.05 1968.08 1969.11 1970.14 1971.17 1972.20 - 1973.23 1974.26 1975.29 1976.32 1977.35 1978.38 - 1979.41 1980.44 1981.47 1982.50 1983.54 1984.57 - 1985.60 1986.63 1987.66 1988.69 1989.72 1990.75 - 1991.78 1992.81 1993.84 1994.87 1995.90 1996.94 - 1997.97 1999.00 2000.03 2001.06 2002.09 2003.12 - 2004.15 2005.18 2006.22 2007.25 2008.28 2009.31 - 2010.34 2011.37 2012.41 2013.44 2014.47 2015.50 - 2016.53 2017.56 2018.60 2019.63 2020.66 2021.69 - 2022.72 2023.76 2024.79 2025.82 2026.85 2027.89 - 2028.92 2029.95 2030.98 2032.01 2033.05 2034.08 - 2035.11 2036.15 2037.18 2038.21 2039.24 2040.28 - 2041.31 2042.34 2043.38 2044.41 2045.44 2046.47 - 2047.51 2048.54 2049.57 2050.61 2051.64 2052.67 - 2053.71 2054.74 2055.77 2056.81 2057.84 2058.88 - 2059.91 2060.94 2061.98 2063.01 2064.05 2065.08 - 2066.11 2067.15 2068.18 2069.22 2070.25 2071.28 - 2072.32 2073.35 2074.39 2075.42 2076.46 2077.49 - 2078.53 2079.56 2080.60 2081.63 2082.67 2083.70 - 2084.74 2085.77 2086.81 2087.84 2088.88 2089.91 - 2090.95 2091.98 2093.02 2094.05 2095.09 2096.12 - 2097.16 2098.19 2099.23 2100.27 2101.30 2102.34 - 2103.37 2104.41 2105.45 2106.48 2107.52 2108.55 - 2109.59 2110.63 2111.66 2112.70 2113.74 2114.77 - 2115.81 2116.85 2117.88 2118.92 2119.96 2120.99 - 2122.03 2123.07 2124.10 2125.14 2126.18 2127.22 - 2128.25 2129.29 2130.33 2131.37 2132.40 2133.44 - 2134.48 2135.52 2136.55 2137.59 2138.63 2139.67 - 2140.71 2141.74 2142.78 2143.82 2144.86 2145.90 - 2146.94 2147.97 2149.01 2150.05 2151.09 2152.13 - 2153.17 2154.21 2155.24 2156.28 2157.32 2158.36 - 2159.40 2160.44 2161.48 2162.52 2163.56 2164.60 - 2165.64 2166.68 2167.72 2168.76 2169.80 2170.84 - 2171.88 2172.92 2173.96 2175.00 2176.04 2177.08 - 2178.12 2179.16 2180.20 2181.24 2182.28 2183.32 - 2184.36 2185.40 2186.44 2187.48 2188.52 2189.56 - 2190.61 2191.65 2192.69 2193.73 2194.77 2195.81 - 2196.85 2197.90 2198.94 2199.98 2201.02 2202.06 - 2203.10 2204.15 2205.19 2206.23 2207.27 2208.32 - 2209.36 2210.40 2211.44 2212.49 2213.53 2214.57 - 2215.61 2216.66 2217.70 2218.74 2219.79 2220.83 - 2221.87 2222.92 2223.96 2225.00 2226.05 2227.09 - 2228.13 2229.18 2230.22 2231.27 2232.31 2233.35 - 2234.40 2235.44 2236.49 2237.53 2238.58 2239.62 - 2240.66 2241.71 2242.75 2243.80 2244.84 2245.89 - 2246.93 2247.98 2249.02 2250.07 2251.12 2252.16 - 2253.21 2254.25 2255.30 2256.34 2257.39 2258.44 - 2259.48 2260.53 2261.57 2262.62 2263.67 2264.71 - 2265.76 2266.81 2267.85 2268.90 2269.95 2270.99 - 2272.04 2273.09 2274.13 2275.18 2276.23 2277.28 - 2278.32 2279.37 2280.42 2281.47 2282.51 2283.56 - 2284.61 2285.66 2286.71 2287.76 2288.80 2289.85 - 2290.90 2291.95 2293.00 2294.05 2295.10 2296.14 - 2297.19 2298.24 2299.29 2300.34 2301.39 2302.44 - 2303.49 2304.54 2305.59 2306.64 2307.69 2308.74 - 2309.79 2310.84 2311.89 2312.94 2313.99 2315.04 - 2316.09 2317.14 2318.19 2319.24 2320.30 2321.35 - 2322.40 2323.45 2324.50 2325.55 2326.60 2327.66 - 2328.71 2329.76 2330.81 2331.86 2332.91 2333.97 - 2335.02 2336.07 2337.12 2338.18 2339.23 2340.28 - 2341.34 2342.39 2343.44 2344.49 2345.55 2346.60 - 2347.65 2348.71 2349.76 2350.82 2351.87 2352.92 - 2353.98 2355.03 2356.09 2357.14 2358.19 2359.25 - 2360.30 2361.36 2362.41 2363.47 2364.52 2365.58 - 2366.63 2367.69 2368.74 2369.80 2370.86 2371.91 - 2372.97 2374.02 2375.08 2376.14 2377.19 2378.25 - 2379.30 2380.36 2381.42 2382.47 2383.53 2384.59 - 2385.65 2386.70 2387.76 2388.82 2389.87 2390.93 - 2391.99 2393.05 2394.11 2395.16 2396.22 2397.28 - 2398.34 2399.40 2400.46 2401.51 2402.57 2403.63 - 2404.69 2405.75 2406.81 2407.87 2408.93 2409.99 - 2411.05 2412.11 2413.17 2414.23 2415.29 2416.35 - 2417.41 2418.47 2419.53 2420.59 2421.65 2422.71 - 2423.77 2424.83 2425.89 2426.95 2428.02 2429.08 - 2430.14 2431.20 2432.26 2433.32 2434.39 2435.45 - 2436.51 2437.57 2438.64 2439.70 2440.76 2441.82 - 2442.89 2443.95 2445.01 2446.08 2447.14 2448.20 - 2449.27 2450.33 2451.40 2452.46 2453.52 2454.59 - 2455.65 2456.72 2457.78 2458.85 2459.91 2460.98 - 2462.04 2463.11 2464.17 2465.24 2466.30 2467.37 - 2468.43 2469.50 2470.57 2471.63 2472.70 2473.77 - 2474.83 2475.90 2476.97 2478.03 2479.10 2480.17 - 2481.23 2482.30 2483.37 2484.44 2485.50 2486.57 - 2487.64 2488.71 2489.78 2490.85 2491.91 2492.98 - 2494.05 2495.12 2496.19 2497.26 2498.33 2499.40 - 2500.47 2501.54 2502.61 2503.68 2504.75 2505.82 - 2506.89 2507.96 2509.03 2510.10 2511.17 2512.24 - 2513.31 2514.38 2515.45 2516.53 2517.60 2518.67 - 2519.74 2520.81 2521.89 2522.96 2524.03 2525.10 - 2526.18 2527.25 2528.32 2529.40 2530.47 2531.54 - 2532.62 2533.69 2534.76 2535.84 2536.91 2537.98 - 2539.06 2540.13 2541.21 2542.28 2543.36 2544.43 - 2545.51 2546.58 2547.66 2548.73 2549.81 2550.89 - 2551.96 2553.04 2554.11 2555.19 2556.27 2557.34 - 2558.42 2559.50 2560.58 2561.65 2562.73 2563.81 - 2564.89 2565.96 2567.04 2568.12 2569.20 2570.28 - 2571.35 2572.43 2573.51 2574.59 2575.67 2576.75 - 2577.83 2578.91 2579.99 2581.07 2582.15 2583.23 - 2584.31 2585.39 2586.47 2587.55 2588.63 2589.71 - 2590.79 2591.88 2592.96 2594.04 2595.12 2596.20 - 2597.28 2598.37 2599.45 2600.53 2601.61 2602.70 - 2603.78 2604.86 2605.95 2607.03 2608.11 2609.20 - 2610.28 2611.37 2612.45 2613.53 2614.62 2615.70 - 2616.79 2617.87 2618.96 2620.04 2621.13 2622.21 - 2623.30 2624.39 2625.47 2626.56 2627.64 2628.73 - 2629.82 2630.91 2631.99 2633.08 2634.17 2635.25 - 2636.34 2637.43 2638.52 2639.61 2640.69 2641.78 - 2642.87 2643.96 2645.05 2646.14 2647.23 2648.32 - 2649.41 2650.50 2651.59 2652.68 2653.77 2654.86 - 2655.95 2657.04 2658.13 2659.22 2660.31 2661.40 - 2662.49 2663.59 2664.68 2665.77 2666.86 2667.96 - 2669.05 2670.14 2671.23 2672.33 2673.42 2674.51 - 2675.61 2676.70 2677.79 2678.89 2679.98 2681.08 - 2682.17 2683.27 2684.36 2685.46 2686.55 2687.65 - 2688.74 2689.84 2690.94 2692.03 2693.13 2694.22 - 2695.32 2696.42 2697.51 2698.61 2699.71 2700.81 - 2701.90 2703.00 2704.10 2705.20 2706.30 2707.40 - 2708.49 2709.59 2710.69 2711.79 2712.89 2713.99 - 2715.09 2716.19 2717.29 2718.39 2719.49 2720.59 - 2721.69 2722.80 2723.90 2725.00 2726.10 2727.20 - 2728.30 2729.41 2730.51 2731.61 2732.71 2733.82 - 2734.92 2736.02 2737.13 2738.23 2739.33 2740.44 - 2741.54 2742.65 2743.75 2744.86 2745.96 2747.07 - 2748.17 2749.28 2750.38 2751.49 2752.59 2753.70 - 2754.81 2755.91 2757.02 2758.13 2759.24 2760.34 - 2761.45 2762.56 2763.67 2764.78 2765.88 2766.99 - 2768.10 2769.21 2770.32 2771.43 2772.54 2773.65 - 2774.76 2775.87 2776.98 2778.09 2779.20 2780.31 - 2781.42 2782.53 2783.64 2784.76 2785.87 2786.98 - 2788.09 2789.21 2790.32 2791.43 2792.54 2793.66 - 2794.77 2795.88 2797.00 2798.11 2799.23 2800.34 - 2801.46 2802.57 2803.69 2804.80 2805.92 2807.03 - 2808.15 2809.26 2810.38 2811.50 2812.61 2813.73 - 2814.85 2815.97 2817.08 2818.20 2819.32 2820.44 - 2821.56 2822.67 2823.79 2824.91 2826.03 2827.15 - 2828.27 2829.39 2830.51 2831.63 2832.75 2833.87 - 2834.99 2836.11 2837.24 2838.36 2839.48 2840.60 - 2841.72 2842.84 2843.97 2845.09 2846.21 2847.34 - 2848.46 2849.58 2850.71 2851.83 2852.96 2854.08 - 2855.21 2856.33 2857.46 2858.58 2859.71 2860.83 - 2861.96 2863.08 2864.21 2865.34 2866.47 2867.59 - 2868.72 2869.85 2870.97 2872.10 2873.23 2874.36 - 2875.49 2876.62 2877.75 2878.88 2880.01 2881.14 - 2882.27 2883.40 2884.53 2885.66 2886.79 2887.92 - 2889.05 2890.18 2891.31 2892.45 2893.58 2894.71 - 2895.84 2896.98 2898.11 2899.24 2900.38 2901.51 - 2902.64 2903.78 2904.91 2906.05 2907.18 2908.32 - 2909.45 2910.59 2911.73 2912.86 2914.00 2915.13 - 2916.27 2917.41 2918.55 2919.68 2920.82 2921.96 - 2923.10 2924.24 2925.38 2926.51 2927.65 2928.79 - 2929.93 2931.07 2932.21 2933.35 2934.49 2935.64 - 2936.78 2937.92 2939.06 2940.20 2941.34 2942.49 - 2943.63 2944.77 2945.91 2947.06 2948.20 2949.34 - 2950.49 2951.63 2952.78 2953.92 2955.07 2956.21 - 2957.36 2958.50 2959.65 2960.80 2961.94 2963.09 - 2964.24 2965.38 2966.53 2967.68 2968.83 2969.97 - 2971.12 2972.27 2973.42 2974.57 2975.72 2976.87 - 2978.02 2979.17 2980.32 2981.47 2982.62 2983.77 - 2984.92 2986.08 2987.23 2988.38 2989.53 2990.69 - 2991.84 2992.99 2994.15 2995.30 2996.45 2997.61 - 2998.76 2999.92 3001.07 3002.23 3003.38 3004.54 - 3005.69 3006.85 3008.01 3009.16 3010.32 3011.48 - 3012.64 3013.79 3014.95 3016.11 3017.27 3018.43 - 3019.59 3020.75 3021.91 3023.07 3024.23 3025.39 - 3026.55 3027.71 3028.87 3030.03 3031.19 3032.36 - 3033.52 3034.68 3035.84 3037.01 3038.17 3039.34 - 3040.50 3041.66 3042.83 3043.99 3045.16 3046.32 - 3047.49 3048.65 3049.82 3050.99 3052.15 3053.32 - 3054.49 3055.66 3056.82 3057.99 3059.16 3060.33 - 3061.50 3062.67 3063.84 3065.01 3066.18 3067.35 - 3068.52 3069.69 3070.86 3072.03 3073.20 3074.37 - 3075.55 3076.72 3077.89 3079.06 3080.24 3081.41 - 3082.59 3083.76 3084.93 3086.11 3087.28 3088.46 - 3089.64 3090.81 3091.99 3093.16 3094.34 3095.52 - 3096.70 3097.87 3099.05 3100.23 3101.41 3102.59 - 3103.76 3104.94 3106.12 3107.30 3108.48 3109.66 - 3110.85 3112.03 3113.21 3114.39 3115.57 3116.75 - 3117.94 3119.12 3120.30 3121.49 3122.67 3123.85 - 3125.04 3126.22 3127.41 3128.59 3129.78 3130.96 - 3132.15 3133.34 3134.52 3135.71 3136.90 3138.08 - 3139.27 3140.46 3141.65 3142.84 3144.03 3145.22 - 3146.41 3147.60 3148.79 3149.98 3151.17 3152.36 - 3153.55 3154.74 3155.93 3157.13 3158.32 3159.51 - 3160.71 3161.90 3163.09 3164.29 3165.48 3166.68 - 3167.87 3169.07 3170.26 3171.46 3172.66 3173.85 - 3175.05 3176.25 3177.44 3178.64 3179.84 3181.04 - 3182.24 3183.44 3184.64 3185.84 3187.04 3188.24 - 3189.44 3190.64 3191.84 3193.04 3194.24 3195.45 - 3196.65 3197.85 3199.06 3200.26 3201.46 3202.67 - 3203.87 3205.08 3206.28 3207.49 3208.69 3209.90 - 3211.11 3212.31 3213.52 3214.73 3215.94 3217.14 - 3218.35 3219.56 3220.77 3221.98 3223.19 3224.40 - 3225.61 3226.82 3228.03 3229.24 3230.45 3231.67 - 3232.88 3234.09 3235.30 3236.52 3237.73 3238.94 - 3240.16 3241.37 3242.59 3243.80 3245.02 3246.24 - 3247.45 3248.67 3249.89 3251.10 3252.32 3253.54 - 3254.76 3255.98 3257.19 3258.41 3259.63 3260.85 - 3262.07 3263.29 3264.51 3265.74 3266.96 3268.18 - 3269.40 3270.62 3271.85 3273.07 3274.30 3275.52 - 3276.74 3277.97 3279.19 3280.42 3281.64 3282.87 - 3284.10 3285.32 3286.55 3287.78 3289.01 3290.23 - 3291.46 3292.69 3293.92 3295.15 3296.38 3297.61 - 3298.84 3300.07 3301.30 3302.54 3303.77 3305.00 - 3306.23 3307.47 3308.70 3309.93 3311.17 3312.40 - 3313.64 3314.87 3316.11 3317.34 3318.58 3319.82 - 3321.05 3322.29 3323.53 3324.77 3326.00 3327.24 - 3328.48 3329.72 3330.96 3332.20 3333.44 3334.68 - 3335.92 3337.17 3338.41 3339.65 3340.89 3342.14 - 3343.38 3344.62 3345.87 3347.11 3348.36 3349.60 - 3350.85 3352.09 3353.34 3354.59 3355.83 3357.08 - 3358.33 3359.58 3360.83 3362.08 3363.32 3364.57 - 3365.82 3367.07 3368.33 3369.58 3370.83 3372.08 - 3373.33 3374.58 3375.84 3377.09 3378.35 3379.60 - 3380.85 3382.11 3383.36 3384.62 3385.88 3387.13 - 3388.39 3389.65 3390.90 3392.16 3393.42 3394.68 - 3395.94 3397.20 3398.46 3399.72 3400.98 3402.24 - 3403.50 3404.76 3406.02 3407.29 3408.55 3409.81 - 3411.08 3412.34 3413.60 3414.87 3416.13 3417.40 - 3418.67 3419.93 3421.20 3422.47 3423.73 3425.00 - 3426.27 3427.54 3428.81 3430.08 3431.35 3432.62 - 3433.89 3435.16 3436.43 3437.70 3438.98 3440.25 - 3441.52 3442.79 3444.07 3445.34 3446.62 3447.89 - 3449.17 3450.44 3451.72 3453.00 3454.27 3455.55 - 3456.83 3458.11 3459.38 3460.66 3461.94 3463.22 - 3464.50 3465.78 3467.06 3468.35 3469.63 3470.91 - 3472.19 3473.48 3474.76 3476.04 3477.33 3478.61 - 3479.90 3481.18 3482.47 3483.76 3485.04 3486.33 - 3487.62 3488.90 3490.19 3491.48 3492.77 3494.06 - 3495.35 3496.64 3497.93 3499.22 3500.52 3501.81 - 3503.10 3504.39 3505.69 3506.98 3508.27 3509.57 - 3510.86 3512.16 3513.45 3514.75 3516.05 3517.34 - 3518.64 3519.94 3521.24 3522.54 3523.84 3525.14 - 3526.44 3527.74 3529.04 3530.34 3531.64 3532.94 - 3534.25 3535.55 3536.85 3538.16 3539.46 3540.77 - 3542.07 3543.38 3544.68 3545.99 3547.30 3548.60 - 3549.91 3551.22 3552.53 3553.84 3555.15 3556.46 - 3557.77 3559.08 3560.39 3561.70 3563.01 3564.32 - 3565.64 3566.95 3568.26 3569.58 3570.89 3572.21 - 3573.52 3574.84 3576.16 3577.47 3578.79 3580.11 - 3581.43 3582.75 3584.06 3585.38 3586.70 3588.03 - 3589.35 3590.67 3591.99 3593.31 3594.63 3595.96 - 3597.28 3598.60 3599.93 3601.25 3602.58 3603.91 - 3605.23 3606.56 3607.89 3609.21 3610.54 3611.87 - 3613.20 3614.53 3615.86 3617.19 3618.52 3619.85 - 3621.18 3622.51 3623.85 3625.18 3626.51 3627.85 - 3629.18 3630.52 3631.85 3633.19 3634.52 3635.86 - 3637.20 3638.54 3639.87 3641.21 3642.55 3643.89 - 3645.23 3646.57 3647.91 3649.25 3650.60 3651.94 - 3653.28 3654.62 3655.97 3657.31 3658.66 3660.00 - 3661.35 3662.69 3664.04 3665.39 3666.73 3668.08 - 3669.43 3670.78 3672.13 3673.48 3674.83 3676.18 - 3677.53 3678.88 3680.24 3681.59 3682.94 3684.30 - 3685.65 3687.00 3688.36 3689.71 3691.07 3692.43 - 3693.78 3695.14 3696.50 3697.86 3699.22 3700.58 - 3701.94 3703.30 3704.66 3706.02 3707.38 3708.74 - 3710.10 3711.47 3712.83 3714.20 3715.56 3716.93 - 3718.29 3719.66 3721.02 3722.39 3723.76 3725.13 - 3726.50 3727.87 3729.24 3730.61 3731.98 3733.35 - 3734.72 3736.09 3737.46 3738.84 3740.21 3741.58 - 3742.96 3744.33 3745.71 3747.09 3748.46 3749.84 - 3751.22 3752.59 3753.97 3755.35 3756.73 3758.11 - 3759.49 3760.87 3762.26 3763.64 3765.02 3766.40 - 3767.79 3769.17 3770.55 3771.94 3773.33 3774.71 - 3776.10 3777.49 3778.87 3780.26 3781.65 3783.04 - 3784.43 3785.82 3787.21 3788.60 3789.99 3791.39 - 3792.78 3794.17 3795.57 3796.96 3798.35 3799.75 - 3801.15 3802.54 3803.94 3805.34 3806.73 3808.13 - 3809.53 3810.93 3812.33 3813.73 3815.13 3816.53 - 3817.94 3819.34 3820.74 3822.15 3823.55 3824.95 - 3826.36 3827.77 3829.17 3830.58 3831.99 3833.39 - 3834.80 3836.21 3837.62 3839.03 3840.44 3841.85 - 3843.26 3844.68 3846.09 3847.50 3848.92 3850.33 - 3851.74 3853.16 3854.58 3855.99 3857.41 3858.83 - 3860.24 3861.66 3863.08 3864.50 3865.92 3867.34 - 3868.76 3870.19 3871.61 3873.03 3874.45 3875.88 - 3877.30 3878.73 3880.15 3881.58 3883.01 3884.43 - 3885.86 3887.29 3888.72 3890.15 3891.58 3893.01 - 3894.44 3895.87 3897.30 3898.74 3900.17 3901.60 - 3903.04 3904.47 3905.91 3907.34 3908.78 3910.22 - 3911.66 3913.09 3914.53 3915.97 3917.41 3918.85 - 3920.29 3921.73 3923.18 3924.62 3926.06 3927.51 - 3928.95 3930.40 3931.84 3933.29 3934.73 3936.18 - 3937.63 3939.08 3940.53 3941.98 3943.43 3944.88 - 3946.33 3947.78 3949.23 3950.68 3952.14 3953.59 - 3955.05 3956.50 3957.96 3959.41 3960.87 3962.33 - 3963.79 3965.24 3966.70 3968.16 3969.62 3971.08 - 3972.54 3974.01 3975.47 3976.93 3978.40 3979.86 - 3981.33 3982.79 3984.26 3985.72 3987.19 3988.66 - 3990.13 3991.60 3993.07 3994.54 3996.01 3997.48 - 3998.95 4000.42 4001.90 4003.37 4004.84 4006.32 - 4007.79 4009.27 4010.75 4012.22 4013.70 4015.18 - 4016.66 4018.14 4019.62 4021.10 4022.58 4024.06 - 4025.54 4027.03 4028.51 4030.00 4031.48 4032.97 - 4034.45 4035.94 4037.43 4038.91 4040.40 4041.89 - 4043.38 4044.87 4046.36 4047.85 4049.35 4050.84 - 4052.33 4053.83 4055.32 4056.82 4058.31 4059.81 - 4061.30 4062.80 4064.30 4065.80 4067.30 4068.80 - 4070.30 4071.80 4073.30 4074.80 4076.31 4077.81 - 4079.32 4080.82 4082.33 4083.83 4085.34 4086.85 - 4088.35 4089.86 4091.37 4092.88 4094.39 4095.90 - 4097.41 4098.93 4100.44 4101.95 4103.47 4104.98 - 4106.50 4108.01 4109.53 4111.05 4112.57 4114.08 - 4115.60 4117.12 4118.64 4120.16 4121.69 4123.21 - 4124.73 4126.25 4127.78 4129.30 4130.83 4132.35 - 4133.88 4135.41 4136.94 4138.47 4140.00 4141.53 - 4143.06 4144.59 4146.12 4147.65 4149.18 4150.72 - 4152.25 4153.79 4155.32 4156.86 4158.40 4159.93 - 4161.47 4163.01 4164.55 4166.09 4167.63 4169.17 - 4170.71 4172.26 4173.80 4175.34 4176.89 4178.43 - 4179.98 4181.53 4183.07 4184.62 4186.17 4187.72 - 4189.27 4190.82 4192.37 4193.92 4195.47 4197.03 - 4198.58 4200.14 4201.69 4203.25 4204.80 4206.36 - 4207.92 4209.48 4211.03 4212.59 4214.15 4215.72 - 4217.28 4218.84 4220.40 4221.97 4223.53 4225.10 - 4226.66 4228.23 4229.79 4231.36 4232.93 4234.50 - 4236.07 4237.64 4239.21 4240.78 4242.35 4243.93 - 4245.50 4247.07 4248.65 4250.22 4251.80 4253.38 - 4254.96 4256.53 4258.11 4259.69 4261.27 4262.85 - 4264.44 4266.02 4267.60 4269.19 4270.77 4272.35 - 4273.94 4275.53 4277.11 4278.70 4280.29 4281.88 - 4283.47 4285.06 4286.65 4288.24 4289.84 4291.43 - 4293.02 4294.62 4296.21 4297.81 4299.41 4301.00 - 4302.60 4304.20 4305.80 4307.40 4309.00 4310.60 - 4312.21 4313.81 4315.41 4317.02 4318.62 4320.23 - 4321.83 4323.44 4325.05 4326.66 4328.27 4329.88 - 4331.49 4333.10 4334.71 4336.32 4337.94 4339.55 - 4341.17 4342.78 4344.40 4346.01 4347.63 4349.25 - 4350.87 4352.49 4354.11 4355.73 4357.35 4358.98 - 4360.60 4362.22 4363.85 4365.47 4367.10 4368.73 - 4370.36 4371.98 4373.61 4375.24 4376.87 4378.50 - 4380.14 4381.77 4383.40 4385.04 4386.67 4388.31 - 4389.94 4391.58 4393.22 4394.86 4396.50 4398.14 - 4399.78 4401.42 4403.06 4404.70 4406.35 4407.99 - 4409.64 4411.28 4412.93 4414.57 4416.22 4417.87 - 4419.52 4421.17 4422.82 4424.47 4426.13 4427.78 - 4429.43 4431.09 4432.74 4434.40 4436.05 4437.71 - 4439.37 4441.03 4442.69 4444.35 4446.01 4447.67 - 4449.33 4451.00 4452.66 4454.33 4455.99 4457.66 - 4459.33 4460.99 4462.66 4464.33 4466.00 4467.67 - 4469.34 4471.02 4472.69 4474.36 4476.04 4477.71 - 4479.39 4481.07 4482.74 4484.42 4486.10 4487.78 - 4489.46 4491.14 4492.83 4494.51 4496.19 4497.88 - 4499.56 4501.25 4502.93 4504.62 4506.31 4508.00 - 4509.69 4511.38 4513.07 4514.76 4516.46 4518.15 - 4519.84 4521.54 4523.23 4524.93 4526.63 4528.33 - 4530.03 4531.73 4533.43 4535.13 4536.83 4538.53 - 4540.24 4541.94 4543.65 4545.35 4547.06 4548.77 - 4550.47 4552.18 4553.89 4555.60 4557.31 4559.03 - 4560.74 4562.45 4564.17 4565.88 4567.60 4569.32 - 4571.03 4572.75 4574.47 4576.19 4577.91 4579.63 - 4581.35 4583.08 4584.80 4586.53 4588.25 4589.98 - 4591.70 4593.43 4595.16 4596.89 4598.62 4600.35 - 4602.08 4603.82 4605.55 4607.28 4609.02 4610.76 - 4612.49 4614.23 4615.97 4617.71 4619.45 4621.19 - 4622.93 4624.67 4626.41 4628.16 diff --git a/omegapy/omega_routines/omega_path b/omegapy/omega_routines/omega_path deleted file mode 100644 index 147e43c..0000000 --- a/omegapy/omega_routines/omega_path +++ /dev/null @@ -1,9 +0,0 @@ -/data2/opt/geomeg/data/product/ -/data2/opt/geomeg/data/product/ - -first line: path to the directory where you put - OMEGA data cubes (.QUB) -second line: path to the directory where you put - OMEGA geometry cubes (.NAV) -a "/" must be appended for UNIX,LINUX, a "\" for windows - diff --git a/omegapy/omega_routines/orbites_lg320lt50.dat b/omegapy/omega_routines/orbites_lg320lt50.dat deleted file mode 100644 index e18a9b1..0000000 --- a/omegapy/omega_routines/orbites_lg320lt50.dat +++ /dev/null @@ -1,19 +0,0 @@ -ORB0285_2 -ORB0311_4 -ORB0905_0 -ORB1001_0 -ORB1023_0 -ORB2621_1 -ORB2687_1 -ORB2752_1 -ORB2768_1 -ORB2825_1 -ORB2921_0 -ORB2977_0 -ORB3032_0 -ORB4343_5 -ORB6020_0 -ORB6038_0 -ORB6388_5 -ORB7756_0 -ORB8360_3 diff --git a/omegapy/omega_routines/ordcorr.pro b/omegapy/omega_routines/ordcorr.pro deleted file mode 100644 index 9a494d1..0000000 --- a/omegapy/omega_routines/ordcorr.pro +++ /dev/null @@ -1,66 +0,0 @@ - -; 20/01/04 - -function ordcorr, l, spt - -; ll: VNIR wavelength in micron -; spt: spettrum to be corrected - - -;___________________________________________________________________________________ -; assignment of the variable k(3,kn), from file Coeff_II_96_ias.txt -; k (0,*) = spectral channels with the second order contamination -; k (1,*) = wavelengths correspondent to each spectral channel -; k (2,*) = values of the coefficients for each channel -nk = 17; total number of the channel with the contamination -k = fltarr(3,nk) -k(0,*) = findgen(nk)+79 -k(1,*) = [952.100, 959.600, 967.000, 974.300, 981.700, 988.900, 996.300 ,$ - 1003.70, 1010.90, 1018.20, 1025.50, 1032.90, 1040.30, 1047.94, $ - 1055.34, 1062.52, 1069.87]/1000. - -k(2,*) = [0.00478825, 0.00764561, 0.0117481, 0.0186357, 0.0291402, 0.0430787, $ - 0.0561666, 0.0694787, 0.0831372, 0.0993437, 0.113755, 0.124017, 0.123925, $ - 0.118724, 0.110151, 0.106578, 0.106578] -;__________________________________________________________________________________________ -; MAIN -; Formula : I_corr = I_raw-kII*I_1_raw -; I_corr = corrected final Intensity -; I_raw = raw spectrum measured by VNIR (initial intensity) -; KII = coefficients for the second order -; I_1_raw = raw intensity responsable of the second order contribution - -I_raw = fltarr(96) -I_1_raw = fltarr(96) -kII = fltarr(96) -I_corr= fltarr(96) - -;_____________________________________ -; Assignment of I_raw -I_raw = spt - -;_________________________________ -; Assignment of I_1_raw -ch = k(0,*); spectral channel concerning the II ord -l2 = k(1,*); lambda of the II ord -l1 = l2/2. ; lambda od first order -nl = n_elements(l1) -ch_start = 16; first spectral channel of the first order wavelength -ch_end = 23; last spectral channel of the first order wavelength - -I_1= spline(l(ch_start:ch_end), I_raw(ch_start:ch_end), l1) - -I_1_raw(k(0,0):k(0,nl-1)) = I_1 - -;_____________________________________ -; Assignment of kII -kII(k(0,0):k(0,nl-1)) = k(2,*) - -;_____________________________________ -; Computation of I_corr - -I_corr = I_raw-kII*I_1_raw - -return, I_corr - -end diff --git a/omegapy/omega_routines/read_geolbl.pro b/omegapy/omega_routines/read_geolbl.pro deleted file mode 100644 index 202b9cd..0000000 --- a/omegapy/omega_routines/read_geolbl.pro +++ /dev/null @@ -1,105 +0,0 @@ -;+ -; NAME: -; READ_GEOLBL -; -; PURPOSE: -; Read the label of a geometrical data cube. In particular, you -; can retrieve any parameters from it by specifying the keywords -; you wish to get the values. Any call return the label size and -; the cube dimension. -; -; CALLING SEQUENCE: -; read_geolbl, filename, keywords, values, info -; -; INPUTS: -; filename: geometrical data file name -; keywords: string array containing a list of keyword - -; KEYWORD PARAMETERS: -; none -; -; OUTPUTS: -; values: has the same dimension as the keywords argument. -; It contains, if exist, the values of the requested -; keywords. -; -; info: integer array -; info(0) = size of one label record -; info(1) = number of label record -; info(2) = number of pixel -; info(3) = number of parameter -; info(4) = number of scan -; -; EXAMPLE: -; IDL>read_geolbl, 'TEST040519.PRE', ['PRODUCT_CREATION_TIME', 'AXIS_NAME'], values, info -; IDL>print, values -; 2003-10-09T17:08:48.00 (SAMPLE,GEOMETRY,LINE) -; IDL>info = long(info) -; IDL>print, 'File size = ', ((info(0)*info(1) + info(2)*info(3)*info(4)*4 ) / 1024.), 'Ko' -; File size = 16265.0Ko -; -; LIMITATIONS: -; -; MODIFICATION HISTORY: -; October 2003, Nicolas Manaud. -;- - - -PRO read_geolbl, filename, keywords, values, info - -line = ' ' -keyword = ' ' -value = ' ' - -npixel = 1 -npara = 1 -nscan = 1 - -openr, 100, filename - -nb_item = n_elements(keywords) -values = strarr(nb_item) - -max_line = 300 -nau=15000 - -for n=0,max_line-1 do begin - readf, 100, line - len=strlen(line) - if strcompress(line, /REMOVE_ALL) eq 'END' then goto, quit - i = strpos(line,' = ') - if ( i gt -1 ) then begin - keyword = strtrim(strmid(line,0,i),2) - value = strmid(line,i+3,len-i-2) - - for idx=0,nb_item-1 do if ( keywords(idx) eq keyword ) then values(idx) = value - - if keyword eq 'RECORD_BYTES' then lrec=fix(value) - if keyword eq 'LABEL_RECORDS' then nrec=fix(value) - if keyword eq 'SOLAR_DISTANCE' then nau=fix(float(value)/14960.000) - if keyword eq 'SUB_SOLAR_LONGITUDE' then slong=float(value) - if keyword eq 'SUB_SOLAR_LATITUDE' then slat=float(value) - if keyword eq 'SOLAR_LONGITUDE' then solarlong=float(value) - - if keyword eq 'CORE_ITEMS' then begin - i = strpos(value,',') - npixel = fix(strmid(value,1,i-1)) - value = strmid(value,i+1,strlen(value)-i-1) - i = strpos(value,',') - npara = fix(strmid(value,0,i)) - value = strmid(value,i+1,strlen(value)-i-1) - i = strpos(value,')') - nscan = fix(strmid(value,0,i)) - endif - endif -endfor -if(nau eq 15000) then print,'no solar distance -> 1.5 AU' - - -quit: - -info = [ lrec, nrec, npixel, npara, nscan, nau,slong,slat,solarlong] - -close,100 - -END diff --git a/omegapy/omega_routines/readcube.pro b/omegapy/omega_routines/readcube.pro deleted file mode 100644 index d171a7e..0000000 --- a/omegapy/omega_routines/readcube.pro +++ /dev/null @@ -1,188 +0,0 @@ -pro readcube, nomfic, idat, sdat0, sdat1, info - -close,3 -close,4 - -idat=0 -openr,3,nomfic,ERROR=err -line=' ' -line1=' ' -line2=' ' -line3=' ' -kax0=1 -kax1=1 -kax2=1 -sax0=0 -sax1=0 -sax2=0 -val=0 -cbyte=2 -axex=0 -axey=1 -axek=2 -info=0 -info=fltarr(6) -itype=1 ; SUN_INTEGER -orbnum=0 - -deb: - readf,3,line - len=strlen(line) - if strtrim(line,2) eq 'END' then goto, fin - i=strpos(line,' = ') - if i gt -1 then begin - line1=strtrim(strmid(line,0,i),2) - line2=strmid(line,i+3,len-i-2) - if strmid(line1,8,4) eq 'DESC' then begin - tst=byte(strmid(line2,34,1))-48 - if(tst gt 9) then tst=tst-7 - flagc=intarr(3) - flagc(*)=0 - if(tst / 8) then flagc(2)=1 - if(tst /4 AND 1) then flagc(1)=1 - if(tst /2 AND 1) then flagc(0)=1 - goto,deb - endif - if line1 eq 'RECORD_BYTES' then begin - lrec=fix(line2) - goto, deb - endif - if line1 eq 'DATA_QUALITY_ID' then begin - dqual=fix(line2) - info(5)=dqual*1.+0.001 - goto,deb - endif - if line1 eq 'LABEL_RECORDS' then begin - nrec=fix(line2) - goto, deb - endif - if line1 eq '^IMAGE' then begin - nrec=fix(line2) - nax=2 - goto, deb - endif - if line1 eq 'EXPOSURE_DURATION' then begin - line2=strtrim(line2,1) - info(0)=float(strmid(line2,1,3)) - info(1)=float(strmid(line2,5,3)) - info(2)=float(strmid(line2,9,4)) - info(0:2)=info(0:2)*flagc - goto, deb - endif - if line1 eq 'DOWNTRACK_SUMMING' then begin - info(3)=fix(line2) - goto, deb - endif - if line1 eq 'INST_CMPRS_RATE' then begin - info(4)=float(line2) - goto, deb - endif - if line1 eq 'AXES' then nax=fix(line2) - if line1 eq 'AXES_NAME' then begin - if nax eq 2 then begin - axex=0 & axek=1 - if line2 eq '(BAND,SAMPLE)' then begin - axex=1 & axek=0 - endif - endif - if nax eq 3 then begin - axex=0 & axey=2 & axek=1 - if line2 eq '(BAND,SAMPLE,LINE)' then begin - axex=1 & axey=2 & axek=0 - endif - if line2 eq '(SAMPLE,LINE,BAND)' then begin - axex=0 & axey=1 & axek=2 - endif - endif - goto, deb - endif - if line1 eq 'LINES' then kax1=fix(line2) - if line1 eq 'LINE_SAMPLES' then kax0=fix(line2) - if line1 eq 'SAMPLE_TYPE' then begin - line2=strtrim(line2,2) - if line2 eq 'VAX_INTEGER' then itype=0 - goto, deb - endif - if line1 eq 'ORBIT_NUMBER' then begin - orbnum=fix(line2) - goto, deb - endif - if line1 eq 'CORE_ITEMS' then begin - i=strpos(line2,',') - kax0=fix(strmid(line2,1,i-1)) - line2=strmid(line2,i+1,strlen(line2)-i-1) - i=strpos(line2,',') - kax1=fix(strmid(line2,0,i)) - line2=strmid(line2,i+1,strlen(line2)-i-1) - if nax gt 2 then begin - i=strpos(line2,')') - kax2=fix(strmid(line2,0,i)) - endif - goto, deb - endif - if line1 eq 'CORE_ITEM_BYTES' then cbyte=fix(line2) - if line1 eq 'SUFFIX_ITEMS' then begin - i=strpos(line2,',') - sax0=fix(strmid(line2,1,i-1)) - line2=strmid(line2,i+1,strlen(line2)-i-1) - i=strpos(line2,',') - sax1=fix(strmid(line2,0,i)) - line2=strmid(line2,i+1,strlen(line2)-i-1) - if nax gt 2 then begin - i=strpos(line2,')') - sax2=fix(strmid(line2,0,i)) - endif - endif - if line1 eq 'SUFFIX_BYTES' then sbyte=fix(line2) - endif -goto,deb -fin: -print,' core: ',kax0,kax1,kax2,' cbyte:',cbyte -print,' suffix:',sax0,sax1,sax2,' sbyte:',sbyte - -close,3 -close,4 -ilec=0 -slec=0 -idat=0 -sdat0=0 -sdat1=0 - -;ilec=intarr(kax0) -;idat=intarr(kax0,kax1,kax2) - -;sdat0=lonarr(sax0,kax1,kax2) -;sdat1=lonarr(kax0,sax1,kax2) -;slec0=long(0) -;slec1=lonarr(kax0) - -; New read, using assoc (S.E.) - C_line = Make_array(kax0, Type = 2, /nozero) ; short int - F_line = {C_line: C_line, S_line: 0L} - - If sax1 NE 0 then begin - SS_frame = reform(Make_array(kax0, sax1, Type = 3), kax0, sax1) ; long int - F_frame = {F_line:replicate(F_line,kax1), SS_frame: SS_frame} - endif else F_frame = {F_line:replicate(F_line,kax1)} - SS_frame = 0B - F_line = 0B - F_Qube= replicate(F_frame,kax2) - F_frame = 0B - openr, 3, nomfic - skip = lrec*nrec - file = assoc(3, F_Qube, skip) - element = file(0) - close, 3 - file = 0B - idat = element.F_line.C_line - sdat0 = element.F_line.S_line - If sax1 NE 0 then sdat1 = reform(element.SS_frame, kax0, sax1,kax2) - element = 0B - -if(sdat1(1,1,0) gt 255) then begin - idat=swap_endian(temporary(idat)) - sdat0=swap_endian(temporary(sdat0)) - sdat1=swap_endian(temporary(sdat1)) -endif - -end diff --git a/omegapy/omega_routines/readomega_vpy.pro b/omegapy/omega_routines/readomega_vpy.pro deleted file mode 100644 index 451a8a2..0000000 --- a/omegapy/omega_routines/readomega_vpy.pro +++ /dev/null @@ -1,419 +0,0 @@ -;SOFT09 -;+ calculs fin + solarlongi -pro readomega_vpy, nomfic0, ldat, jdat, wvl, ic, specmars, latitude, longitude, emergence, incidence, altitude, solarlongi, ut_time, geocube, temperature, saturation_c, saturation_vis - -dirsoft = '' - -openr,2,dirsoft+'omega_path' -datapath='' -geompath='' -readf,2,datapath -readf,2,geompath -close,2 -;nomfic0=' ' -;start: -;print,'OMEGA observation: ' -;read,nomfic0 - -orbnum=(byte(nomfic0))(3)-48 -if(orbnum gt 9) then orbnum=orbnum-7 -orbnum=1000*orbnum+fix(strmid(nomfic0,4,3)) -nomgeo=nomfic0+'.NAV' -nomfic0=nomfic0+'.QUB' -nomfic=datapath+nomfic0 -openr,2,nomfic,ERROR=errflag -close,2 -if (errflag ne 0) then begin - print,'file ',nomfic,' not found' - ;goto, start - goto, fin -endif -readcube, nomfic, idat, sdat0, sdat1,info -if(size(idat))(0) ne 3 then begin - print,'***** only one line in cube ',nomfic0,' ******' - goto, fin -endif -exposure=0 -exposure=info(0:2) -summation=info(3) -bits_per_data=info(4) -data_quality=fix(info(5)) -nomgeo=geompath+nomgeo - -openr,1,nomgeo,ERROR=errflag -if(errflag ne 0) then begin - print,' no corresponding NAV cube' - close,1 - dmars=1.52 - specmars=fltarr(352) - openr,2,dirsoft+'specsol_0403.dat' - readf,2,specmars - close,2 - specmars=specmars/dmars/dmars - goto, nogeom -endif -trans= !pi/180.*1.e-4 - -geocube=0B -ilec=0B - -read_geolbl,nomgeo, '', values, data - -lrec = data(0) -nrec = data(1) -npixel = data(2) -npara = data(3) -nscan = data(4) -nau = data(5) -solarlongi = data(8) -dmars=nau*1.e-4 -close,2 -openr,2,dirsoft+'specsol_0403.dat' -specmars=0B -specmars=fltarr(352) -readf,2,specmars -close,2 -specmars=specmars/dmars/dmars - -data = 0B -geocube=0B - -geocube = lonarr(npixel, npara, nscan) -ilec = lonarr(npixel) - -point_lun,1,lrec*nrec - -for k=0,nscan-1 do begin - for j=0,npara-1 do begin - readu, 1, ilec - geocube(*,j,k) = ilec - endfor -endfor -close, 1 -if(geocube(1,1,0) gt 13) then geocube=swap_endian(temporary(geocube)) -longi=reform(geocube(*,6,*)*1.e-4) -lati=reform(geocube(*,7,*)*1.e-4) -alt=reform(geocube(*,12,*)*1.e-3) -nogeom: -close,/all -; preliminary pipeline tool - -a=size(idat) -nbal=a(3) -npix=a(1) -jdat=0 -jdat=float(idat) - -fond2=intarr(256) -openr,2,dirsoft+'fond2.dat' -readf,2,fond2 -close,2 -if(exposure(1) gt 4.) then fond2=2*fond2 -fondcur=fond2(128:255)#(0.*indgen(nbal)+1.) - -jdat=0 -jdat=float(idat) -i=where(idat le 1) -if(i(0) ne -1) then jdat(i)=1.e-5 - -pix0IR=0 -i=where(idat(*,0:255,*) le 0) -if(i(0) ne -1) then pix0IR=(size(i))(3) -print,' 0 or less IR: ',pix0IR - -hkmin=min(sdat1(14,1,*)) -if(hkmin lt 6) then hkmin=6 -indj=where(sdat1(14,1,*) ge hkmin) -i6=indj(0) -indj=where(sdat1(14,1,*) ge hkmin+1) -balHK=indj(0)-i6 -indi=where(sdat1(14,1,*) ge 6 and sdat0(10,*) gt 100) -balsm=balHK*8 - -if(balHK gt 0 and nbal gt indi(0)+balsm) then begin - a=0. - b=0. - c=0. - d=0. - ndeb=indi(0) - nf=(size(indi))(1)-1 - nfin=indi(nf) - if(sdat0(26,nbal-1) lt 20) then sdat0(*,nbal-1)=sdat0(*,nbal-2) - for k=0,255 do begin - b=reform(float(sdat0(k,indi))) - a=[2*b(0)-rotate(b(0:balsm-1),2),b,2*b(nf)-rotate(b(nf-balsm+1:nf),2)] - c=(smooth(a,balsm))(balsm:balsm+nf) - d= -sdat0(k,ndeb:nbal-1)+spline(indi,c,ndeb+indgen(nbal-ndeb)) - for i=0,npix-1 do jdat(i,k,ndeb:nbal-1)= $ - jdat(i,k,ndeb:nbal-1)+d - endfor -endif - -for i=0,npix-1 do jdat(i,128:255,*)=jdat(i,128:255,*)-fondcur - -i=where(jdat lt 1.e-5) -if(i(0) ne -1) then jdat(i)=1.e-5 - -if(summation ne 1) then jdat=jdat/summation -linearC=0 -linearC=fltarr(4096) -openr,2,dirsoft+'linearC.dat' -readf,2,linearC -close,2 -jdat(*,0:127,*)=linearC(fix(jdat(*,0:127,*)+0.5)) - - -wvl=0 -wvl=fltarr(352) -openr,2,dirsoft+'lambda_0403.dat' -readf,2,wvl -close,2 - - -mtf=fltarr(352) -rap=fltarr(3,256) -bound=intarr(3,256) -openr,2,dirsoft+'boundcur.dat' -readf,2,bound -close,2 - -if(exposure(1) lt 4.) then begin - openr,2,dirsoft+'mtf120315_25.dat' - readf,2,mtf - close,2 - openr,2,dirsoft+'rapcur_25.dat' - readf,2,rap - close,2 -endif else begin - openr,2,dirsoft+'mtf120315_50.dat' - readf,2,mtf - close,2 - openr,2,dirsoft+'rapcur_50.dat' - readf,2,rap - close,2 -endelse -ib=where(orbnum gt bound(0,*)) -mtf(ib)=mtf(ib)*rap(0,ib) -ib=where(orbnum gt bound(1,*)) -if(ib(0) ge 0) then mtf(ib)=mtf(ib)*rap(1,ib) -ib=where(orbnum gt bound(2,*)) -if(ib(0) ge 0) then mtf(ib)=mtf(ib)*rap(2,ib) - -; correction voie L -rapl=fltarr(128) -openr,2,'rapmtflcur.bin' -tmp=FSTAT(2) -orbmax=tmp.size/512-1 -orbcur=orbnum -if(orbcur gt orbmax) then begin - orbcur=orbmax - print,orbcur,format='(" warning: L channel corrected as for orbit",I5)' -endif -offs=long(512)*orbcur -point_LUN,2,offs -readu,2,rapl -close,2 -mtf(128:255)=mtf(128:255)*rapl -if(exposure(1) gt 5.) then mtf(0:255)=mtf(0:255)/5.*exposure(1) - -for n=0,255 do jdat(*,n,*)=jdat(*,n,*)/mtf(n) - -ic=where(mtf lt 10000.) - -;************************************************************************************************************************** -;bit error correction -;************************************************************************************************************************** - -vis=float(idat(*,256:351,*)) -siz = size(idat) -lines = siz(3) -pixels = siz(1) -exptime = info(2)/1000. -image_ratio = fltarr(pixels, lines) - -level = 4095.*info(3) -if pixels EQ 128 then level = info(3)*4095*2. - -i=where(vis le 0) -counter_neg=0 -if(i(0) ne -1) then begin - counter_neg=(size(i))(3) - vis(i)=0.001 -endif - -i=where(vis gt level) -counter_pos=0 -if(i(0) ne -1) then begin - counter_pos=(size(i))(3) - vis(i)=level -endif -i=where(vis le level and vis gt 0.8*level) -counter_sat=0 -if(i(0) ne -1) then begin - counter_sat=(size(i))(3) - vis(i)=level*0.8 -endif - -plan3=reform(vis(*,3,*)) -counter_spike3=0 -i=where(plan3 gt 0.5*(vis(*,2,*)+vis(*,3,*))+50) -if(i(0) ne -1) then begin - counter_spike3=(size(i))(3) - plan3(i)=0.5*(reform(vis(*,2,*)+vis(*,3,*)))(i) - vis(*,3,*)=plan3 -endif - -median_line = fltarr(lines) -column = fltarr(lines) - -counter_spikes=long(0) - -if(lines lt 10) then goto, nodespike - -for k = 0, 95 do begin - for m = 0, pixels - 1 do begin - column(*) = vis(m, k, *) - median_line = median(column, 7) - for i = 0, lines-1 do begin - if (abs(median_line(i) - vis(m, k, i)) GT 200) then begin - vis(m, k, i) = median_line(i) - counter_spikes = counter_spikes + 1 - endif - endfor - endfor -endfor -nodespike: - -print, ' negative pixels VIS:', counter_neg -print, 'anomalous pixels VIS:', counter_pos -print, 'saturated pixels VIS:', counter_sat -print, ' spikes VIS:', counter_spikes - -vis = float(fix(vis)) - -;****************************************************************************************************************************** -; bias correction -;****************************************************************************************************************************** - - - -percen = 3.4e-6 -fper = 0. -pend = 5. -if npixel eq 128 then fper = 1. -if npixel eq 64 then fper = 2. -if npixel eq 32 then fper = 4. -if npixel eq 16 then fper = 8. - - - -strL1 =0. -strL2 = fltarr(96) -Strl_nc = 0. - -lv = wvl(256:*) -lft1 = linfit([lv(0), lv(95)], [percen*fper, (percen*fper) +(percen*fper)/100.*pend ]) -Strl_nc = (lv*lft1(1)+lft1(0)) - -for j = 0, lines-1 do begin - for k = 0, 96-1 do strL2(k) = total(vis(*, k, j)) - strL1 = total(vis(*, *, j)) - for i = 0, pixels -1 do begin - vis(i, *, j) = (vis(i, *, j) - 50.*strL2*percen*fper)- 0.75*strL1*strl_nc; - endfor -endfor - -;****************************************************************************************************************************** -; smear correction -;****************************************************************************************************************************** - -for i = 0, pixels-1 do begin - for n = 0, lines-1 do begin - vis(i, *, n) = smear_corr_050701( vis(i, *, n), info(2)) - - endfor -endfor - - -;****************************************************************************************************************************** -;flat cube -;****************************************************************************************************************************** - -slice = ulonarr(128, 96) - -openr, 1, dirsoft+'flatVIS050701.bin' -readu, 1, slice -close, 1 -if(slice(48,0) gt 40000) then slice=swap_endian(slice) - - -istart= (128 - pixels)/2. -iend = istart + pixels - 1 - -for i = 0, lines-1 do begin - - vis(*, *, i) = vis(*, *, i) * 2.^15 / slice(istart:iend, *) - -endfor - -;*************************************************************************************************************************** -;radiometric calibration -;*************************************************************************************************************************** - -f = 1. -if pixels eq 128 then f = 2; internal summation -f2 = 1. -if exptime eq 0.1 then f2 = 2. -if exptime eq 0.2 then f2 = 4. - -spectrum = fltarr(96) - -for i = 0, lines - 1 do begin - for m = 0, pixels - 1 do begin - spectrum = vis(m, *, i) - jdat(m, 256:351, i) = ordcorr(wvl(256:351), spectrum)/ ( f2 * mtf(256:351)) / f / summation - endfor - ;print, 'done %', 100*float(i)/(lines - 1) -endfor - -;************* -;AJOUT MATHIEU -;************* - -;useful quantities: -trans= !pi/180.*1.e-4 -ecl=reform(cos(geocube(*,2,*)*trans)) - -longitude=reform(geocube(*,6,*)*1.e-4) -latitude=reform(geocube(*,7,*)*1.e-4) -altitude=reform(geocube(*,12,*)*1.e-3) -emergence=reform(geocube(*,3,*))*1.e-4 -incidence=reform(geocube(*,2,*))*1.e-4 -ut_time=reform(geocube(*,1,*)) - -;reflectance factor calculation -ldat=jdat -for n=0,351 do ldat(*,n,*)=ldat(*,n,*)/specmars(n)/ecl(*,*) -albedo=reform(ldat(*,11,*)) -;atmospheric spectrum -atmorap=fltarr(256) -openr,2,'atmorap.dat' -readf,2,atmorap -close,2 - - -;saturation -summation=info(3) -;voie C : -;saturation_c=reform(idat(*,39,*))/summation -saturation_c=reform(idat(*,39,*)) & saturation_c(*,*)=0. -for i=0,(size(saturation_c))(1)-1 do saturation_c(i,*)=(reform(sdat0(39,*))-reform(idat(i,39,*)))/summation ;42? -;voie visible : -saturation_vis=reform(idat(*,299,*))/summation -;temperature voie C -temperature=reform(sdat1(0,2,*))*0.001 - - -fin: -close,/all -end diff --git a/omegapy/omega_routines/smear_corr_050701.pro b/omegapy/omega_routines/smear_corr_050701.pro deleted file mode 100644 index 6a8d249..0000000 --- a/omegapy/omega_routines/smear_corr_050701.pro +++ /dev/null @@ -1,33 +0,0 @@ -function smear_corr_050701, spectrum, exposure_time, smear - -smear = fltarr(96) - -spectrum1 = spectrum - -; Correction for the CCD cleaning time -ft = 0.87 -int = exposure_time - ft - -; -bands = 96 - - -; Check for saturation in the 90:95 channels -; -means = mean(spectrum1(0:84)) -for i = 85, bands - 1 do begin - if spectrum1(i) GT means then spectrum1(i) = 0 -endfor - -;; -; Smearing term -for i = 0, bands - 1 do begin - smear(i) = total(spectrum1(i:bands-1)) * ft / int / bands -endfor - - -spectrum1 = spectrum1 - smear - - -return, spectrum1 -end \ No newline at end of file diff --git a/omegapy/omega_routines/testin.pro b/omegapy/omega_routines/testin.pro deleted file mode 100644 index 33eff18..0000000 --- a/omegapy/omega_routines/testin.pro +++ /dev/null @@ -1,18 +0,0 @@ -function testin,x0,y0,x1,y1 - nb=(size(x1))(1) - x2=[x1,x1(0)] - y2=[y1,y1(0)] - dx=x2-x0 - dy=y2-y0 - atot=0. - for n=0,nb-1 do begin - ps=dx(n)*dx(n+1)+dy(n)*dy(n+1) - pv=dx(n)*dy(n+1)-dx(n+1)*dy(n) - atot=atot+atan(pv,ps) - endfor - if(abs(atot) gt 3) then goto, yes - return, 0 -yes: - return, 1 -end - diff --git a/omegapy/res_findcube/cubelist b/omegapy/res_findcube/cubelist new file mode 100644 index 0000000..515d0f7 --- /dev/null +++ b/omegapy/res_findcube/cubelist @@ -0,0 +1,68 @@ +# long: 225.000 lat: 75.000 + +# orbit x y dmin altMEx inci emer phas loct Ls MY +ORB0413_3 118 247 6.17 5038.0 65.09 50.09 30.06 9.15 34.97 27 +ORB0615_3 119 676 5.92 7939.1 53.79 75.93 67.35 10.99 60.12 27 +ORB0719_1 31 788 1.21 4412.9 65.55 30.23 77.52 17.70 72.81 27 +ORB0891_1 9 201 0.63 3208.9 54.31 8.66 62.75 14.70 93.94 27 +ORB0902_2 11 22 1.96 3058.5 54.22 8.41 62.35 14.82 95.32 27 +ORB0917_0 18 1506 2.96 5326.4 60.31 41.03 72.06 16.49 97.18 27 +ORB0928_0 2 1427 2.27 5473.6 60.12 44.47 74.74 16.54 98.55 27 +ORB0930_0 20 768 1.06 5200.1 68.06 3.55 70.62 5.51 98.80 27 +ORB0946_2 12 239 0.69 2510.1 54.17 6.82 60.52 14.57 100.81 27 +ORB0979_2 19 378 0.97 2160.5 54.22 5.60 59.21 14.37 104.97 27 +ORB0987_0 21 1573 2.69 4479.8 68.42 46.93 74.29 18.45 105.98 27 +ORB0991_0 19 1692 3.66 5528.7 75.32 51.30 79.60 20.44 106.48 27 +ORB1001_3 26 96 0.53 1953.0 54.34 4.60 58.32 14.40 107.76 27 +ORB1002_0 0 1675 18.85 5607.5 75.56 53.33 82.63 20.44 107.88 27 +ORB1007_1 29 62 0.81 3687.6 69.72 5.68 74.43 5.32 108.52 27 +ORB1012_3 30 174 0.73 1854.5 54.42 4.07 57.84 14.33 109.16 27 +ORB1021_0 9 1855 1.93 4956.4 81.13 33.89 83.04 0.62 110.30 27 +ORB1023_3 34 248 0.76 1762.2 54.50 3.55 57.44 14.26 110.57 27 +ORB1029_1 26 131 1.06 3359.5 70.41 7.05 75.92 5.19 111.33 27 +ORB1034_3 40 320 1.20 1675.0 54.65 2.86 56.99 14.20 111.98 27 +ORB1040_1 11 163 1.22 3204.8 70.79 7.78 76.68 5.12 112.75 27 +ORB1051_1 4 194 2.11 3047.4 71.17 8.51 77.27 5.06 114.16 27 +ORB1056_3 52 455 0.64 1506.5 54.90 1.61 56.03 14.06 114.81 27 +ORB1069_2 125 26 0.99 2948.6 78.76 7.86 73.73 2.93 116.49 27 +ORB1157_1 100 29 1.22 2026.6 82.36 3.59 80.95 2.57 128.09 27 +ORB2534_1 112 599 4.40 7520.1 85.77 31.17 57.08 8.10 350.16 27 +ORB2593_1 42 500 2.56 9321.6 76.42 20.37 68.68 10.73 358.58 27 +ORB2619_1 11 667 4.28 10071.9 75.07 29.69 71.32 13.04 2.21 28 +ORB2672_0 57 207 5.21 10763.2 87.41 40.65 71.17 18.26 9.38 28 +ORB2673_1 110 441 2.52 10225.9 82.25 17.09 67.52 6.91 9.64 28 +ORB2675_0 15 108 1.93 10481.4 72.82 29.35 74.17 13.87 9.78 28 +ORB2690_0 31 649 2.00 10264.7 79.37 32.37 75.15 16.22 11.82 28 +ORB2700_0 20 789 0.85 10084.0 72.42 10.09 73.51 9.70 13.16 28 +ORB2740_1 79 404 1.59 9109.7 74.75 2.87 74.92 8.20 18.51 28 +ORB2752_1 16 740 1.01 8321.4 71.34 21.93 79.06 14.83 20.10 28 +ORB2766_1 28 482 5.09 8450.0 67.13 11.52 77.91 10.58 21.94 28 +ORB2767_1 54 783 4.17 7854.4 78.40 24.67 76.07 17.09 22.07 28 +ORB2769_1 119 386 2.84 8653.6 80.83 10.42 71.49 6.19 22.33 28 +ORB2800_1 73 556 3.33 5702.6 78.44 10.88 77.03 17.57 26.38 28 +ORB2839_1 6 483 1.69 6038.4 67.54 18.12 77.30 8.92 31.41 28 +ORB2879_1 95 193 2.73 5426.8 73.48 18.83 71.36 6.77 36.51 28 +ORB2905_1 15 243 0.83 4821.9 64.67 19.10 75.67 8.88 39.79 28 +ORB2956_0 30 1350 1.16 4727.1 71.27 6.01 71.10 6.12 46.17 28 +ORB2972_2 9 179 1.86 2573.1 62.77 7.32 69.95 15.44 48.17 28 +ORB2978_0 20 2561 2.26 4632.0 70.77 2.29 72.74 6.18 48.91 28 +ORB3000_1 49 116 1.95 4292.9 70.23 3.36 73.46 6.32 51.63 28 +ORB3027_3 22 56 0.64 2012.4 60.32 5.16 65.21 15.30 54.97 28 +ORB3062_1 120 79 1.22 3440.1 76.65 9.07 68.67 3.93 59.27 28 +ORB3077_1 7 143 2.05 3131.6 68.58 8.25 75.70 6.03 61.11 28 +ORB3117_2 107 101 1.43 2763.2 75.75 6.75 70.46 3.81 66.01 28 +ORB3137_0 50 3215 0.72 1211.4 56.27 2.48 54.16 14.71 68.45 28 +ORB3183_0 55 695 0.77 2091.9 75.22 3.47 72.94 3.61 74.08 28 +ORB3192_2 61 1812 0.28 945.0 54.66 8.62 48.24 14.52 75.18 28 +ORB3260_0 0 355 0.52 1484.9 75.08 2.43 76.56 3.33 83.51 28 +ORB5344_1 20 1401 0.39 592.1 61.34 0.21 61.15 13.70 38.67 29 +ORB5418_0 27 231 0.43 912.7 83.46 2.11 82.64 2.56 48.10 29 +ORB5454_0 4 253 0.12 772.2 82.61 0.72 82.98 2.34 52.64 29 +ORB6020_1 40 1696 0.95 8598.9 69.93 71.91 66.43 6.05 124.66 29 +ORB6038_1 20 1587 1.48 9955.0 69.66 75.91 71.06 6.25 127.10 29 +ORB6238_4 7 246 1.27 2698.9 78.73 3.59 82.26 17.75 155.49 29 +ORB7750_0 31 1138 1.10 381.4 89.10 0.73 88.38 0.19 39.53 30 +ORB7791_1 35 516 5.12 4079.1 57.82 87.49 35.87 11.75 44.81 30 +ORB8442_0 63 510 4.36 4544.0 69.63 4.36 65.49 17.82 129.51 30 +ORB8470_4 40 1112 1.64 4940.5 65.87 2.08 67.69 15.99 133.45 30 +ORB8695_0 6 657 0.75 9929.6 70.95 7.98 78.93 13.78 167.09 30 diff --git a/omegapy/useful_functions.py b/omegapy/useful_functions.py index 877b049..ca76b8e 100644 --- a/omegapy/useful_functions.py +++ b/omegapy/useful_functions.py @@ -3,7 +3,7 @@ ## useful_functions.py ## Created by Aurélien STCHERBININE -## Last modified by Aurélien STCHERBININE : 24/04/2020 +## Last modified by Aurélien STCHERBININE : 06/10/2020 ##----------------------------------------------------------------------------------- """Useful generics functions. @@ -21,7 +21,6 @@ import scipy.constants as const import glob - ##----------------------------------------------------------------------------------- ## Ajustement def f_lin(x, a, b): @@ -41,7 +40,7 @@ def f_lin(x, a, b): """ return a*x + b -def reg_lin(X, Y): +def reg_lin(X, Y, **kwargs): """Renvoie le résultat de la régression linéaire ( f(x) = a*x + b ) sur les valeurs en entrée. @@ -51,6 +50,8 @@ def reg_lin(X, Y): The X-values. Y : ndarray The Y-values. + **kwargs + Optional keyword arguments to pass to the scipy.optimize.curve_fit function. Returns ======= @@ -59,7 +60,7 @@ def reg_lin(X, Y): b : float Origin ordinate of the fitted line. """ - a, b = curve_fit(f_lin, X, Y)[0] + a, b = curve_fit(f_lin, X, Y, **kwargs)[0] return a, b def planck(lam, T): @@ -122,6 +123,24 @@ def degre2(x, a, b, c): """ return a*x*x + b*x + c +def degre3(x, a, b, c, d): + """Polynôme d'ordre 3. + + Parameters + ========== + x : array-like or float + a : float + b : float + c : float + d : float + + Returns + ======= + y : float + y = a*x**3 + b*x**2 + c*x + d + """ + return a*x*x*x + b*x*x + c*x + d + ##----------------------------------------------------------------------------------- ## Filtrage def filtre_median(sp, n): diff --git a/requirements.txt b/requirements.txt index c56e237..f40b8e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ numpy>=1.17 matplotlib>=3.0 tqdm>=4.31 -pidly>=0.2 scipy>=1.3 pandas>=0.25 diff --git a/setup.py b/setup.py index a704ad8..9efcb61 100644 --- a/setup.py +++ b/setup.py @@ -6,12 +6,12 @@ requirements = f.read().strip('\n').split('\n') package_data = { - '': ['OMEGA_dataref/*', 'omega_routines/*'], + '': ['OMEGA_dataref/*', 'res_findcube/*'], } setuptools.setup( name='omegapy', - version='1.4.2', + version='2.0', author='Aurélien Stcherbinine', author_email='aurelien.stcherbinine@ias.u-psud.fr', description='Python tools for OMEGA/MEx observations analysis',