diff --git a/docs/doc.md b/docs/doc.md index ac3a33c..f36191a 100644 --- a/docs/doc.md +++ b/docs/doc.md @@ -4,7 +4,7 @@ Importation and correction of OMEGA/MEx observations from binaries files. -`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True)` +`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True, disp=True)` `find_cube(lon0, lat0, cmin=0, cmax=10000, out=False)` @@ -73,9 +73,9 @@ Display of OMEGAdata cubes. `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)` +`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)` -`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='')` +`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, negative_values=False, sav_filename='auto', ext='', base_folder='../data/OMEGA/sav_map_list_v2/', sub_folder='')` `load_map_omega_list(filename)` diff --git a/docs/doc_omega_data.md b/docs/doc_omega_data.md index 6056d74..bb2c3de 100644 --- a/docs/doc_omega_data.md +++ b/docs/doc_omega_data.md @@ -4,7 +4,7 @@ Importation and correction of OMEGA/MEx observations from binaries files. -`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True)` +`class OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True, disp=True)` `find_cube(lon0, lat0, cmin=0, cmax=10000, out=False)` @@ -61,7 +61,7 @@ Importation and correction of OMEGA/MEx observations from binaries files. ### OMEGAdata class ~~~python -class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True): +class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_path, corrV=True, corrL=True, disp=True): Importation of OMEGA/MEx observation. Parameters @@ -77,6 +77,10 @@ class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_pat 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). + disp : bool, optional (default True) + Enable or disable the display of informations during the file reading. + | True -> Enable display. + Attributes ========== @@ -178,8 +182,8 @@ class omegapy.omega_data.OMEGAdata(obs='', empty=False, data_path=_omega_bin_pat | False -> No atmospheric correction. atm_corr_infos : dict Information about the atmospheric correction (date, method). - version : float - The version of the omegapy.omega_data.py file used. + version : int + The major release version of the omegapy.omega_data.py file used. add_infos : str Additional informations about the observation. Show in the OMEGAdata representation. @@ -237,7 +241,7 @@ omegapy.omega_data.autosave_omega(omega, folder='auto', base_folder=_omega_py_pa The OMEGA/MEx observation object. folder : str, optional (default 'auto') The subfolder to save the data. - | If 'auto' -> folder = 'vX.X', where X.X is the Version of the current code. + | If 'auto' -> folder = 'vX', where X is the major release version of the used code. base_folder : str, optional (default _omega_py_path) The base folder path. security : bool, optional (default True) @@ -262,7 +266,7 @@ omegapy.omega_data.autoload_omega(obs_name, folder='auto', version=_Version, bas The observation ID. folder : str, optional (default 'auto') The subfolder where the data is. - | If 'auto' -> folder = 'vX.X', where X.X is the given value of code version. + | If 'auto' -> folder = 'vX', where X is the major release version of the used code. version : float, optional (default _Version) The version of the target file (if folder is 'auto'). base_folder : str, optional (default _omega_py_path) @@ -489,7 +493,7 @@ omegapy.omega_data.corr_save_omega(obsname, folder='auto', base_folder=_omega_py The name of the OMEGA observation. folder : str, optional (default 'auto') The subfolder to save the data. - | If 'auto' -> folder = 'vX.X', where X.X is the OMEGAdata version. + | If 'auto' -> folder = 'vX.X', where X.X is the given value of code version. base_folder : str, optional (default _omega_py_path) The base folder path. security : bool, optional (default True) diff --git a/docs/doc_omega_plots.md b/docs/doc_omega_plots.md index 602e0bb..bbf9b90 100644 --- a/docs/doc_omega_plots.md +++ b/docs/doc_omega_plots.md @@ -14,9 +14,9 @@ Display of OMEGAdata cubes. `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)` +`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)` -`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='')` +`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, negative_values=False, sav_filename='auto', ext='', base_folder='../data/OMEGA/sav_map_list_v2/', sub_folder='')` `load_map_omega_list(filename)` @@ -286,8 +286,8 @@ omegapy.omega_plots.show_data_v2(omega, data, cmap='viridis', vmin=None, vmax=No omegapy.omega_plots.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): + data_list=None, mask_list=None, negative_values=False, 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. Parameters @@ -332,6 +332,8 @@ omegapy.omega_plots.show_omega_list_v2(omega_list, lam=1.085, lat_min=-90, lat_m 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. + negative_values : bool, optional (default False) + Set if the negative values are considered as relevant data or not. plot : bool, optional (default True) If True -> Diplay the final figure. grid : bool, optional (default True) @@ -363,9 +365,9 @@ omegapy.omega_plots.show_omega_list_v2(omega_list, lam=1.085, lat_min=-90, lat_m ~~~python omegapy.omega_plots.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=''): - Save the output of the omega_plots.show_omega_list_v2() function with the requested + mask_list=None, negative_values=False, 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 @@ -396,13 +398,18 @@ omegapy.omega_plots.save_map_omega_list(omega_list, lat_min=-90, lat_max=90, lon 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. + negative_values : bool, optional (default False) + Set if the negative values are considered as relevant data or not. 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" ~~~ ~~~python diff --git a/omegapy/omega_data.py b/omegapy/omega_data.py index 6092b74..4f9f39e 100644 --- a/omegapy/omega_data.py +++ b/omegapy/omega_data.py @@ -1522,7 +1522,7 @@ def autosave_omega(omega, folder='auto', base_folder=_omega_py_path, security=Tr The OMEGA/MEx observation object. folder : str, optional (default 'auto') The subfolder to save the data. - | If 'auto' -> folder = 'vX.X', where X.X is the Version of the current code. + | If 'auto' -> folder = 'vX', where X is the major release version of the used code. base_folder : str, optional (default _omega_py_path) The base folder path. security : bool, optional (default True) @@ -1546,7 +1546,7 @@ def autosave_omega(omega, folder='auto', base_folder=_omega_py_path, security=Tr suff = '' savname = '{name}{suff}.pkl'.format(name=omega.name, suff=suff) if folder == 'auto': - folder = 'v' + str(omega.version) + folder = 'v' + str(int(omega.version)) # Chemin sav fichier target_path = os.path.join(base_folder, folder, savname) # Testing existent file