From 192a54bffed93af3b66fa64a79c5b33fc6278827 Mon Sep 17 00:00:00 2001 From: aurelien stcherbinine Date: Sat, 6 Mar 2021 19:36:49 +0100 Subject: [PATCH] update to version 2.2 --- README.md | 6 ++-- docs/doc.md | 12 ++++--- docs/doc_omega_data.md | 36 ++++++++++++++++++++- docs/doc_omega_plots.md | 22 ++++++++----- docs/doc_useful_functions.md | 2 +- omegapy/omega_data.py | 61 ++++++++++++++++++++++++++++++++---- omegapy/omega_plots.py | 30 ++++++++++++------ setup.py | 2 +- 8 files changed, 138 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 93a0794..76c90c9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -![version](https://img.shields.io/badge/version-2.1-blue) -![pythonversion](https://img.shields.io/badge/Python-3.7-blue) +![version](https://img.shields.io/badge/version-2.2-blue) +![pythonversion](https://img.shields.io/badge/Python-3.7+-blue) # OMEGA-Py : Python tools for OMEGA data @@ -34,7 +34,7 @@ export OMEGA_PY_PATH="/data/mex-omegj/data1/omega_python/omegapy/" ~~~ *Adapt the path if needed, here is the default configuration for internal IAS use on the server.* -## Usage +## Basic usage ~~~python # package importation import omegapy.omega_data as od diff --git a/docs/doc.md b/docs/doc.md index f36191a..9333f93 100644 --- a/docs/doc.md +++ b/docs/doc.md @@ -1,4 +1,4 @@ -# OMEGA-Py documentation - v2.0 +# OMEGA-Py documentation - v2.2 ## [`omegapy.omega_data`](doc_omega_data.md) @@ -6,6 +6,10 @@ Importation and correction of OMEGA/MEx observations from binaries files. `class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True, disp=True)` +`OMEGAdata.get_header_qub(data_path=_omega_bin_path)` + +`OMEGAdata.get_header_nav(data_path=_omega_bin_path)` + `find_cube(lon0, lat0, cmin=0, cmax=10000, out=False)` `autosave_omega(omega, folder='auto', base_folder=_omega_py_path, security=True, disp=True)` @@ -65,13 +69,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, mask=None, negatives_longitudes='auto')` +`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', **kwargs)` `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='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_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', **kwargs)` -`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_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', **kwargs)` `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, negative_values=False, plot=True, grid=True, out=False, negatives_longitudes=False, **kwargs)` diff --git a/docs/doc_omega_data.md b/docs/doc_omega_data.md index bb2c3de..722e8f4 100644 --- a/docs/doc_omega_data.md +++ b/docs/doc_omega_data.md @@ -1,4 +1,4 @@ -# OMEGA-Py documentation - v2.0 +# OMEGA-Py documentation - v2.2 ## `omegapy.omega_data` @@ -6,6 +6,10 @@ Importation and correction of OMEGA/MEx observations from binaries files. `class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True, disp=True)` +`OMEGAdata.get_header_qub(data_path=_omega_bin_path)` + +`OMEGAdata.get_header_nav(data_path=_omega_bin_path)` + `find_cube(lon0, lat0, cmin=0, cmax=10000, out=False)` `autosave_omega(omega, folder='auto', base_folder=_omega_py_path, security=True, disp=True)` @@ -199,6 +203,36 @@ class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_pat __eq__(self, other) __repr__(self) + + get_header_qub(self, data_path=_omega_bin_path) + Return the data from the header of the .QUB file, as a dictionary. + + See the OMEGA ECAID for informations about the header entries. + + Parameters + ========== + data_path : str, optional (default _omega_py_path) + The path of the directory containing the data (.QUB) files. + + Returns + ======= + hd_qub : dict + Dictionary containing the data from the ORBXXXX_X.QUB file. + + get_header_nav(self, data_path=_omega_bin_path) + Return the data from the header of the .NAV file, as a dictionary. + + See the OMEGA ECAID for informations about the header entries. + + Parameters + ========== + data_path : str, optional (default _omega_py_path) + The path of the directory containing the navigation (.NAV) files. + + Returns + ======= + hd_nav : dict + Dictionary containing the data from the ORBXXXX_X.NAV file. ~~~ ### Observation search diff --git a/docs/doc_omega_plots.md b/docs/doc_omega_plots.md index bbf9b90..dfc88c7 100644 --- a/docs/doc_omega_plots.md +++ b/docs/doc_omega_plots.md @@ -1,4 +1,4 @@ -# OMEGA-Py documentation - v2.0 +# OMEGA-Py documentation - v2.2 ## `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, mask=None, negatives_longitudes='auto')` +`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', **kwargs)` `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='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_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', **kwargs)` -`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_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', **kwargs)` `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, negative_values=False, plot=True, grid=True, out=False, negatives_longitudes=False, **kwargs)` @@ -64,7 +64,8 @@ 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, mask=None, negatives_longitudes='auto'): + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto', + **kwargs): Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -113,6 +114,8 @@ omegapy.omega_plots.show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Gre | True -> longitudes between 0° and 360°. | False -> longitudus between -180° and 180°. | 'auto' -> automatic detection of the best case. + **kwargs: + Optional arguments for the plt.pcolormesh() function. ~~~ ### Display cube interactive version @@ -158,7 +161,7 @@ omegapy.omega_plots.show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_un 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'): + negatives_longitudes='auto', **kwargs): 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. @@ -226,6 +229,8 @@ omegapy.omega_plots.show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_un | True -> longitudes between 0° and 360°. | False -> longitudus between -180° and 180°. | 'auto' -> automatic detection of the best case. + **kwargs: + Optional arguments for the plt.pcolormesh() function. ~~~ ### Display derived high-level data map from OMEGA observation @@ -233,7 +238,8 @@ omegapy.omega_plots.show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_un ~~~python 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, mask=None, negatives_longitudes='auto'): + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto', + **kwargs): 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. @@ -278,6 +284,8 @@ omegapy.omega_plots.show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=No | True -> longitudes between 0° and 360°. | False -> longitudus between -180° and 180°. | 'auto' -> automatic detection of the best case. + **kwargs: + Optional arguments for the plt.pcolormesh() function. ~~~ ### Display composite map of several OMEGA observations, sample on a lat/lon grid diff --git a/docs/doc_useful_functions.md b/docs/doc_useful_functions.md index d4b2a11..92539b2 100644 --- a/docs/doc_useful_functions.md +++ b/docs/doc_useful_functions.md @@ -1,4 +1,4 @@ -# OMEGA-Py documentation - v2.0 +# OMEGA-Py documentation - v2.2 ## `omegapy.useful_functions` diff --git a/omegapy/omega_data.py b/omegapy/omega_data.py index 4f9f39e..cdffe70 100644 --- a/omegapy/omega_data.py +++ b/omegapy/omega_data.py @@ -3,7 +3,7 @@ ## omega_data.py ## Created by Aurélien STCHERBININE -## Last modified by Aurélien STCHERBININE : 15/02/2021 +## Last modified by Aurélien STCHERBININE : 06/03/2021 ##---------------------------------------------------------------------------------------- """Importation and correction of OMEGA/MEx observations from binaries files. @@ -34,7 +34,7 @@ # Name of the current file _py_file = 'omega_data.py' -_Version = 2.1 +_Version = 2.2 # Path of the package files package_path = os.path.abspath(os.path.dirname(__file__)) @@ -687,6 +687,8 @@ def ordcorr(lam, sp): saturation_vis = idat[:, 299, :] / summation # Temperature voie C temperature = sdat1[0, 2, :] * 0.001 + # Temperature voie L + # temperature = sdat1[1, 2, :] * 0.001 #-------------------------- # Output data @@ -947,7 +949,7 @@ def __init__(self, obs='', empty=False, data_path=_omega_bin_path, corrV=True, c 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) + Y, M, D, h, m, s = np.median(utc[:,:6], axis=0).astype(np.int64) utc_dt = datetime.datetime(Y, M, D, h, m, s) # Longitude pixels grid ny, nx = lon.shape @@ -1194,6 +1196,44 @@ def __repr__(self): \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 + + def get_header_qub(self, data_path=_omega_bin_path): + """Return the data from the header of the .QUB file, as a dictionary. + + See the OMEGA ECAID for informations about the header entries. + + Parameters + ========== + data_path : str, optional (default _omega_py_path) + The path of the directory containing the data (.QUB) files. + + Returns + ======= + hd_qub : dict + Dictionary containing the data from the ORBXXXX_X.QUB file. + """ + qub_path = os.path.join(data_path, self.name+'.QUB') + hd_qub = _read_header(qub_path) + return hd_qub + + def get_header_nav(self, data_path=_omega_bin_path): + """Return the data from the header of the .NAV file, as a dictionary. + + See the OMEGA ECAID for informations about the header entries. + + Parameters + ========== + data_path : str, optional (default _omega_py_path) + The path of the directory containing the navigation (.NAV) files. + + Returns + ======= + hd_nav : dict + Dictionary containing the data from the ORBXXXX_X.NAV file. + """ + nav_path = os.path.join(data_path, self.name+'.NAV') + hd_nav = _read_header(nav_path) + return hd_nav ##----------------------------------------------------------------------------------- ## Recherche observation @@ -1401,12 +1441,20 @@ class F_Qube_nav(ctypes.Structure): 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) + possible_geom_corruption = False + try: + Y, M, D, h, m, s = geocube[:6, 1, j0] + utc_dt = datetime.datetime(Y, M, D, h, m, s) + except: # Possible corruption of some geometry lines + Y, M, D, h, m, s = np.median(geocube[:6, 1, :], axis=1).astype(np.int64) + utc_dt = datetime.datetime(Y, M, D, h, m, s) + possible_geom_corruption = True 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) + if possible_geom_corruption: + obs_output = '\033[3m' + obs_output + '\033[0m' print(obs_output) with open(path_cubliste, 'a') as f_cublist: @@ -1606,7 +1654,8 @@ def autoload_omega(obs_name, folder='auto', version=_Version, base_folder=_omega excl.append('atm') filename = '*{name}*{corr_ext}*.pkl'.format(name=obs_name, corr_ext=ext) if folder == 'auto': - folder = 'v' + str(int(version)) + Mversion = int(version) + folder = 'v' + str(Mversion) filename2 = uf.myglob(os.path.join(base_folder, folder, filename), exclude=excl) if filename2 is None: if (therm_corr in [None, False]) and (atm_corr in [None, False]): diff --git a/omegapy/omega_plots.py b/omegapy/omega_plots.py index 0ff88fd..971dba5 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 : 15/02/2021 +## Last modified by Aurélien STCHERBININE : 06/03/2021 ##---------------------------------------------------------------------------------------- """Display of OMEGAdata cubes. @@ -124,7 +124,8 @@ 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, mask=None, negatives_longitudes='auto'): + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto', + **kwargs): """Display an OMEGA/MEx observation with respect of the lat/lon coordinates of the pixels, and allows to use a polar projection if desired. @@ -173,6 +174,8 @@ def show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None | True -> longitudes between 0° and 360°. | False -> longitudus between -180° and 180°. | 'auto' -> automatic detection of the best case. + **kwargs: + Optional arguments for the plt.pcolormesh() function. """ if ((lam_unit == 'm') or isinstance(lam, float)) and (lam < 10): i_lam = uf.where_closer(lam, omega.lam) @@ -200,7 +203,7 @@ def show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None if polar: ax = plt.axes(polar=True) plt.pcolormesh(omega.lon_grid*np.pi/180, omega.lat_grid, cube_map, cmap=cmap, - alpha=alpha, vmin=vmin, vmax=vmax) + alpha=alpha, vmin=vmin, vmax=vmax, **kwargs) ax.set_yticklabels([]) # remove the latitude values in the plot if latlim[0] is None: if np.max(omega.lat) > 0: @@ -219,7 +222,7 @@ def show_omega_v2(omega, lam, refl=True, lam_unit='m', cmap='Greys_r', vmin=None 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) + vmin=vmin, vmax=vmax, **kwargs) plt.gca().axis('equal') plt.xlim(lonlim) plt.ylim(latlim) @@ -528,7 +531,7 @@ def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=Non 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'): + negatives_longitudes='auto', **kwargs): """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. @@ -596,6 +599,8 @@ def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=Non | True -> longitudes between 0° and 360°. | False -> longitudus between -180° and 180°. | 'auto' -> automatic detection of the best case. + **kwargs: + Optional arguments for the plt.pcolormesh() function. """ # Initialisation if refl: @@ -632,10 +637,12 @@ def show_omega_interactif_v2(omega, lam=1.085, refl=True, lam_unit='m', data=Non 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, mask, negatives_longitudes) + lonlim, latlim, nfig, polar, cbar, grid, mask, negatives_longitudes, + **kwargs) else: show_data_v2(omega, data, cmap, vmin, vmax, alpha, title, cb_title, - lonlim, latlim, nfig, polar, cbar, grid, mask, negatives_longitudes) + lonlim, latlim, nfig, polar, cbar, grid, mask, negatives_longitudes, + **kwargs) ax1 = fig1.gca() ax1.scatter(lon, lat, c=bij, marker='s', s=1, picker=True, alpha=0) sc_pos = [] @@ -736,7 +743,8 @@ def change_pos(event): ## 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'): + polar=False, cbar=True, grid=True, mask=None, negatives_longitudes='auto', + **kwargs): """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. @@ -781,6 +789,8 @@ def show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=None, alpha=None, | True -> longitudes between 0° and 360°. | False -> longitudus between -180° and 180°. | 'auto' -> automatic detection of the best case. + **kwargs: + Optional arguments for the plt.pcolormesh() function. """ if isinstance(negatives_longitudes, str): mask_lat = (np.abs(omega.lat) < 85) @@ -795,7 +805,7 @@ def show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=None, alpha=None, if polar: ax = plt.axes(polar=True) plt.pcolormesh(omega.lon_grid*np.pi/180, omega.lat_grid, data, cmap=cmap, - alpha=alpha, vmin=vmin, vmax=vmax) + alpha=alpha, vmin=vmin, vmax=vmax, **kwargs) ax.set_yticklabels([]) # remove the latitude values in the plot if latlim[0] is None: if np.max(omega.lat) > 0: @@ -814,7 +824,7 @@ def show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=None, alpha=None, 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) + vmin=vmin, vmax=vmax, **kwargs) plt.gca().axis('equal') plt.xlim(lonlim) plt.ylim(latlim) diff --git a/setup.py b/setup.py index bc236d5..d3e43cf 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setuptools.setup( name='omegapy', - version='2.1', + version='2.2', author='Aurélien Stcherbinine', author_email='aurelien.stcherbinine@ias.u-psud.fr', description='Python tools for OMEGA/MEx observations analysis',