Skip to content

Commit

Permalink
update doc to v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AStcherbinine committed Feb 15, 2021
1 parent 4452281 commit 94ad89a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
6 changes: 3 additions & 3 deletions docs/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`

Expand Down Expand Up @@ -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)`

Expand Down
18 changes: 11 additions & 7 deletions docs/doc_omega_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`

Expand Down Expand Up @@ -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
Expand All @@ -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
==========
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
25 changes: 16 additions & 9 deletions docs/doc_omega_plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions omegapy/omega_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 94ad89a

Please sign in to comment.